BOSS 7.1.2
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 ()
 
- Protected Member Functions inherited from MucEntity

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:56
MucEntity(int part, int segment, int layer)
Definition MucEntity.cxx:17

◆ 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)

◆ ~MucBox()

MucBox::~MucBox ( )

Definition at line 48 of file MucBox.cxx.

49{
50 delete m_MucStripPlane;
51 delete m_MucRpc;
52 delete m_MucBoxCover;
53}

Member Function Documentation

◆ GetBoxCover()

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

Definition at line 92 of file MucBox.cxx.

93{
94 if( m_MucBoxCover != NULL ) delete m_MucBoxCover;
95 return ( m_MucBoxCover = new MucBoxCover( m_Part, m_Segment, m_Layer, upDown, id ) );
96}
int m_Layer
Definition MucEntity.h:89
int m_Segment
Definition MucEntity.h:88
int m_Part
Definition MucEntity.h:87

◆ GetRpc()

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

Definition at line 86 of file MucBox.cxx.

87{
88 if( m_MucRpc != NULL ) delete m_MucRpc;
89 return ( m_MucRpc = new MucRpc( m_Part, m_Segment, m_Layer, upDown, id ) );
90}

◆ GetStripPlane()

MucStripPlane * MucBox::GetStripPlane ( )

Definition at line 78 of file MucBox.cxx.

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

◆ Init()

void MucBox::Init ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 56 of file MucBox.cxx.

57{
58 SetTheta();
59 SetRin();
60 SetRout();
61 SetRc();
62
63 SetThin();
64 SetW();
65 SetWu();
66 SetWd();
67 SetH();
68 SetL();
69 SetArea();
70
75}
virtual void SetObjOrgInLoc()
Definition MucBox.cxx:384
virtual void SetRc()
Definition MucBox.cxx:124
virtual void SetRout()
Definition MucBox.cxx:118
virtual void SetObjOrgInBes()
Definition MucBox.cxx:315
virtual void SetArea()
Definition MucBox.cxx:240
virtual void SetRin()
Definition MucBox.cxx:109
virtual void SetLocOrgInBes()
Definition MucBox.cxx:247
virtual void SetH()
Definition MucBox.cxx:161
virtual void SetTheta()
Definition MucBox.cxx:100
virtual void SetL()
Definition MucBox.cxx:176
virtual void SetObjRotToMot()
Definition MucBox.cxx:298
virtual void SetThin()
Definition MucBox.cxx:133
virtual void SetWu()
Definition MucBox.cxx:194
virtual void SetW()
Definition MucBox.cxx:138
virtual void SetWd()
Definition MucBox.cxx:217

Referenced by MucBox().

◆ operator=()

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

Definition at line 35 of file MucBox.cxx.

36{
37 if( this == &other) return *this;
38
40 m_MucRpc = other.m_MucRpc;
41 m_MucBoxCover = other.m_MucBoxCover;
42 m_MucStripPlane = other.m_MucStripPlane;
43
44 return *this;
45}
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 397 of file MucBox.cxx.

398{
399 if( m_Part == BRID || m_ID == -1 )
400 {
401 m_ObjOrgInLoc[0] += dx;
402 m_ObjOrgInLoc[1] += dy;
403 m_ObjOrgInLoc[2] += dz;
404 }
405}
double m_ObjOrgInLoc[3]
Definition MucEntity.h:118

Referenced by MucGeoMgr::CreateBox().

◆ SetArea()

void MucBox::SetArea ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 240 of file MucBox.cxx.

241{
242 if( m_Part == BRID ) m_Area = m_W * m_L;
243 else m_Area = m_W * m_L;
244}
double m_W
Definition MucEntity.h:101
double m_Area
Definition MucEntity.h:106
double m_L
Definition MucEntity.h:103

Referenced by Init().

◆ SetH()

void MucBox::SetH ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 161 of file MucBox.cxx.

162{
163 if( m_Part == BRID )
164 m_H = BOX_TH;
165 else
166 {
167 if( m_ID == -1 ) // virtual encap gap
168 m_H = E_AS_RMAX - E_BOX_DR - E_GP_DY;
169 else if( m_ID == 1 ) // for panel logical operation "AND" valid;
170 m_H = E_AS_RMAX - E_BOX_DR - E_GP_RMIN[m_Layer] + OVERLAP_WIDTH;
171 else
172 m_H = E_AS_RMAX - E_BOX_DR - E_GP_RMIN[m_Layer];
173 }
174}
double m_H
Definition MucEntity.h:102

Referenced by Init().

◆ SetL()

void MucBox::SetL ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 176 of file MucBox.cxx.

177{
178 if( m_Part == BRID )
179 {
180 if( m_Segment != B_TOP || m_ID == -1 )
181 m_L = B_BOX_LT;
182 else // top segment
183 {
184 if( m_ID == 2 )
185 m_L = B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)];
186 else
187 m_L = B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)];
188 }
189 }
190 else
191 m_L = BOX_TH;
192}

Referenced by Init().

◆ SetLocOrgInBes()

void MucBox::SetLocOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 247 of file MucBox.cxx.

248{
249 double x, y, z;
250 x = y = z = 0.;
251
252 if( m_Part == BRID )
253 {
254 x = m_Rc*cos( m_Theta );
255 y = m_Rc*sin( m_Theta );
256 z = 0.;
257 } // barrel
258 else
259 {
260 //------------ set x and y ---------------
261 // segment 0 as reference
262 if( m_ID == -1 ) // for box, local is gap
263 {
264 x = (E_AS_RMAX + E_GP_DX) / 2.0;
265 y = (E_AS_RMAX + E_GP_DY) / 2.0;
266 }
267 else // for box panel, local is box
268 {
269 x = (E_AS_RMAX - E_BOX_DR + E_GP_DX) / 2.0;
270 y = (E_AS_RMAX - E_BOX_DR + E_GP_DY) / 2.0;
271 }
272
273 // x, y signs of coordinate different by segment
274 if ( m_Segment == 0 ) { ; }
275 else if ( m_Segment == 1 ) { x = -x; }
276 else if ( m_Segment == 2 ) { x = -x; y = -y; }
277 else { y = -y; }
278
279 //------------- set z --------------------
280 for( int i=0; i<m_Layer+1; i++ ) z += E_AS_TH[i];
281
282 z += m_Layer * AS_GAP;
283 z += (E_AS_ZMAX - E_AS_TOTAL_TH) + AS_GAP/2.0;
284 z *= cos( m_Part*MUC_PI/2.0 );
285
286 }// endcap
287
288 m_LocOrgInBes[0] = x;
289 m_LocOrgInBes[1] = y;
290 m_LocOrgInBes[2] = z;
291
292 // limit cut
293 for(int i=0;i<3;i++) {
294 if( fabs(m_LocOrgInBes[i]) < ERR_LIMIT ) m_LocOrgInBes[i] = 0;
295 }
296}
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:94
double m_LocOrgInBes[3]
Definition MucEntity.h:108
double m_Rc
Definition MucEntity.h:99
double y[1000]

Referenced by Init().

◆ SetObjOrgInBes()

void MucBox::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 315 of file MucBox.cxx.

316{
317 double x, y, z;
318 x = y = z = 0.;
319
320 if( m_Part == BRID )
321 {
322 if( m_Segment != B_TOP || m_ID == -1 )
323 for( int i=0; i<3; i++ ) m_ObjOrgInBes[i] = m_LocOrgInBes[i];
324 else // top segment
325 {
326 // set x
327 if( m_ID == 2 ) x = 0.;
328 else x = (1-2*m_ID) * ( B_BOX_WT[m_Layer] + B_BOX_SLOT_WT )/4.0;
329
330 // set z
331 if( m_ID == 2 ) z = -B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] / 2.0;
332 else z = ( B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] )/2.0;
333
334 m_ObjOrgInBes[0] = x;
335 m_ObjOrgInBes[2] = z;
336
337 // set y
339
340 // limit cut
341 for( int i=0; i<3; i++ )
342 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
343 }
344 }
345 else // endcap
346 {
347 //------------- set x, y --------------------------
348 // segment 0 as reference
349 if( m_ID == -1 ) {
350 x = (E_AS_RMAX - E_BOX_DR + E_GP_DX) / 2.0;
351 y = (E_AS_RMAX - E_BOX_DR + E_GP_DY) / 2.0;
352 }
353 else if( m_ID == 0 ) {
354 x = m_Rc;
355 y = ( m_Rc * tan( m_Theta ) + E_GP_DY ) / 2.0;
356 }
357 else if ( m_ID ==1 ) {
358 x = m_Rc * cos( m_Theta );
359 y = m_Rc * sin( m_Theta );
360 }
361 else { // m_ID == 2
362 x = ( m_Rc / tan( m_Theta ) + E_GP_DX ) / 2.0;
363 y = m_Rc;
364 }
365
366 // x, y signs of coordinate different by segment
367 if ( m_Segment == 0 ) { ; }
368 else if ( m_Segment == 1 ) { x = -x; }
369 else if ( m_Segment == 2 ) { x = -x; y = -y; }
370 else { y = -y; }
371
372 m_ObjOrgInBes[0] = x;
373 m_ObjOrgInBes[1] = y;
374
375 // limit cut
376 for( int i=0; i<2; i++ )
377 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
378
379 //---------- set z ---------------------
381 } // else, panels
382}
double tan(const BesAngle a)
Definition BesAngle.h:216
double m_ObjOrgInBes[3]
Definition MucEntity.h:117

Referenced by Init().

◆ SetObjOrgInLoc()

void MucBox::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 384 of file MucBox.cxx.

385{
386 if( m_Part == BRID )
387 {
388 if( m_Segment != B_TOP )
389 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = 0.;
390 else
391 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
392 }
393 else
394 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
395}

Referenced by Init().

◆ SetObjRotToMot()

void MucBox::SetObjRotToMot ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 298 of file MucBox.cxx.

299{
300 m_ObjRotToMot[0] = 0.;
301 m_ObjRotToMot[1] = 0.;
302
303 if( m_Part == BRID )
304 {
305 // for barrel segment 5, 6 and 7, the box is uppended in the gap
306 if( m_Segment == 5 || m_Segment == 6 || m_Segment == 7 )
307 m_ObjRotToMot[2] = MUC_PI;
308 else
309 m_ObjRotToMot[2] = 0.;
310 }
311 else
312 m_ObjRotToMot[2] = 0.;
313}
double m_ObjRotToMot[3]
Definition MucEntity.h:110

Referenced by Init().

◆ SetRc()

void MucBox::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 124 of file MucBox.cxx.

125{
126 if( m_Part == BRID ) m_Rc = B_AS_RMIN[m_Layer] - AS_GAP/2.0;
127 else {
128 if( m_ID == -1 ) m_Rc = sqrt(2.0) * ( E_AS_RMAX - E_BOX_DR ) / 2.0;
129 else m_Rc = (m_Rin + m_Rout)/2.0;
130 }
131}
double m_Rin
Definition MucEntity.h:97
double m_Rout
Definition MucEntity.h:98

Referenced by Init().

◆ SetRin()

void MucBox::SetRin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 109 of file MucBox.cxx.

110{
111 if( m_Part == BRID ) m_Rin = B_AS_RMIN[m_Layer] - ( AS_GAP + BOX_TH ) / 2.0;
112 else {
113 if( m_ID == -1 ) m_Rin = 0.;
114 else m_Rin = E_GP_RMIN[m_Layer];
115 }
116}

Referenced by Init().

◆ SetRout()

void MucBox::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 118 of file MucBox.cxx.

119{
120 if( m_Part == BRID ) m_Rout = B_AS_RMIN[m_Layer] -( AS_GAP - BOX_TH ) / 2.0;
121 else m_Rout = E_AS_RMAX - E_BOX_DR;
122}

Referenced by Init().

◆ SetTheta()

void MucBox::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 100 of file MucBox.cxx.

101{
102 if( m_Part == BRID ) m_Theta = m_Segment * ( MUC_PI/4.0 );
103 else {
104 if( m_ID == -1 ) m_Theta = ( 2*m_Segment + 1 ) * ( MUC_PI/4.0 );
105 else m_Theta = ( MUC_PI/4.0 ) + ( m_ID - 1) * MUC_PI / 8.0 ;
106 }
107}

Referenced by Init().

◆ SetThin()

void MucBox::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 133 of file MucBox.cxx.

134{
135 m_Thin = BOX_TH;
136}
double m_Thin
Definition MucEntity.h:100

Referenced by Init().

◆ SetW()

void MucBox::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 138 of file MucBox.cxx.

139{
140 if( m_Part == BRID)
141 {
142 if( m_Segment != B_TOP )
143 m_W = B_BOX_WT[m_Layer];
144 else // top segment
145 {
146 if( m_ID == -1 || m_ID == 2 )
147 m_W = B_BOX_WT[m_Layer];
148 else
149 m_W = ( B_BOX_WT[m_Layer] - B_BOX_SLOT_WT )/2.0;
150 }
151 }
152 else
153 {
154 if( m_ID == -1 ) // virtual encap gap
155 m_W = E_AS_RMAX - E_BOX_DR - E_GP_DX;
156 else
157 m_W = 0.;
158 }
159}

Referenced by Init().

◆ SetWd()

void MucBox::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 217 of file MucBox.cxx.

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

Referenced by Init().

◆ SetWu()

void MucBox::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 194 of file MucBox.cxx.

195{
196 if( m_Part == BRID )
197 m_Wu = m_W;
198 else
199 {
200 if( m_ID == -1 ) // virtual box
201 m_Wu = m_W;
202 else if( m_ID == 1 ) // center fraction
203 {
204 m_Wu = 2 * VALUE * m_Rin ;
205 m_Wu -= 2*VALUE*(2.0/2); // for panel operation "AND" valid
206 m_Wu += OVERLAP_WIDTH;
207 }
208 else if( m_ID == 0 )
209 m_Wu = VALUE * m_Rin - E_GP_DY;
210 else
211 m_Wu = VALUE * m_Rin - E_GP_DX;
212
213 if( m_ID != -1 ) m_Wu+=OVERLAP_WIDTH; // avoid panels overlap
214 }
215}
double m_Wu
Definition MucEntity.h:104

Referenced by Init().


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