#include <MucBox.h>
Inheritance diagram for MucBox:
Public Member Functions | |
double | GetArea () |
double | GetArea () |
MucBoxCover * | GetBoxCover (int upDown, int id) |
MucBoxCover * | GetBoxCover (int upDown, int id) |
double | GetH () |
double | GetH () |
int | GetID () |
int | GetID () |
double | GetL () |
double | GetL () |
int | GetLayer () |
int | GetLayer () |
double * | GetLocOrgInBes () |
double | GetLocOrgInBes (int i) |
double * | GetLocOrgInBes () |
double | GetLocOrgInBes (int i) |
double * | GetObjOrgInBes () |
double | GetObjOrgInBes (int i) |
double * | GetObjOrgInBes () |
double | GetObjOrgInBes (int i) |
double * | GetObjOrgInLoc () |
double | GetObjOrgInLoc (int i) |
double * | GetObjOrgInLoc () |
double | GetObjOrgInLoc (int i) |
double * | GetObjRotToMot () |
double | GetObjRotToMot (int i) |
double * | GetObjRotToMot () |
double | GetObjRotToMot (int i) |
int | GetPart () |
int | GetPart () |
double | GetRc () |
double | GetRc () |
double | GetRin () |
double | GetRin () |
double | GetRout () |
double | GetRout () |
MucRpc * | GetRpc (int upDown, int id) |
MucRpc * | GetRpc (int upDown, int id) |
int | GetRpcId () |
int | GetRpcId () |
int | GetSegment () |
int | GetSegment () |
MucStripPlane * | GetStripPlane () |
MucStripPlane * | GetStripPlane () |
double | GetTheta () |
double | GetTheta () |
double | GetThin () |
double | GetThin () |
int | GetUpDown () |
int | GetUpDown () |
double | GetW () |
double | GetW () |
double | GetWd () |
double | GetWd () |
double | GetWu () |
double | GetWu () |
MucBox (const MucBox &other) | |
MucBox (int part, int segment, int layer, int id) | |
MucBox (const MucBox &other) | |
MucBox (int part, int segment, int layer, int id) | |
MucBox & | operator= (const MucBox &other) |
MucBox & | operator= (const MucBox &other) |
virtual void | SetAlignment (double dx, double dy, double dz) |
virtual void | SetAlignment (double dx, double dy, double dz) |
void | TransBesToLoc (double LocCoord[], double BesCoord[], double LocOrgInBes[], double Rot_z) |
void | TransBesToLoc (double LocCoord[], double BesCoord[], double LocOrgInBes[], double Rot_z) |
void | TransLocToBes (double LocCoord[], double BesCoord[], double LocOrgInBes[], double Rot_z) |
void | TransLocToBes (double LocCoord[], double BesCoord[], double LocOrgInBes[], double Rot_z) |
~MucBox () | |
~MucBox () | |
Protected Member Functions | |
virtual void | Init () |
virtual void | Init () |
virtual void | SetArea () |
virtual void | SetArea () |
virtual void | SetH () |
virtual void | SetH () |
virtual void | SetL () |
virtual void | SetL () |
virtual void | SetLocOrgInBes () |
virtual void | SetLocOrgInBes () |
virtual void | SetObjOrgInBes () |
virtual void | SetObjOrgInBes () |
virtual void | SetObjOrgInLoc () |
virtual void | SetObjOrgInLoc () |
virtual void | SetObjRotToMot () |
virtual void | SetObjRotToMot () |
virtual void | SetRc () |
virtual void | SetRc () |
virtual void | SetRin () |
virtual void | SetRin () |
virtual void | SetRout () |
virtual void | SetRout () |
virtual void | SetTheta () |
virtual void | SetTheta () |
virtual void | SetThin () |
virtual void | SetThin () |
virtual void | SetW () |
virtual void | SetW () |
virtual void | SetWd () |
virtual void | SetWd () |
virtual void | SetWu () |
virtual void | SetWu () |
Protected Attributes | |
double | m_Area |
double | m_H |
int | m_ID |
double | m_L |
int | m_Layer |
double | m_LocOrgInBes [3] |
double | m_ObjOrgInBes [3] |
double | m_ObjOrgInLoc [3] |
double | m_ObjRotToMot [3] |
int | m_Part |
double | m_Rc |
double | m_Rin |
double | m_Rout |
int | m_RpcId |
int | m_Segment |
double | m_Theta |
double | m_Thin |
int | m_UpDown |
double | m_W |
double | m_Wd |
double | m_Wu |
Private Attributes | |
MucBoxCover * | m_MucBoxCover |
MucBoxCover * | m_MucBoxCover |
MucRpc * | m_MucRpc |
MucRpc * | m_MucRpc |
MucStripPlane * | m_MucStripPlane |
MucStripPlane * | m_MucStripPlane |
|
00017 : MucEntity( part, segment, layer, id ) 00018 { 00019 MucBox::Init(); 00020 00021 m_MucStripPlane = NULL; 00022 m_MucRpc = NULL; 00023 m_MucBoxCover = NULL; 00024 }
|
|
00027 : MucEntity( other ) 00028 { 00029 m_MucStripPlane = other.m_MucStripPlane; 00030 m_MucRpc = other.m_MucRpc; 00031 m_MucBoxCover = other.m_MucBoxCover; 00032 }
|
|
00051 { 00052 delete m_MucStripPlane; 00053 delete m_MucRpc; 00054 delete m_MucBoxCover; 00055 }
|
|
|
|
|
|
|
|
|
|
00150 { return m_Area; }
|
|
|
|
00098 { 00099 if( m_MucBoxCover != NULL ) 00100 delete m_MucBoxCover; 00101 00102 return ( m_MucBoxCover = new MucBoxCover( m_Part, m_Segment, m_Layer, upDown, id ) ); 00103 }
|
|
|
|
00146 { return m_H; }
|
|
|
|
00139 { return m_ID; }
|
|
|
|
00147 { return m_L; }
|
|
|
|
00136 { return m_Layer; }
|
|
|
|
|
|
00176 { return &m_LocOrgInBes[0]; }
|
|
00153 { 00154 if( i<1 || i>3 ) i=1; 00155 return m_LocOrgInBes[i-1]; 00156 }
|
|
|
|
|
|
00178 { return &m_ObjOrgInBes[0]; }
|
|
00165 { 00166 if( i<1 || i>3 ) i=1; 00167 return m_ObjOrgInBes[i-1]; 00168 }
|
|
|
|
|
|
00179 { return &m_ObjOrgInLoc[0]; }
|
|
00171 { 00172 if( i<1 || i>3 ) i=1; 00173 return m_ObjOrgInLoc[i-1]; 00174 }
|
|
|
|
|
|
00177 { return &m_ObjRotToMot[0]; }
|
|
00159 { 00160 if( i<1 || i>3 ) i=1; 00161 return m_ObjRotToMot[i-1]; 00162 }
|
|
|
|
00134 { return m_Part; }
|
|
|
|
00143 { return m_Rc; }
|
|
|
|
00141 { return m_Rin; }
|
|
|
|
00142 { return m_Rout; }
|
|
|
|
00090 { 00091 if( m_MucRpc != NULL ) 00092 delete m_MucRpc; 00093 00094 return ( m_MucRpc = new MucRpc( m_Part, m_Segment, m_Layer, upDown, id ) ); 00095 }
|
|
|
|
00138 { return m_RpcId; }
|
|
|
|
00135 { return m_Segment; }
|
|
|
|
00082 { 00083 if( m_MucStripPlane != NULL ) 00084 return m_MucStripPlane; 00085 else 00086 return ( m_MucStripPlane = new MucStripPlane( m_Part, m_Segment, m_Layer, ((m_Part==BRID)?0:-1) ) ); 00087 }
|
|
|
|
00140 { return m_Theta; }
|
|
|
|
00144 { return m_Thin; }
|
|
|
|
00137 { return m_UpDown; }
|
|
|
|
00145 { return m_W; }
|
|
|
|
00149 { return m_Wd; }
|
|
|
|
00148 { return m_Wu; }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00059 { 00060 SetTheta(); 00061 SetRin(); 00062 SetRout(); 00063 SetRc(); 00064 00065 SetThin(); 00066 SetW(); 00067 SetWu(); 00068 SetWd(); 00069 SetH(); 00070 SetL(); 00071 SetArea(); 00072 00073 SetLocOrgInBes(); 00074 SetObjRotToMot(); 00075 SetObjOrgInBes(); 00076 SetObjOrgInLoc(); 00077 }
|
|
|
|
00036 { 00037 if( this == &other) 00038 return *this; 00039 00040 MucEntity::operator =(other); 00041 00042 m_MucRpc = other.m_MucRpc; 00043 m_MucBoxCover = other.m_MucBoxCover; 00044 m_MucStripPlane = other.m_MucStripPlane; 00045 00046 return *this; 00047 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00437 { 00438 00439 if( m_Part == BRID || m_ID == -1 ) 00440 { 00441 m_ObjOrgInLoc[0] += dx; 00442 m_ObjOrgInLoc[1] += dy; 00443 m_ObjOrgInLoc[2] += dz; 00444 } 00445 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00265 { 00266 if( m_Part == BRID ) 00267 m_Area = m_W * m_L; 00268 else 00269 m_Area = m_W * m_L; 00270 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00183 { 00184 if( m_Part == BRID ) 00185 m_H = BOX_TH; 00186 else 00187 { 00188 if( m_ID == -1 ) // virtual encap gap 00189 m_H = E_AS_RMAX - E_BOX_DR - E_GP_DY; 00190 else if( m_ID == 1 ) 00191 { // for panel logical operation "AND" valid; 00192 m_H = E_AS_RMAX - E_BOX_DR - E_GP_RMIN[m_Layer] + OVERLAP_WIDTH; 00193 } 00194 else 00195 m_H = E_AS_RMAX - E_BOX_DR - E_GP_RMIN[m_Layer]; 00196 } 00197 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00200 { 00201 if( m_Part == BRID ) 00202 { 00203 if( m_Segment != B_TOP || m_ID == -1 ) 00204 m_L = B_BOX_LT; 00205 else // top segment 00206 { 00207 if( m_ID == 2 ) 00208 m_L = B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)]; 00209 else 00210 m_L = B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)]; 00211 } 00212 } 00213 else 00214 m_L = BOX_TH; 00215 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00275 { 00276 double x, y, z; 00277 x = y = z = 0.; 00278 00279 if( m_Part == BRID ) 00280 { 00281 x = m_Rc*cos( m_Theta ); 00282 y = m_Rc*sin( m_Theta ); 00283 z = 0.; 00284 00285 } // barrel 00286 else 00287 { 00288 //------------ set x and y --------------- 00289 // segment 0 as reference 00290 if( m_ID == -1 ) // for box, local is gap 00291 { 00292 x = (E_AS_RMAX + E_GP_DX) / 2.0; 00293 y = (E_AS_RMAX + E_GP_DY) / 2.0; 00294 } 00295 else // for box panel, local is box 00296 { 00297 x = (E_AS_RMAX - E_BOX_DR + E_GP_DX) / 2.0; 00298 y = (E_AS_RMAX - E_BOX_DR + E_GP_DY) / 2.0; 00299 } 00300 00301 // x, y signs of coordinate different by segment 00302 if ( m_Segment == 0 ) { ; } 00303 else if ( m_Segment == 1 ) { x = -x; } 00304 else if ( m_Segment == 2 ) { x = -x; y = -y; } 00305 else { y = -y; } 00306 00307 //------------- set z -------------------- 00308 for( int i=0; i<m_Layer+1; i++ ) z += E_AS_TH[i]; 00309 00310 z += m_Layer * AS_GAP; 00311 z += (E_AS_ZMAX - E_AS_TOTAL_TH) + AS_GAP/2.0; 00312 z *= cos( m_Part*MUC_PI/2.0 ); 00313 00314 }// endcap 00315 00316 m_LocOrgInBes[0] = x; 00317 m_LocOrgInBes[1] = y; 00318 m_LocOrgInBes[2] = z; 00319 00320 // limit cut 00321 for(int i=0;i<3;i++) { 00322 if( fabs(m_LocOrgInBes[i]) < ERR_LIMIT ) m_LocOrgInBes[i] = 0; 00323 } 00324 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00346 { 00347 double x, y, z; 00348 x = y = z = 0.; 00349 00350 if( m_Part == BRID ) 00351 { 00352 if( m_Segment != B_TOP || m_ID == -1 ) 00353 for( int i=0; i<3; i++ ) m_ObjOrgInBes[i] = m_LocOrgInBes[i]; 00354 else // top segment 00355 { 00356 // set x 00357 if( m_ID == 2 ) x = 0.; 00358 else x = (1-2*m_ID) * ( B_BOX_WT[m_Layer] + B_BOX_SLOT_WT )/4.0; 00359 00360 00361 // set z 00362 if( m_ID == 2 ) z = -B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] / 2.0; 00363 else z = ( B_BOX_LT - B_TOPRPC_LTS[(m_Layer==0)?1:(m_Layer%2)] )/2.0; 00364 00365 m_ObjOrgInBes[0] = x; 00366 m_ObjOrgInBes[2] = z; 00367 00368 // set y 00369 m_ObjOrgInBes[1] = m_LocOrgInBes[1]; 00370 00371 // limit cut 00372 for( int i=0; i<3; i++ ) { 00373 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0; 00374 00375 } 00376 } 00377 } 00378 else // endcap 00379 { 00380 //------------- set x, y -------------------------- 00381 // segment 0 as reference 00382 if( m_ID == -1 ) 00383 { 00384 x = (E_AS_RMAX - E_BOX_DR + E_GP_DX) / 2.0; 00385 y = (E_AS_RMAX - E_BOX_DR + E_GP_DY) / 2.0; 00386 } 00387 else if( m_ID == 0 ) 00388 { 00389 x = m_Rc; 00390 y = ( m_Rc * tan( m_Theta ) + E_GP_DY ) / 2.0; 00391 } 00392 else if ( m_ID ==1 ) 00393 { 00394 x = m_Rc * cos( m_Theta ); 00395 y = m_Rc * sin( m_Theta ); 00396 } 00397 else // m_ID == 2 00398 { 00399 x = ( m_Rc / tan( m_Theta ) + E_GP_DX ) / 2.0; 00400 y = m_Rc; 00401 } 00402 00403 // x, y signs of coordinate different by segment 00404 if ( m_Segment == 0 ) { ; } 00405 else if ( m_Segment == 1 ) { x = -x; } 00406 else if ( m_Segment == 2 ) { x = -x; y = -y; } 00407 else { y = -y; } 00408 00409 m_ObjOrgInBes[0] = x; 00410 m_ObjOrgInBes[1] = y; 00411 00412 // limit cut 00413 for( int i=0; i<2; i++ ) { 00414 if( fabs(m_ObjOrgInBes[i]) < ERR_LIMIT ) m_ObjOrgInBes[i] = 0; 00415 } 00416 00417 //---------- set z --------------------- 00418 m_ObjOrgInBes[2] = m_LocOrgInBes[2]; 00419 00420 } // else, panels 00421 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00424 { 00425 if( m_Part == BRID ) 00426 { 00427 if( m_Segment != B_TOP ) 00428 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = 0.; 00429 else 00430 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i]; 00431 } 00432 else 00433 for(int i=0; i<3; i++) m_ObjOrgInLoc[i] = m_ObjOrgInBes[i] - m_LocOrgInBes[i]; 00434 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00327 { 00328 m_ObjRotToMot[0] = 0.; 00329 m_ObjRotToMot[1] = 0.; 00330 00331 if( m_Part == BRID ) 00332 { 00333 // for barrel segment 5, 6 and 7, the box is uppended in the gap 00334 if( m_Segment == 5 || m_Segment == 6 || m_Segment == 7 ) 00335 m_ObjRotToMot[2] = MUC_PI; 00336 else 00337 m_ObjRotToMot[2] = 0.; 00338 } 00339 else 00340 { 00341 m_ObjRotToMot[2] = 0.; 00342 } 00343 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00142 { 00143 if( m_Part == BRID ) 00144 m_Rc = B_AS_RMIN[m_Layer] - AS_GAP/2.0; 00145 else 00146 { 00147 if( m_ID == -1 ) 00148 m_Rc = sqrt(2.0) * ( E_AS_RMAX - E_BOX_DR ) / 2.0; 00149 else 00150 m_Rc = (m_Rin + m_Rout)/2.0; 00151 } 00152 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00121 { 00122 if( m_Part == BRID ) 00123 m_Rin = B_AS_RMIN[m_Layer] - ( AS_GAP + BOX_TH ) / 2.0; 00124 else 00125 { 00126 if( m_ID == -1 ) 00127 m_Rin = 0.; 00128 else 00129 m_Rin = E_GP_RMIN[m_Layer]; 00130 } 00131 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00134 { 00135 if( m_Part == BRID ) 00136 m_Rout = B_AS_RMIN[m_Layer] -( AS_GAP - BOX_TH ) / 2.0; 00137 else 00138 m_Rout = E_AS_RMAX - E_BOX_DR; 00139 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00108 { 00109 if( m_Part == BRID ) 00110 m_Theta = m_Segment * ( MUC_PI/4.0 ); 00111 else 00112 { 00113 if( m_ID == -1 ) 00114 m_Theta = ( 2*m_Segment + 1 ) * ( MUC_PI/4.0 ); 00115 else 00116 m_Theta = ( MUC_PI/4.0 ) + ( m_ID - 1) * MUC_PI / 8.0 ; 00117 } 00118 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00155 { 00156 m_Thin = BOX_TH; 00157 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00160 { 00161 if( m_Part == BRID) 00162 { 00163 if( m_Segment != B_TOP ) 00164 m_W = B_BOX_WT[m_Layer]; 00165 else // top segment 00166 { 00167 if( m_ID == -1 || m_ID == 2 ) 00168 m_W = B_BOX_WT[m_Layer]; 00169 else 00170 m_W = ( B_BOX_WT[m_Layer] - B_BOX_SLOT_WT )/2.0; 00171 } 00172 } 00173 else 00174 { 00175 if( m_ID == -1 ) // virtual encap gap 00176 m_W = E_AS_RMAX - E_BOX_DR - E_GP_DX; 00177 else 00178 m_W = 0.; 00179 } 00180 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00241 { 00242 if( m_Part == BRID ) 00243 m_Wd = m_W; 00244 else 00245 { 00246 if( m_ID == -1 ) // virtual box 00247 m_Wd = m_W; 00248 else if( m_ID == 1 ) // center fraction 00249 { 00250 m_Wd = 2 * VALUE * m_Rout; 00251 m_Wd += 2*VALUE*(2.0/2); // for panel operation "AND" valid 00252 m_Wd += OVERLAP_WIDTH; 00253 } 00254 else if( m_ID == 0 ) 00255 m_Wd = VALUE * m_Rout - E_GP_DY; 00256 else 00257 m_Wd = VALUE * m_Rout - E_GP_DX; 00258 00259 if( m_ID != -1 ) m_Wd+=OVERLAP_WIDTH; // avoid panels overlap 00260 00261 } 00262 }
|
|
Reimplemented from MucEntity. |
|
Reimplemented from MucEntity. 00218 { 00219 if( m_Part == BRID ) 00220 m_Wu = m_W; 00221 else 00222 { 00223 if( m_ID == -1 ) // virtual box 00224 m_Wu = m_W; 00225 else if( m_ID == 1 ) // center fraction 00226 { 00227 m_Wu = 2 * VALUE * m_Rin ; 00228 m_Wu -= 2*VALUE*(2.0/2); // for panel operation "AND" valid 00229 m_Wu += OVERLAP_WIDTH; 00230 } 00231 else if( m_ID == 0 ) 00232 m_Wu = VALUE * m_Rin - E_GP_DY; 00233 else 00234 m_Wu = VALUE * m_Rin - E_GP_DX; 00235 00236 if( m_ID != -1 ) m_Wu+=OVERLAP_WIDTH; // avoid panels overlap 00237 } 00238 }
|
|
|
|
00224 { 00225 LocCoord[0] = (BesCoord[0] - LocOrgInBes[0])*cos(Rot_z) + (BesCoord[1] - LocOrgInBes[1])*sin(Rot_z); 00226 LocCoord[1] = -(BesCoord[0] - LocOrgInBes[0])*sin(Rot_z) + (BesCoord[1] - LocOrgInBes[1])*cos(Rot_z); 00227 LocCoord[2] = BesCoord[2] - LocOrgInBes[2]; 00228 }
|
|
|
|
00233 { 00234 BesCoord[0] = LocCoord[0]*cos(Rot_z) - LocCoord[1]*sin(Rot_z) + LocOrgInBes[0]; 00235 BesCoord[1] = LocCoord[0]*sin(Rot_z) + LocCoord[1]*cos(Rot_z) + LocOrgInBes[1]; 00236 BesCoord[2] = LocCoord[2] + LocOrgInBes[2]; 00237 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|