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

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

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

◆ MucGap() [2/2]

MucGap::MucGap ( const MucGap & other)

Definition at line 24 of file MucGap.cxx.

24: MucEntity( other ) { m_MucBox = other.m_MucBox; }
Index other(Index i, Index j)

◆ ~MucGap()

MucGap::~MucGap ( )

Definition at line 36 of file MucGap.cxx.

36{ delete m_MucBox; }

Member Function Documentation

◆ GetBox()

MucBox * MucGap::GetBox ( )

Definition at line 60 of file MucGap.cxx.

60 {
61 if ( m_MucBox != NULL ) return m_MucBox;
62 else
63 return ( m_MucBox =
64 new MucBox( m_Part, m_Segment, m_Layer, ( ( m_Part == BRID ) ? 0 : -1 ) ) );
65}
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 39 of file MucGap.cxx.

39 {
40 SetTheta();
41 SetRin();
42 SetRout();
43 SetRc();
44
45 SetThin();
46 SetW();
47 SetWu();
48 SetWd();
49 SetH();
50 SetL();
51
56}
virtual void SetRin()
Definition MucGap.cxx:77
virtual void SetTheta()
Definition MucGap.cxx:68
virtual void SetWd()
Definition MucGap.cxx:166
virtual void SetW()
Definition MucGap.cxx:102
virtual void SetRc()
Definition MucGap.cxx:91
virtual void SetObjOrgInBes()
Definition MucGap.cxx:237
virtual void SetH()
Definition MucGap.cxx:120
virtual void SetLocOrgInBes()
Definition MucGap.cxx:185
virtual void SetRout()
Definition MucGap.cxx:86
virtual void SetL()
Definition MucGap.cxx:134
virtual void SetWu()
Definition MucGap.cxx:147
virtual void SetObjRotToMot()
Definition MucGap.cxx:229
virtual void SetThin()
Definition MucGap.cxx:100
virtual void SetObjOrgInLoc()
Definition MucGap.cxx:308

Referenced by MucGap().

◆ operator=()

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

Definition at line 27 of file MucGap.cxx.

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

◆ SetH()

void MucGap::SetH ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 120 of file MucGap.cxx.

120 {
121 if ( m_Part == BRID ) m_H = AS_GAP - 0.2; // avoid overlap between absorber and gap
122 else
123 {
124 if ( m_ID == -1 ) // virtual encap gap
125 m_H = E_AS_RMAX - E_GP_DY;
126 else if ( m_ID == 1 )
127 { // for panel logical operation "AND" valid;
128 m_H = E_AS_RMAX - E_GP_RMIN[m_Layer] + 1.5 * OVERLAP_WIDTH;
129 }
130 else m_H = E_AS_RMAX - E_GP_RMIN[m_Layer];
131 }
132}
double m_H
Definition MucEntity.h:102

Referenced by Init().

◆ SetL()

void MucGap::SetL ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 134 of file MucGap.cxx.

134 {
135 if ( m_Part == BRID )
136 {
137 if ( m_Segment != B_TOP || m_ID == -1 ) m_L = B_AS_LMAX;
138 else
139 { // top segment
140 if ( m_ID == 2 ) m_L = B_AS_LMAX - B_GP_SLOT_LT;
141 else m_L = B_GP_SLOT_LT;
142 }
143 }
144 else m_L = AS_GAP;
145}
double m_L
Definition MucEntity.h:103

Referenced by Init().

◆ SetLocOrgInBes()

void MucGap::SetLocOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 185 of file MucGap.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_GP_DX ) / 2.0;
200 y = ( E_AS_RMAX + E_GP_DY ) / 2.0;
201
202 // x, y signs of coordinate different by segment
203 if ( m_Segment == 0 ) { ; }
204 else if ( m_Segment == 1 ) { x = -x; }
205 else if ( m_Segment == 2 )
206 {
207 x = -x;
208 y = -y;
209 }
210 else { y = -y; }
211
212 //----------- set z ----------------
213 for ( int i = 0; i < m_Layer + 1; i++ ) z += E_AS_TH[i];
214
215 z += m_Layer * AS_GAP;
216 z += ( E_AS_ZMAX - E_AS_TOTAL_TH ) + AS_GAP / 2.0;
217 z *= cos( m_Part * MUC_PI / 2.0 );
218 } // endcap
219
220 m_LocOrgInBes[0] = x;
221 m_LocOrgInBes[1] = y;
222 m_LocOrgInBes[2] = z;
223
224 // limit cut
225 for ( int i = 0; i < 3; i++ )
226 if ( fabs( m_LocOrgInBes[i] ) < ERR_LIMIT ) m_LocOrgInBes[i] = 0;
227}
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

Referenced by Init().

◆ SetObjOrgInBes()

void MucGap::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 237 of file MucGap.cxx.

237 {
238 double x, y, z;
239 x = y = z = 0.;
240
241 if ( m_Part == BRID )
242 {
243 if ( m_Segment != B_TOP || m_ID == -1 )
244 for ( int i = 0; i < 3; i++ ) m_ObjOrgInBes[i] = m_LocOrgInBes[i];
245 else // top segment
246 {
247 // set x
248 if ( m_ID == 2 ) x = 0.;
249 else x = ( 1 - 2 * m_ID ) * ( B_GP_WT[m_Layer] + B_GP_SLOT_WT ) / 4.0;
250
251 // set z
252 if ( m_ID == 2 ) z = -B_GP_SLOT_LT / 2.0;
253 else z = ( B_AS_LMAX - B_GP_SLOT_LT ) / 2.0;
254
255 m_ObjOrgInBes[0] = x;
256 m_ObjOrgInBes[2] = z;
257
258 // set y
260
261 // limit cut
262 for ( int i = 0; i < 3; i++ )
263 if ( fabs( m_ObjOrgInBes[i] ) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
264 }
265 } // End barrel
266 else
267 {
268 // -------------- set x and y --------------------
269 // setting segment 0 as reference
270 if ( m_ID == 0 )
271 {
272 x = m_Rc;
273 y = ( m_Rc * tan( m_Theta ) + E_GP_DY ) / 2.0;
274 }
275 else if ( m_ID == 1 )
276 {
277 x = m_Rc * cos( m_Theta );
278 y = m_Rc * sin( m_Theta );
279 }
280 else
281 { // m_ID == 2
282 x = ( m_Rc / tan( m_Theta ) + E_GP_DX ) / 2.0;
283 y = m_Rc;
284 }
285
286 // x, y signs of coordinate different by segment
287 if ( m_Segment == 0 ) { ; }
288 else if ( m_Segment == 1 ) { x = -x; }
289 else if ( m_Segment == 2 )
290 {
291 x = -x;
292 y = -y;
293 }
294 else { y = -y; }
295
296 m_ObjOrgInBes[0] = x;
297 m_ObjOrgInBes[1] = y;
298
299 // limit cut
300 for ( int i = 0; i < 2; i++ )
301 if ( fabs( m_ObjOrgInBes[i] ) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
302
303 // ------------- set z ------------------------
305 } // else
306}
double m_ObjOrgInBes[3]
Definition MucEntity.h:117

Referenced by Init().

◆ SetObjOrgInLoc()

void MucGap::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 308 of file MucGap.cxx.

308 {
309 if ( m_Part == BRID )
310 {
311 if ( m_Segment != B_TOP )
312 for ( int i = 0; i < 3; i++ ) m_ObjOrgInLoc[i] = 0.;
313 else
314 for ( int i = 0; i < 3; i++ ) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
315 }
316 else
317 for ( int i = 0; i < 3; i++ ) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
318}
double m_ObjOrgInLoc[3]
Definition MucEntity.h:118

Referenced by Init().

◆ SetObjRotToMot()

void MucGap::SetObjRotToMot ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 229 of file MucGap.cxx.

229 {
230 m_ObjRotToMot[0] = 0.;
231 m_ObjRotToMot[1] = 0.;
232
233 if ( m_Part == BRID ) m_ObjRotToMot[2] = MUC_PI * ( m_Segment - 2 ) / 4.0;
234 else m_ObjRotToMot[2] = 0.;
235}
double m_ObjRotToMot[3]
Definition MucEntity.h:110

Referenced by Init().

◆ SetRc()

void MucGap::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 91 of file MucGap.cxx.

91 {
92 if ( m_Part == BRID ) m_Rc = B_AS_RMIN[m_Layer] - AS_GAP / 2.0;
93 else
94 {
95 if ( m_ID == -1 ) m_Rc = sqrt( 2.0 ) * E_AS_RMAX / 2.0;
96 else m_Rc = ( m_Rin + m_Rout ) / 2.0;
97 }
98}
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 77 of file MucGap.cxx.

77 {
78 if ( m_Part == BRID ) m_Rin = B_AS_RMIN[m_Layer] - AS_GAP;
79 else
80 {
81 if ( m_ID == -1 ) m_Rin = 0.;
82 else m_Rin = E_GP_RMIN[m_Layer];
83 }
84}

Referenced by Init().

◆ SetRout()

void MucGap::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 86 of file MucGap.cxx.

86 {
87 if ( m_Part == BRID ) m_Rout = B_AS_RMIN[m_Layer];
88 else m_Rout = E_AS_RMAX;
89}

Referenced by Init().

◆ SetTheta()

void MucGap::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 68 of file MucGap.cxx.

68 {
69 if ( m_Part == BRID ) m_Theta = m_Segment * ( MUC_PI / 4.0 );
70 else
71 {
72 if ( m_ID == -1 ) m_Theta = ( 2 * m_Segment + 1 ) * ( MUC_PI / 4.0 );
73 else m_Theta = ( MUC_PI / 4.0 ) + ( m_ID - 1 ) * MUC_PI / 8.0;
74 }
75}

Referenced by Init().

◆ SetThin()

void MucGap::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 100 of file MucGap.cxx.

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

Referenced by Init().

◆ SetW()

void MucGap::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 102 of file MucGap.cxx.

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

Referenced by Init().

◆ SetWd()

void MucGap::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 166 of file MucGap.cxx.

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

Referenced by Init().

◆ SetWu()

void MucGap::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 147 of file MucGap.cxx.

147 {
148 if ( m_Part == BRID ) m_Wu = m_W;
149 else
150 {
151 if ( m_ID == -1 ) // temporary local
152 m_Wu = m_W;
153 else if ( m_ID == 1 ) // center fraction
154 {
155 m_Wu = 2 * VALUE * m_Rin;
156 m_Wu -= 2 * VALUE * ( 2.0 / 2 ); // for panel operation "AND" valid
157 m_Wu += 1.5 * OVERLAP_WIDTH;
158 }
159 else if ( m_ID == 0 ) m_Wu = VALUE * m_Rin - E_GP_DY;
160 else m_Wu = VALUE * m_Rin - E_GP_DX;
161
162 if ( m_ID != -1 ) m_Wu += OVERLAP_WIDTH; // avoid panels overlap
163 }
164}
double m_Wu
Definition MucEntity.h:104

Referenced by Init().


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