BOSS 7.1.0
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:37

◆ 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 34 of file MucAbsorber.cxx.

34{ ; }

Member Function Documentation

◆ Init()

void MucAbsorber::Init ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 37 of file MucAbsorber.cxx.

38{
39 SetTheta();
40 SetRin();
41 SetRout();
42 SetRc();
43
44 SetThin();
45 SetW();
46 SetWu();
47 SetWd();
48 SetH();
49 SetL();
54}
virtual void SetThin()
Definition: MucAbsorber.cxx:93
virtual void SetObjOrgInBes()
virtual void SetLocOrgInBes()
virtual void SetTheta()
Definition: MucAbsorber.cxx:57
virtual void SetWd()
virtual void SetW()
Definition: MucAbsorber.cxx:99
virtual void SetH()
virtual void SetObjRotToMot()
virtual void SetWu()
virtual void SetRin()
Definition: MucAbsorber.cxx:67
virtual void SetL()
virtual void SetObjOrgInLoc()
virtual void SetRout()
Definition: MucAbsorber.cxx:77
virtual void SetRc()
Definition: MucAbsorber.cxx:83

Referenced by MucAbsorber().

◆ operator=()

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

Definition at line 26 of file MucAbsorber.cxx.

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

◆ SetH()

void MucAbsorber::SetH ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 112 of file MucAbsorber.cxx.

113{
114 if( m_Part == BRID )
115 m_H = B_AS_TH[m_Layer];
116 else
117 {
118 if( m_ID == -1 ) // temporary local
119 m_H = E_AS_RMAX;
120 else
121 m_H = E_AS_RMAX - E_AS_RMIN[m_Layer];
122 }
123}
double m_H
Definition: MucEntity.h:102
int m_Layer
Definition: MucEntity.h:89
int m_Part
Definition: MucEntity.h:87
int m_ID
Definition: MucEntity.h:92

Referenced by Init().

◆ SetL()

void MucAbsorber::SetL ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 125 of file MucAbsorber.cxx.

126{
127 if( m_Part == BRID ) m_L = B_AS_LMAX;
128 else m_L = E_AS_TH[m_Layer];
129}
double m_L
Definition: MucEntity.h:103

Referenced by Init().

◆ SetLocOrgInBes()

void MucAbsorber::SetLocOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 165 of file MucAbsorber.cxx.

166{
167 double x, y, z;
168 x = y = z = 0.0;
169
170 //---------- set x and y --------
171 if( m_Part == BRID || m_ID == -1 ) // the local(mother) in BES
172 {
173 x = m_Rc * cos( m_Theta );
174 y = m_Rc * sin( m_Theta );
175 } // barrel
176 else // for endcap panel, calculate the origin of temporary local in BES
177 {
178 // set x and y
179 double tempR, tempTheta;
180 tempR = sqrt(2.0) * E_AS_RMAX / 2.0;
181 tempTheta = ( 2*m_Segment + 1 ) * ( MUC_PI / 4.0 );
182
183 x = tempR * cos( tempTheta );
184 y = tempR * sin( tempTheta );
185 }// endcap
186
187 //---------- set z -----------
188 if( m_Part == BRID ) z = 0.;
189 else
190 {
191 for( int i=0; i<m_Layer+1; i++ ) z += E_AS_TH[i];
192
193 z += m_Layer * AS_GAP;
194 z += (E_AS_ZMAX - E_AS_TOTAL_TH ) - m_Thin/2.0;
195 z *= cos( m_Part*MUC_PI/2.0 );
196 }
197
198 m_LocOrgInBes[0] = x;
199 m_LocOrgInBes[1] = y;
200 m_LocOrgInBes[2] = z;
201
202 // limit cut
203 for(int i=0; i<3; i++) {
204 if( fabs(m_LocOrgInBes[i]) < ERR_LIMIT ) m_LocOrgInBes[i] = 0;
205 }
206}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
Double_t x[10]
double m_Thin
Definition: MucEntity.h:100
int m_Segment
Definition: MucEntity.h:88
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 MucAbsorber::SetObjOrgInBes ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 219 of file MucAbsorber.cxx.

220{
221 double x, y;
222
223 if( m_Part == BRID || m_ID == -1 ) // object is concided with local
224 {
228 } // local
229 else
230 {
231 //-------- set x and y ------------
232 // endcap panels
233 // setting segment 0 as reference
234 if( m_ID == 0 )
235 {
236 x = m_Rc;
237 y = m_Rc * tan( m_Theta ) / 2.0;
238 } else if ( m_ID ==1 )
239 {
240 x = m_Rc * cos( m_Theta );
241 y = m_Rc * sin( m_Theta );
242 } else // m_ID == 2
243 {
244 x = m_Rc / tan( m_Theta ) / 2.0;
245 y = m_Rc;
246 }
247
248 // x, y signs of coordinate different by segment
249 if ( m_Segment == 0 ) { ; }
250 else if ( m_Segment == 1 ) { x = -x; }
251 else if ( m_Segment == 2 ) { x = -x; y = -y; }
252 else { y = -y; }
253
254 m_ObjOrgInBes[0] = x;
255 m_ObjOrgInBes[1] = y;
256
257 // limit cut
258 for( int i=0; i<2; i++ ) {
259 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0;
260 }
261
262 //---------- set z--------------
264
265 } // else, endcap panels
266}
double tan(const BesAngle a)
Definition: BesAngle.h:216
double m_ObjOrgInBes[3]
Definition: MucEntity.h:117

Referenced by Init().

◆ SetObjOrgInLoc()

void MucAbsorber::SetObjOrgInLoc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 268 of file MucAbsorber.cxx.

269{
270 if( m_Part == BRID || m_ID == -1 ) // for barrel and endcap local
271 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = 0.;
272 else // for endcap panels
273 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i];
274}
double m_ObjOrgInLoc[3]
Definition: MucEntity.h:118

Referenced by Init().

◆ SetObjRotToMot()

void MucAbsorber::SetObjRotToMot ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 208 of file MucAbsorber.cxx.

209{
210 m_ObjRotToMot[0] = 0.;
211 m_ObjRotToMot[1] = 0.;
212
213 if( m_Part == BRID )
214 m_ObjRotToMot[2] = MUC_PI * (m_Segment - 2) / 4.0;
215 else
216 m_ObjRotToMot[2] = 0.;
217}
double m_ObjRotToMot[3]
Definition: MucEntity.h:110

Referenced by Init().

◆ SetRc()

void MucAbsorber::SetRc ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 83 of file MucAbsorber.cxx.

84{
85 if( m_Part == BRID )
86 m_Rc = B_AS_RMIN[m_Layer] + B_AS_TH[m_Layer]/2.0;
87 else {
88 if( m_ID == -1 ) m_Rc = sqrt(2.0) * E_AS_RMAX / 2.0;
89 else m_Rc = (m_Rin + m_Rout)/2.0;
90 }
91}
double m_Rin
Definition: MucEntity.h:97
double m_Rout
Definition: MucEntity.h:98

Referenced by Init().

◆ SetRin()

void MucAbsorber::SetRin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 67 of file MucAbsorber.cxx.

68{
69 if( m_Part == BRID )
70 m_Rin = B_AS_RMIN[m_Layer];
71 else {
72 if( m_ID == -1 ) m_Rin = 0.0;
73 else m_Rin = E_AS_RMIN[m_Layer];
74 }
75}

Referenced by Init().

◆ SetRout()

void MucAbsorber::SetRout ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 77 of file MucAbsorber.cxx.

78{
79 if( m_Part == BRID ) m_Rout = B_AS_RMIN[m_Layer] + B_AS_TH[m_Layer] ;
80 else m_Rout = E_AS_RMAX;
81}

Referenced by Init().

◆ SetTheta()

void MucAbsorber::SetTheta ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 57 of file MucAbsorber.cxx.

58{
59 if( m_Part == BRID )
60 m_Theta = m_Segment * ( MUC_PI/4.0 );
61 else {
62 if( m_ID == -1 ) m_Theta = ( 2*m_Segment + 1 ) * ( MUC_PI/4.0 );
63 else m_Theta = ( MUC_PI/4.0 ) + ( m_ID - 1) * MUC_PI / 8.0 ;
64 }
65}

Referenced by Init().

◆ SetThin()

void MucAbsorber::SetThin ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 93 of file MucAbsorber.cxx.

94{
95 if( m_Part == BRID ) m_Thin = B_AS_TH[m_Layer];
96 else m_Thin = E_AS_TH[m_Layer];
97}

Referenced by Init().

◆ SetW()

void MucAbsorber::SetW ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 99 of file MucAbsorber.cxx.

100{
101 if( m_Part == BRID)
102 m_W = 2.0 * VALUE * m_Rout;
103 else
104 {
105 if( m_ID == -1 ) // temporary local
106 m_W = E_AS_RMAX;
107 else
108 m_W = 0;
109 }
110}
double m_W
Definition: MucEntity.h:101

Referenced by Init().

◆ SetWd()

void MucAbsorber::SetWd ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 148 of file MucAbsorber.cxx.

149{
150 if( m_Part == BRID )
151 m_Wd = 2.0 * VALUE * m_Rout;
152 else
153 {
154 if( m_ID == -1 ) // temporary local
155 m_Wd = m_W;
156 if( m_ID == 1 ) // center panel
157 m_Wd = 2.0 * VALUE * E_AS_RMAX;
158 else
159 m_Wd = VALUE * E_AS_RMAX;
160 }
161
162 m_Wd -= 0.8; //mm, avoid overlaping
163}
double m_Wd
Definition: MucEntity.h:105

Referenced by Init().

◆ SetWu()

void MucAbsorber::SetWu ( )
protectedvirtual

Reimplemented from MucEntity.

Definition at line 131 of file MucAbsorber.cxx.

132{
133 if( m_Part == BRID )
134 m_Wu = 2 * VALUE * m_Rin;
135 else
136 {
137 if( m_ID == -1 ) // temporary local
138 m_Wu = m_W;
139 else if( m_ID == 1 ) // center panel
140 m_Wu = 2 * VALUE * m_Rin;
141 else
142 m_Wu = VALUE * m_Rin;
143 }
144
145 m_Wu -= 0.8; //mm, avoid overlaping
146}
double m_Wu
Definition: MucEntity.h:104

Referenced by Init().


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