BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
MucGap Class Reference

#include <MucGap.h>

+ Inheritance diagram for MucGap:

Public Member Functions

 MucGap (int part, int segment, int layer, int id)
 
 MucGap (const MucGap &other)
 
MucGapoperator= (const MucGap &other)
 
 ~MucGap ()
 
MucBoxGetBox ()
 
 MucGap (int part, int segment, int layer, int id)
 
 MucGap (const MucGap &other)
 
MucGapoperator= (const MucGap &other)
 
 ~MucGap ()
 
MucBoxGetBox ()
 
- 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)
 
 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 SetObjRotToMot ()
 
virtual void SetObjOrgInBes ()
 
virtual void SetObjOrgInLoc ()
 
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 SetObjRotToMot ()
 
virtual void SetObjOrgInBes ()
 
virtual void SetObjOrgInLoc ()
 
- Protected Member Functions inherited from MucEntity
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 ()
 
virtual void SetAlignment (double dx, double dy, double dz)
 
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 ()
 
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

Constructor & Destructor Documentation

◆ MucGap() [1/4]

MucGap::MucGap ( int  part,
int  segment,
int  layer,
int  id 
)

Definition at line 17 of file MucGap.cxx.

17 : MucEntity( part, segment, layer, id )
18{
20 m_MucBox = NULL;
21}
virtual void Init()
Definition: MucGap.cxx:49

◆ MucGap() [2/4]

MucGap::MucGap ( const MucGap other)

Definition at line 24 of file MucGap.cxx.

24 : MucEntity( other )
25{
26 m_MucBox = other.m_MucBox;
27}
Index other(Index i, Index j)
Definition: EvtCyclic3.cc:118

◆ ~MucGap() [1/2]

MucGap::~MucGap ( )

Definition at line 43 of file MucGap.cxx.

44{
45 delete m_MucBox ;
46}

◆ MucGap() [3/4]

MucGap::MucGap ( int  part,
int  segment,
int  layer,
int  id 
)

◆ MucGap() [4/4]

MucGap::MucGap ( const MucGap other)

◆ ~MucGap() [2/2]

MucGap::~MucGap ( )

Member Function Documentation

◆ GetBox() [1/2]

MucBox * MucGap::GetBox ( )

◆ GetBox() [2/2]

MucBox * MucGap::GetBox ( )

◆ Init() [1/2]

void MucGap::Init ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 49 of file MucGap.cxx.

50{
51 SetTheta();
52 SetRin();
53 SetRout();
54 SetRc();
55
56 SetThin();
57 SetW();
58 SetWu();
59 SetWd();
60 SetH();
61 SetL();
62
67}
virtual void SetRin()
Definition: MucGap.cxx:95
virtual void SetTheta()
Definition: MucGap.cxx:82
virtual void SetWd()
Definition: MucGap.cxx:216
virtual void SetW()
Definition: MucGap.cxx:134
virtual void SetRc()
Definition: MucGap.cxx:116
virtual void SetObjOrgInBes()
Definition: MucGap.cxx:293
virtual void SetH()
Definition: MucGap.cxx:157
virtual void SetLocOrgInBes()
Definition: MucGap.cxx:240
virtual void SetRout()
Definition: MucGap.cxx:108
virtual void SetL()
Definition: MucGap.cxx:174
virtual void SetWu()
Definition: MucGap.cxx:192
virtual void SetObjRotToMot()
Definition: MucGap.cxx:282
virtual void SetThin()
Definition: MucGap.cxx:129
virtual void SetObjOrgInLoc()
Definition: MucGap.cxx:366

Referenced by MucGap().

◆ Init() [2/2]

virtual void MucGap::Init ( )
protectedvirtual

Reimplemented from MucEntity.

◆ operator=() [1/2]

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

Definition at line 30 of file MucGap.cxx.

31{
32 if( this == &other)
33 return *this;
34
36
37 m_MucBox = other.m_MucBox;
38
39 return *this;
40}
MucEntity & operator=(const MucEntity &other)
Definition: MucEntity.cxx:92

◆ operator=() [2/2]

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

◆ SetH() [1/2]

void MucGap::SetH ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 157 of file MucGap.cxx.

158{
159 if( m_Part == BRID )
160 m_H = AS_GAP-0.2; // avoid overlap between absorber and gap
161 else
162 {
163 if( m_ID == -1 ) // virtual encap gap
164 m_H = E_AS_RMAX - E_GP_DY;
165 else if( m_ID == 1 )
166 { // for panel logical operation "AND" valid;
167 m_H = E_AS_RMAX - E_GP_RMIN[m_Layer] +1.5*OVERLAP_WIDTH;
168 }
169 else
170 m_H = E_AS_RMAX - E_GP_RMIN[m_Layer];
171 }
172}

Referenced by Init().

◆ SetH() [2/2]

virtual void MucGap::SetH ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetL() [1/2]

void MucGap::SetL ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 174 of file MucGap.cxx.

175{
176 if( m_Part == BRID )
177 {
178 if( m_Segment != B_TOP || m_ID == -1 )
179 m_L = B_AS_LMAX;
180 else // top segment
181 {
182 if( m_ID == 2 )
183 m_L = B_AS_LMAX - B_GP_SLOT_LT;
184 else
185 m_L = B_GP_SLOT_LT;
186 }
187 }
188 else
189 m_L = AS_GAP;
190}

Referenced by Init().

◆ SetL() [2/2]

virtual void MucGap::SetL ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetLocOrgInBes() [1/2]

void MucGap::SetLocOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 240 of file MucGap.cxx.

241{
242 double x, y, z;
243 x = y = z = 0.;
244
245 if( m_Part == BRID )
246 {
247 x = m_Rc*cos( m_Theta );
248 y = m_Rc*sin( m_Theta );
249 z = 0.;
250 } // barrel
251 else
252 {
253 //---------- set x and y ------------
254 // segment 0 as reference
255 x = (E_AS_RMAX + E_GP_DX) / 2.0;
256 y = (E_AS_RMAX + E_GP_DY) / 2.0;
257
258 // x, y signs of coordinate different by segment
259 if( m_Segment == 0 ) { ; }
260 else if ( m_Segment == 1 ) { x = -x; }
261 else if ( m_Segment == 2 ) { x = -x; y = -y; }
262 else { y = -y; }
263
264 //----------- set z ----------------
265 for( int i=0; i<m_Layer+1; i++ ) z += E_AS_TH[i];
266 z += m_Layer * AS_GAP;
267 z += (E_AS_ZMAX - E_AS_TOTAL_TH ) + AS_GAP/2.0;
268 z *= cos( m_Part*MUC_PI/2.0 );
269
270 }// endcap
271
272 m_LocOrgInBes[0] = x;
273 m_LocOrgInBes[1] = y;
274 m_LocOrgInBes[2] = z;
275
276 // limit cut
277 for(int i=0;i<3;i++) {
278 if( fabs(m_LocOrgInBes[i]) < ERR_LIMIT ) m_LocOrgInBes[i] = 0;
279 }
280}
Double_t x[10]
double sin(const BesAngle a)
double cos(const BesAngle a)

Referenced by Init().

◆ SetLocOrgInBes() [2/2]

virtual void MucGap::SetLocOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetObjOrgInBes() [1/2]

void MucGap::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 293 of file MucGap.cxx.

294{
295 double x, y, z;
296 x = y = z = 0.;
297
298 if( m_Part == BRID )
299 {
300 if( m_Segment != B_TOP || m_ID == -1 )
301 for( int i=0; i<3; i++ ) m_ObjOrgInBes[i] = m_LocOrgInBes[i];
302 else // top segment
303 {
304 // set x
305 if( m_ID == 2 ) x = 0.;
306 else x = (1-2*m_ID) * ( B_GP_WT[m_Layer] + B_GP_SLOT_WT )/4.0;
307
308
309 // set z
310 if( m_ID == 2 ) z = -B_GP_SLOT_LT / 2.0;
311 else z = ( B_AS_LMAX - B_GP_SLOT_LT )/2.0;
312
313 m_ObjOrgInBes[0] = x;
314 m_ObjOrgInBes[2] = z;
315
316 // set y
318
319 // limit cut
320 for( int i=0; i<3; i++ ) {
321 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
322
323 }
324 }
325 }
326 else
327 {
328 // -------------- set x and y --------------------
329 // setting segment 0 as reference
330 if( m_ID == 0 )
331 {
332 x = m_Rc;
333 y = ( m_Rc * tan( m_Theta ) + E_GP_DY ) / 2.0;
334 }
335 else if ( m_ID ==1 )
336 {
337 x = m_Rc * cos( m_Theta );
338 y = m_Rc * sin( m_Theta );
339 }
340 else // m_ID == 2
341 {
342 x = ( m_Rc / tan( m_Theta ) + E_GP_DX ) / 2.0;
343 y = m_Rc;
344 }
345
346 // x, y signs of coordinate different by segment
347 if( m_Segment == 0 ) { ; }
348 else if ( m_Segment == 1 ) { x = -x; }
349 else if ( m_Segment == 2 ) { x = -x; y = -y; }
350 else { y = -y; }
351
352 m_ObjOrgInBes[0] = x;
353 m_ObjOrgInBes[1] = y;
354
355 // limit cut
356 for( int i=0; i<2; i++ ) {
357 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
358 }
359
360 // ------------- set z ------------------------
362
363 } // else
364}
double tan(const BesAngle a)

Referenced by Init().

◆ SetObjOrgInBes() [2/2]

virtual void MucGap::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetObjOrgInLoc() [1/2]

void MucGap::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 366 of file MucGap.cxx.

367{
368 if( m_Part == BRID)
369 {
370 if( m_Segment != B_TOP )
371 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = 0.;
372 else
373 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
374 }
375 else
376 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
377}

Referenced by Init().

◆ SetObjOrgInLoc() [2/2]

virtual void MucGap::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetObjRotToMot() [1/2]

void MucGap::SetObjRotToMot ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 282 of file MucGap.cxx.

283{
284 m_ObjRotToMot[0] = 0.;
285 m_ObjRotToMot[1] = 0.;
286
287 if( m_Part == BRID )
288 m_ObjRotToMot[2] = MUC_PI * (m_Segment - 2) / 4.0;
289 else
290 m_ObjRotToMot[2] = 0.;
291}

Referenced by Init().

◆ SetObjRotToMot() [2/2]

virtual void MucGap::SetObjRotToMot ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetRc() [1/2]

void MucGap::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 116 of file MucGap.cxx.

117{
118 if( m_Part == BRID )
119 m_Rc = B_AS_RMIN[m_Layer] - AS_GAP/2.0;
120 else
121 {
122 if( m_ID == -1 )
123 m_Rc = sqrt(2.0) * E_AS_RMAX / 2.0;
124 else
125 m_Rc = (m_Rin + m_Rout)/2.0;
126 }
127}

Referenced by Init().

◆ SetRc() [2/2]

virtual void MucGap::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetRin() [1/2]

void MucGap::SetRin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 95 of file MucGap.cxx.

96{
97 if( m_Part == BRID )
98 m_Rin = B_AS_RMIN[m_Layer] - AS_GAP;
99 else
100 {
101 if( m_ID == -1 )
102 m_Rin = 0.;
103 else
104 m_Rin = E_GP_RMIN[m_Layer];
105 }
106}

Referenced by Init().

◆ SetRin() [2/2]

virtual void MucGap::SetRin ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetRout() [1/2]

void MucGap::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 108 of file MucGap.cxx.

109{
110 if( m_Part == BRID )
111 m_Rout = B_AS_RMIN[m_Layer];
112 else
113 m_Rout = E_AS_RMAX;
114}

Referenced by Init().

◆ SetRout() [2/2]

virtual void MucGap::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetTheta() [1/2]

void MucGap::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 82 of file MucGap.cxx.

83{
84 if( m_Part == BRID )
85 m_Theta = m_Segment * ( MUC_PI/4.0 );
86 else
87 {
88 if( m_ID == -1 )
89 m_Theta = ( 2*m_Segment + 1 ) * ( MUC_PI/4.0 );
90 else
91 m_Theta = ( MUC_PI/4.0 ) + ( m_ID - 1) * MUC_PI / 8.0 ;
92 }
93}

Referenced by Init().

◆ SetTheta() [2/2]

virtual void MucGap::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetThin() [1/2]

void MucGap::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 129 of file MucGap.cxx.

Referenced by Init().

◆ SetThin() [2/2]

virtual void MucGap::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetW() [1/2]

void MucGap::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 134 of file MucGap.cxx.

135{
136 if( m_Part == BRID)
137 {
138 if( m_Segment != B_TOP )
139 m_W = B_GP_WT[m_Layer];
140 else // top segment
141 {
142 if( m_ID == -1 || m_ID == 2 )
143 m_W = B_GP_WT[m_Layer];
144 else
145 m_W = ( B_GP_WT[m_Layer] - B_GP_SLOT_WT )/2.0;
146 }
147 }
148 else
149 {
150 if( m_ID == -1 ) // virtual encap gap
151 m_W = E_AS_RMAX - E_GP_DX;
152 else
153 m_W = 0.;
154 }
155}

Referenced by Init().

◆ SetW() [2/2]

virtual void MucGap::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetWd() [1/2]

void MucGap::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 216 of file MucGap.cxx.

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

Referenced by Init().

◆ SetWd() [2/2]

virtual void MucGap::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

◆ SetWu() [1/2]

void MucGap::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 192 of file MucGap.cxx.

193{
194 if( m_Part == BRID )
195 m_Wu = m_W;
196 else
197 {
198 if( m_ID == -1 ) // temporary local
199 m_Wu = m_W;
200 else if( m_ID == 1 ) // center fraction
201 {
202 m_Wu = 2 * VALUE * m_Rin ;
203 m_Wu -= 2*VALUE*(2.0/2); // for panel operation "AND" valid
204 m_Wu += 1.5*OVERLAP_WIDTH;
205 }
206 else if( m_ID == 0 )
207 m_Wu = VALUE * m_Rin - E_GP_DY;
208 else
209 m_Wu = VALUE * m_Rin - E_GP_DX;
210
211 if( m_ID != -1 ) m_Wu+=OVERLAP_WIDTH; // avoid panels overlap
212
213 }
214}

Referenced by Init().

◆ SetWu() [2/2]

virtual void MucGap::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.


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