BOSS 8.0.0
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 ()

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.

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

Referenced by MucBox(), and operator=().

◆ MucBox() [2/2]

MucBox::MucBox ( const MucBox & other)

Definition at line 27 of file MucBox.cxx.

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

◆ ~MucBox()

MucBox::~MucBox ( )

Definition at line 46 of file MucBox.cxx.

46 {
47 delete m_MucStripPlane;
48 delete m_MucRpc;
49 delete m_MucBoxCover;
50}

Member Function Documentation

◆ GetBoxCover()

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

Definition at line 86 of file MucBox.cxx.

86 {
87 if ( m_MucBoxCover != NULL ) delete m_MucBoxCover;
88 return ( m_MucBoxCover = new MucBoxCover( m_Part, m_Segment, m_Layer, upDown, id ) );
89}
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 81 of file MucBox.cxx.

81 {
82 if ( m_MucRpc != NULL ) delete m_MucRpc;
83 return ( m_MucRpc = new MucRpc( m_Part, m_Segment, m_Layer, upDown, id ) );
84}

◆ GetStripPlane()

MucStripPlane * MucBox::GetStripPlane ( )

Definition at line 74 of file MucBox.cxx.

74 {
75 if ( m_MucStripPlane != NULL ) return m_MucStripPlane;
76 else
77 return ( m_MucStripPlane = new MucStripPlane( m_Part, m_Segment, m_Layer,
78 ( ( m_Part == BRID ) ? 0 : -1 ) ) );
79}

◆ Init()

void MucBox::Init ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 53 of file MucBox.cxx.

53 {
54 SetTheta();
55 SetRin();
56 SetRout();
57 SetRc();
58
59 SetThin();
60 SetW();
61 SetWu();
62 SetWd();
63 SetH();
64 SetL();
65 SetArea();
66
71}
virtual void SetObjOrgInLoc()
Definition MucBox.cxx:357
virtual void SetRc()
Definition MucBox.cxx:115
virtual void SetRout()
Definition MucBox.cxx:110
virtual void SetObjOrgInBes()
Definition MucBox.cxx:281
virtual void SetArea()
Definition MucBox.cxx:207
virtual void SetRin()
Definition MucBox.cxx:101
virtual void SetLocOrgInBes()
Definition MucBox.cxx:213
virtual void SetH()
Definition MucBox.cxx:144
virtual void SetTheta()
Definition MucBox.cxx:92
virtual void SetL()
Definition MucBox.cxx:156
virtual void SetObjRotToMot()
Definition MucBox.cxx:268
virtual void SetThin()
Definition MucBox.cxx:124
virtual void SetWu()
Definition MucBox.cxx:169
virtual void SetW()
Definition MucBox.cxx:126
virtual void SetWd()
Definition MucBox.cxx:188

Referenced by MucBox().

◆ operator=()

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

Definition at line 34 of file MucBox.cxx.

34 {
35 if ( this == &other ) return *this;
36
37 MucEntity::operator=( other );
38 m_MucRpc = other.m_MucRpc;
39 m_MucBoxCover = other.m_MucBoxCover;
40 m_MucStripPlane = other.m_MucStripPlane;
41
42 return *this;
43}
MucEntity & operator=(const MucEntity &other)
Definition MucEntity.cxx:87

◆ SetAlignment()

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

Reimplemented from MucEntity.

Definition at line 369 of file MucBox.cxx.

369 {
370 if ( m_Part == BRID || m_ID == -1 )
371 {
372 m_ObjOrgInLoc[0] += dx;
373 m_ObjOrgInLoc[1] += dy;
374 m_ObjOrgInLoc[2] += dz;
375 }
376}
double m_ObjOrgInLoc[3]
Definition MucEntity.h:118

Referenced by MucGeoMgr::CreateBox().

◆ SetArea()

void MucBox::SetArea ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 207 of file MucBox.cxx.

207 {
208 if ( m_Part == BRID ) m_Area = m_W * m_L;
209 else m_Area = m_W * m_L;
210}
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 144 of file MucBox.cxx.

144 {
145 if ( m_Part == BRID ) m_H = BOX_TH;
146 else
147 {
148 if ( m_ID == -1 ) // virtual encap gap
149 m_H = E_AS_RMAX - E_BOX_DR - E_GP_DY;
150 else if ( m_ID == 1 ) // for panel logical operation "AND" valid;
151 m_H = E_AS_RMAX - E_BOX_DR - E_GP_RMIN[m_Layer] + OVERLAP_WIDTH;
152 else m_H = E_AS_RMAX - E_BOX_DR - E_GP_RMIN[m_Layer];
153 }
154}
double m_H
Definition MucEntity.h:102

Referenced by Init().

◆ SetL()

void MucBox::SetL ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 156 of file MucBox.cxx.

156 {
157 if ( m_Part == BRID )
158 {
159 if ( m_Segment != B_TOP || m_ID == -1 ) m_L = B_BOX_LT;
160 else // top segment
161 {
162 if ( m_ID == 2 ) m_L = B_BOX_LT - B_TOPRPC_LTS[( m_Layer == 0 ) ? 1 : ( m_Layer % 2 )];
163 else m_L = B_TOPRPC_LTS[( m_Layer == 0 ) ? 1 : ( m_Layer % 2 )];
164 }
165 }
166 else m_L = BOX_TH;
167}

Referenced by Init().

◆ SetLocOrgInBes()

void MucBox::SetLocOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 213 of file MucBox.cxx.

213 {
214 double x, y, z;
215 x = y = z = 0.;
216
217 if ( m_Part == BRID )
218 {
219 x = m_Rc * cos( m_Theta );
220 y = m_Rc * sin( m_Theta );
221 z = 0.;
222 } // barrel
223 else
224 {
225 //------------ set x and y ---------------
226 // segment 0 as reference
227 if ( m_ID == -1 ) // for box, local is gap
228 {
229 x = ( E_AS_RMAX + E_GP_DX ) / 2.0;
230 y = ( E_AS_RMAX + E_GP_DY ) / 2.0;
231 }
232 else // for box panel, local is box
233 {
234 x = ( E_AS_RMAX - E_BOX_DR + E_GP_DX ) / 2.0;
235 y = ( E_AS_RMAX - E_BOX_DR + E_GP_DY ) / 2.0;
236 }
237
238 // x, y signs of coordinate different by segment
239 if ( m_Segment == 0 ) { ; }
240 else if ( m_Segment == 1 ) { x = -x; }
241 else if ( m_Segment == 2 )
242 {
243 x = -x;
244 y = -y;
245 }
246 else { y = -y; }
247
248 //------------- set z --------------------
249 for ( int i = 0; i < m_Layer + 1; i++ ) z += E_AS_TH[i];
250
251 z += m_Layer * AS_GAP;
252 z += ( E_AS_ZMAX - E_AS_TOTAL_TH ) + AS_GAP / 2.0;
253 z *= cos( m_Part * MUC_PI / 2.0 );
254
255 } // endcap
256
257 m_LocOrgInBes[0] = x;
258 m_LocOrgInBes[1] = y;
259 m_LocOrgInBes[2] = z;
260
261 // limit cut
262 for ( int i = 0; i < 3; i++ )
263 {
264 if ( fabs( m_LocOrgInBes[i] ) < ERR_LIMIT ) m_LocOrgInBes[i] = 0;
265 }
266}
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

Referenced by Init().

◆ SetObjOrgInBes()

void MucBox::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 281 of file MucBox.cxx.

281 {
282 double x, y, z;
283 x = y = z = 0.;
284
285 if ( m_Part == BRID )
286 {
287 if ( m_Segment != B_TOP || m_ID == -1 )
288 for ( int i = 0; i < 3; i++ ) m_ObjOrgInBes[i] = m_LocOrgInBes[i];
289 else // top segment
290 {
291 // set x
292 if ( m_ID == 2 ) x = 0.;
293 else x = ( 1 - 2 * m_ID ) * ( B_BOX_WT[m_Layer] + B_BOX_SLOT_WT ) / 4.0;
294
295 // set z
296 if ( m_ID == 2 ) z = -B_TOPRPC_LTS[( m_Layer == 0 ) ? 1 : ( m_Layer % 2 )] / 2.0;
297 else z = ( B_BOX_LT - B_TOPRPC_LTS[( m_Layer == 0 ) ? 1 : ( m_Layer % 2 )] ) / 2.0;
298
299 m_ObjOrgInBes[0] = x;
300 m_ObjOrgInBes[2] = z;
301
302 // set y
304
305 // limit cut
306 for ( int i = 0; i < 3; i++ )
307 if ( fabs( m_ObjOrgInBes[i] ) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
308 }
309 }
310 else // endcap
311 {
312 //------------- set x, y --------------------------
313 // segment 0 as reference
314 if ( m_ID == -1 )
315 {
316 x = ( E_AS_RMAX - E_BOX_DR + E_GP_DX ) / 2.0;
317 y = ( E_AS_RMAX - E_BOX_DR + E_GP_DY ) / 2.0;
318 }
319 else if ( m_ID == 0 )
320 {
321 x = m_Rc;
322 y = ( m_Rc * tan( m_Theta ) + E_GP_DY ) / 2.0;
323 }
324 else if ( m_ID == 1 )
325 {
326 x = m_Rc * cos( m_Theta );
327 y = m_Rc * sin( m_Theta );
328 }
329 else
330 { // m_ID == 2
331 x = ( m_Rc / tan( m_Theta ) + E_GP_DX ) / 2.0;
332 y = m_Rc;
333 }
334
335 // x, y signs of coordinate different by segment
336 if ( m_Segment == 0 ) { ; }
337 else if ( m_Segment == 1 ) { x = -x; }
338 else if ( m_Segment == 2 )
339 {
340 x = -x;
341 y = -y;
342 }
343 else { y = -y; }
344
345 m_ObjOrgInBes[0] = x;
346 m_ObjOrgInBes[1] = y;
347
348 // limit cut
349 for ( int i = 0; i < 2; i++ )
350 if ( fabs( m_ObjOrgInBes[i] ) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
351
352 //---------- set z ---------------------
354 } // else, panels
355}
double m_ObjOrgInBes[3]
Definition MucEntity.h:117

Referenced by Init().

◆ SetObjOrgInLoc()

void MucBox::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 357 of file MucBox.cxx.

357 {
358 if ( m_Part == BRID )
359 {
360 if ( m_Segment != B_TOP )
361 for ( int i = 0; i < 3; i++ ) m_ObjOrgInLoc[i] = 0.;
362 else
363 for ( int i = 0; i < 3; i++ ) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
364 }
365 else
366 for ( int i = 0; i < 3; i++ ) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
367}

Referenced by Init().

◆ SetObjRotToMot()

void MucBox::SetObjRotToMot ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 268 of file MucBox.cxx.

268 {
269 m_ObjRotToMot[0] = 0.;
270 m_ObjRotToMot[1] = 0.;
271
272 if ( m_Part == BRID )
273 {
274 // for barrel segment 5, 6 and 7, the box is uppended in the gap
275 if ( m_Segment == 5 || m_Segment == 6 || m_Segment == 7 ) m_ObjRotToMot[2] = MUC_PI;
276 else m_ObjRotToMot[2] = 0.;
277 }
278 else m_ObjRotToMot[2] = 0.;
279}
double m_ObjRotToMot[3]
Definition MucEntity.h:110

Referenced by Init().

◆ SetRc()

void MucBox::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 115 of file MucBox.cxx.

115 {
116 if ( m_Part == BRID ) m_Rc = B_AS_RMIN[m_Layer] - AS_GAP / 2.0;
117 else
118 {
119 if ( m_ID == -1 ) m_Rc = sqrt( 2.0 ) * ( E_AS_RMAX - E_BOX_DR ) / 2.0;
120 else m_Rc = ( m_Rin + m_Rout ) / 2.0;
121 }
122}
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 101 of file MucBox.cxx.

101 {
102 if ( m_Part == BRID ) m_Rin = B_AS_RMIN[m_Layer] - ( AS_GAP + BOX_TH ) / 2.0;
103 else
104 {
105 if ( m_ID == -1 ) m_Rin = 0.;
106 else m_Rin = E_GP_RMIN[m_Layer];
107 }
108}

Referenced by Init().

◆ SetRout()

void MucBox::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 110 of file MucBox.cxx.

110 {
111 if ( m_Part == BRID ) m_Rout = B_AS_RMIN[m_Layer] - ( AS_GAP - BOX_TH ) / 2.0;
112 else m_Rout = E_AS_RMAX - E_BOX_DR;
113}

Referenced by Init().

◆ SetTheta()

void MucBox::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 92 of file MucBox.cxx.

92 {
93 if ( m_Part == BRID ) m_Theta = m_Segment * ( MUC_PI / 4.0 );
94 else
95 {
96 if ( m_ID == -1 ) m_Theta = ( 2 * m_Segment + 1 ) * ( MUC_PI / 4.0 );
97 else m_Theta = ( MUC_PI / 4.0 ) + ( m_ID - 1 ) * MUC_PI / 8.0;
98 }
99}

Referenced by Init().

◆ SetThin()

void MucBox::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 124 of file MucBox.cxx.

124{ m_Thin = BOX_TH; }
double m_Thin
Definition MucEntity.h:100

Referenced by Init().

◆ SetW()

void MucBox::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 126 of file MucBox.cxx.

126 {
127 if ( m_Part == BRID )
128 {
129 if ( m_Segment != B_TOP ) m_W = B_BOX_WT[m_Layer];
130 else // top segment
131 {
132 if ( m_ID == -1 || m_ID == 2 ) m_W = B_BOX_WT[m_Layer];
133 else m_W = ( B_BOX_WT[m_Layer] - B_BOX_SLOT_WT ) / 2.0;
134 }
135 }
136 else
137 {
138 if ( m_ID == -1 ) // virtual encap gap
139 m_W = E_AS_RMAX - E_BOX_DR - E_GP_DX;
140 else m_W = 0.;
141 }
142}

Referenced by Init().

◆ SetWd()

void MucBox::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 188 of file MucBox.cxx.

188 {
189 if ( m_Part == BRID ) m_Wd = m_W;
190 else
191 {
192 if ( m_ID == -1 ) // virtual box
193 m_Wd = m_W;
194 else if ( m_ID == 1 ) // center fraction
195 {
196 m_Wd = 2 * VALUE * m_Rout;
197 m_Wd += 2 * VALUE * ( 2.0 / 2 ); // for panel operation "AND" valid
198 m_Wd += OVERLAP_WIDTH;
199 }
200 else if ( m_ID == 0 ) m_Wd = VALUE * m_Rout - E_GP_DY;
201 else m_Wd = VALUE * m_Rout - E_GP_DX;
202
203 if ( m_ID != -1 ) m_Wd += OVERLAP_WIDTH; // avoid panels overlap
204 }
205}
double m_Wd
Definition MucEntity.h:105

Referenced by Init().

◆ SetWu()

void MucBox::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 169 of file MucBox.cxx.

169 {
170 if ( m_Part == BRID ) m_Wu = m_W;
171 else
172 {
173 if ( m_ID == -1 ) // virtual box
174 m_Wu = m_W;
175 else if ( m_ID == 1 ) // center fraction
176 {
177 m_Wu = 2 * VALUE * m_Rin;
178 m_Wu -= 2 * VALUE * ( 2.0 / 2 ); // for panel operation "AND" valid
179 m_Wu += OVERLAP_WIDTH;
180 }
181 else if ( m_ID == 0 ) m_Wu = VALUE * m_Rin - E_GP_DY;
182 else m_Wu = VALUE * m_Rin - E_GP_DX;
183
184 if ( m_ID != -1 ) m_Wu += OVERLAP_WIDTH; // avoid panels overlap
185 }
186}
double m_Wu
Definition MucEntity.h:104

Referenced by Init().


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