CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
MucBoxCover Class Reference

#include <MucBoxCover.h>

+ Inheritance diagram for MucBoxCover:

Public Member Functions

 MucBoxCover (int part, int segment, int layer, int upDown, int id)
 
 MucBoxCover (const MucBoxCover &other)
 
MucBoxCoveroperator= (const MucBoxCover &other)
 
 ~MucBoxCover ()
 
- 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 SetLocOrgInBes ()
 
virtual void SetObjOrgInBes ()
 
virtual void SetObjOrgInLoc ()
 
- Protected Member Functions inherited from MucEntity
virtual void SetArea ()
 
virtual void SetObjRotToMot ()
 
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 17 of file MucBoxCover.h.

Constructor & Destructor Documentation

◆ MucBoxCover() [1/2]

MucBoxCover::MucBoxCover ( int part,
int segment,
int layer,
int upDown,
int id )

Definition at line 17 of file MucBoxCover.cxx.

17 : MucEntity( part, segment, layer, upDown, id )
18{
20}
virtual void Init()
MucEntity(int part, int segment, int layer)
Definition MucEntity.cxx:17

◆ MucBoxCover() [2/2]

MucBoxCover::MucBoxCover ( const MucBoxCover & other)

Definition at line 23 of file MucBoxCover.cxx.

23: MucEntity( other ) { ; }

◆ ~MucBoxCover()

MucBoxCover::~MucBoxCover ( )

Definition at line 37 of file MucBoxCover.cxx.

38{
39 ;
40}

Member Function Documentation

◆ Init()

void MucBoxCover::Init ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 43 of file MucBoxCover.cxx.

44{
45 SetTheta();
46 SetRin();
47 SetRout();
48 SetRc();
49
50 SetThin();
51 SetW();
52 SetWu();
53 SetWd();
54 SetH();
55 SetL();
56
60}
virtual void SetWu()
virtual void SetL()
virtual void SetObjOrgInBes()
virtual void SetThin()
virtual void SetWd()
virtual void SetW()
virtual void SetRin()
virtual void SetRout()
virtual void SetLocOrgInBes()
virtual void SetRc()
virtual void SetObjOrgInLoc()
virtual void SetTheta()
virtual void SetH()

Referenced by MucBoxCover().

◆ operator=()

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

Definition at line 26 of file MucBoxCover.cxx.

27{
28 if( this == &other)
29 return *this;
30
32
33 return *this;
34}
MucEntity & operator=(const MucEntity &other)
Definition MucEntity.cxx:92

◆ SetH()

void MucBoxCover::SetH ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 142 of file MucBoxCover.cxx.

143{
144 if( m_Part == BRID )
145 m_H = BOX_COVER_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
151 m_H = E_AS_RMAX - E_BOX_DR - E_GP_RMIN[m_Layer];
152 }
153}
double m_H
Definition MucEntity.h:103
int m_Layer
Definition MucEntity.h:90
int m_Part
Definition MucEntity.h:88

Referenced by Init().

◆ SetL()

void MucBoxCover::SetL ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 155 of file MucBoxCover.cxx.

156{
157 if( m_Part == BRID )
158 {
159 if( m_Segment != B_TOP || m_ID == -1 )
160 m_L = B_BOX_LT;
161 else // top segment
162 {
163 if( m_ID == 2 )
164 m_L = B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)];
165 else
166 m_L = B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)];
167 }
168 }
169 else
170 m_L = BOX_COVER_TH;
171}
int m_Segment
Definition MucEntity.h:89
double m_L
Definition MucEntity.h:104

Referenced by Init().

◆ SetLocOrgInBes()

void MucBoxCover::SetLocOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 208 of file MucBoxCover.cxx.

209{
210 double x, y, z;
211 x = y = z = 0.;
212
213 if( m_Part == BRID )
214 {
215 x = m_Rc*cos( m_Theta );
216 y = m_Rc*sin( m_Theta );
217 z = 0.;
218
219 } // barrel
220 else
221 {
222 //------------ set x and y ---------------
223 // segment 0 as reference
224 x = (E_AS_RMAX - E_BOX_DR + E_GP_DX) / 2.0;
225 y = (E_AS_RMAX - E_BOX_DR + E_GP_DY) / 2.0;
226
227 // sign different by segment
228 if ( m_Segment == 0 ) { ; }
229 else if( m_Segment == 1 ) { x = -x; }
230 else if( m_Segment == 2 ) { x = -x; y = -y; }
231 else { y = -y; }
232
233 //------------- set z --------------------
234 for( int i=0; i<m_Layer+1; i++ ) z += E_AS_TH[i];
235
236 z += m_Layer * AS_GAP;
237 z += (E_AS_ZMAX - E_AS_TOTAL_TH) + AS_GAP/2.0;
238 z *= cos( m_Part*MUC_PI/2.0 );
239
240 if( m_ID != -1 ) z += (1-2*m_UpDown)*(BOX_TH - BOX_COVER_TH)/2.0;
241
242 }// endcap
243
244 m_LocOrgInBes[0] = x;
245 m_LocOrgInBes[1] = y;
246 m_LocOrgInBes[2] = z;
247
248 // limit cut
249 for(int i=0;i<3;i++) {
250 if( fabs(m_LocOrgInBes[i]) < ERR_LIMIT ) m_LocOrgInBes[i] = 0.;
251 }
252}
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
int m_UpDown
Definition MucEntity.h:91

Referenced by Init().

◆ SetObjOrgInBes()

void MucBoxCover::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 254 of file MucBoxCover.cxx.

255{
256 double x, y, z;
257 x = y = z =0.;
258
259 if( m_Part == BRID ) // barrel
260 {
261 if( m_Segment != B_TOP || m_ID ==-1 )
262 {
263 double r;
264 r = m_Rc + (1-2*m_UpDown)*(BOX_TH - BOX_COVER_TH) / 2.0;
265 x = r * cos( m_Theta );
266 y = r * sin( m_Theta );
267 z = 0.;
268 }
269 else // top segment
270 {
271 // set x
272 if( m_ID == 2 ) x = 0.;
273 else x = (1-2*m_ID) * ( B_BOX_WT[m_Layer] + B_BOX_SLOT_WT )/4.0;
274
275 // set y
276 y = m_Rc + (1-2*m_UpDown)*(BOX_TH - BOX_COVER_TH) / 2.0;
277
278 // set z
279 if( m_ID == 2 ) z = -B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] / 2.0;
280 else z = ( B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] )/2.0;
281 }
282 }
283 else // endcap
284 {
285 //------------- set x, y --------------------------
286 // segment 0 as reference
287 if( m_ID == -1 ) // box cover
288 {
289 x = (E_AS_RMAX - E_BOX_DR + E_GP_DX) / 2.0;
290 y = (E_AS_RMAX - E_BOX_DR + E_GP_DY) / 2.0;
291 }
292 else if( m_ID == 0 ) // box cover panels
293 {
294 x = m_Rc;
295 y = ( m_Rc * tan( m_Theta ) + E_GP_DY ) / 2.0;
296 }
297 else if ( m_ID == 1 )
298 {
299 x = m_Rc * cos( m_Theta );
300 y = m_Rc * sin( m_Theta );
301 }
302 else // m_ID == 2
303 {
304 x = ( m_Rc / tan( m_Theta ) + E_GP_DX ) / 2.0;
305 y = m_Rc;
306 }
307
308 // sign different by segment
309 if ( m_Segment == 0 ) { ; }
310 else if( m_Segment == 1 ) { x = -x; }
311 else if( m_Segment == 2 ) { x = -x; y = -y; }
312 else { y = -y; }
313
314 //---------- set z --------------------
315 if( m_ID == -1 )
316 z = m_LocOrgInBes[2] + (1-2*m_UpDown)*(BOX_TH - BOX_COVER_TH)/2.0;
317 else
318 z = m_LocOrgInBes[2];
319
320 } // else, endcap
321
322 m_ObjOrgInBes[0] = x;
323 m_ObjOrgInBes[1] = y;
324 m_ObjOrgInBes[2] = z;
325
326 // limit cut
327 for( int i=0; i<3; i++ ) {
328 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0.;
329 }
330
331}
double tan(const BesAngle a)
Definition BesAngle.h:216
double m_ObjOrgInBes[3]
Definition MucEntity.h:118

Referenced by Init().

◆ SetObjOrgInLoc()

void MucBoxCover::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 333 of file MucBoxCover.cxx.

334{
335 if( m_Part == BRID )
336 {
337
338 // set local x
339 if( m_Segment != B_TOP || m_ID == -1 || m_ID == 2 )
340 m_ObjOrgInLoc[0] = 0.;
341 else
342 m_ObjOrgInLoc[0] = (1-2*m_ID) * ( B_BOX_WT[m_Layer] + B_BOX_SLOT_WT )/4.0;
343
344 // set local y
345 m_ObjOrgInLoc[1] = (1-2*m_UpDown)*(BOX_TH - BOX_COVER_TH)/2.0;
346// m_ObjOrgInLoc[1] = 0.;
347
348 // set local z
349 if( m_Segment != B_TOP || m_ID == -1 )
350 m_ObjOrgInLoc[2] = 0.;
351 else
352 {
353 if( m_ID == 2 ) m_ObjOrgInLoc[2] = -B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] / 2.0;
354 else m_ObjOrgInLoc[2] = ( B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] )/2.0;
355 }
356 }
357 else // endcap
358 {
359 for(int i=0; i<3; i++)
361 }
362
363 // limit cut
364 for( int i=0; i<3; i++ ) {
365 if( fabs(m_ObjOrgInLoc[i]) < ERR_LIMIT ) m_ObjOrgInLoc[i] = 0.;
366 }
367
368}
double m_ObjOrgInLoc[3]
Definition MucEntity.h:119

Referenced by Init().

◆ SetRc()

void MucBoxCover::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 101 of file MucBoxCover.cxx.

102{
103 if( m_Part == BRID )
104 m_Rc = B_AS_RMIN[m_Layer] - AS_GAP/2.0;
105 else
106 {
107 if( m_ID == -1 )
108 m_Rc = sqrt(2.0) * ( E_AS_RMAX - E_BOX_DR ) / 2.0;
109 else
110 m_Rc = (m_Rin + m_Rout)/2.0;
111 }
112}
double m_Rin
Definition MucEntity.h:98
double m_Rout
Definition MucEntity.h:99

Referenced by Init().

◆ SetRin()

void MucBoxCover::SetRin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 78 of file MucBoxCover.cxx.

79{
80 if( m_Part == BRID )
81 m_Rin = B_AS_RMIN[m_Layer] - ( AS_GAP + BOX_TH ) / 2.0;
82 else
83 {
84 if( m_ID == -1 )
85 m_Rin = 0.0;
86 else
87 m_Rin = E_GP_RMIN[m_Layer];
88 }
89}

Referenced by Init().

◆ SetRout()

void MucBoxCover::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 92 of file MucBoxCover.cxx.

93{
94 if( m_Part == BRID )
95 m_Rout = B_AS_RMIN[m_Layer] -( AS_GAP - BOX_TH ) / 2.0;
96 else
97 m_Rout = E_AS_RMAX - E_BOX_DR;
98}

Referenced by Init().

◆ SetTheta()

void MucBoxCover::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 64 of file MucBoxCover.cxx.

65{
66 if( m_Part == BRID )
67 m_Theta = m_Segment * ( MUC_PI/4.0 );
68 else
69 {
70 if( m_ID == -1 )
71 m_Theta = ( 2*m_Segment + 1 ) * ( MUC_PI/4.0 );
72 else
73 m_Theta = ( MUC_PI/4.0 ) + ( m_ID - 1) * MUC_PI / 8.0 ;
74 }
75}

Referenced by Init().

◆ SetThin()

void MucBoxCover::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 114 of file MucBoxCover.cxx.

115{
116 m_Thin = BOX_COVER_TH;
117}
double m_Thin
Definition MucEntity.h:101

Referenced by Init().

◆ SetW()

void MucBoxCover::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 119 of file MucBoxCover.cxx.

120{
121 if( m_Part == BRID)
122 {
123 if( m_Segment != B_TOP )
124 m_W = B_BOX_WT[m_Layer];
125 else // top segment
126 {
127 if( m_ID == -1 || m_ID == 2 )
128 m_W = B_BOX_WT[m_Layer];
129 else
130 m_W = ( B_BOX_WT[m_Layer] - B_BOX_SLOT_WT )/2.0;
131 }
132 }
133 else
134 {
135 if( m_ID == -1 ) // virtual encap gap
136 m_W = E_AS_RMAX - E_BOX_DR - E_GP_DX;
137 else
138 m_W = 0.;
139 }
140}
double m_W
Definition MucEntity.h:102

Referenced by Init().

◆ SetWd()

void MucBoxCover::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 190 of file MucBoxCover.cxx.

191{
192 if( m_Part == BRID )
193 m_Wd = m_W;
194 else
195 {
196 if( m_ID == -1 ) // virtual box
197 m_Wd = m_W;
198 else if( m_ID == 1 ) // center fraction
199 m_Wd = 2 * VALUE * m_Rout;
200 else if( m_ID == 0 )
201 m_Wd = VALUE * m_Rout - E_GP_DY;
202 else
203 m_Wd = VALUE * m_Rout - E_GP_DX;
204 }
205}
double m_Wd
Definition MucEntity.h:106

Referenced by Init().

◆ SetWu()

void MucBoxCover::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 173 of file MucBoxCover.cxx.

174{
175 if( m_Part == BRID )
176 m_Wu = m_W;
177 else
178 {
179 if( m_ID == -1 ) // virtual box
180 m_Wu = m_W;
181 else if( m_ID == 1 ) // center fraction
182 m_Wu = 2 * VALUE * m_Rin ;
183 else if( m_ID == 0 )
184 m_Wu = VALUE * m_Rin - E_GP_DY;
185 else
186 m_Wu = VALUE * m_Rin - E_GP_DX;
187 }
188}
double m_Wu
Definition MucEntity.h:105

Referenced by Init().


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