11#include "MucGeoCreateAlg/MucGeoConst.h"
12#include "MucGeoCreateAlg/MucGas.h"
17MucGas::MucGas(
int part,
int segment,
int layer,
int upDown,
int rpcId,
int id )
18 :
MucEntity( part, segment, layer, upDown, rpcId, id )
98 m_Theta = ( MUC_PI/4.0 ) + MUC_PI / 8.0 ;
102 m_Theta = ( MUC_PI/4.0 ) - MUC_PI / 8.0 ;
160 m_W = VALUE *
m_Rc - E_GP_DX - E_STRPLN_DA - RPC_SL_OFFSET;
164 m_W = VALUE *
m_Rc - E_GP_DY - E_STRPLN_DA - RPC_SL_OFFSET;
171 m_W = VALUE *
m_Rc - E_GP_DX - E_STRPLN_DA;
181 m_W = VALUE *
m_Rc - E_GP_DY - E_STRPLN_DA;
191 m_W -= RPC_DEATH_EDGE * 2.0;
196 if(
m_RpcId == 1 )
m_W -= RPC_DEATH_EDGE * 2.0;
197 else m_W -= ( 1 + 1.0/
cos(MUC_PI/8.0) ) * RPC_DEATH_EDGE;
202 m_W -= RPC_DEATH_EDGE * 2.0;
204 m_W -= RPC_DEATH_EDGE;
219 m_H -= RPC_DEATH_EDGE * (1 + 1.0/VALUE);
221 m_H -= RPC_DEATH_EDGE * 2.0;
235 m_L = B_BOX_LT - 2*B_BOX_DZ[
m_UpDown] - 3*B_RPC_LTN;
237 m_L = B_BOX_LT - 2*B_BOX_DZ[
m_UpDown] - 3*B_RPC_LTS;
262 m_L -= RPC_DEATH_EDGE * 2.0;
281 m_Wu = VALUE *
m_Rin - E_GP_DX - E_STRPLN_DA - RPC_SL_OFFSET;
285 m_Wu = VALUE *
m_Rin - E_GP_DY - E_STRPLN_DA - RPC_SL_OFFSET;
292 m_Wu = VALUE *
m_Rin - E_GP_DX - E_STRPLN_DA;
302 m_Wu = VALUE *
m_Rin - E_GP_DY - E_STRPLN_DA;
314 else m_Wu -= ( 1 + 1.0/
cos(MUC_PI/8.0) ) * RPC_DEATH_EDGE;
319 m_Wu -= RPC_DEATH_EDGE * 2.0;
321 m_W -= RPC_DEATH_EDGE;
336 m_Wd = VALUE *
m_Rout - E_GP_DX - E_STRPLN_DA - RPC_SL_OFFSET;
340 m_Wd = VALUE *
m_Rout - E_GP_DY - E_STRPLN_DA - RPC_SL_OFFSET;
347 m_Wd = VALUE *
m_Rout - E_GP_DX - E_STRPLN_DA;
357 m_Wd = VALUE *
m_Rout - E_GP_DY - E_STRPLN_DA;
367 else m_Wd -= ( 1 + 1.0/
cos(MUC_PI/8.0) ) * RPC_DEATH_EDGE;
372 m_Wd -= RPC_DEATH_EDGE * 2.0;
374 m_Wd -= RPC_DEATH_EDGE;
393 r = (B_AS_RMIN[
m_Layer] - AS_GAP/2.0) + (1-2*
m_UpDown)*(STR_TH + RPC_TH)/2.0;
401 z = (2*
m_UpDown - 1) * 3 * B_RPC_LTN/2.0;
403 z = (2*
m_UpDown - 1) * 3 * B_RPC_LTS/2.0;
408 z = -B_BOX_LT/2.0 + B_BOX_DZ[
m_UpDown] + (1+2*(3-
m_RpcId))*B_RPC_LTN/2.0;
420 y = (B_AS_RMIN[
m_Layer] - AS_GAP / 2.0) + (1-2*
m_UpDown)*(STR_TH + RPC_TH)/2.0;
432 z = -B_BOX_LT/2.0 - B_BOX_DZ[
m_UpDown] + (1+2*(4-
m_RpcId))*B_RPC_LTN/2.0;
441 for(
int i=0; i<2; i++ ) {
460 x = ( VALUE*
m_Rc + E_GP_DX + E_STRPLN_DA + RPC_SL_OFFSET ) / 2.0;
471 y = ( VALUE*
m_Rc + E_GP_DY + E_STRPLN_DA + RPC_SL_OFFSET ) / 2.0;
479 x = ( VALUE*
m_Rc + E_GP_DX + E_STRPLN_DA )/2.0 + RPC_DEATH_EDGE/2.0;
484 x += RPC_DEATH_EDGE * ( 3 - 2*sqrt(2.0) )/4.0;
487 y += RPC_DEATH_EDGE * ( 1 + 4.0/sqrt(2.0) )/4.0;
496 x += RPC_DEATH_EDGE * ( 1 + 4.0/sqrt(2.0) )/4.0;
499 y += RPC_DEATH_EDGE * ( 3 - 2*sqrt(2.0) )/4.0;
504 y = ( VALUE*
m_Rc + E_GP_DY + E_STRPLN_DA )/2.0 + RPC_DEATH_EDGE/2.0;
517 for(
int i=0; i<
m_Layer+1; i++ ) z += E_AS_TH[i];
519 z += ( (E_AS_ZMAX - E_AS_TOTAL_TH) + AS_GAP/2.0 );
520 z += (1-2*
m_UpDown) * ( STR_TH + RPC_TH ) / 2.0;
528 for(
int i=0; i<2; i++ ) {
555 for(
int i=0; i<3; i++ ) {
double sin(const BesAngle a)
double cos(const BesAngle a)
MucEntity & operator=(const MucEntity &other)
void TransLocToBes(double LocCoord[], double BesCoord[], double LocOrgInBes[], double Rot_z)
MucGas(int part, int segment, int layer, int upDown, int rpcId, int id)
MucGas & operator=(const MucGas &other)
virtual void SetObjOrgInLoc()
virtual void SetObjOrgInBes()
virtual void SetLocOrgInBes()