27 m_Type = other.m_Type;
28 m_CenterLine = other.m_CenterLine;
29 m_Head = other.m_Head;
30 m_Tail = other.m_Tail;
39 if(
this == &other)
return *
this;
43 m_Type = other.m_Type;
44 m_CenterLine = other.m_CenterLine;
45 m_Head = other.m_Head;
46 m_Tail = other.m_Tail;
111 if( (
m_Layer+1)%2 == 1 ) m_Type = ZSTR;
112 else m_Type = PHISTR;
115 if( (
m_Layer+1)%2 == 1 ) m_Type = XSTR;
133 if(
m_ID == 0 ) m_CenterLine = segFlag * (E_GP_DY+E_STRPLN_DA+
m_W/2.0);
134 else if(
m_ID != E_STR_NUM-1 )
135 m_CenterLine = segFlag * ( E_XSTR_OFFSET +
m_ID*E_STR_DST );
137 m_CenterLine = segFlag * ( E_XSTR_OFFSET + (E_STR_NUM-2)*E_STR_DST + (E_STR_DST +
m_W +
STR_GAP)/2);
144 if(
m_ID == 0 ) m_CenterLine = segFlag * (E_GP_DX+E_STRPLN_DA+
m_W/2.0);
145 else if(
m_ID != E_STR_NUM-1)
146 m_CenterLine = segFlag * ( E_YSTR_OFFSET +
m_ID*E_STR_DST );
148 m_CenterLine = segFlag * ( E_YSTR_OFFSET + (E_STR_NUM-2)*E_STR_DST + (E_STR_DST +
m_W +
STR_GAP)/2);
198 if(
m_ID == E_STR_NUM - 1 )
212 if(
m_ID == E_STR_NUM - 1 )
244 maxStrip = B_PHISTR_NUM;
246 maxStrip = B_TOPSTR_NUM;
250 if(
m_ID > 0 &&
m_ID < (maxStrip-1))
257 if(
m_ID >0 &&
m_ID < (maxStrip-1) )
260 m_W = B_BOX_LT/2 - B_BOX_DZ[SL_DOWN] - B_STR_DST[
m_Layer]*(B_PHISTR_NUM-2)/2;
262 if( (maxStrip == B_TOPSTR_NUM) && (
m_ID == (B_PHISTR_NUM - 1)) )
263 m_W = B_BOX_LT/2 - B_BOX_DZ[SL_DOWN] - B_STR_DST[
m_Layer]*(B_PHISTR_NUM-2)/2;
272 else if(
m_ID != E_STR_NUM-1)
m_W = E_STR_WT;
314 m_L = B_BOX_LT - 2*B_BOX_DZ[SL_DOWN];
316 m_L = B_BOX_WT[
m_Layer] - 2*B_BOX_DZ[SL_DOWN];
322 if(
m_ID > ZCUT_HEAD_NUM &&
m_ID < ZCUT_TAIL_NUM )
330 m_L = B_BOX_LT - 2*B_BOX_DZ[SL_DOWN];
334 if(
m_ID < B_PHISTR_CUT_NUM )
335 m_L = B_BOX_WT[
m_Layer] - 2*B_BOX_DZ[SL_DOWN];
337 m_L = (B_BOX_WT[
m_Layer] - 2*B_BOX_DZ[SL_DOWN] - B_PHISTR_CUT)/2;
342 m_L = fabs( m_Head - m_Tail );
358 cout<<
"Error, strip width = 0!"<<endl;
366 if( (fn -
n) > 0.3 ) m_PadNumber =
n + 1;
367 else m_PadNumber =
n;
387 x = (E_AS_RMAX - E_BOX_DR - E_STRPLN_DB[(
m_Layer==0)?0:1] + E_GP_DX + E_STRPLN_DA) / 2.0;
388 y = (E_AS_RMAX - E_BOX_DR - E_STRPLN_DB[(
m_Layer==0)?0:1] + E_GP_DY + E_STRPLN_DA) / 2.0;
397 for(
int i=0; i<
m_Layer+1; i++ ) z += E_AS_TH[i];
400 z += (E_AS_ZMAX - E_AS_TOTAL_TH) + AS_GAP/2.0;
409 for(
int i=0; i<3; i++ )
431 x = ( m_Head + m_Tail )/2;
435 y = ( m_Head + m_Tail )/2;
441 for(
int i=0; i<
m_Layer+1; i++) z += E_AS_TH[i];
444 z = ( (E_AS_ZMAX - E_AS_TOTAL_TH + z) + AS_GAP/2.0 ) *
cos(
m_Part*MUC_PI/2.0 );
451 for(
int i=0; i<3; i++ )
465 else if(
m_Segment != B_TOP ) maxStrip = B_PHISTR_NUM;
466 else maxStrip = B_TOPSTR_NUM;
474 x = ( B_BOX_WT[j] - 2*B_BOX_DT[SL_DOWN] + (maxStrip-2)*B_STR_DST[j] +
STR_GAP )/4.0;
475 else if(
n == (maxStrip-1) )
476 x = ( 2*B_BOX_DT[SL_DOWN] - B_BOX_WT[j] - (maxStrip-2)*B_STR_DST[j] -
STR_GAP )/4.0;
478 x =( ((maxStrip-1) - 2*
n) * B_STR_DST[j] )/2.0;
496 z = -B_BOX_LT/4.0 + B_BOX_DZ[SL_DOWN]/2.0 - B_STR_DST[j]*(B_PHISTR_NUM-2)/4.0;
497 else if(
n == (B_PHISTR_NUM - 1) )
498 z = B_BOX_LT/4.0 - B_BOX_DZ[SL_DOWN]/2.0 + B_STR_DST[j]*(B_PHISTR_NUM-2)/4.0;
500 z = ( 2*
n - B_PHISTR_NUM + 1 ) * B_STR_DST[j] / 2.0;
509 x = B_BOX_WT[j]/4.0 - B_BOX_DT[SL_DOWN]/2.0 + (maxStrip-2)*B_STR_DST[j]/4.0 +
STR_GAP/4.0;
510 else if(
n == (maxStrip-1) )
511 x = -B_BOX_WT[j]/4.0 + B_BOX_DT[SL_DOWN]/2.0 - (maxStrip-2)*B_STR_DST[j]/4.0 -
STR_GAP/4.0;
513 x = ( (maxStrip-1) - 2*
n ) * B_STR_DST[j] / 2.0;
527 if(
n < B_PHISTR_CUT_NUM )
531 if(
n < B_PHISTR_NUM )
532 x = -B_BOX_WT[j]/4.0 - B_PHISTR_CUT/4.0 + B_BOX_DZ[SL_DOWN]/2.0;
534 x = B_BOX_WT[j]/4.0 + B_PHISTR_CUT/4.0 - B_BOX_DZ[SL_DOWN]/2.0;
541 if(
n < B_PHISTR_NUM )
544 z = -B_BOX_LT/4.0 + B_BOX_DZ[SL_DOWN]/2.0 - B_STR_DST[j]*(B_PHISTR_NUM-2)/4.0;
545 else if(
n == (B_PHISTR_NUM - 1) )
546 z = B_BOX_LT/4.0 - B_BOX_DZ[SL_DOWN]/2.0 + B_STR_DST[j]*(B_PHISTR_NUM-2)/4.0;
548 z = ( 2*
n - B_PHISTR_NUM + 1 ) * B_STR_DST[j] / 2.0;
552 if(
n == (B_TOPSTR_NUM-1) )
553 z = B_BOX_LT/4.0 - B_BOX_DZ[SL_DOWN]/2.0 + B_STR_DST[j]*(B_PHISTR_NUM-2)/4.0;
555 z = ( 2*
n - 3*B_PHISTR_NUM + 2*B_PHISTR_CUT_NUM + 1 ) * B_STR_DST[j]/2.0;
565 for(
int i=0; i<3; i++ ) {
578 for(
int i=0; i<3; i++ )
590 for(
int i=0; i<3; i++ )
double sin(const BesAngle a)
double cos(const BesAngle a)
const int B_ZSTR_CUT_NUM[B_LAY_NUM]
const double B_ZSTR_CUT[2]
const double SECOND_TURN_HEAD[2]
const double EVEN_TURN_POINT_TAIL[2]
const int HEAD_TURN_STR_NUM[8][2]
const double ODD_TURN_POINT_TAIL[2][2]
const int TAIL_TURN_STR_NUM[2]
const double FIRST_TURN_HEAD[8][2]
const double E_FIRST_STR_WT
virtual void SetObjRotToMot()
MucEntity & operator=(const MucEntity &other)
void TransBesToLoc(double LocCoord[], double BesCoord[], double LocOrgInBes[], double Rot_z)
void TransLocToBes(double LocCoord[], double BesCoord[], double LocOrgInBes[], double Rot_z)
virtual void SetLocOrgInBes()
MucStrip(int part, int segment, int layer, int id)
void SetEndcapStripInBes()
void SetBarrelStripInLoc()
virtual void SetObjOrgInBes()
MucStrip & operator=(const MucStrip &other)
virtual void SetObjOrgInLoc()