BOSS 7.1.2
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 )
19{
21}
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 24 of file MucBoxCover.cxx.

24: MucEntity( other ) { ; }

◆ ~MucBoxCover()

MucBoxCover::~MucBoxCover ( )

Definition at line 35 of file MucBoxCover.cxx.

35{ ; }

Member Function Documentation

◆ Init()

void MucBoxCover::Init ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 38 of file MucBoxCover.cxx.

39{
40 SetTheta();
41 SetRin();
42 SetRout();
43 SetRc();
44
45 SetThin();
46 SetW();
47 SetWu();
48 SetWd();
49 SetH();
50 SetL();
51
55}
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 27 of file MucBoxCover.cxx.

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

◆ SetH()

void MucBoxCover::SetH ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 119 of file MucBoxCover.cxx.

120{
121 if( m_Part == BRID )
122 m_H = BOX_COVER_TH;
123 else
124 {
125 if( m_ID == -1 ) // virtual encap gap
126 m_H = E_AS_RMAX - E_BOX_DR - E_GP_DY;
127 else
128 m_H = E_AS_RMAX - E_BOX_DR - E_GP_RMIN[m_Layer];
129 }
130}
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 132 of file MucBoxCover.cxx.

133{
134 if( m_Part == BRID )
135 {
136 if( m_Segment != B_TOP || m_ID == -1 )
137 m_L = B_BOX_LT;
138 else // top segment
139 {
140 if( m_ID == 2 )
141 m_L = B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)];
142 else
143 m_L = B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)];
144 }
145 }
146 else
147 m_L = BOX_COVER_TH;
148}
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 184 of file MucBoxCover.cxx.

185{
186 double x, y, z;
187 x = y = z = 0.;
188
189 if( m_Part == BRID )
190 {
191 x = m_Rc*cos( m_Theta );
192 y = m_Rc*sin( m_Theta );
193 z = 0.;
194 } // barrel
195 else
196 {
197 //------------ set x and y ---------------
198 // segment 0 as reference
199 x = (E_AS_RMAX - E_BOX_DR + E_GP_DX) / 2.0;
200 y = (E_AS_RMAX - E_BOX_DR + E_GP_DY) / 2.0;
201
202 // sign different by segment
203 if ( m_Segment == 0 ) { ; }
204 else if ( m_Segment == 1 ) { x = -x; }
205 else if ( m_Segment == 2 ) { x = -x; y = -y; }
206 else { y = -y; }
207
208 //------------- set z --------------------
209 for( int i=0; i<m_Layer+1; i++ ) z += E_AS_TH[i];
210
211 z += m_Layer * AS_GAP;
212 z += (E_AS_ZMAX - E_AS_TOTAL_TH) + AS_GAP/2.0;
213 z *= cos( m_Part*MUC_PI/2.0 );
214
215 if( m_ID != -1 ) z += (1-2*m_UpDown)*(BOX_TH - BOX_COVER_TH)/2.0;
216
217 }// endcap
218
219 m_LocOrgInBes[0] = x;
220 m_LocOrgInBes[1] = y;
221 m_LocOrgInBes[2] = z;
222
223 // limit cut
224 for(int i=0;i<3;i++)
225 if( fabs(m_LocOrgInBes[i]) < ERR_LIMIT ) m_LocOrgInBes[i] = 0.;
226}
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
int m_UpDown
Definition MucEntity.h:90
double y[1000]

Referenced by Init().

◆ SetObjOrgInBes()

void MucBoxCover::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 228 of file MucBoxCover.cxx.

229{
230 double x, y, z;
231 x = y = z =0.;
232
233 if( m_Part == BRID ) // barrel
234 {
235 if( m_Segment != B_TOP || m_ID ==-1 )
236 {
237 double r;
238 r = m_Rc + (1-2*m_UpDown)*(BOX_TH - BOX_COVER_TH) / 2.0;
239 x = r * cos( m_Theta );
240 y = r * sin( m_Theta );
241 z = 0.;
242 }
243 else // top segment
244 {
245 // set x
246 if( m_ID == 2 ) x = 0.;
247 else x = (1-2*m_ID) * ( B_BOX_WT[m_Layer] + B_BOX_SLOT_WT )/4.0;
248
249 // set y
250 y = m_Rc + (1-2*m_UpDown)*(BOX_TH - BOX_COVER_TH) / 2.0;
251
252 // set z
253 if( m_ID == 2 ) z = -B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] / 2.0;
254 else z = ( B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] )/2.0;
255 }
256 }
257 else // endcap
258 {
259 //------------- set x, y --------------------------
260 // segment 0 as reference
261 if( m_ID == -1 ) { // box cover
262 x = (E_AS_RMAX - E_BOX_DR + E_GP_DX) / 2.0;
263 y = (E_AS_RMAX - E_BOX_DR + E_GP_DY) / 2.0;
264 }
265 else if( m_ID == 0 ) { // box cover panels
266 x = m_Rc;
267 y = ( m_Rc * tan( m_Theta ) + E_GP_DY ) / 2.0;
268 }
269 else if ( m_ID == 1 ) {
270 x = m_Rc * cos( m_Theta );
271 y = m_Rc * sin( m_Theta );
272 }
273 else { // m_ID == 2
274 x = ( m_Rc / tan( m_Theta ) + E_GP_DX ) / 2.0;
275 y = m_Rc;
276 }
277
278 // sign different by segment
279 if ( m_Segment == 0 ) { ; }
280 else if( m_Segment == 1 ) { x = -x; }
281 else if( m_Segment == 2 ) { x = -x; y = -y; }
282 else { y = -y; }
283
284 //---------- set z --------------------
285 if( m_ID == -1 )
286 z = m_LocOrgInBes[2] + (1-2*m_UpDown)*(BOX_TH - BOX_COVER_TH)/2.0;
287 else
288 z = m_LocOrgInBes[2];
289 } // else, endcap
290
291 m_ObjOrgInBes[0] = x;
292 m_ObjOrgInBes[1] = y;
293 m_ObjOrgInBes[2] = z;
294
295 // limit cut
296 for( int i=0; i<3; i++ )
297 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0.;
298}
double tan(const BesAngle a)
Definition BesAngle.h:216
double m_ObjOrgInBes[3]
Definition MucEntity.h:117

Referenced by Init().

◆ SetObjOrgInLoc()

void MucBoxCover::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 300 of file MucBoxCover.cxx.

301{
302 if( m_Part == BRID )
303 {
304 // set local x
305 if( m_Segment != B_TOP || m_ID == -1 || m_ID == 2 )
306 m_ObjOrgInLoc[0] = 0.;
307 else
308 m_ObjOrgInLoc[0] = (1-2*m_ID) * ( B_BOX_WT[m_Layer] + B_BOX_SLOT_WT )/4.0;
309
310 // set local y
311 m_ObjOrgInLoc[1] = (1-2*m_UpDown)*(BOX_TH - BOX_COVER_TH)/2.0;
312 // m_ObjOrgInLoc[1] = 0.;
313
314 // set local z
315 if( m_Segment != B_TOP || m_ID == -1 )
316 m_ObjOrgInLoc[2] = 0.;
317 else {
318 if( m_ID == 2 ) m_ObjOrgInLoc[2] = -B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] / 2.0;
319 else m_ObjOrgInLoc[2] = ( B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] )/2.0;
320 }
321 }
322 else // endcap
323 {
324 for(int i=0; i<3; i++)
326 }
327
328 // limit cut
329 for( int i=0; i<3; i++ )
330 if( fabs(m_ObjOrgInLoc[i]) < ERR_LIMIT ) m_ObjOrgInLoc[i] = 0.;
331}
double m_ObjOrgInLoc[3]
Definition MucEntity.h:118

Referenced by Init().

◆ SetRc()

void MucBoxCover::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 86 of file MucBoxCover.cxx.

87{
88 if( m_Part == BRID ) m_Rc = B_AS_RMIN[m_Layer] - AS_GAP/2.0;
89 else {
90 if( m_ID == -1 ) m_Rc = sqrt(2.0) * ( E_AS_RMAX - E_BOX_DR ) / 2.0;
91 else m_Rc = (m_Rin + m_Rout)/2.0;
92 }
93}
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 69 of file MucBoxCover.cxx.

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

Referenced by Init().

◆ SetRout()

void MucBoxCover::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 79 of file MucBoxCover.cxx.

80{
81 if( m_Part == BRID ) m_Rout = B_AS_RMIN[m_Layer] -( AS_GAP - BOX_TH ) / 2.0;
82 else m_Rout = E_AS_RMAX - E_BOX_DR;
83}

Referenced by Init().

◆ SetTheta()

void MucBoxCover::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 59 of file MucBoxCover.cxx.

60{
61 if( m_Part == BRID ) m_Theta = m_Segment * ( MUC_PI/4.0 );
62 else {
63 if( m_ID == -1 ) m_Theta = ( 2*m_Segment + 1 ) * ( MUC_PI/4.0 );
64 else m_Theta = ( MUC_PI/4.0 ) + ( m_ID - 1) * MUC_PI / 8.0 ;
65 }
66}

Referenced by Init().

◆ SetThin()

void MucBoxCover::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 95 of file MucBoxCover.cxx.

96{
97 m_Thin = BOX_COVER_TH;
98}
double m_Thin
Definition MucEntity.h:100

Referenced by Init().

◆ SetW()

void MucBoxCover::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 100 of file MucBoxCover.cxx.

101{
102 if( m_Part == BRID)
103 {
104 if( m_Segment != B_TOP ) m_W = B_BOX_WT[m_Layer];
105 else { // top segment
106 if( m_ID == -1 || m_ID == 2 ) m_W = B_BOX_WT[m_Layer];
107 else m_W = ( B_BOX_WT[m_Layer] - B_BOX_SLOT_WT )/2.0;
108 }
109 }
110 else
111 {
112 if( m_ID == -1 ) // virtual encap gap
113 m_W = E_AS_RMAX - E_BOX_DR - E_GP_DX;
114 else
115 m_W = 0.;
116 }
117}
double m_W
Definition MucEntity.h:101

Referenced by Init().

◆ SetWd()

void MucBoxCover::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 167 of file MucBoxCover.cxx.

168{
169 if( m_Part == BRID ) m_Wd = m_W;
170 else
171 {
172 if( m_ID == -1 ) // virtual box
173 m_Wd = m_W;
174 else if( m_ID == 1 ) // center fraction
175 m_Wd = 2 * VALUE * m_Rout;
176 else if( m_ID == 0 )
177 m_Wd = VALUE * m_Rout - E_GP_DY;
178 else
179 m_Wd = VALUE * m_Rout - E_GP_DX;
180 }
181}
double m_Wd
Definition MucEntity.h:105

Referenced by Init().

◆ SetWu()

void MucBoxCover::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 150 of file MucBoxCover.cxx.

151{
152 if( m_Part == BRID )
153 m_Wu = m_W;
154 else
155 {
156 if( m_ID == -1 ) // virtual box
157 m_Wu = m_W;
158 else if( m_ID == 1 ) // center fraction
159 m_Wu = 2 * VALUE * m_Rin ;
160 else if( m_ID == 0 )
161 m_Wu = VALUE * m_Rin - E_GP_DY;
162 else
163 m_Wu = VALUE * m_Rin - E_GP_DX;
164 }
165}
double m_Wu
Definition MucEntity.h:104

Referenced by Init().


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