BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
MucStripCal Class Reference

#include <MucStripCal.h>

+ Inheritance diagram for MucStripCal:

Public Member Functions

 MucStripCal (int part, int segment, int layer, int id)
 
 MucStripCal (const MucStripCal &other)
 
MucStripCaloperator= (const MucStripCal &other)
 
virtual ~MucStripCal ()
 
int GetType ()
 
double GetCenterLine ()
 
double GetHead ()
 
double GetTail ()
 
double GetPhi ()
 
int GetPadNumber ()
 
- Public Member Functions inherited from MucEntityCal
 MucEntityCal (int part, int segment, int layer)
 
 MucEntityCal (int part, int segment, int layer, int id)
 
 MucEntityCal (const MucEntityCal &other)
 
MucEntityCaloperator= (const MucEntityCal &other)
 
virtual ~MucEntityCal ()
 
int GetPart ()
 
int GetSegment ()
 
int GetLayer ()
 
int GetID ()
 
double GetTheta ()
 
double GetRin ()
 
double GetRout ()
 
double GetRc ()
 
double GetThin ()
 
double GetW ()
 
double GetH ()
 
double GetL ()
 
double GetWu ()
 
double GetWd ()
 
double GetArea ()
 

Protected Member Functions

virtual void Init ()
 
void SetType ()
 
void SetCenterLine ()
 
void SetHead ()
 
void SetTail ()
 
void SetPhi ()
 
virtual void SetThin ()
 
virtual void SetW ()
 
virtual void SetWu ()
 
virtual void SetWd ()
 
virtual void SetH ()
 
virtual void SetL ()
 
virtual void SetArea ()
 
void SetPadNumber ()
 
- Protected Member Functions inherited from MucEntityCal
virtual void Init ()
 
virtual void SetTheta ()
 
virtual void SetRin ()
 
virtual void SetRout ()
 
virtual void SetRc ()
 
virtual void SetThin ()
 
virtual void SetW ()
 
virtual void SetH ()
 
virtual void SetL ()
 
virtual void SetWu ()
 
virtual void SetWd ()
 
virtual void SetArea ()
 

Additional Inherited Members

- Protected Attributes inherited from MucEntityCal
int m_Part
 
int m_Segment
 
int m_Layer
 
int m_ID
 
double m_Theta
 
double m_Rin
 
double m_Rout
 
double m_Rc
 
double m_Thin
 
double m_W
 
double m_H
 
double m_L
 
double m_Wu
 
double m_Wd
 
double m_Area
 

Detailed Description

Definition at line 27 of file MucStripCal.h.

Constructor & Destructor Documentation

◆ MucStripCal() [1/2]

MucStripCal::MucStripCal ( int  part,
int  segment,
int  layer,
int  id 
)

Definition at line 18 of file MucStripCal.cxx.

18 : MucEntityCal( part, segment, layer, id )
19{
21
22 // m_MucPadChain = NULL;
23}
virtual void Init()
Definition: MucStripCal.cxx:63

◆ MucStripCal() [2/2]

MucStripCal::MucStripCal ( const MucStripCal other)

Definition at line 26 of file MucStripCal.cxx.

26 : MucEntityCal( other )
27{
28 m_Type = other.m_Type;
29 m_CenterLine = other.m_CenterLine;
30 m_Head = other.m_Head;
31 m_Tail = other.m_Tail;
32 m_Phi = other.m_Phi;
33
34// m_MucPadChain = other.m_MucPadChain;
35}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ~MucStripCal()

MucStripCal::~MucStripCal ( )
virtual

Definition at line 56 of file MucStripCal.cxx.

57{
58 // delete m_MucPadChain;
59 ;
60}

Member Function Documentation

◆ GetCenterLine()

double MucStripCal::GetCenterLine ( )

Definition at line 84 of file MucStripCal.cxx.

84{ return m_CenterLine; }

◆ GetHead()

double MucStripCal::GetHead ( )

Definition at line 85 of file MucStripCal.cxx.

85{ return m_Head; }

◆ GetPadNumber()

int MucStripCal::GetPadNumber ( )

Definition at line 88 of file MucStripCal.cxx.

88{ return m_PadNumber; }

◆ GetPhi()

double MucStripCal::GetPhi ( )

Definition at line 87 of file MucStripCal.cxx.

87{ return m_Phi; }

◆ GetTail()

double MucStripCal::GetTail ( )

Definition at line 86 of file MucStripCal.cxx.

86{ return m_Tail; }

◆ GetType()

int MucStripCal::GetType ( )

Definition at line 83 of file MucStripCal.cxx.

83{ return m_Type; }

◆ Init()

void MucStripCal::Init ( )
protectedvirtual

Reimplemented from MucEntityCal.

Definition at line 63 of file MucStripCal.cxx.

64{
65 SetType();
66 SetW();
67 SetWu();
68 SetWd();
69 SetCenterLine(); // use strip width
70 SetHead();
71 SetTail();
72 SetPhi();
73
74 SetThin();
75 SetH();
76 SetL();
77 SetArea();
79}
void SetPadNumber()
void SetHead()
virtual void SetArea()
virtual void SetH()
virtual void SetThin()
virtual void SetWu()
void SetType()
virtual void SetW()
virtual void SetWd()
void SetTail()
void SetCenterLine()
virtual void SetL()

Referenced by MucStripCal().

◆ operator=()

MucStripCal & MucStripCal::operator= ( const MucStripCal other)

Definition at line 38 of file MucStripCal.cxx.

39{
40 if( this == &other) return *this;
41
43
44 m_Type = other.m_Type;
45 m_CenterLine = other.m_CenterLine;
46 m_Head = other.m_Head;
47 m_Tail = other.m_Tail;
48 m_Phi = other.m_Phi;
49
50 // m_MucPadChain = other.m_MucPadChain;
51
52 return *this;
53}
MucEntityCal & operator=(const MucEntityCal &other)

◆ SetArea()

void MucStripCal::SetArea ( )
protectedvirtual

Reimplemented from MucEntityCal.

Definition at line 341 of file MucStripCal.cxx.

342{
343 m_Area = m_W*m_L/100;
344}
double m_Area
Definition: MucEntityCal.h:75

Referenced by Init().

◆ SetCenterLine()

void MucStripCal::SetCenterLine ( )
protected

Definition at line 115 of file MucStripCal.cxx.

116{
117 // Base on strips width and structure correlations
118 // Endcap only
119
120 int segFlag = 0;
121
122 if( (m_Layer+1)%2 == 1 ) // 1,3,5,7
123 {
124 if( m_Segment < 2 ) segFlag = 1;
125 else segFlag = -1;
126
127 if( m_ID != E_STR_NUM-1 ) // NO.1~62
128 m_CenterLine = segFlag * ( E_XSTR_OFFSET + m_ID*E_STR_DST );
129 else // NO.63 end strip
130 m_CenterLine = segFlag * ( E_XSTR_OFFSET + (E_STR_NUM-2)*E_STR_DST + (E_STR_DST + m_W + STR_GAP)/2);
131 }
132 else // 2,4,6,8
133 {
134 if( m_Segment%3 == 0 ) segFlag = 1;
135 else segFlag = -1;
136
137 if(m_ID != E_STR_NUM-1) // NO.1~62
138 m_CenterLine = segFlag * ( E_YSTR_OFFSET + m_ID*E_STR_DST );
139 else // NO.63 end strip
140 m_CenterLine = segFlag * ( E_YSTR_OFFSET + (E_STR_NUM-2)*E_STR_DST + (E_STR_DST + m_W + STR_GAP)/2);
141 }
142}

Referenced by Init().

◆ SetH()

void MucStripCal::SetH ( )
protectedvirtual

Reimplemented from MucEntityCal.

Definition at line 291 of file MucStripCal.cxx.

292{
293 m_H = STR_TH;
294}

Referenced by Init().

◆ SetHead()

void MucStripCal::SetHead ( )
protected

Definition at line 145 of file MucStripCal.cxx.

146{
147 int segFlag = 0;
148
149 // base on strips width and correlations
150 if( m_ID+1 < TURN_STR_ID[m_Layer][0] )
151 m_Head = FIRST_TURN_HEAD[m_Layer][0];
152
153 if( m_ID+1 == TURN_STR_ID[m_Layer][0] )
154 m_Head = FIRST_TURN_HEAD[m_Layer][1];
155
156 if( (m_ID+1 > TURN_STR_ID[m_Layer][0]) && (m_ID+1 <= TURN_STR_ID[m_Layer][1]) )
157 m_Head = FIRST_TURN_HEAD[m_Layer][1] - ( m_ID + 1 - TURN_STR_ID[m_Layer][0] )*E_STR_DST;
158
159 if( m_ID+1 > TURN_STR_ID[m_Layer][1] )
160 m_Head = SECOND_TURN_HEAD[m_Layer%2];
161
162 if( (m_Layer+1)%2 == 1 ) // 1,3,5,7
163 {
164 if( m_Segment%3 ==0 ) segFlag = 1;
165 else segFlag = -1;
166 }
167 else // 2,4,6,8
168 {
169 if( m_Segment < 2 ) segFlag = 1;
170 else segFlag = -1;
171 }
172
173 m_Head *= segFlag;
174}
const double SECOND_TURN_HEAD[2]
Definition: MucStripCal.h:21
const int TURN_STR_ID[8][2]
Definition: MucStripCal.h:18
const double FIRST_TURN_HEAD[8][2]
Definition: MucStripCal.h:19

Referenced by Init().

◆ SetL()

void MucStripCal::SetL ( )
protectedvirtual

Reimplemented from MucEntityCal.

Definition at line 297 of file MucStripCal.cxx.

298{
299 if( m_Part==BRID ) // barrel
300 {
301 int ZCUT_HEAD_NUM = B_ZSTR_NUM/2 - B_ZSTR_CUT_NUM[m_Layer] - 1;
302 int ZCUT_TAIL_NUM = B_ZSTR_NUM/2 + B_ZSTR_CUT_NUM[m_Layer];
303
304 if( m_Segment != B_TOP ) // not top segment
305 {
306 if( (m_Layer+1)%2 == 1) // odd layer, Z
307 m_L = B_BOX_LT - 2*B_BOX_DZ[SL_DOWN];
308 else // even layer, phi
309 m_L = B_BOX_WT[m_Layer] - 2*B_BOX_DZ[SL_DOWN];
310 }
311 else // top segment
312 {
313 if((m_Layer+1)%2 == 1) // odd layer, z
314 {
315 if( m_ID > ZCUT_HEAD_NUM && m_ID < ZCUT_TAIL_NUM ) // be cut
316 {
317 if( m_Layer == 0 )
318 m_L = B_BOX_LT - 2*B_BOX_DZ[SL_DOWN] - B_ZSTR_CUT[1];
319 else
320 m_L = B_BOX_LT - 2*B_BOX_DZ[SL_DOWN] - B_ZSTR_CUT[0];
321 }
322 else // no cut
323 m_L = B_BOX_LT - 2*B_BOX_DZ[SL_DOWN];
324 }
325 else // even layer, phi
326 {
327 if( m_ID < B_PHISTR_CUT_NUM ) // no cut
328 m_L = B_BOX_WT[m_Layer] - 2*B_BOX_DZ[SL_DOWN];
329 else // be cut
330 m_L = (B_BOX_WT[m_Layer] - 2*B_BOX_DZ[SL_DOWN] - B_PHISTR_CUT)/2;
331 }
332 }
333 }
334 else // endcap
335 {
336 m_L = fabs( m_Head - m_Tail );
337 }
338}

Referenced by Init().

◆ SetPadNumber()

void MucStripCal::SetPadNumber ( )
protected

Definition at line 347 of file MucStripCal.cxx.

348{
349 int n = 0;
350 double fn = 0;
351
352 if(m_W == 0) {
353 cout<<"Error, strip width = 0!"<<endl;
354 m_PadNumber = 0;
355 }
356 else
357 {
358 fn = (m_L/m_W);
359 n = (int)fn;
360
361 if( (fn - n) > 0.3 )
362 m_PadNumber = n + 1;
363 else
364 m_PadNumber = n;
365 }
366}
const Int_t n

Referenced by Init().

◆ SetPhi()

void MucStripCal::SetPhi ( )
protected

Definition at line 214 of file MucStripCal.cxx.

215{
216 if ( m_Part == BRID ) // barrel
217 m_Phi = B_PHI[m_Segment] * (PI/4.0);
218 else // endcap , all phi is zer
219 m_Phi = 0.;
220}
const double PI
Definition: PipiJpsi.cxx:55

Referenced by Init().

◆ SetTail()

void MucStripCal::SetTail ( )
protected

Definition at line 177 of file MucStripCal.cxx.

178{
179 int segFlag = 0;
180
181 if( (m_Layer+1)%2 == 1 ) // 1,3,5,7
182 {
183 if( m_Segment%3 ==0 ) segFlag = 1;
184 else segFlag = -1;
185
186 if( m_ID+1 < TURN_POINT_NUM )
187 m_Tail = ODD_TURN_POINT_TAIL[(m_Layer==0)?0:1][0];
188 if( m_ID+1 == TURN_POINT_NUM )
189 m_Tail = ODD_TURN_POINT_TAIL[(m_Layer==0)?0:1][1];
190 if( m_ID+1 > TURN_POINT_NUM )
191 m_Tail = ODD_TURN_POINT_TAIL[(m_Layer==0)?0:1][1]-( m_ID + 1 - TURN_POINT_NUM )* E_STR_DST;
192 if( m_ID == E_STR_NUM - 1 )
193 m_Tail = ODD_TURN_POINT_TAIL[(m_Layer==0)?0:1][1]-( m_ID -TURN_POINT_NUM )*E_STR_DST - ( E_STR_DST + m_W + STR_GAP )/2;
194 }
195 else // 2,4,6,8
196 {
197 if( m_Segment < 2 ) segFlag = 1;
198 else segFlag = -1;
199
200 if( m_ID+1 < TURN_POINT_NUM )
201 m_Tail = EVEN_TURN_POINT_TAIL[0];
202 if( m_ID+1 == TURN_POINT_NUM )
203 m_Tail = EVEN_TURN_POINT_TAIL[1];
204 if( m_ID+1 > TURN_POINT_NUM )
205 m_Tail = EVEN_TURN_POINT_TAIL[1] - ( m_ID + 1 - TURN_POINT_NUM ) * E_STR_DST;
206 if( m_ID == E_STR_NUM - 1 )
207 m_Tail = EVEN_TURN_POINT_TAIL[1]-(m_ID - TURN_POINT_NUM)*E_STR_DST - ( E_STR_DST + m_W + STR_GAP )/2;
208 }
209
210 m_Tail *= segFlag;
211}
const double EVEN_TURN_POINT_TAIL[2]
Definition: MucStripCal.h:24
const double ODD_TURN_POINT_TAIL[2][2]
Definition: MucStripCal.h:23
const int TURN_POINT_NUM
Definition: MucStripCal.h:22

Referenced by Init().

◆ SetThin()

void MucStripCal::SetThin ( )
protectedvirtual

Reimplemented from MucEntityCal.

Definition at line 223 of file MucStripCal.cxx.

224{
225 m_Thin = STR_TH;
226}
double m_Thin
Definition: MucEntityCal.h:69

Referenced by Init().

◆ SetType()

void MucStripCal::SetType ( )
protected

Definition at line 102 of file MucStripCal.cxx.

103{
104 if( m_Part == BRID ) {
105 if( (m_Layer+1)%2 == 1 ) m_Type = ZSTR;
106 else m_Type = PHISTR;
107 }
108 else {
109 if( (m_Layer+1)%2 == 1 ) m_Type = XSTR;
110 else m_Type = YSTR;
111 }
112}

Referenced by Init().

◆ SetW()

void MucStripCal::SetW ( )
protectedvirtual

Reimplemented from MucEntityCal.

Definition at line 229 of file MucStripCal.cxx.

230{
231 if( m_Part == BRID )
232 {
233 // Set maximum strip
234 int maxStrip;
235 if( (m_Layer+1)%2 == 1 )
236 maxStrip = B_ZSTR_NUM; // odd layer
237 else if( m_Segment != B_TOP )
238 maxStrip = B_PHISTR_NUM; // even layer not top segment
239 else
240 maxStrip = B_TOPSTR_NUM; // even layer top segment
241
242
243 if( (m_Layer+1)%2 == 1 ) // odd layer, z
244 {
245 if( m_ID > 0 && m_ID < (maxStrip-1)) // not marginal strip
246 m_W = B_STR_DST[m_Layer] - STR_GAP;
247 else // marginal strip
248 m_W = (B_BOX_WT[m_Layer] - 2*B_BOX_DT[SL_DOWN] - (maxStrip-2)*B_STR_DST[m_Layer] - STR_GAP)/2;
249 }
250 else // even layer, phi
251 {
252 if( m_ID >0 && m_ID < (maxStrip-1) ) // not marginal strip
253 m_W = B_STR_DST[m_Layer] - STR_GAP;
254 else // marginal strip
255 m_W = B_BOX_LT/2 - B_BOX_DZ[SL_DOWN] - B_STR_DST[m_Layer]*(B_PHISTR_NUM-2)/2;
256
257 if( (maxStrip == B_TOPSTR_NUM) && (m_ID == (B_PHISTR_NUM - 1)) ) // special marginal strip
258 m_W = B_BOX_LT/2 - B_BOX_DZ[SL_DOWN] - B_STR_DST[m_Layer]*(B_PHISTR_NUM-2)/2;
259 }
260 }
261 else
262 {
263 // Strip0~62: 33;
264 // Strip63: L0: 34; L2/4/6: 43; L1/3/5/7: 53
265 if(m_ID != E_STR_NUM-1) m_W = E_STR_WT; // NO.1~62
266 else // NO.63, end strip
267 {
268 if((m_Layer+1)%2!=0) // 0,2,4,6
269 {
270 if(m_Layer==0) m_W = 34;
271 else m_W = 43;
272 }
273 else m_W = 53; // 1,3,5,7
274 }
275 }
276}

Referenced by Init().

◆ SetWd()

void MucStripCal::SetWd ( )
protectedvirtual

Reimplemented from MucEntityCal.

Definition at line 285 of file MucStripCal.cxx.

286{
287 m_Wd = m_W;
288}

Referenced by Init().

◆ SetWu()

void MucStripCal::SetWu ( )
protectedvirtual

Reimplemented from MucEntityCal.

Definition at line 279 of file MucStripCal.cxx.

280{
281 m_Wu = m_W;
282}

Referenced by Init().


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