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

#include <MucBox.h>

+ Inheritance diagram for MucBox:

Public Member Functions

 MucBox (int part, int segment, int layer, int id)
 
 MucBox (const MucBox &other)
 
MucBoxoperator= (const MucBox &other)
 
 ~MucBox ()
 
virtual void SetAlignment (double dx, double dy, double dz)
 
MucStripPlaneGetStripPlane ()
 
MucRpcGetRpc (int upDown, int id)
 
MucBoxCoverGetBoxCover (int upDown, int id)
 
- Public Member Functions inherited from MucEntity
 MucEntity (int part, int segment, int layer)
 
 MucEntity (int part, int segment, int layer, int id)
 
 MucEntity (int part, int segment, int layer, int upDown, int id)
 
 MucEntity (int part, int segment, int layer, int upDown, int rpcId, int id)
 
 MucEntity (const MucEntity &other)
 
MucEntityoperator= (const MucEntity &other)
 
virtual ~MucEntity ()
 
int GetPart ()
 
int GetSegment ()
 
int GetLayer ()
 
int GetUpDown ()
 
int GetRpcId ()
 
int GetID ()
 
double GetTheta ()
 
double GetRin ()
 
double GetRout ()
 
double GetRc ()
 
double GetThin ()
 
double GetW ()
 
double GetH ()
 
double GetL ()
 
double GetWu ()
 
double GetWd ()
 
double GetArea ()
 
double GetLocOrgInBes (int i)
 
double GetObjRotToMot (int i)
 
double GetObjOrgInBes (int i)
 
double GetObjOrgInLoc (int i)
 
double * GetLocOrgInBes ()
 
double * GetObjRotToMot ()
 
double * GetObjOrgInLoc ()
 
double * GetObjOrgInBes ()
 
void TransBesToLoc (double LocCoord[], double BesCoord[], double LocOrgInBes[], double Rot_z)
 
void TransLocToBes (double LocCoord[], double BesCoord[], double LocOrgInBes[], double Rot_z)
 

Protected Member Functions

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 ()
 
virtual void SetLocOrgInBes ()
 
virtual void SetObjRotToMot ()
 
virtual void SetObjOrgInBes ()
 
virtual void SetObjOrgInLoc ()
 
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 ()
 
virtual void SetLocOrgInBes ()
 
virtual void SetObjRotToMot ()
 
virtual void SetObjOrgInBes ()
 
virtual void SetObjOrgInLoc ()
 
virtual void SetAlignment (double dx, double dy, double dz)
 

Additional Inherited Members

- Protected Attributes inherited from MucEntity
int m_Part
 
int m_Segment
 
int m_Layer
 
int m_UpDown
 
int m_RpcId
 
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
 
double m_LocOrgInBes [3]
 
double m_ObjRotToMot [3]
 
double m_ObjOrgInBes [3]
 
double m_ObjOrgInLoc [3]
 

Detailed Description

Definition at line 20 of file MucBox.h.

Constructor & Destructor Documentation

◆ MucBox() [1/2]

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

Definition at line 17 of file MucBox.cxx.

17 : MucEntity( part, segment, layer, id )
18{
20
21 m_MucStripPlane = NULL;
22 m_MucRpc = NULL;
23 m_MucBoxCover = NULL;
24}
#define NULL
virtual void Init()
Definition: MucBox.cxx:58

◆ MucBox() [2/2]

MucBox::MucBox ( const MucBox other)

Definition at line 27 of file MucBox.cxx.

27 : MucEntity( other )
28{
29 m_MucStripPlane = other.m_MucStripPlane;
30 m_MucRpc = other.m_MucRpc;
31 m_MucBoxCover = other.m_MucBoxCover;
32}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ~MucBox()

MucBox::~MucBox ( )

Definition at line 50 of file MucBox.cxx.

51{
52 delete m_MucStripPlane;
53 delete m_MucRpc;
54 delete m_MucBoxCover;
55}

Member Function Documentation

◆ GetBoxCover()

MucBoxCover * MucBox::GetBoxCover ( int  upDown,
int  id 
)

Definition at line 97 of file MucBox.cxx.

98{
99 if( m_MucBoxCover != NULL )
100 delete m_MucBoxCover;
101
102 return ( m_MucBoxCover = new MucBoxCover( m_Part, m_Segment, m_Layer, upDown, id ) );
103}
int m_Layer
Definition: MucEntity.h:90
int m_Segment
Definition: MucEntity.h:89
int m_Part
Definition: MucEntity.h:88

◆ GetRpc()

MucRpc * MucBox::GetRpc ( int  upDown,
int  id 
)

Definition at line 89 of file MucBox.cxx.

90{
91 if( m_MucRpc != NULL )
92 delete m_MucRpc;
93
94 return ( m_MucRpc = new MucRpc( m_Part, m_Segment, m_Layer, upDown, id ) );
95}
Definition: MucRpc.h:21

◆ GetStripPlane()

MucStripPlane * MucBox::GetStripPlane ( )

Definition at line 81 of file MucBox.cxx.

82{
83 if( m_MucStripPlane != NULL )
84 return m_MucStripPlane;
85 else
86 return ( m_MucStripPlane = new MucStripPlane( m_Part, m_Segment, m_Layer, ((m_Part==BRID)?0:-1) ) );
87}

◆ Init()

void MucBox::Init ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 58 of file MucBox.cxx.

59{
60 SetTheta();
61 SetRin();
62 SetRout();
63 SetRc();
64
65 SetThin();
66 SetW();
67 SetWu();
68 SetWd();
69 SetH();
70 SetL();
71 SetArea();
72
77}
virtual void SetObjOrgInLoc()
Definition: MucBox.cxx:423
virtual void SetRc()
Definition: MucBox.cxx:141
virtual void SetRout()
Definition: MucBox.cxx:133
virtual void SetObjOrgInBes()
Definition: MucBox.cxx:345
virtual void SetArea()
Definition: MucBox.cxx:264
virtual void SetRin()
Definition: MucBox.cxx:120
virtual void SetLocOrgInBes()
Definition: MucBox.cxx:274
virtual void SetH()
Definition: MucBox.cxx:182
virtual void SetTheta()
Definition: MucBox.cxx:107
virtual void SetL()
Definition: MucBox.cxx:199
virtual void SetObjRotToMot()
Definition: MucBox.cxx:326
virtual void SetThin()
Definition: MucBox.cxx:154
virtual void SetWu()
Definition: MucBox.cxx:217
virtual void SetW()
Definition: MucBox.cxx:159
virtual void SetWd()
Definition: MucBox.cxx:240

Referenced by MucBox().

◆ operator=()

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

Definition at line 35 of file MucBox.cxx.

36{
37 if( this == &other)
38 return *this;
39
41
42 m_MucRpc = other.m_MucRpc;
43 m_MucBoxCover = other.m_MucBoxCover;
44 m_MucStripPlane = other.m_MucStripPlane;
45
46 return *this;
47}
MucEntity & operator=(const MucEntity &other)
Definition: MucEntity.cxx:92

◆ SetAlignment()

void MucBox::SetAlignment ( double  dx,
double  dy,
double  dz 
)
virtual

Reimplemented from MucEntity.

Definition at line 436 of file MucBox.cxx.

437{
438
439 if( m_Part == BRID || m_ID == -1 )
440 {
441 m_ObjOrgInLoc[0] += dx;
442 m_ObjOrgInLoc[1] += dy;
443 m_ObjOrgInLoc[2] += dz;
444 }
445}
double m_ObjOrgInLoc[3]
Definition: MucEntity.h:119
int m_ID
Definition: MucEntity.h:93

Referenced by MucGeoMgr::CreateBox().

◆ SetArea()

void MucBox::SetArea ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 264 of file MucBox.cxx.

265{
266 if( m_Part == BRID )
267 m_Area = m_W * m_L;
268 else
269 m_Area = m_W * m_L;
270}
double m_W
Definition: MucEntity.h:102
double m_Area
Definition: MucEntity.h:107
double m_L
Definition: MucEntity.h:104

Referenced by Init().

◆ SetH()

void MucBox::SetH ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 182 of file MucBox.cxx.

183{
184 if( m_Part == BRID )
185 m_H = BOX_TH;
186 else
187 {
188 if( m_ID == -1 ) // virtual encap gap
189 m_H = E_AS_RMAX - E_BOX_DR - E_GP_DY;
190 else if( m_ID == 1 )
191 { // for panel logical operation "AND" valid;
192 m_H = E_AS_RMAX - E_BOX_DR - E_GP_RMIN[m_Layer] + OVERLAP_WIDTH;
193 }
194 else
195 m_H = E_AS_RMAX - E_BOX_DR - E_GP_RMIN[m_Layer];
196 }
197}
double m_H
Definition: MucEntity.h:103

Referenced by Init().

◆ SetL()

void MucBox::SetL ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 199 of file MucBox.cxx.

200{
201 if( m_Part == BRID )
202 {
203 if( m_Segment != B_TOP || m_ID == -1 )
204 m_L = B_BOX_LT;
205 else // top segment
206 {
207 if( m_ID == 2 )
208 m_L = B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)];
209 else
210 m_L = B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)];
211 }
212 }
213 else
214 m_L = BOX_TH;
215}

Referenced by Init().

◆ SetLocOrgInBes()

void MucBox::SetLocOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 274 of file MucBox.cxx.

275{
276 double x, y, z;
277 x = y = z = 0.;
278
279 if( m_Part == BRID )
280 {
281 x = m_Rc*cos( m_Theta );
282 y = m_Rc*sin( m_Theta );
283 z = 0.;
284
285 } // barrel
286 else
287 {
288 //------------ set x and y ---------------
289 // segment 0 as reference
290 if( m_ID == -1 ) // for box, local is gap
291 {
292 x = (E_AS_RMAX + E_GP_DX) / 2.0;
293 y = (E_AS_RMAX + E_GP_DY) / 2.0;
294 }
295 else // for box panel, local is box
296 {
297 x = (E_AS_RMAX - E_BOX_DR + E_GP_DX) / 2.0;
298 y = (E_AS_RMAX - E_BOX_DR + E_GP_DY) / 2.0;
299 }
300
301 // x, y signs of coordinate different by segment
302 if ( m_Segment == 0 ) { ; }
303 else if ( m_Segment == 1 ) { x = -x; }
304 else if ( m_Segment == 2 ) { x = -x; y = -y; }
305 else { y = -y; }
306
307 //------------- set z --------------------
308 for( int i=0; i<m_Layer+1; i++ ) z += E_AS_TH[i];
309
310 z += m_Layer * AS_GAP;
311 z += (E_AS_ZMAX - E_AS_TOTAL_TH) + AS_GAP/2.0;
312 z *= cos( m_Part*MUC_PI/2.0 );
313
314 }// endcap
315
316 m_LocOrgInBes[0] = x;
317 m_LocOrgInBes[1] = y;
318 m_LocOrgInBes[2] = z;
319
320 // limit cut
321 for(int i=0;i<3;i++) {
322 if( fabs(m_LocOrgInBes[i]) < ERR_LIMIT ) m_LocOrgInBes[i] = 0;
323 }
324}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
Double_t x[10]
double m_Theta
Definition: MucEntity.h:95
double m_LocOrgInBes[3]
Definition: MucEntity.h:109
double m_Rc
Definition: MucEntity.h:100
double y[1000]

Referenced by Init().

◆ SetObjOrgInBes()

void MucBox::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 345 of file MucBox.cxx.

346{
347 double x, y, z;
348 x = y = z = 0.;
349
350 if( m_Part == BRID )
351 {
352 if( m_Segment != B_TOP || m_ID == -1 )
353 for( int i=0; i<3; i++ ) m_ObjOrgInBes[i] = m_LocOrgInBes[i];
354 else // top segment
355 {
356 // set x
357 if( m_ID == 2 ) x = 0.;
358 else x = (1-2*m_ID) * ( B_BOX_WT[m_Layer] + B_BOX_SLOT_WT )/4.0;
359
360
361 // set z
362 if( m_ID == 2 ) z = -B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] / 2.0;
363 else z = ( B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] )/2.0;
364
365 m_ObjOrgInBes[0] = x;
366 m_ObjOrgInBes[2] = z;
367
368 // set y
370
371 // limit cut
372 for( int i=0; i<3; i++ ) {
373 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
374
375 }
376 }
377 }
378 else // endcap
379 {
380 //------------- set x, y --------------------------
381 // segment 0 as reference
382 if( m_ID == -1 )
383 {
384 x = (E_AS_RMAX - E_BOX_DR + E_GP_DX) / 2.0;
385 y = (E_AS_RMAX - E_BOX_DR + E_GP_DY) / 2.0;
386 }
387 else if( m_ID == 0 )
388 {
389 x = m_Rc;
390 y = ( m_Rc * tan( m_Theta ) + E_GP_DY ) / 2.0;
391 }
392 else if ( m_ID ==1 )
393 {
394 x = m_Rc * cos( m_Theta );
395 y = m_Rc * sin( m_Theta );
396 }
397 else // m_ID == 2
398 {
399 x = ( m_Rc / tan( m_Theta ) + E_GP_DX ) / 2.0;
400 y = m_Rc;
401 }
402
403 // x, y signs of coordinate different by segment
404 if ( m_Segment == 0 ) { ; }
405 else if ( m_Segment == 1 ) { x = -x; }
406 else if ( m_Segment == 2 ) { x = -x; y = -y; }
407 else { y = -y; }
408
409 m_ObjOrgInBes[0] = x;
410 m_ObjOrgInBes[1] = y;
411
412 // limit cut
413 for( int i=0; i<2; i++ ) {
414 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
415 }
416
417 //---------- set z ---------------------
419
420 } // else, panels
421}
double tan(const BesAngle a)
Definition: BesAngle.h:216
double m_ObjOrgInBes[3]
Definition: MucEntity.h:118

Referenced by Init().

◆ SetObjOrgInLoc()

void MucBox::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 423 of file MucBox.cxx.

424{
425 if( m_Part == BRID )
426 {
427 if( m_Segment != B_TOP )
428 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = 0.;
429 else
430 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
431 }
432 else
433 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
434}

Referenced by Init().

◆ SetObjRotToMot()

void MucBox::SetObjRotToMot ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 326 of file MucBox.cxx.

327{
328 m_ObjRotToMot[0] = 0.;
329 m_ObjRotToMot[1] = 0.;
330
331 if( m_Part == BRID )
332 {
333 // for barrel segment 5, 6 and 7, the box is uppended in the gap
334 if( m_Segment == 5 || m_Segment == 6 || m_Segment == 7 )
335 m_ObjRotToMot[2] = MUC_PI;
336 else
337 m_ObjRotToMot[2] = 0.;
338 }
339 else
340 {
341 m_ObjRotToMot[2] = 0.;
342 }
343}
double m_ObjRotToMot[3]
Definition: MucEntity.h:111

Referenced by Init().

◆ SetRc()

void MucBox::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 141 of file MucBox.cxx.

142{
143 if( m_Part == BRID )
144 m_Rc = B_AS_RMIN[m_Layer] - AS_GAP/2.0;
145 else
146 {
147 if( m_ID == -1 )
148 m_Rc = sqrt(2.0) * ( E_AS_RMAX - E_BOX_DR ) / 2.0;
149 else
150 m_Rc = (m_Rin + m_Rout)/2.0;
151 }
152}
double m_Rin
Definition: MucEntity.h:98
double m_Rout
Definition: MucEntity.h:99

Referenced by Init().

◆ SetRin()

void MucBox::SetRin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 120 of file MucBox.cxx.

121{
122 if( m_Part == BRID )
123 m_Rin = B_AS_RMIN[m_Layer] - ( AS_GAP + BOX_TH ) / 2.0;
124 else
125 {
126 if( m_ID == -1 )
127 m_Rin = 0.;
128 else
129 m_Rin = E_GP_RMIN[m_Layer];
130 }
131}

Referenced by Init().

◆ SetRout()

void MucBox::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 133 of file MucBox.cxx.

134{
135 if( m_Part == BRID )
136 m_Rout = B_AS_RMIN[m_Layer] -( AS_GAP - BOX_TH ) / 2.0;
137 else
138 m_Rout = E_AS_RMAX - E_BOX_DR;
139}

Referenced by Init().

◆ SetTheta()

void MucBox::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 107 of file MucBox.cxx.

108{
109 if( m_Part == BRID )
110 m_Theta = m_Segment * ( MUC_PI/4.0 );
111 else
112 {
113 if( m_ID == -1 )
114 m_Theta = ( 2*m_Segment + 1 ) * ( MUC_PI/4.0 );
115 else
116 m_Theta = ( MUC_PI/4.0 ) + ( m_ID - 1) * MUC_PI / 8.0 ;
117 }
118}

Referenced by Init().

◆ SetThin()

void MucBox::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 154 of file MucBox.cxx.

155{
156 m_Thin = BOX_TH;
157}
double m_Thin
Definition: MucEntity.h:101

Referenced by Init().

◆ SetW()

void MucBox::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 159 of file MucBox.cxx.

160{
161 if( m_Part == BRID)
162 {
163 if( m_Segment != B_TOP )
164 m_W = B_BOX_WT[m_Layer];
165 else // top segment
166 {
167 if( m_ID == -1 || m_ID == 2 )
168 m_W = B_BOX_WT[m_Layer];
169 else
170 m_W = ( B_BOX_WT[m_Layer] - B_BOX_SLOT_WT )/2.0;
171 }
172 }
173 else
174 {
175 if( m_ID == -1 ) // virtual encap gap
176 m_W = E_AS_RMAX - E_BOX_DR - E_GP_DX;
177 else
178 m_W = 0.;
179 }
180}

Referenced by Init().

◆ SetWd()

void MucBox::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 240 of file MucBox.cxx.

241{
242 if( m_Part == BRID )
243 m_Wd = m_W;
244 else
245 {
246 if( m_ID == -1 ) // virtual box
247 m_Wd = m_W;
248 else if( m_ID == 1 ) // center fraction
249 {
250 m_Wd = 2 * VALUE * m_Rout;
251 m_Wd += 2*VALUE*(2.0/2); // for panel operation "AND" valid
252 m_Wd += OVERLAP_WIDTH;
253 }
254 else if( m_ID == 0 )
255 m_Wd = VALUE * m_Rout - E_GP_DY;
256 else
257 m_Wd = VALUE * m_Rout - E_GP_DX;
258
259 if( m_ID != -1 ) m_Wd+=OVERLAP_WIDTH; // avoid panels overlap
260
261 }
262}
double m_Wd
Definition: MucEntity.h:106

Referenced by Init().

◆ SetWu()

void MucBox::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 217 of file MucBox.cxx.

218{
219 if( m_Part == BRID )
220 m_Wu = m_W;
221 else
222 {
223 if( m_ID == -1 ) // virtual box
224 m_Wu = m_W;
225 else if( m_ID == 1 ) // center fraction
226 {
227 m_Wu = 2 * VALUE * m_Rin ;
228 m_Wu -= 2*VALUE*(2.0/2); // for panel operation "AND" valid
229 m_Wu += OVERLAP_WIDTH;
230 }
231 else if( m_ID == 0 )
232 m_Wu = VALUE * m_Rin - E_GP_DY;
233 else
234 m_Wu = VALUE * m_Rin - E_GP_DX;
235
236 if( m_ID != -1 ) m_Wu+=OVERLAP_WIDTH; // avoid panels overlap
237 }
238}
double m_Wu
Definition: MucEntity.h:105

Referenced by Init().


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