BOSS 7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
MucAbsorber Class Reference

#include <MucAbsorber.h>

+ Inheritance diagram for MucAbsorber:

Public Member Functions

 MucAbsorber (int part, int segment, int layer, int id)
 
 MucAbsorber (const MucAbsorber &other)
 
MucAbsorberoperator= (const MucAbsorber &other)
 
virtual ~MucAbsorber ()
 
- 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 17 of file MucAbsorber.h.

Constructor & Destructor Documentation

◆ MucAbsorber() [1/2]

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

Definition at line 17 of file MucAbsorber.cxx.

17 : MucEntity( part, segment, layer, id )
18{
20}
virtual void Init()
Definition: MucAbsorber.cxx:40

◆ MucAbsorber() [2/2]

MucAbsorber::MucAbsorber ( const MucAbsorber other)

Definition at line 23 of file MucAbsorber.cxx.

23: MucEntity( other ) { ; }

◆ ~MucAbsorber()

MucAbsorber::~MucAbsorber ( )
virtual

Definition at line 37 of file MucAbsorber.cxx.

37{ ; }

Member Function Documentation

◆ Init()

void MucAbsorber::Init ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 40 of file MucAbsorber.cxx.

41{
42 SetTheta();
43 SetRin();
44 SetRout();
45 SetRc();
46
47 SetThin();
48 SetW();
49 SetWu();
50 SetWd();
51 SetH();
52 SetL();
57}
virtual void SetThin()
virtual void SetObjOrgInBes()
virtual void SetLocOrgInBes()
virtual void SetTheta()
Definition: MucAbsorber.cxx:61
virtual void SetWd()
virtual void SetW()
virtual void SetH()
virtual void SetObjRotToMot()
virtual void SetWu()
virtual void SetRin()
Definition: MucAbsorber.cxx:74
virtual void SetL()
virtual void SetObjOrgInLoc()
virtual void SetRout()
Definition: MucAbsorber.cxx:87
virtual void SetRc()
Definition: MucAbsorber.cxx:96

Referenced by MucAbsorber().

◆ operator=()

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

Definition at line 26 of file MucAbsorber.cxx.

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

◆ SetH()

void MucAbsorber::SetH ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 130 of file MucAbsorber.cxx.

131{
132 if( m_Part == BRID )
133 m_H = B_AS_TH[m_Layer];
134 else
135 {
136 if( m_ID == -1 ) // temporary local
137 m_H = E_AS_RMAX;
138 else
139 m_H = E_AS_RMAX - E_AS_RMIN[m_Layer];
140 }
141}
double m_H
Definition: MucEntity.h:103
int m_Layer
Definition: MucEntity.h:90
int m_Part
Definition: MucEntity.h:88
int m_ID
Definition: MucEntity.h:93

Referenced by Init().

◆ SetL()

void MucAbsorber::SetL ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 143 of file MucAbsorber.cxx.

144{
145 if( m_Part == BRID )
146 m_L = B_AS_LMAX;
147 else
148 m_L = E_AS_TH[m_Layer];
149}
double m_L
Definition: MucEntity.h:104

Referenced by Init().

◆ SetLocOrgInBes()

void MucAbsorber::SetLocOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 186 of file MucAbsorber.cxx.

187{
188 double x, y, z;
189 x = y = z = 0.0;
190
191 //---------- set x and y --------
192 if( m_Part == BRID || m_ID == -1 ) // the local(mother) in BES
193 {
194 x = m_Rc * cos( m_Theta );
195 y = m_Rc * sin( m_Theta );
196 } // barrel
197 else // for endcap panel, calculate the origin of temporary local in BES
198 {
199 // set x and y
200 double tempR, tempTheta;
201 tempR = sqrt(2.0) * E_AS_RMAX / 2.0;
202 tempTheta = ( 2*m_Segment + 1 ) * ( MUC_PI / 4.0 );
203
204 x = tempR * cos( tempTheta );
205 y = tempR * sin( tempTheta );
206
207 }// endcap
208
209 //---------- set z -----------
210 if( m_Part == BRID ) z = 0.;
211 else
212 {
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 ) - m_Thin/2.0;
217 z *= cos( m_Part*MUC_PI/2.0 );
218 }
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 }
228}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
double m_Thin
Definition: MucEntity.h:101
int m_Segment
Definition: MucEntity.h:89
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 MucAbsorber::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 241 of file MucAbsorber.cxx.

242{
243 double x, y;
244
245 if( m_Part == BRID || m_ID == -1 ) // object is concided with local
246 {
250
251 } // local
252 else
253 {
254 //-------- set x and y ------------
255 // endcap panels
256 // setting segment 0 as reference
257 if( m_ID == 0 )
258 {
259 x = m_Rc;
260 y = m_Rc * tan( m_Theta ) / 2.0;
261 }
262 else if ( m_ID ==1 )
263 {
264 x = m_Rc * cos( m_Theta );
265 y = m_Rc * sin( m_Theta );
266 }
267 else // m_ID == 2
268 {
269 x = m_Rc / tan( m_Theta ) / 2.0;
270 y = m_Rc;
271 }
272
273 // x, y signs of coordinate different by segment
274 if( m_Segment == 0 ) { ; }
275 else if ( m_Segment == 1 ) { x = -x; }
276 else if ( m_Segment == 2 ) { x = -x; y = -y; }
277 else { y = -y; }
278
279 m_ObjOrgInBes[0] = x;
280 m_ObjOrgInBes[1] = y;
281
282 // limit cut
283 for( int i=0; i<2; i++ ) {
284 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
285 }
286
287 //---------- set z--------------
289
290 } // else, endcap panels
291}
double tan(const BesAngle a)
Definition: BesAngle.h:216
double m_ObjOrgInBes[3]
Definition: MucEntity.h:118

Referenced by Init().

◆ SetObjOrgInLoc()

void MucAbsorber::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 293 of file MucAbsorber.cxx.

294{
295 if( m_Part == BRID || m_ID == -1 ) // for barrel and endcap local
296 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = 0.;
297 else // for endcap panels
298 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
299}
double m_ObjOrgInLoc[3]
Definition: MucEntity.h:119

Referenced by Init().

◆ SetObjRotToMot()

void MucAbsorber::SetObjRotToMot ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 230 of file MucAbsorber.cxx.

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

Referenced by Init().

◆ SetRc()

void MucAbsorber::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 96 of file MucAbsorber.cxx.

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

Referenced by Init().

◆ SetRin()

void MucAbsorber::SetRin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 74 of file MucAbsorber.cxx.

75{
76 if( m_Part == BRID )
77 m_Rin = B_AS_RMIN[m_Layer];
78 else
79 {
80 if( m_ID == -1 )
81 m_Rin = 0.0;
82 else
83 m_Rin = E_AS_RMIN[m_Layer];
84 }
85}

Referenced by Init().

◆ SetRout()

void MucAbsorber::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 87 of file MucAbsorber.cxx.

88{
89 if( m_Part == BRID )
90 m_Rout = B_AS_RMIN[m_Layer] + B_AS_TH[m_Layer] ;
91 else
92 m_Rout = E_AS_RMAX;
93}

Referenced by Init().

◆ SetTheta()

void MucAbsorber::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 61 of file MucAbsorber.cxx.

62{
63 if( m_Part == BRID )
64 m_Theta = m_Segment * ( MUC_PI/4.0 );
65 else
66 {
67 if( m_ID == -1 )
68 m_Theta = ( 2*m_Segment + 1 ) * ( MUC_PI/4.0 );
69 else
70 m_Theta = ( MUC_PI/4.0 ) + ( m_ID - 1) * MUC_PI / 8.0 ;
71 }
72}

Referenced by Init().

◆ SetThin()

void MucAbsorber::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 109 of file MucAbsorber.cxx.

110{
111 if( m_Part == BRID )
112 m_Thin = B_AS_TH[m_Layer];
113 else
114 m_Thin = E_AS_TH[m_Layer];
115}

Referenced by Init().

◆ SetW()

void MucAbsorber::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 117 of file MucAbsorber.cxx.

118{
119 if( m_Part == BRID)
120 m_W = 2.0 * VALUE * m_Rout;
121 else
122 {
123 if( m_ID == -1 ) // temporary local
124 m_W = E_AS_RMAX;
125 else
126 m_W = 0;
127 }
128}
double m_W
Definition: MucEntity.h:102

Referenced by Init().

◆ SetWd()

void MucAbsorber::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 168 of file MucAbsorber.cxx.

169{
170 if( m_Part == BRID )
171 m_Wd = 2.0 * VALUE * m_Rout;
172 else
173 {
174 if( m_ID == -1 ) // temporary local
175 m_Wd = m_W;
176 if( m_ID == 1 ) // center panel
177 m_Wd = 2.0 * VALUE * E_AS_RMAX;
178 else
179 m_Wd = VALUE * E_AS_RMAX;
180 }
181
182 m_Wd -= 0.8; //mm, avoid overlaping
183}
double m_Wd
Definition: MucEntity.h:106

Referenced by Init().

◆ SetWu()

void MucAbsorber::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 151 of file MucAbsorber.cxx.

152{
153 if( m_Part == BRID )
154 m_Wu = 2 * VALUE * m_Rin;
155 else
156 {
157 if( m_ID == -1 ) // temporary local
158 m_Wu = m_W;
159 else if( m_ID == 1 ) // center panel
160 m_Wu = 2 * VALUE * m_Rin;
161 else
162 m_Wu = VALUE * m_Rin;
163 }
164
165 m_Wu -= 0.8; //mm, avoid overlaping
166}
double m_Wu
Definition: MucEntity.h:105

Referenced by Init().


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