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

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 18 of file MucGap.h.

Constructor & Destructor Documentation

◆ MucGap() [1/2]

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/2]

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

MucGap::~MucGap ( )

Definition at line 43 of file MucGap.cxx.

44{
45 delete m_MucBox ;
46}

Member Function Documentation

◆ GetBox()

MucBox * MucGap::GetBox ( )

Definition at line 72 of file MucGap.cxx.

73{
74 if( m_MucBox != NULL )
75 return m_MucBox;
76 else
77 return ( m_MucBox = new MucBox(m_Part, m_Segment, m_Layer, ((m_Part==BRID)?0:-1) ) );
78}
Definition: MucBox.h:21
int m_Layer
Definition: MucEntity.h:90
int m_Segment
Definition: MucEntity.h:89
int m_Part
Definition: MucEntity.h:88

◆ Init()

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().

◆ operator=()

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

◆ SetH()

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}
double m_H
Definition: MucEntity.h:103
int m_ID
Definition: MucEntity.h:93

Referenced by Init().

◆ SetL()

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}
double m_L
Definition: MucEntity.h:104

Referenced by Init().

◆ SetLocOrgInBes()

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 sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
double m_Theta
Definition: MucEntity.h:95
double m_LocOrgInBes[3]
Definition: MucEntity.h:109
double m_Rc
Definition: MucEntity.h:100
double y[1000]
double x[1000]

Referenced by Init().

◆ SetObjOrgInBes()

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)
Definition: BesAngle.h:216
double m_ObjOrgInBes[3]
Definition: MucEntity.h:118

Referenced by Init().

◆ SetObjOrgInLoc()

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}
double m_ObjOrgInLoc[3]
Definition: MucEntity.h:119

Referenced by Init().

◆ SetObjRotToMot()

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}
double m_ObjRotToMot[3]
Definition: MucEntity.h:111

Referenced by Init().

◆ SetRc()

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}
double m_Rin
Definition: MucEntity.h:98
double m_Rout
Definition: MucEntity.h:99

Referenced by Init().

◆ SetRin()

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().

◆ SetRout()

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().

◆ SetTheta()

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().

◆ SetThin()

void MucGap::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 129 of file MucGap.cxx.

130{
131 m_Thin = AS_GAP;
132}
double m_Thin
Definition: MucEntity.h:101

Referenced by Init().

◆ SetW()

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}
double m_W
Definition: MucEntity.h:102

Referenced by Init().

◆ SetWd()

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}
double m_Wd
Definition: MucEntity.h:106

Referenced by Init().

◆ SetWu()

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}
double m_Wu
Definition: MucEntity.h:105

Referenced by Init().


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