BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcLayer Class Reference

#include <MdcLayer.h>

Public Member Functions

 MdcLayer (int lay, int nwir, MdcSWire **wires, const MdcDetector &theDet)
 
 ~MdcLayer ()
 
void print (std::ostream &o) const
 
bool exist (void) const
 
int view (void) const
 
int layNum (void) const
 
int nWires (void) const
 
int superLayer (void) const
 
int subLayer (void) const
 
double cellHeight (void) const
 
double stDip (void) const
 
double zEnd (void) const
 
double rMid (void) const
 
double rEnd (void) const
 
double rIn (void) const
 
double rOut (void) const
 
double stereo (void) const
 
double dPhiz (void) const
 
double zLength (void) const
 
double sag (void) const
 
double phiOffset (void) const
 
double phiEPOffset (void) const
 
double dPhizDC (double z) const
 
double radiusDC (double z) const
 
MdcSWiregetWire (int wire) const
 
double phiWireDC (int cell, double z) const
 
double phiWire (int cell) const
 
double xWire (int cell) const
 
double yWire (int cell) const
 
double dPhi (void) const
 
double cellWidth (void) const
 
double cellWidth (double z) const
 
const TrajectorymakeHitTrajInGlobalCoords (int wire, double z=0) const
 
void View (int v)
 
void setCellHeight (double height)
 
 MdcLayer (int lay, int nwir, MdcSWire **wires, const MdcDetector &theDet)
 
 ~MdcLayer ()
 
void print (std::ostream &o) const
 
bool exist (void) const
 
int view (void) const
 
int layNum (void) const
 
int nWires (void) const
 
int superLayer (void) const
 
int subLayer (void) const
 
double cellHeight (void) const
 
double stDip (void) const
 
double zEnd (void) const
 
double rMid (void) const
 
double rEnd (void) const
 
double rIn (void) const
 
double rOut (void) const
 
double stereo (void) const
 
double dPhiz (void) const
 
double zLength (void) const
 
double sag (void) const
 
double phiOffset (void) const
 
double phiEPOffset (void) const
 
double dPhizDC (double z) const
 
double radiusDC (double z) const
 
MdcSWiregetWire (int wire) const
 
double phiWireDC (int cell, double z) const
 
double phiWire (int cell) const
 
double xWire (int cell) const
 
double yWire (int cell) const
 
double dPhi (void) const
 
double cellWidth (void) const
 
double cellWidth (double z) const
 
const TrajectorymakeHitTrajInGlobalCoords (int wire, double z=0) const
 
void View (int v)
 
void setCellHeight (double height)
 

Detailed Description

Constructor & Destructor Documentation

◆ MdcLayer() [1/2]

MdcLayer::MdcLayer ( int  lay,
int  nwir,
MdcSWire **  wires,
const MdcDetector theDet 
)

Definition at line 9 of file MdcLayer.cxx.

10 : _mdcDet(theDet), _exist(1), _layer(lay), _nwires(nwir),
11 _wires(wires)
12{
13 if (_nwires == 0) _exist = 0;
14 // set pointer to layer for wires
15 for (int wire=0; wire<_nwires; wire++) {
16 getWire(wire)->setLayerPtr(this);
17// _cells.push_back(buildCell(wire));
18 }
19
20 // get nominal values from wire # 0
21 _rend = wires[0]->rEnd();
22 _rmid = wires[0]->rMid();
23 _stdip = _rend - _rmid;
24 // in the local (DC) system frame
25 _zend = wires[0]->zEndDC();
26 _stereo = wires[0]->stereo();
27 // half twist angle
28 _delphi = wires[0]->dPhiz();
29 // stereo view
30 if((_layer>=0 && _layer<=7)||(_layer>=20&&_layer<=35)){
31 _view = (int)(_stereo/(fabs(_stereo)));
32 } else {
33 _view = 0;
34 }
35 _phiOffset = wires[0]->phiE();
36}
MdcSWire * getWire(int wire) const
void setLayerPtr(const MdcLayer *lay)

◆ ~MdcLayer() [1/2]

MdcLayer::~MdcLayer ( )
inline

Definition at line 22 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

22{};

◆ MdcLayer() [2/2]

MdcLayer::MdcLayer ( int  lay,
int  nwir,
MdcSWire **  wires,
const MdcDetector theDet 
)

◆ ~MdcLayer() [2/2]

MdcLayer::~MdcLayer ( )
inline

Member Function Documentation

◆ cellHeight() [1/2]

double MdcLayer::cellHeight ( void  ) const
inline

Definition at line 33 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

33{ return _cellHeight; }

Referenced by rIn(), and rOut().

◆ cellHeight() [2/2]

double MdcLayer::cellHeight ( void  ) const
inline

Definition at line 33 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

33{ return _cellHeight; }

◆ cellWidth() [1/4]

double MdcLayer::cellWidth ( double  z) const
inline

Definition at line 66 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

66{ return dPhi()*radiusDC(z)*cos(stereo()); }
double cos(const BesAngle a)

◆ cellWidth() [2/4]

double MdcLayer::cellWidth ( double  z) const
inline

◆ cellWidth() [3/4]

double MdcLayer::cellWidth ( void  ) const
inline

Definition at line 64 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

64{ return dPhi()*rMid()*cos(stereo()); }

Referenced by print().

◆ cellWidth() [4/4]

double MdcLayer::cellWidth ( void  ) const
inline

◆ dPhi() [1/2]

double MdcLayer::dPhi ( void  ) const
inline

◆ dPhi() [2/2]

double MdcLayer::dPhi ( void  ) const
inline

◆ dPhiz() [1/2]

double MdcLayer::dPhiz ( void  ) const
inline

Definition at line 43 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

43{ return _delphi; }

Referenced by print().

◆ dPhiz() [2/2]

double MdcLayer::dPhiz ( void  ) const
inline

Definition at line 43 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

43{ return _delphi; }

◆ dPhizDC() [1/2]

double MdcLayer::dPhizDC ( double  z) const
inline

Definition at line 50 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

50{ return phiWireDC(0, z); }
double phiWireDC(int cell, double z) const
Definition: MdcLayer.cxx:74

Referenced by print().

◆ dPhizDC() [2/2]

double MdcLayer::dPhizDC ( double  z) const
inline

◆ exist() [1/2]

bool MdcLayer::exist ( void  ) const
inline

Definition at line 27 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

27{ return _exist; }

◆ exist() [2/2]

bool MdcLayer::exist ( void  ) const
inline

Definition at line 27 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

27{ return _exist; }

◆ getWire() [1/2]

◆ getWire() [2/2]

MdcSWire * MdcLayer::getWire ( int  wire) const
inline

Definition at line 52 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

52{ return _wires[wire]; }

◆ layNum() [1/2]

int MdcLayer::layNum ( void  ) const
inline

◆ layNum() [2/2]

int MdcLayer::layNum ( void  ) const
inline

Definition at line 29 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

29{ return _layer; }

◆ makeHitTrajInGlobalCoords() [1/2]

const Trajectory * MdcLayer::makeHitTrajInGlobalCoords ( int  wire,
double  z = 0 
) const

Definition at line 132 of file MdcLayer.cxx.

133{
134 if ( wire >= 0 && wire < nWires() ) {
135 return getWire(wire)->getTraj();
136 } else {
137 std::cout << "Error In makeHitTrajInGlobalCoords: wrong cell # "<< wire << "\n"
138 <<" number of cells in this layer is " << nWires() << std::endl;
139 return getWire(0)->getTraj();
140 }
141}
const MdcSagTraj * getTraj(void) const

Referenced by MdcHit::hitTraj().

◆ makeHitTrajInGlobalCoords() [2/2]

const Trajectory * MdcLayer::makeHitTrajInGlobalCoords ( int  wire,
double  z = 0 
) const

◆ nWires() [1/2]

◆ nWires() [2/2]

int MdcLayer::nWires ( void  ) const
inline

Definition at line 30 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

30{ return _nwires; }

◆ phiEPOffset() [1/2]

double MdcLayer::phiEPOffset ( void  ) const
inline

Definition at line 49 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

49{ return _phiOffset; }

Referenced by print().

◆ phiEPOffset() [2/2]

double MdcLayer::phiEPOffset ( void  ) const
inline

Definition at line 49 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

49{ return _phiOffset; }

◆ phiOffset() [1/2]

double MdcLayer::phiOffset ( void  ) const
inline

Definition at line 47 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

47{ return phiWire(0); }
double phiWire(int cell) const
Definition: MdcLayer.cxx:87

Referenced by print(), and MdcxHit::process().

◆ phiOffset() [2/2]

double MdcLayer::phiOffset ( void  ) const
inline

◆ phiWire() [1/2]

double MdcLayer::phiWire ( int  cell) const

Definition at line 87 of file MdcLayer.cxx.

88{
89 // in the middle of the chamber
90 if ( cell >= 0 && cell < nWires() ) {
91 return getWire(cell)->phi();
92 } else {
93 std::cout << "phiWire: wrong cell # " << cell << "\n"
94 << " number of cells in this layer is " << nWires()
95 << std::endl;
96 return 0.;
97 }
98}

Referenced by MdcTrkRecon::fillEvent(), phiOffset(), and print().

◆ phiWire() [2/2]

double MdcLayer::phiWire ( int  cell) const

◆ phiWireDC() [1/2]

double MdcLayer::phiWireDC ( int  cell,
double  z 
) const

Definition at line 74 of file MdcLayer.cxx.

75{
76 if ( cell >= 0 && cell < nWires() ) {
77 return getWire(cell)->phiDC(z);
78 } else {
79 std::cout << "phiWireDC: wrong cell # " << cell << "\n"
80 << " number of cells in this layer is " << nWires()
81 << std::endl;
82 return 0.;
83 }
84}

Referenced by dPhizDC(), and print().

◆ phiWireDC() [2/2]

double MdcLayer::phiWireDC ( int  cell,
double  z 
) const

◆ print() [1/2]

void MdcLayer::print ( std::ostream &  o) const

Definition at line 41 of file MdcLayer.cxx.

42{
43 o<< setw(3)<<layNum()<<
44 setw(3)<<view()<<
45 setw(4)<<nWires()<<
46 setw(3)<<superLayer()<<
47 setw(3)<<subLayer()<<
48 setw(10)<<stDip()<<
49 setw(10)<<zEnd()<<
50 setw(10)<<rMid()<<
51 setw(10)<<rEnd()<<
52 setw(10)<<rIn()<<
53 setw(10)<<rOut()<<
54 setw(10)<<stereo()<<
55 setw(10)<<dPhiz()<<
56 setw(7)<<zLength()<<
57 setw(10)<<sag()<<
58 setw(10)<<dPhi()<<
59 setw(10)<<phiOffset()<<
60 setw(10)<<phiEPOffset()<<
61 setw(10)<<dPhizDC(0.)<<
62 setw(10)<<radiusDC(0.)<<
63 setw(10)<<phiWireDC(0,0.)<<
64 setw(10)<<phiWire(0)<<
65 setw(10)<<xWire(0)<<
66 setw(10)<<yWire(0)<<
67 setw(10)<<cellWidth()<<
68 setw(10)<<cellWidth(0.)<<
69 std::endl;
70}
double yWire(int cell) const
Definition: MdcLayer.cxx:115
double xWire(int cell) const
Definition: MdcLayer.cxx:101

◆ print() [2/2]

void MdcLayer::print ( std::ostream &  o) const

◆ radiusDC() [1/2]

double MdcLayer::radiusDC ( double  z) const
inline

Definition at line 51 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

51{ return getWire(0)->radiusDC(z); }

Referenced by cellWidth(), and print().

◆ radiusDC() [2/2]

double MdcLayer::radiusDC ( double  z) const
inline

◆ rEnd() [1/2]

double MdcLayer::rEnd ( void  ) const
inline

Definition at line 37 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

37{ return _rend; }

Referenced by MdcTrackList::pickHits(), and print().

◆ rEnd() [2/2]

double MdcLayer::rEnd ( void  ) const
inline

Definition at line 37 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

37{ return _rend; }

◆ rIn() [1/2]

double MdcLayer::rIn ( void  ) const
inline

Definition at line 38 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

38{ return rMid() - 0.5 * cellHeight(); }//yzhang del

Referenced by MdcTrackList::pickHits(), and print().

◆ rIn() [2/2]

double MdcLayer::rIn ( void  ) const
inline

Definition at line 38 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

38{ return rMid() - 0.5 * cellHeight(); }//yzhang del

◆ rMid() [1/2]

double MdcLayer::rMid ( void  ) const
inline

◆ rMid() [2/2]

double MdcLayer::rMid ( void  ) const
inline

Definition at line 36 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

36{ return _rmid; }

◆ rOut() [1/2]

double MdcLayer::rOut ( void  ) const
inline

Definition at line 39 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

39{ return rMid() + 0.5 * cellHeight(); }//yzhang del

Referenced by MdcTrackList::pickHits(), and print().

◆ rOut() [2/2]

double MdcLayer::rOut ( void  ) const
inline

Definition at line 39 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

39{ return rMid() + 0.5 * cellHeight(); }//yzhang del

◆ sag() [1/2]

double MdcLayer::sag ( void  ) const
inline

Definition at line 45 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

45{ return getWire(0)->getSag(); }

Referenced by print().

◆ sag() [2/2]

double MdcLayer::sag ( void  ) const
inline

◆ setCellHeight() [1/2]

void MdcLayer::setCellHeight ( double  height)
inline

Definition at line 77 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

77{ _cellHeight = height; }

◆ setCellHeight() [2/2]

void MdcLayer::setCellHeight ( double  height)
inline

Definition at line 77 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

77{ _cellHeight = height; }

◆ stDip() [1/2]

double MdcLayer::stDip ( void  ) const
inline

Definition at line 34 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

34{ return _stdip; }

Referenced by print(), and MdcSuperLayer::stDip().

◆ stDip() [2/2]

double MdcLayer::stDip ( void  ) const
inline

Definition at line 34 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

34{ return _stdip; }

◆ stereo() [1/2]

double MdcLayer::stereo ( void  ) const
inline

Definition at line 42 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

42{ return _stereo; }

Referenced by cellWidth(), print(), and MdcxHit::process().

◆ stereo() [2/2]

double MdcLayer::stereo ( void  ) const
inline

Definition at line 42 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

42{ return _stereo; }

◆ subLayer() [1/2]

int MdcLayer::subLayer ( void  ) const
inline

Definition at line 32 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

32{ return layNum()-4*(superLayer()-1);}

Referenced by print().

◆ subLayer() [2/2]

int MdcLayer::subLayer ( void  ) const
inline

◆ superLayer() [1/2]

int MdcLayer::superLayer ( void  ) const
inline

Definition at line 31 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

31{ return 1+((layNum()-1)/4);}

Referenced by print(), and subLayer().

◆ superLayer() [2/2]

int MdcLayer::superLayer ( void  ) const
inline

Definition at line 31 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

31{ return 1+((layNum()-1)/4);}

◆ View() [1/2]

void MdcLayer::View ( int  v)
inline

Definition at line 76 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

76{ _view = v; }
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition: KarLud.h:35

◆ View() [2/2]

void MdcLayer::View ( int  v)
inline

◆ view() [1/2]

int MdcLayer::view ( void  ) const
inline

◆ view() [2/2]

int MdcLayer::view ( void  ) const
inline

Definition at line 28 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

28{ return _view; }

◆ xWire() [1/2]

double MdcLayer::xWire ( int  cell) const

Definition at line 101 of file MdcLayer.cxx.

102{
103 // in the middle of the chamber
104 if ( cell >= 0 && cell < nWires() ) {
105 return getWire(cell)->xMid();
106 } else {
107 std::cout << "xWire: wrong cell # " << cell << "\n"
108 << " number of cells in this layer is " << nWires()
109 << std::endl;
110 return 0.;
111 }
112}

Referenced by print(), and MdcxHit::process().

◆ xWire() [2/2]

double MdcLayer::xWire ( int  cell) const

◆ yWire() [1/2]

double MdcLayer::yWire ( int  cell) const

Definition at line 115 of file MdcLayer.cxx.

116{
117 // in the middle of the chamber
118 if ( cell >= 0 && cell < nWires() ) {
119 return getWire(cell)->yMid();
120 } else {
121 std::cout << "YWire: wrong cell # " << cell << "\n"
122 << " number of cells in this layer is " << nWires()
123 << std::endl;
124 return 0.;
125 }
126}

Referenced by print(), and MdcxHit::process().

◆ yWire() [2/2]

double MdcLayer::yWire ( int  cell) const

◆ zEnd() [1/2]

double MdcLayer::zEnd ( void  ) const
inline

Definition at line 35 of file InstallArea/include/MdcGeom/MdcGeom/MdcLayer.h.

35{ return _zend; }

Referenced by print(), and MdcSuperLayer::zEnd().

◆ zEnd() [2/2]

double MdcLayer::zEnd ( void  ) const
inline

Definition at line 35 of file Reconstruction/MdcPatRec/MdcGeom/MdcGeom-00-01-17/MdcGeom/MdcLayer.h.

35{ return _zend; }

◆ zLength() [1/2]

double MdcLayer::zLength ( void  ) const
inline

◆ zLength() [2/2]

double MdcLayer::zLength ( void  ) const
inline

The documentation for this class was generated from the following files: