BOSS 7.1.2
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 SetArea ()
 
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}
#define NULL
MucEntity(int part, int segment, int layer)
Definition MucEntity.cxx:17
virtual void Init()
Definition MucGap.cxx:46

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

◆ ~MucGap()

MucGap::~MucGap ( )

Definition at line 40 of file MucGap.cxx.

41{
42 delete m_MucBox;
43}

Member Function Documentation

◆ GetBox()

MucBox * MucGap::GetBox ( )

Definition at line 68 of file MucGap.cxx.

69{
70 if( m_MucBox != NULL )
71 return m_MucBox;
72 else
73 return ( m_MucBox = new MucBox(m_Part, m_Segment, m_Layer, ((m_Part==BRID)?0:-1) ) );
74}
int m_Layer
Definition MucEntity.h:89
int m_Segment
Definition MucEntity.h:88
int m_Part
Definition MucEntity.h:87

◆ Init()

void MucGap::Init ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 46 of file MucGap.cxx.

47{
48 SetTheta();
49 SetRin();
50 SetRout();
51 SetRc();
52
53 SetThin();
54 SetW();
55 SetWu();
56 SetWd();
57 SetH();
58 SetL();
59
64}
virtual void SetRin()
Definition MucGap.cxx:87
virtual void SetTheta()
Definition MucGap.cxx:78
virtual void SetWd()
Definition MucGap.cxx:191
virtual void SetW()
Definition MucGap.cxx:116
virtual void SetRc()
Definition MucGap.cxx:102
virtual void SetObjOrgInBes()
Definition MucGap.cxx:265
virtual void SetH()
Definition MucGap.cxx:136
virtual void SetLocOrgInBes()
Definition MucGap.cxx:213
virtual void SetRout()
Definition MucGap.cxx:96
virtual void SetL()
Definition MucGap.cxx:153
virtual void SetWu()
Definition MucGap.cxx:168
virtual void SetObjRotToMot()
Definition MucGap.cxx:254
virtual void SetThin()
Definition MucGap.cxx:111
virtual void SetObjOrgInLoc()
Definition MucGap.cxx:330

Referenced by MucGap().

◆ operator=()

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

Definition at line 30 of file MucGap.cxx.

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

◆ SetH()

void MucGap::SetH ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 136 of file MucGap.cxx.

137{
138 if( m_Part == BRID )
139 m_H = AS_GAP-0.2; // avoid overlap between absorber and gap
140 else
141 {
142 if( m_ID == -1 ) // virtual encap gap
143 m_H = E_AS_RMAX - E_GP_DY;
144 else if( m_ID == 1 )
145 { // for panel logical operation "AND" valid;
146 m_H = E_AS_RMAX - E_GP_RMIN[m_Layer] +1.5*OVERLAP_WIDTH;
147 }
148 else
149 m_H = E_AS_RMAX - E_GP_RMIN[m_Layer];
150 }
151}
double m_H
Definition MucEntity.h:102

Referenced by Init().

◆ SetL()

void MucGap::SetL ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 153 of file MucGap.cxx.

154{
155 if( m_Part == BRID )
156 {
157 if( m_Segment != B_TOP || m_ID == -1 )
158 m_L = B_AS_LMAX;
159 else { // top segment
160 if( m_ID == 2 ) m_L = B_AS_LMAX - B_GP_SLOT_LT;
161 else m_L = B_GP_SLOT_LT;
162 }
163 }
164 else
165 m_L = AS_GAP;
166}
double m_L
Definition MucEntity.h:103

Referenced by Init().

◆ SetLocOrgInBes()

void MucGap::SetLocOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 213 of file MucGap.cxx.

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

Referenced by Init().

◆ SetObjOrgInBes()

void MucGap::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 265 of file MucGap.cxx.

266{
267 double x, y, z;
268 x = y = z = 0.;
269
270 if( m_Part == BRID )
271 {
272 if( m_Segment != B_TOP || m_ID == -1 )
273 for( int i=0; i<3; i++ ) m_ObjOrgInBes[i] = m_LocOrgInBes[i];
274 else // top segment
275 {
276 // set x
277 if( m_ID == 2 ) x = 0.;
278 else x = (1-2*m_ID) * ( B_GP_WT[m_Layer] + B_GP_SLOT_WT )/4.0;
279
280 // set z
281 if( m_ID == 2 ) z = -B_GP_SLOT_LT / 2.0;
282 else z = ( B_AS_LMAX - B_GP_SLOT_LT )/2.0;
283
284 m_ObjOrgInBes[0] = x;
285 m_ObjOrgInBes[2] = z;
286
287 // set y
289
290 // limit cut
291 for( int i=0; i<3; i++ )
292 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
293 }
294 } // End barrel
295 else
296 {
297 // -------------- set x and y --------------------
298 // setting segment 0 as reference
299 if( m_ID == 0 ) {
300 x = m_Rc;
301 y = ( m_Rc * tan( m_Theta ) + E_GP_DY ) / 2.0;
302 }
303 else if ( m_ID ==1 ) {
304 x = m_Rc * cos( m_Theta );
305 y = m_Rc * sin( m_Theta );
306 }
307 else { // m_ID == 2
308 x = ( m_Rc / tan( m_Theta ) + E_GP_DX ) / 2.0;
309 y = m_Rc;
310 }
311
312 // x, y signs of coordinate different by segment
313 if ( m_Segment == 0 ) { ; }
314 else if ( m_Segment == 1 ) { x = -x; }
315 else if ( m_Segment == 2 ) { x = -x; y = -y; }
316 else { y = -y; }
317
318 m_ObjOrgInBes[0] = x;
319 m_ObjOrgInBes[1] = y;
320
321 // limit cut
322 for( int i=0; i<2; i++ )
323 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
324
325 // ------------- set z ------------------------
327 } // else
328}
double tan(const BesAngle a)
Definition BesAngle.h:216
double m_ObjOrgInBes[3]
Definition MucEntity.h:117

Referenced by Init().

◆ SetObjOrgInLoc()

void MucGap::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 330 of file MucGap.cxx.

331{
332 if( m_Part == BRID)
333 {
334 if( m_Segment != B_TOP )
335 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = 0.;
336 else
337 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
338 }
339 else
340 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
341}
double m_ObjOrgInLoc[3]
Definition MucEntity.h:118

Referenced by Init().

◆ SetObjRotToMot()

void MucGap::SetObjRotToMot ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 254 of file MucGap.cxx.

255{
256 m_ObjRotToMot[0] = 0.;
257 m_ObjRotToMot[1] = 0.;
258
259 if( m_Part == BRID )
260 m_ObjRotToMot[2] = MUC_PI * (m_Segment - 2) / 4.0;
261 else
262 m_ObjRotToMot[2] = 0.;
263}
double m_ObjRotToMot[3]
Definition MucEntity.h:110

Referenced by Init().

◆ SetRc()

void MucGap::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 102 of file MucGap.cxx.

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

Referenced by Init().

◆ SetRin()

void MucGap::SetRin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 87 of file MucGap.cxx.

88{
89 if( m_Part == BRID ) m_Rin = B_AS_RMIN[m_Layer] - AS_GAP;
90 else {
91 if( m_ID == -1 ) m_Rin = 0.;
92 else m_Rin = E_GP_RMIN[m_Layer];
93 }
94}

Referenced by Init().

◆ SetRout()

void MucGap::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 96 of file MucGap.cxx.

97{
98 if( m_Part == BRID ) m_Rout = B_AS_RMIN[m_Layer];
99 else m_Rout = E_AS_RMAX;
100}

Referenced by Init().

◆ SetTheta()

void MucGap::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 78 of file MucGap.cxx.

79{
80 if( m_Part == BRID ) m_Theta = m_Segment * ( MUC_PI/4.0 );
81 else {
82 if( m_ID == -1 ) m_Theta = ( 2*m_Segment + 1 ) * ( MUC_PI/4.0 );
83 else m_Theta = ( MUC_PI/4.0 ) + ( m_ID - 1) * MUC_PI / 8.0 ;
84 }
85}

Referenced by Init().

◆ SetThin()

void MucGap::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 111 of file MucGap.cxx.

112{
113 m_Thin = AS_GAP;
114}
double m_Thin
Definition MucEntity.h:100

Referenced by Init().

◆ SetW()

void MucGap::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 116 of file MucGap.cxx.

117{
118 if( m_Part == BRID)
119 {
120 if( m_Segment != B_TOP )
121 m_W = B_GP_WT[m_Layer];
122 else { // top segment
123 if( m_ID == -1 || m_ID == 2 ) m_W = B_GP_WT[m_Layer];
124 else m_W = ( B_GP_WT[m_Layer] - B_GP_SLOT_WT )/2.0;
125 }
126 }
127 else
128 {
129 if( m_ID == -1 ) // virtual encap gap
130 m_W = E_AS_RMAX - E_GP_DX;
131 else
132 m_W = 0.;
133 }
134}
double m_W
Definition MucEntity.h:101

Referenced by Init().

◆ SetWd()

void MucGap::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 191 of file MucGap.cxx.

192{
193 if( m_Part == BRID ) m_Wd = m_W;
194 else
195 {
196 if( m_ID == -1 ) // temporary local
197 m_Wd = m_W;
198 else if( m_ID == 1 ) // center fraction
199 {
200 m_Wd = 2 * VALUE * m_Rout;
201 m_Wd += 2*VALUE*(2.0/2); // for panel operation "AND" valid
202 m_Wd += 1.5*OVERLAP_WIDTH;
203 }
204 else if( m_ID == 0 )
205 m_Wd = VALUE * m_Rout - E_GP_DY;
206 else
207 m_Wd = VALUE * m_Rout - E_GP_DX;
208
209 if( m_ID != -1 ) m_Wd+=OVERLAP_WIDTH; // avoid panels overlap
210 }
211}
double m_Wd
Definition MucEntity.h:105

Referenced by Init().

◆ SetWu()

void MucGap::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 168 of file MucGap.cxx.

169{
170 if( m_Part == BRID )
171 m_Wu = m_W;
172 else
173 {
174 if( m_ID == -1 ) // temporary local
175 m_Wu = m_W;
176 else if( m_ID == 1 ) // center fraction
177 {
178 m_Wu = 2 * VALUE * m_Rin ;
179 m_Wu -= 2*VALUE*(2.0/2); // for panel operation "AND" valid
180 m_Wu += 1.5*OVERLAP_WIDTH;
181 }
182 else if( m_ID == 0 )
183 m_Wu = VALUE * m_Rin - E_GP_DY;
184 else
185 m_Wu = VALUE * m_Rin - E_GP_DX;
186
187 if( m_ID != -1 ) m_Wu+=OVERLAP_WIDTH; // avoid panels overlap
188 }
189}
double m_Wu
Definition MucEntity.h:104

Referenced by Init().


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