BOSS 8.0.0
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.

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

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

◆ 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 33 of file MucBoxCover.cxx.

33{ ; }

Member Function Documentation

◆ Init()

void MucBoxCover::Init ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 36 of file MucBoxCover.cxx.

36 {
37 SetTheta();
38 SetRin();
39 SetRout();
40 SetRc();
41
42 SetThin();
43 SetW();
44 SetWu();
45 SetWd();
46 SetH();
47 SetL();
48
52}
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.

26 {
27 if ( this == &other ) return *this;
28 MucEntity::operator=( other );
29 return *this;
30}
MucEntity & operator=(const MucEntity &other)
Definition MucEntity.cxx:87

◆ SetH()

void MucBoxCover::SetH ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 111 of file MucBoxCover.cxx.

111 {
112 if ( m_Part == BRID ) m_H = BOX_COVER_TH;
113 else
114 {
115 if ( m_ID == -1 ) // virtual encap gap
116 m_H = E_AS_RMAX - E_BOX_DR - E_GP_DY;
117 else m_H = E_AS_RMAX - E_BOX_DR - E_GP_RMIN[m_Layer];
118 }
119}
double m_H
Definition MucEntity.h:102
int m_Layer
Definition MucEntity.h:89
int m_Part
Definition MucEntity.h:87

Referenced by Init().

◆ SetL()

void MucBoxCover::SetL ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 121 of file MucBoxCover.cxx.

121 {
122 if ( m_Part == BRID )
123 {
124 if ( m_Segment != B_TOP || m_ID == -1 ) m_L = B_BOX_LT;
125 else // top segment
126 {
127 if ( m_ID == 2 ) m_L = B_BOX_LT - B_TOPRPC_LTS[( m_Layer == 0 ) ? 1 : ( m_Layer % 2 )];
128 else m_L = B_TOPRPC_LTS[( m_Layer == 0 ) ? 1 : ( m_Layer % 2 )];
129 }
130 }
131 else m_L = BOX_COVER_TH;
132}
int m_Segment
Definition MucEntity.h:88
double m_L
Definition MucEntity.h:103

Referenced by Init().

◆ SetLocOrgInBes()

void MucBoxCover::SetLocOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 161 of file MucBoxCover.cxx.

161 {
162 double x, y, z;
163 x = y = z = 0.;
164
165 if ( m_Part == BRID )
166 {
167 x = m_Rc * cos( m_Theta );
168 y = m_Rc * sin( m_Theta );
169 z = 0.;
170 } // barrel
171 else
172 {
173 //------------ set x and y ---------------
174 // segment 0 as reference
175 x = ( E_AS_RMAX - E_BOX_DR + E_GP_DX ) / 2.0;
176 y = ( E_AS_RMAX - E_BOX_DR + E_GP_DY ) / 2.0;
177
178 // sign different by segment
179 if ( m_Segment == 0 ) { ; }
180 else if ( m_Segment == 1 ) { x = -x; }
181 else if ( m_Segment == 2 )
182 {
183 x = -x;
184 y = -y;
185 }
186 else { y = -y; }
187
188 //------------- set z --------------------
189 for ( int i = 0; i < m_Layer + 1; i++ ) z += E_AS_TH[i];
190
191 z += m_Layer * AS_GAP;
192 z += ( E_AS_ZMAX - E_AS_TOTAL_TH ) + AS_GAP / 2.0;
193 z *= cos( m_Part * MUC_PI / 2.0 );
194
195 if ( m_ID != -1 ) z += ( 1 - 2 * m_UpDown ) * ( BOX_TH - BOX_COVER_TH ) / 2.0;
196
197 } // endcap
198
199 m_LocOrgInBes[0] = x;
200 m_LocOrgInBes[1] = y;
201 m_LocOrgInBes[2] = z;
202
203 // limit cut
204 for ( int i = 0; i < 3; i++ )
205 if ( fabs( m_LocOrgInBes[i] ) < ERR_LIMIT ) m_LocOrgInBes[i] = 0.;
206}
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
int m_UpDown
Definition MucEntity.h:90

Referenced by Init().

◆ SetObjOrgInBes()

void MucBoxCover::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 208 of file MucBoxCover.cxx.

208 {
209 double x, y, z;
210 x = y = z = 0.;
211
212 if ( m_Part == BRID ) // barrel
213 {
214 if ( m_Segment != B_TOP || m_ID == -1 )
215 {
216 double r;
217 r = m_Rc + ( 1 - 2 * m_UpDown ) * ( BOX_TH - BOX_COVER_TH ) / 2.0;
218 x = r * cos( m_Theta );
219 y = r * sin( m_Theta );
220 z = 0.;
221 }
222 else // top segment
223 {
224 // set x
225 if ( m_ID == 2 ) x = 0.;
226 else x = ( 1 - 2 * m_ID ) * ( B_BOX_WT[m_Layer] + B_BOX_SLOT_WT ) / 4.0;
227
228 // set y
229 y = m_Rc + ( 1 - 2 * m_UpDown ) * ( BOX_TH - BOX_COVER_TH ) / 2.0;
230
231 // set z
232 if ( m_ID == 2 ) z = -B_TOPRPC_LTS[( m_Layer == 0 ) ? 1 : ( m_Layer % 2 )] / 2.0;
233 else z = ( B_BOX_LT - B_TOPRPC_LTS[( m_Layer == 0 ) ? 1 : ( m_Layer % 2 )] ) / 2.0;
234 }
235 }
236 else // endcap
237 {
238 //------------- set x, y --------------------------
239 // segment 0 as reference
240 if ( m_ID == -1 )
241 { // box cover
242 x = ( E_AS_RMAX - E_BOX_DR + E_GP_DX ) / 2.0;
243 y = ( E_AS_RMAX - E_BOX_DR + E_GP_DY ) / 2.0;
244 }
245 else if ( m_ID == 0 )
246 { // box cover panels
247 x = m_Rc;
248 y = ( m_Rc * tan( m_Theta ) + E_GP_DY ) / 2.0;
249 }
250 else if ( m_ID == 1 )
251 {
252 x = m_Rc * cos( m_Theta );
253 y = m_Rc * sin( m_Theta );
254 }
255 else
256 { // m_ID == 2
257 x = ( m_Rc / tan( m_Theta ) + E_GP_DX ) / 2.0;
258 y = m_Rc;
259 }
260
261 // sign different by segment
262 if ( m_Segment == 0 ) { ; }
263 else if ( m_Segment == 1 ) { x = -x; }
264 else if ( m_Segment == 2 )
265 {
266 x = -x;
267 y = -y;
268 }
269 else { y = -y; }
270
271 //---------- set z --------------------
272 if ( m_ID == -1 )
273 z = m_LocOrgInBes[2] + ( 1 - 2 * m_UpDown ) * ( BOX_TH - BOX_COVER_TH ) / 2.0;
274 else z = m_LocOrgInBes[2];
275 } // else, endcap
276
277 m_ObjOrgInBes[0] = x;
278 m_ObjOrgInBes[1] = y;
279 m_ObjOrgInBes[2] = z;
280
281 // limit cut
282 for ( int i = 0; i < 3; i++ )
283 if ( fabs( m_ObjOrgInBes[i] ) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0.;
284}
double m_ObjOrgInBes[3]
Definition MucEntity.h:117

Referenced by Init().

◆ SetObjOrgInLoc()

void MucBoxCover::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 286 of file MucBoxCover.cxx.

286 {
287 if ( m_Part == BRID )
288 {
289 // set local x
290 if ( m_Segment != B_TOP || m_ID == -1 || m_ID == 2 ) m_ObjOrgInLoc[0] = 0.;
291 else m_ObjOrgInLoc[0] = ( 1 - 2 * m_ID ) * ( B_BOX_WT[m_Layer] + B_BOX_SLOT_WT ) / 4.0;
292
293 // set local y
294 m_ObjOrgInLoc[1] = ( 1 - 2 * m_UpDown ) * ( BOX_TH - BOX_COVER_TH ) / 2.0;
295 // m_ObjOrgInLoc[1] = 0.;
296
297 // set local z
298 if ( m_Segment != B_TOP || m_ID == -1 ) m_ObjOrgInLoc[2] = 0.;
299 else
300 {
301 if ( m_ID == 2 )
302 m_ObjOrgInLoc[2] = -B_TOPRPC_LTS[( m_Layer == 0 ) ? 1 : ( m_Layer % 2 )] / 2.0;
303 else
304 m_ObjOrgInLoc[2] =
305 ( B_BOX_LT - B_TOPRPC_LTS[( m_Layer == 0 ) ? 1 : ( m_Layer % 2 )] ) / 2.0;
306 }
307 }
308 else // endcap
309 {
310 for ( int i = 0; i < 3; i++ ) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
311 }
312
313 // limit cut
314 for ( int i = 0; i < 3; i++ )
315 if ( fabs( m_ObjOrgInLoc[i] ) < ERR_LIMIT ) m_ObjOrgInLoc[i] = 0.;
316}
double m_ObjOrgInLoc[3]
Definition MucEntity.h:118

Referenced by Init().

◆ SetRc()

void MucBoxCover::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 82 of file MucBoxCover.cxx.

82 {
83 if ( m_Part == BRID ) m_Rc = B_AS_RMIN[m_Layer] - AS_GAP / 2.0;
84 else
85 {
86 if ( m_ID == -1 ) m_Rc = sqrt( 2.0 ) * ( E_AS_RMAX - E_BOX_DR ) / 2.0;
87 else m_Rc = ( m_Rin + m_Rout ) / 2.0;
88 }
89}
double m_Rin
Definition MucEntity.h:97
double m_Rout
Definition MucEntity.h:98

Referenced by Init().

◆ SetRin()

void MucBoxCover::SetRin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 66 of file MucBoxCover.cxx.

66 {
67 if ( m_Part == BRID ) m_Rin = B_AS_RMIN[m_Layer] - ( AS_GAP + BOX_TH ) / 2.0;
68 else
69 {
70 if ( m_ID == -1 ) m_Rin = 0.0;
71 else m_Rin = E_GP_RMIN[m_Layer];
72 }
73}

Referenced by Init().

◆ SetRout()

void MucBoxCover::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 76 of file MucBoxCover.cxx.

76 {
77 if ( m_Part == BRID ) m_Rout = B_AS_RMIN[m_Layer] - ( AS_GAP - BOX_TH ) / 2.0;
78 else m_Rout = E_AS_RMAX - E_BOX_DR;
79}

Referenced by Init().

◆ SetTheta()

void MucBoxCover::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 56 of file MucBoxCover.cxx.

56 {
57 if ( m_Part == BRID ) m_Theta = m_Segment * ( MUC_PI / 4.0 );
58 else
59 {
60 if ( m_ID == -1 ) m_Theta = ( 2 * m_Segment + 1 ) * ( MUC_PI / 4.0 );
61 else m_Theta = ( MUC_PI / 4.0 ) + ( m_ID - 1 ) * MUC_PI / 8.0;
62 }
63}

Referenced by Init().

◆ SetThin()

void MucBoxCover::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 91 of file MucBoxCover.cxx.

91{ m_Thin = BOX_COVER_TH; }
double m_Thin
Definition MucEntity.h:100

Referenced by Init().

◆ SetW()

void MucBoxCover::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 93 of file MucBoxCover.cxx.

93 {
94 if ( m_Part == BRID )
95 {
96 if ( m_Segment != B_TOP ) m_W = B_BOX_WT[m_Layer];
97 else
98 { // top segment
99 if ( m_ID == -1 || m_ID == 2 ) m_W = B_BOX_WT[m_Layer];
100 else m_W = ( B_BOX_WT[m_Layer] - B_BOX_SLOT_WT ) / 2.0;
101 }
102 }
103 else
104 {
105 if ( m_ID == -1 ) // virtual encap gap
106 m_W = E_AS_RMAX - E_BOX_DR - E_GP_DX;
107 else m_W = 0.;
108 }
109}
double m_W
Definition MucEntity.h:101

Referenced by Init().

◆ SetWd()

void MucBoxCover::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 147 of file MucBoxCover.cxx.

147 {
148 if ( m_Part == BRID ) m_Wd = m_W;
149 else
150 {
151 if ( m_ID == -1 ) // virtual box
152 m_Wd = m_W;
153 else if ( m_ID == 1 ) // center fraction
154 m_Wd = 2 * VALUE * m_Rout;
155 else if ( m_ID == 0 ) m_Wd = VALUE * m_Rout - E_GP_DY;
156 else m_Wd = VALUE * m_Rout - E_GP_DX;
157 }
158}
double m_Wd
Definition MucEntity.h:105

Referenced by Init().

◆ SetWu()

void MucBoxCover::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 134 of file MucBoxCover.cxx.

134 {
135 if ( m_Part == BRID ) m_Wu = m_W;
136 else
137 {
138 if ( m_ID == -1 ) // virtual box
139 m_Wu = m_W;
140 else if ( m_ID == 1 ) // center fraction
141 m_Wu = 2 * VALUE * m_Rin;
142 else if ( m_ID == 0 ) m_Wu = VALUE * m_Rin - E_GP_DY;
143 else m_Wu = VALUE * m_Rin - E_GP_DX;
144 }
145}
double m_Wu
Definition MucEntity.h:104

Referenced by Init().


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