BOSS 7.0.6
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)
 

Detailed Description

Definition at line 15 of file MdcLayer.h.

Constructor & Destructor Documentation

◆ MdcLayer()

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
Definition: MdcLayer.h:52
double rEnd(void) const
Definition: MdcSWire.h:43
double phiE(void) const
Definition: MdcSWire.h:51
double rMid(void) const
Definition: MdcSWire.h:50
double zEndDC(void) const
Definition: MdcSWire.h:49
double stereo(void) const
Definition: MdcSWire.h:53
void setLayerPtr(const MdcLayer *lay)
Definition: MdcSWire.h:74
double dPhiz(void) const
Definition: MdcSWire.h:48

◆ ~MdcLayer()

MdcLayer::~MdcLayer ( )
inline

Definition at line 22 of file MdcLayer.h.

22{};

Member Function Documentation

◆ cellHeight()

double MdcLayer::cellHeight ( void  ) const
inline

Definition at line 33 of file MdcLayer.h.

33{ return _cellHeight; }

Referenced by rIn(), and rOut().

◆ cellWidth() [1/2]

double MdcLayer::cellWidth ( double  z) const
inline

Definition at line 66 of file MdcLayer.h.

66{ return dPhi()*radiusDC(z)*cos(stereo()); }
double cos(const BesAngle a)
Definition: BesAngle.h:213
double radiusDC(double z) const
Definition: MdcLayer.h:51
double stereo(void) const
Definition: MdcLayer.h:42
double dPhi(void) const
Definition: MdcLayer.h:61

◆ cellWidth() [2/2]

double MdcLayer::cellWidth ( void  ) const
inline

Definition at line 64 of file MdcLayer.h.

64{ return dPhi()*rMid()*cos(stereo()); }
double rMid(void) const
Definition: MdcLayer.h:36

Referenced by print().

◆ dPhi()

double MdcLayer::dPhi ( void  ) const
inline

Definition at line 61 of file MdcLayer.h.

61{ return Constants::twoPi/nWires(); }
static const double twoPi
Definition: Constants.h:39
int nWires(void) const
Definition: MdcLayer.h:30

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

◆ dPhiz()

double MdcLayer::dPhiz ( void  ) const
inline

Definition at line 43 of file MdcLayer.h.

43{ return _delphi; }

Referenced by print().

◆ dPhizDC()

double MdcLayer::dPhizDC ( double  z) const
inline

Definition at line 50 of file MdcLayer.h.

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

Referenced by print().

◆ exist()

bool MdcLayer::exist ( void  ) const
inline

Definition at line 27 of file MdcLayer.h.

27{ return _exist; }

◆ getWire()

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

◆ layNum()

int MdcLayer::layNum ( void  ) const
inline

◆ makeHitTrajInGlobalCoords()

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
Definition: MdcSWire.h:34

Referenced by MdcHit::hitTraj().

◆ nWires()

◆ phiEPOffset()

double MdcLayer::phiEPOffset ( void  ) const
inline

Definition at line 49 of file MdcLayer.h.

49{ return _phiOffset; }

Referenced by print().

◆ phiOffset()

double MdcLayer::phiOffset ( void  ) const
inline

Definition at line 47 of file MdcLayer.h.

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

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

◆ phiWire()

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}
double phi(void) const
Definition: MdcSWire.h:52

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

◆ phiWireDC()

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}
double phiDC(double z) const
Definition: MdcSWire.h:60

Referenced by dPhizDC(), and print().

◆ print()

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 zEnd(void) const
Definition: MdcLayer.h:35
double phiOffset(void) const
Definition: MdcLayer.h:47
double sag(void) const
Definition: MdcLayer.h:45
double zLength(void) const
Definition: MdcLayer.h:44
double phiEPOffset(void) const
Definition: MdcLayer.h:49
double cellWidth(void) const
Definition: MdcLayer.h:64
double rEnd(void) const
Definition: MdcLayer.h:37
double stDip(void) const
Definition: MdcLayer.h:34
double dPhizDC(double z) const
Definition: MdcLayer.h:50
int superLayer(void) const
Definition: MdcLayer.h:31
double rOut(void) const
Definition: MdcLayer.h:39
int view(void) const
Definition: MdcLayer.h:28
double dPhiz(void) const
Definition: MdcLayer.h:43
int subLayer(void) const
Definition: MdcLayer.h:32
int layNum(void) const
Definition: MdcLayer.h:29
double xWire(int cell) const
Definition: MdcLayer.cxx:101
double rIn(void) const
Definition: MdcLayer.h:38

◆ radiusDC()

double MdcLayer::radiusDC ( double  z) const
inline

Definition at line 51 of file MdcLayer.h.

51{ return getWire(0)->radiusDC(z); }
double radiusDC(double z) const
Definition: MdcSWire.h:57

Referenced by cellWidth(), and print().

◆ rEnd()

double MdcLayer::rEnd ( void  ) const
inline

Definition at line 37 of file MdcLayer.h.

37{ return _rend; }

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

◆ rIn()

double MdcLayer::rIn ( void  ) const
inline

Definition at line 38 of file MdcLayer.h.

38{ return rMid() - 0.5 * cellHeight(); }//yzhang del
double cellHeight(void) const
Definition: MdcLayer.h:33

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

◆ rMid()

double MdcLayer::rMid ( void  ) const
inline

◆ rOut()

double MdcLayer::rOut ( void  ) const
inline

Definition at line 39 of file MdcLayer.h.

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

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

◆ sag()

double MdcLayer::sag ( void  ) const
inline

Definition at line 45 of file MdcLayer.h.

45{ return getWire(0)->getSag(); }
double getSag(void) const
Definition: MdcSWire.h:31

Referenced by print().

◆ setCellHeight()

void MdcLayer::setCellHeight ( double  height)
inline

Definition at line 77 of file MdcLayer.h.

77{ _cellHeight = height; }

◆ stDip()

double MdcLayer::stDip ( void  ) const
inline

Definition at line 34 of file MdcLayer.h.

34{ return _stdip; }

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

◆ stereo()

double MdcLayer::stereo ( void  ) const
inline

Definition at line 42 of file MdcLayer.h.

42{ return _stereo; }

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

◆ subLayer()

int MdcLayer::subLayer ( void  ) const
inline

Definition at line 32 of file MdcLayer.h.

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

Referenced by print().

◆ superLayer()

int MdcLayer::superLayer ( void  ) const
inline

Definition at line 31 of file MdcLayer.h.

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

Referenced by print(), and subLayer().

◆ View()

void MdcLayer::View ( int  v)
inline

Definition at line 76 of file 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()

int MdcLayer::view ( void  ) const
inline

◆ xWire()

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}
double xMid(void) const
Definition: MdcSWire.h:41

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

◆ yWire()

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}
double yMid(void) const
Definition: MdcSWire.h:42

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

◆ zEnd()

double MdcLayer::zEnd ( void  ) const
inline

Definition at line 35 of file MdcLayer.h.

35{ return _zend; }

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

◆ zLength()

double MdcLayer::zLength ( void  ) const
inline

Definition at line 44 of file MdcLayer.h.

44{ return getWire(0)->zLength(); }
double zLength(void) const
Definition: MdcSWire.h:47

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


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