Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BesEmcGeometry Class Reference

#include <BesEmcGeometry.hh>

List of all members.

Public Member Functions

 BesEmcGeometry ()
 BesEmcGeometry ()
void ComputeEMCParameters ()
void ComputeEMCParameters ()
G4double GetBSCAngleRotat ()
G4double GetBSCAngleRotat ()
G4double GetBSCCryLength ()
G4double GetBSCCryLength ()
G4double GetBSCCryLength1 ()
G4double GetBSCCryLength1 ()
G4double GetBSCDz ()
G4double GetBSCDz ()
G4int GetBSCNbPhi ()
G4int GetBSCNbPhi ()
G4int GetBSCNbTheta ()
G4int GetBSCNbTheta ()
G4double GetBSCPositon0 ()
G4double GetBSCPositon0 ()
G4double GetBSCPositon1 ()
G4double GetBSCPositon1 ()
G4double GetBSCRmin ()
G4double GetBSCRmin ()
G4double GetBSCYFront ()
G4double GetBSCYFront ()
G4double GetBSCYFront0 ()
G4double GetBSCYFront0 ()
G4ThreeVector GetCasingThickness ()
G4ThreeVector GetCasingThickness ()
G4double GetPhiAxis (G4int NbCrystal)
G4double GetPhiAxis (G4int NbCrystal)
G4VPhysicalVolume * GetPhysiBSCCrystal (G4int NbCrystal)
G4VPhysicalVolume * GetPhysiBSCCrystal (G4int NbCrystal)
G4double GetRearBoxDz (G4int NbCrystal)
G4double GetRearBoxDz (G4int NbCrystal)
G4double GetRearBoxLength (G4int NbCrystal)
G4double GetRearBoxLength (G4int NbCrystal)
G4double GetRearBoxPosTheta (G4int NbCrystal)
G4double GetRearBoxPosTheta (G4int NbCrystal)
G4double GetRearBoxPosX (G4int NbCrystal)
G4double GetRearBoxPosX (G4int NbCrystal)
G4double GetRearBoxPosY (G4int NbCrystal)
G4double GetRearBoxPosY (G4int NbCrystal)
G4double GetRearBoxPosZ (G4int NbCrystal)
G4double GetRearBoxPosZ (G4int NbCrystal)
G4double GetTanAlpha1 (G4int NbCrystal)
G4double GetTanAlpha1 (G4int NbCrystal)
G4double GetTanAlpha2 (G4int NbCrystal)
G4double GetTanAlpha2 (G4int NbCrystal)
G4double GetThetaAxis (G4int NbCrystal)
G4double GetThetaAxis (G4int NbCrystal)
G4double GetThetaPosition (G4int NbCrystal)
G4double GetThetaPosition (G4int NbCrystal)
G4int GetVerboseLevel ()
G4int GetVerboseLevel ()
G4double GetXHalfLength1 (G4int NbCrystal)
G4double GetXHalfLength1 (G4int NbCrystal)
G4double GetXHalfLength2 (G4int NbCrystal)
G4double GetXHalfLength2 (G4int NbCrystal)
G4double GetXHalfLength3 (G4int NbCrystal)
G4double GetXHalfLength3 (G4int NbCrystal)
G4double GetXHalfLength4 (G4int NbCrystal)
G4double GetXHalfLength4 (G4int NbCrystal)
G4double GetXPosition (G4int NbCrystal)
G4double GetXPosition (G4int NbCrystal)
G4double GetYHalfLength1 (G4int NbCrystal)
G4double GetYHalfLength1 (G4int NbCrystal)
G4double GetYHalfLength2 (G4int NbCrystal)
G4double GetYHalfLength2 (G4int NbCrystal)
G4double GetYPosition (G4int NbCrystal)
G4double GetYPosition (G4int NbCrystal)
G4double GetZHalfLength (G4int NbCrystal)
G4double GetZHalfLength (G4int NbCrystal)
G4double GetZPosition (G4int NbCrystal)
G4double GetZPosition (G4int NbCrystal)
void ModifyForCasing ()
void ModifyForCasing ()
void PrintEMCParameters ()
void PrintEMCParameters ()
void ReadEMCParameters ()
void ReadEMCParameters ()
void SetBSCAngleRotat (G4double val)
void SetBSCAngleRotat (G4double val)
void SetBSCCrystalLength (G4double val)
void SetBSCCrystalLength (G4double val)
void SetBSCCrystalLength1 (G4double val)
void SetBSCCrystalLength1 (G4double val)
void SetBSCDz (G4double val)
void SetBSCDz (G4double val)
void SetBSCNbPhi (G4int val)
void SetBSCNbPhi (G4int val)
void SetBSCNbTheta (G4int val)
void SetBSCNbTheta (G4int val)
void SetBSCPosition0 (G4double val)
void SetBSCPosition0 (G4double val)
void SetBSCPosition1 (G4double val)
void SetBSCPosition1 (G4double val)
void SetBSCRmin (G4double val)
void SetBSCRmin (G4double val)
void SetBSCYFront (G4double val)
void SetBSCYFront (G4double val)
void SetBSCYFront0 (G4double val)
void SetBSCYFront0 (G4double val)
void SetCasingThickness (G4ThreeVector)
void SetCasingThickness (G4ThreeVector)
void SetVerboseLevel (G4int val)
void SetVerboseLevel (G4int val)
 ~BesEmcGeometry ()
 ~BesEmcGeometry ()

Private Attributes

G4double AlPlateDz
G4double BSCAngleRotat
G4double BSCCryLength
G4double BSCCryLength1
G4double BSCDz
G4double BSCDz1
G4int BSCNbPhi
G4int BSCNbTheta
G4double BSCPhiDphi
G4double BSCPhiDz
G4double BSCPhiRmax
G4double BSCPhiRmin
G4double BSCPhiSphi
G4double BSCPosition0
G4double BSCPosition1
G4double BSCRmax
G4double BSCRmax1
G4double BSCRmax2
G4double BSCRmin
G4double BSCRmin1
G4double BSCRmin2
G4double BSCYFront
G4double BSCYFront0
G4double BSCYFront1
G4double cableDr
G4double cableLength [22]
G4double cablePosX [22]
G4double cablePosY [22]
G4double cablePosZ [22]
G4double EndRingDr
G4double EndRingDz
G4double EndRingRmin
G4double fAlThickness
G4double fMylarThickness
G4double fTyvekThickness
G4double HangingPlateDz
G4double OCGirderAngle
G4double OCGirderDz [22]
G4double OCGirderPosZ [22]
G4double OCGirderRmin1 [22]
G4double OCGirderRmin2 [22]
G4double orgGlassLengthX
G4double orgGlassLengthY
G4double orgGlassLengthZ
G4double PABoxDz
G4double PABoxThickness
G4double PDLengthX
G4double PDLengthY
G4double PDLengthZ
G4double phiAxis [150]
G4VPhysicalVolume * physiBSCCrystal [50]
G4VPhysicalVolume * physiBSCCrystal [50]
G4double rearBoxDz
G4double rearBoxLength
G4double rearBoxPosX [150]
G4double rearBoxPosY [150]
G4double rearBoxPosZ [150]
G4double rearCasingThickness
G4double RFBarHoleDphi
G4double RFBarHoleDz
G4int RFBarHoleNb
G4double RFBarThickness
G4double SPBarDphi
G4double SPBarThickness
G4double SPBarThickness1
G4double SPBarwidth
G4double tanAlpha1 [150]
G4double tanAlpha2 [150]
G4double TaperRingDr
G4double TaperRingDz
G4double TaperRingInnerLength
G4double TaperRingOuterLength
G4double TaperRingOuterLength1
G4double TaperRingRmin1
G4double TaperRingRmin2
G4double TaperRingTheta
G4double TaperRingThickness1
G4double TaperRingThickness2
G4double TaperRingThickness3
G4double thetaAxis [150]
G4double thetaPosition [150]
G4int verboseLevel
G4double waterPipeDr
G4double waterPipeThickness
G4double xHalfLength1 [150]
G4double xHalfLength2 [150]
G4double xHalfLength3 [150]
G4double xHalfLength4 [150]
G4double xPosition [150]
G4double yHalfLength1 [150]
G4double yHalfLength2 [150]
G4double yPosition [150]
G4double zHalfLength [150]
G4double zPosition [150]

Friends

class BesEmcConstruction
class EmcGdmlWriter


Constructor & Destructor Documentation

BesEmcGeometry::BesEmcGeometry  ) 
 

00017 {
00018   verboseLevel = 0;
00019 }

BesEmcGeometry::~BesEmcGeometry  ) 
 

00022 {;}

BesEmcGeometry::BesEmcGeometry  ) 
 

BesEmcGeometry::~BesEmcGeometry  ) 
 


Member Function Documentation

void BesEmcGeometry::ComputeEMCParameters  ) 
 

void BesEmcGeometry::ComputeEMCParameters  ) 
 

00121 {
00122   ReadEMCParameters();
00123   
00124   // Compute derived parameters of the calorimeter
00125   G4double theta0;
00126   G4int i;
00127   //for debug
00128   //G4Exception("BesEmcGeometry::ComputeEMCParameters() starting.......");
00129   //
00130   //support frame
00131   //
00132   const G4double delta=1.*mm; //for opening-cut girder
00133   TaperRingRmin1 = BSCRmax1-TaperRingThickness1;
00134   TaperRingRmin2 = TaperRingRmin1+TaperRingDz*tan(TaperRingTheta);
00135   TaperRingDr = TaperRingThickness2/cos(TaperRingTheta);
00136   TaperRingOuterLength1 = TaperRingOuterLength+TaperRingThickness3*tan(TaperRingTheta);
00137   
00138   BSCRmax2 = TaperRingRmin2+TaperRingDr-TaperRingThickness3*tan(TaperRingTheta);
00139   BSCRmax = BSCRmin+33.8*cm;
00140   BSCPhiDphi= 360.*deg/BSCNbPhi;
00141   BSCPhiSphi= -BSCPhiDphi/2.;
00142   BSCPhiDz  = BSCDz;
00143   BSCPhiRmax= BSCRmax-0.5*cm;
00144   BSCPhiRmin= BSCRmin/sin(90.*deg+BSCPhiDphi/2.)
00145     *sin(90.*deg+BSCPhiDphi/2.-BSCAngleRotat); //Rmin after rotate
00146   SPBarDphi=2*atan(SPBarwidth/(2*BSCRmax));
00147 
00148   //crystal No.1(from z=0 to big)
00149   zHalfLength[0] = BSCCryLength/2.;
00150   yHalfLength1[0]= BSCYFront0/2.;
00151   xHalfLength1[0]= BSCPhiRmin*tan(BSCPhiDphi)/2.;
00152   xHalfLength2[0]= xHalfLength1[0];
00153 
00154   //there are 3 choices of rminprojected
00155   G4double rminprojected=BSCRmin*cos(BSCAngleRotat);
00156     rminprojected=BSCRmin;//according to hardware design
00157   //rminprojected=BSCPhiRmin;
00158     yHalfLength2[0]= yHalfLength1[0]
00159     +(BSCYFront0-BSCPosition0)/rminprojected*BSCCryLength/2.;
00160   xHalfLength3[0]= xHalfLength1[0]*(BSCPhiRmin+BSCCryLength)/BSCPhiRmin;
00161   xHalfLength4[0]= xHalfLength2[0]*(BSCPhiRmin+BSCCryLength)/BSCPhiRmin;
00162 
00163   thetaPosition[0]= 90.*deg;
00164   xPosition[0]    = BSCPhiRmin+BSCCryLength/2.;
00165   yPosition[0]    = 
00166     -(xHalfLength1[0]+xHalfLength3[0]+xHalfLength2[0]+xHalfLength4[0])/4.;
00167   zPosition[0]    = (yHalfLength1[0]+yHalfLength2[0])/2.;
00168   
00169   theta0= 90.*deg-atan((BSCYFront0-BSCPosition0)/rminprojected);
00170   if(verboseLevel>1)
00171     {
00172       G4cout << "------------------------------------>1"<< G4endl
00173              << "The direction of crystal is:"
00174              << theta0/deg <<"(deg)."<< G4endl;
00175     }
00176 
00177   rearBoxPosX[0] = xPosition[0]+BSCCryLength/2.+rearBoxDz/2.;
00178   rearBoxPosY[0] = -(xHalfLength3[0]+xHalfLength4[0])/2.;
00179   rearBoxPosZ[0] = yHalfLength2[0];
00180 
00181   OCGirderRmin1[0] = rearBoxPosX[0]+rearBoxDz/2.+delta;
00182   OCGirderRmin2[0] = rearBoxPosX[0]+rearBoxDz/2.+delta;
00183   OCGirderDz[0] = rearBoxLength;
00184   OCGirderPosZ[0] = rearBoxLength/2;
00185 
00186   cableLength[0] = BSCDz-rearBoxPosZ[0];
00187   cablePosX[0] = BSCPhiRmax-cableDr-2.*mm;
00188   cablePosY[0] = rearBoxPosY[0]-3*cableDr;
00189   cablePosZ[0] = BSCDz-cableLength[0]/2;
00190 
00191   //crystal No.2
00192   zHalfLength[1]= BSCCryLength/2.;
00193   yHalfLength1[1]= BSCYFront0/2.;
00194   G4double deltaR= BSCYFront0*cos(theta0);
00195   xHalfLength1[1]= xHalfLength1[0];
00196   xHalfLength2[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
00197   yHalfLength2[1]= yHalfLength1[1]
00198     +tan(theta0-atan(rminprojected/(BSCYFront0*(1.+1./sin(theta0))-
00199                                     BSCPosition1)))*BSCCryLength/2.;
00200   deltaR=deltaR+BSCCryLength*sin(theta0);
00201   xHalfLength4[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
00202   deltaR=deltaR-yHalfLength2[1]*2.*cos(theta0);
00203   xHalfLength3[1]= xHalfLength1[1]*(BSCPhiRmin+deltaR)/BSCPhiRmin;
00204 
00205   thetaPosition[1]= theta0;
00206   xPosition[1]    = BSCPhiRmin+BSCCryLength/2.*sin(theta0)
00207                   + (3.*yHalfLength1[1]-yHalfLength2[1])/2.*cos(theta0);
00208   yPosition[1]    = 
00209     -(xHalfLength1[1]+xHalfLength3[1]+xHalfLength2[1]+xHalfLength4[1])/4.;
00210   zPosition[1]    = yHalfLength1[0]*2.
00211     + (yHalfLength1[1]*2./tan(theta0)+BSCCryLength/2.)*cos(theta0)
00212     + (yHalfLength1[1]+yHalfLength2[1])/2.*sin(theta0);
00213 
00214   rearBoxPosX[1] = xPosition[1]+(BSCCryLength/2.+rearBoxDz/2.)*sin(theta0);
00215   rearBoxPosY[1] = -(xHalfLength3[1]+xHalfLength4[1])/2.;
00216   rearBoxPosZ[1] = zPosition[1]+(BSCCryLength/2.+rearBoxDz/2.)*cos(theta0);
00217 
00218   OCGirderRmin1[1] = rearBoxPosX[1]+rearBoxDz*sin(theta0)/2.+rearBoxLength*cos(theta0)/2+delta;
00219   OCGirderRmin2[1] = rearBoxPosX[1]+rearBoxDz*sin(theta0)/2.-rearBoxLength*cos(theta0)/2+delta;
00220   OCGirderDz[1] = rearBoxLength*sin(theta0);
00221   OCGirderPosZ[1] = rearBoxPosZ[1]+rearBoxDz*cos(theta0)/2.;
00222 
00223   cableLength[1] = BSCDz-rearBoxPosZ[1];
00224   cablePosX[1] = cablePosX[0];
00225   cablePosY[1] = cablePosY[0]+2*cableDr;
00226   cablePosZ[1] = BSCDz-cableLength[1]/2;
00227 
00228   theta0= theta0-atan((yHalfLength2[1]-yHalfLength1[1])*2./BSCCryLength);
00229 
00230   for(i=2;i<BSCNbTheta;i++)
00231     {
00232       if(verboseLevel>1)
00233         {
00234           G4cout << "------------------------------------>"<<i<< G4endl
00235                  << "The direction of crystal is:"
00236                  << theta0/deg <<"(deg)." << G4endl;
00237         }
00238       G4double CryLength;
00239       if(i==BSCNbTheta-1) //the rightest crystal
00240       {
00241         CryLength=BSCCryLength1;    //24cm
00242         yHalfLength1[i]=BSCYFront1/2.;
00243       } else {
00244         //crystal No.i+1
00245         CryLength=BSCCryLength;   //28cm
00246         yHalfLength1[i]=BSCYFront/2.;
00247       }
00248       zHalfLength[i]=CryLength/2;
00249 
00250       deltaR=yHalfLength1[i]*2.*cos(theta0);
00251       xHalfLength1[i]=xHalfLength1[0];
00252       xHalfLength2[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
00253       yHalfLength2[i]=yHalfLength1[i]
00254         *(1.+CryLength/(rminprojected/sin(theta0)
00255                            +yHalfLength1[i]*2./tan(theta0)));
00256       deltaR=deltaR+CryLength*sin(theta0);
00257       xHalfLength4[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
00258       deltaR=deltaR-yHalfLength2[i]*2.*cos(theta0);
00259       xHalfLength3[i]=xHalfLength1[i]/BSCPhiRmin*(BSCPhiRmin+deltaR);
00260 
00261       thetaPosition[i]=theta0;
00262       xPosition[i]=BSCPhiRmin+zHalfLength[i]*sin(theta0)
00263                   + (3.*yHalfLength1[i]-yHalfLength2[i])/2.*cos(theta0);
00264       yPosition[i]=
00265         -(xHalfLength1[i]+xHalfLength3[i]+xHalfLength2[i]+xHalfLength4[i])/4.;
00266       zPosition[i]=BSCPosition1+rminprojected/tan(theta0)
00267         +(2.*yHalfLength1[i]/tan(theta0)+zHalfLength[i])*cos(theta0)
00268         +(yHalfLength1[i]+yHalfLength2[i])/2.*sin(theta0);
00269 
00270       rearBoxPosX[i] = xPosition[i]+(CryLength/2.+rearBoxDz/2.)*sin(theta0);
00271       rearBoxPosY[i] = -(xHalfLength3[i]+xHalfLength4[i])/2.;
00272       rearBoxPosZ[i] = zPosition[i]+(CryLength/2.+rearBoxDz/2.)*cos(theta0);
00273       
00274       OCGirderRmin1[i] = rearBoxPosX[i]+rearBoxDz*sin(theta0)/2.+rearBoxLength*cos(theta0)/2+delta;
00275       OCGirderRmin2[i] = rearBoxPosX[i]+rearBoxDz*sin(theta0)/2.-rearBoxLength*cos(theta0)/2+delta;
00276       OCGirderDz[i] = rearBoxLength*sin(theta0);
00277       OCGirderPosZ[i] = rearBoxPosZ[i]+rearBoxDz*cos(theta0)/2.;
00278 
00279      G4int xCable,yCable;
00280       xCable = i/4;
00281       yCable = i-4*(G4int)(i/4);
00282       cableLength[i] = BSCDz-(rearBoxPosZ[i]+rearBoxDz/2.*cos(theta0));
00283       cablePosX[i] = cablePosX[0]-xCable*2*cableDr;
00284       cablePosY[i] = cablePosY[0]+yCable*2*cableDr;
00285       cablePosZ[i] = BSCDz-cableLength[i]/2;
00286 
00287       theta0=theta0-atan(2.*yHalfLength1[i]/(rminprojected/sin(theta0)
00288                                              +2.*yHalfLength1[i]/tan(theta0)));
00289       
00290     }
00291   thetaPosition[BSCNbTheta]=theta0;
00292     if(verboseLevel>1)
00293     {
00294       G4cout << "------------------------------------>"<<i<< G4endl
00295              << "The direction of crystal is:"
00296              << theta0/deg <<"(deg)." << G4endl;
00297     }
00298    
00299   G4double oop;
00300   G4double dx=0.001*mm; //zoom out of crystals to avoid overlap
00301   for(i=0;i<BSCNbTheta;i++)
00302     {
00303       xHalfLength1[i]-=dx;
00304       xHalfLength2[i]-=dx;
00305       xHalfLength3[i]-=dx;
00306       xHalfLength4[i]-=dx;
00307       yHalfLength1[i]-=dx;
00308       yHalfLength2[i]-=dx;
00309 
00310       G4double CryLength;
00311       if(i==BSCNbTheta-1) //the rightest crystal
00312       {
00313         CryLength=BSCCryLength1;
00314       } else {
00315         CryLength=BSCCryLength;
00316       }
00317       oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
00318                                                   -yHalfLength1[i])
00319                +(xHalfLength3[i]+xHalfLength4[i]-xHalfLength1[i]
00320                  -xHalfLength2[i])*(xHalfLength3[i]+xHalfLength4[i]
00321                                     -xHalfLength1[i]-xHalfLength2[i])/4);
00322       thetaAxis[i]=atan(oop/CryLength);
00323       phiAxis[i]  =180.*deg+atan((yHalfLength2[i]-yHalfLength1[i])
00324                          /(xHalfLength3[i]+xHalfLength4[i]
00325                            -xHalfLength1[i]-xHalfLength2[i])*2.);
00326       tanAlpha2[i]=-(xHalfLength4[i]-xHalfLength3[i])/yHalfLength2[i]/2.;
00327       tanAlpha1[i]=-(xHalfLength2[i]-xHalfLength1[i])/yHalfLength1[i]/2.;
00328       //G4cout <<thetaAxis[i]<<",  "
00329       //     <<phiAxis[i]<<",  "
00330       //     <<tanAlpha1[i]<<",  "
00331       //     <<tanAlpha2[i]<<G4endl;
00332     }
00333     
00334 }

G4double BesEmcGeometry::GetBSCAngleRotat  )  [inline]
 

00064 {return BSCAngleRotat;};

G4double BesEmcGeometry::GetBSCAngleRotat  )  [inline]
 

00064 {return BSCAngleRotat;};

G4double BesEmcGeometry::GetBSCCryLength  )  [inline]
 

00058 {return BSCCryLength;};

G4double BesEmcGeometry::GetBSCCryLength  )  [inline]
 

00058 {return BSCCryLength;};

G4double BesEmcGeometry::GetBSCCryLength1  )  [inline]
 

00059 {return BSCCryLength1;};

G4double BesEmcGeometry::GetBSCCryLength1  )  [inline]
 

00059 {return BSCCryLength1;};

G4double BesEmcGeometry::GetBSCDz  )  [inline]
 

00055 {return BSCDz;};

G4double BesEmcGeometry::GetBSCDz  )  [inline]
 

00055 {return BSCDz;};

G4int BesEmcGeometry::GetBSCNbPhi  )  [inline]
 

00056 {return BSCNbPhi;};

G4int BesEmcGeometry::GetBSCNbPhi  )  [inline]
 

00056 {return BSCNbPhi;};

G4int BesEmcGeometry::GetBSCNbTheta  )  [inline]
 

00057 {return BSCNbTheta;};

G4int BesEmcGeometry::GetBSCNbTheta  )  [inline]
 

00057 {return BSCNbTheta;};

G4double BesEmcGeometry::GetBSCPositon0  )  [inline]
 

00062 {return BSCPosition0;};

G4double BesEmcGeometry::GetBSCPositon0  )  [inline]
 

00062 {return BSCPosition0;};

G4double BesEmcGeometry::GetBSCPositon1  )  [inline]
 

00063 {return BSCPosition1;};

G4double BesEmcGeometry::GetBSCPositon1  )  [inline]
 

00063 {return BSCPosition1;};

G4double BesEmcGeometry::GetBSCRmin  )  [inline]
 

00054 {return BSCRmin;};

G4double BesEmcGeometry::GetBSCRmin  )  [inline]
 

00054 {return BSCRmin;};

G4double BesEmcGeometry::GetBSCYFront  )  [inline]
 

00060 {return BSCYFront;};

G4double BesEmcGeometry::GetBSCYFront  )  [inline]
 

00060 {return BSCYFront;};

G4double BesEmcGeometry::GetBSCYFront0  )  [inline]
 

00061 {return BSCYFront0;};

G4double BesEmcGeometry::GetBSCYFront0  )  [inline]
 

00061 {return BSCYFront0;};

G4ThreeVector BesEmcGeometry::GetCasingThickness  )  [inline]
 

00066 {return G4ThreeVector(fTyvekThickness,fAlThickness,fMylarThickness);};

G4ThreeVector BesEmcGeometry::GetCasingThickness  )  [inline]
 

00066 {return G4ThreeVector(fTyvekThickness,fAlThickness,fMylarThickness);};

G4double BesEmcGeometry::GetPhiAxis G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetPhiAxis G4int  NbCrystal  ) 
 

00675 {
00676   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00677     {
00678       return phiAxis[NbCrystal];
00679     }
00680   else
00681     {
00682       return 0.;
00683     }
00684 }

G4VPhysicalVolume* BesEmcGeometry::GetPhysiBSCCrystal G4int  NbCrystal  ) 
 

G4VPhysicalVolume * BesEmcGeometry::GetPhysiBSCCrystal G4int  NbCrystal  ) 
 

00783 {
00784   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00785     {
00786       return physiBSCCrystal[NbCrystal];
00787     }
00788   else
00789     {
00790       return NULL;
00791     }
00792 }

G4double BesEmcGeometry::GetRearBoxDz G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetRearBoxDz G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetRearBoxLength G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetRearBoxLength G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetRearBoxPosTheta G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetRearBoxPosTheta G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetRearBoxPosX G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetRearBoxPosX G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetRearBoxPosY G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetRearBoxPosY G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetRearBoxPosZ G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetRearBoxPosZ G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetTanAlpha1 G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetTanAlpha1 G4int  NbCrystal  ) 
 

00723 {
00724   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00725     {
00726       return tanAlpha1[NbCrystal];
00727     }
00728   else
00729     {
00730       return 0.;
00731     }
00732 }

G4double BesEmcGeometry::GetTanAlpha2 G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetTanAlpha2 G4int  NbCrystal  ) 
 

00771 {
00772   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00773     {
00774       return tanAlpha2[NbCrystal];
00775     }
00776   else
00777     {
00778       return 0.;
00779     }
00780 }

G4double BesEmcGeometry::GetThetaAxis G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetThetaAxis G4int  NbCrystal  ) 
 

00663 {
00664   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00665     {
00666       return thetaAxis[NbCrystal];
00667     }
00668   else
00669     {
00670       return 0.;
00671     }
00672 }

G4double BesEmcGeometry::GetThetaPosition G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetThetaPosition G4int  NbCrystal  ) 
 

00639 {
00640   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00641     {
00642       return thetaPosition[NbCrystal];
00643     }
00644   else
00645     {
00646       return 0.;
00647     }
00648 }

G4int BesEmcGeometry::GetVerboseLevel  )  [inline]
 

00052 {return verboseLevel;};

G4int BesEmcGeometry::GetVerboseLevel  )  [inline]
 

00052 {return verboseLevel;};

G4double BesEmcGeometry::GetXHalfLength1 G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetXHalfLength1 G4int  NbCrystal  ) 
 

00699 {
00700   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00701     {
00702       return xHalfLength1[NbCrystal];
00703     }
00704   else
00705     {
00706       return 0.;
00707     }
00708 }

G4double BesEmcGeometry::GetXHalfLength2 G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetXHalfLength2 G4int  NbCrystal  ) 
 

00711 {
00712   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00713     {
00714       return xHalfLength2[NbCrystal];
00715     }
00716   else
00717     {
00718       return 0.;
00719     }
00720 }

G4double BesEmcGeometry::GetXHalfLength3 G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetXHalfLength3 G4int  NbCrystal  ) 
 

00747 {
00748   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00749     {
00750       return xHalfLength3[NbCrystal];
00751     }
00752   else
00753     {
00754       return 0.;
00755     }
00756 }

G4double BesEmcGeometry::GetXHalfLength4 G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetXHalfLength4 G4int  NbCrystal  ) 
 

00759 {
00760   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00761     {
00762       return xHalfLength4[NbCrystal];
00763     }
00764   else
00765     {
00766       return 0.;
00767     }
00768 }

G4double BesEmcGeometry::GetXPosition G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetXPosition G4int  NbCrystal  ) 
 

00603 {
00604   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00605     {
00606       return xPosition[NbCrystal];
00607     }
00608   else
00609     {
00610       return 0.;
00611     }
00612 }

G4double BesEmcGeometry::GetYHalfLength1 G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetYHalfLength1 G4int  NbCrystal  ) 
 

00687 {
00688   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00689     {
00690       return yHalfLength1[NbCrystal];
00691     }
00692   else
00693     {
00694       return 0.;
00695     }
00696 }

G4double BesEmcGeometry::GetYHalfLength2 G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetYHalfLength2 G4int  NbCrystal  ) 
 

00735 {
00736   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00737     {
00738       return yHalfLength2[NbCrystal];
00739     }
00740   else
00741     {
00742       return 0.;
00743     }
00744 }

G4double BesEmcGeometry::GetYPosition G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetYPosition G4int  NbCrystal  ) 
 

00615 {
00616   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00617     {
00618       return yPosition[NbCrystal];
00619     }
00620   else
00621     {
00622       return 0.;
00623     }
00624 }

G4double BesEmcGeometry::GetZHalfLength G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetZHalfLength G4int  NbCrystal  ) 
 

00651 {
00652   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00653     {
00654       return zHalfLength[NbCrystal];
00655     }
00656   else
00657     {
00658       return 0.;
00659     }
00660 }

G4double BesEmcGeometry::GetZPosition G4int  NbCrystal  ) 
 

G4double BesEmcGeometry::GetZPosition G4int  NbCrystal  ) 
 

00627 {
00628   if(NbCrystal>=0&&NbCrystal<BSCNbTheta*6)
00629     {
00630       return zPosition[NbCrystal];
00631     }
00632   else
00633     {
00634       return 0.;
00635     }
00636 }

void BesEmcGeometry::ModifyForCasing  ) 
 

void BesEmcGeometry::ModifyForCasing  ) 
 

00337 {
00338   // Compute the sizes of the naked crystals and the casing
00339   // Casing size
00340   // BSCNbTheta---->2*BSCNbTheta-1 : before crystal
00341   // 2*BSCNbTheta-->3*BSCNbTheta-1 : a side of crystal
00342   // 3*BSCNbTheta-->4*BSCNbTheta-1 : b side of crystal
00343   // 4*BSCNbTheta-->5*BSCNbTheta-1 : c side of crystal
00344   // 5*BSCNbTheta-->6*BSCNbTheta-1 : d side of crystal
00345   //                         d
00346   //                    ----------
00347   //                   |          |
00348   //                   |          |  
00349   //               c   |          |    a
00350   //                   |          |
00351   //                   |          |
00352   //                   |         / 
00353   //                   |     /
00354   //                   | / 
00355   //                         b   
00356   G4double totalThickness=fTyvekThickness+fAlThickness+fMylarThickness;//
00357   G4double delta=0.,angle1=0.*deg,angle2=0.*deg;
00358   G4double oop; //the distance of the centers of the two parallel plane
00359 
00360   G4double rminprojected=BSCRmin*cos(BSCAngleRotat);
00361   rminprojected=BSCRmin;//accord with hardware design
00362   //rminprojected=BSCPhiRmin;
00363 
00364   G4int i;
00365   for(i=0;i<BSCNbTheta;i++)
00366     {
00367       G4double CryLength;
00368       if(i==BSCNbTheta-1) //the rightest crystal
00369       {
00370         CryLength=BSCCryLength1;
00371       } else {
00372         CryLength=BSCCryLength;
00373       }
00374       zHalfLength[BSCNbTheta+i]=totalThickness/2.;
00375       yHalfLength1[BSCNbTheta+i]=yHalfLength1[i];
00376       yHalfLength2[BSCNbTheta+i]=yHalfLength1[i]
00377         +(yHalfLength2[i]-yHalfLength1[i])*totalThickness/CryLength;
00378       xHalfLength1[BSCNbTheta+i]=xHalfLength1[i];
00379       xHalfLength2[BSCNbTheta+i]=xHalfLength2[i];
00380       xHalfLength1[BSCNbTheta*2+i]=xHalfLength3[BSCNbTheta+i]=
00381         xHalfLength1[i]*(CryLength-totalThickness)/CryLength
00382         +xHalfLength3[i]*totalThickness/CryLength;
00383       xHalfLength2[BSCNbTheta*4+i]=xHalfLength4[BSCNbTheta+i]=
00384         xHalfLength2[i]*(CryLength-totalThickness)/CryLength
00385         +xHalfLength4[i]*totalThickness/CryLength;
00386       
00387       zHalfLength[BSCNbTheta*5+i]=zHalfLength[BSCNbTheta*4+i]=
00388       zHalfLength[BSCNbTheta*3+i]=zHalfLength[BSCNbTheta*2+i]=
00389         zHalfLength[i]-totalThickness/2.;
00390       
00391       yHalfLength2[BSCNbTheta*2+i]=yHalfLength1[BSCNbTheta*2+i]=
00392         totalThickness/cos(thetaPosition[i+1]-thetaPosition[i])/2.;
00393       xHalfLength3[BSCNbTheta*2+i]=xHalfLength3[i];
00394       xHalfLength4[BSCNbTheta*2+i]=xHalfLength3[i]
00395         +(xHalfLength4[i]-xHalfLength3[i])*yHalfLength2[BSCNbTheta*2+i]
00396         /yHalfLength2[i];
00397       xHalfLength2[BSCNbTheta*2+i]=xHalfLength3[BSCNbTheta+i]
00398         +(xHalfLength4[BSCNbTheta+i]-xHalfLength3[BSCNbTheta+i])
00399         *yHalfLength1[BSCNbTheta*2+i]/yHalfLength2[BSCNbTheta*1+i];
00400       
00401       yHalfLength2[BSCNbTheta*4+i]=yHalfLength1[BSCNbTheta*4+i]=
00402         totalThickness/2.;
00403       xHalfLength4[BSCNbTheta*4+i]=xHalfLength4[i];
00404       xHalfLength3[BSCNbTheta*4+i]=xHalfLength4[i]
00405         -(xHalfLength4[i]-xHalfLength3[i])*yHalfLength2[BSCNbTheta*4+i]
00406         /yHalfLength2[i];
00407       xHalfLength1[BSCNbTheta*4+i]=xHalfLength4[BSCNbTheta+i]
00408         -(xHalfLength4[BSCNbTheta+i]-xHalfLength3[BSCNbTheta+i])
00409         *yHalfLength1[BSCNbTheta*4+i]/yHalfLength2[BSCNbTheta*1+i];
00410       
00411       delta=totalThickness/2.+yHalfLength1[BSCNbTheta*2+i];
00412       angle1=atan(yHalfLength2[i]/(xHalfLength4[i]-xHalfLength3[i]));
00413       angle2=atan(2.*(xHalfLength4[i]-xHalfLength2[i])*sin(angle1)
00414                   /CryLength);
00415       
00416       yHalfLength1[BSCNbTheta*5+i]=yHalfLength1[BSCNbTheta*3+i]=
00417         yHalfLength1[i]-delta;
00418       yHalfLength2[BSCNbTheta*5+i]=yHalfLength2[BSCNbTheta*3+i]=
00419         yHalfLength2[i]-delta;
00420       xHalfLength4[BSCNbTheta*3+i]=xHalfLength3[BSCNbTheta*3+i]=
00421       xHalfLength2[BSCNbTheta*3+i]=xHalfLength1[BSCNbTheta*3+i]=
00422         totalThickness/cos(angle2)/sin(angle1)/2.;
00423       xHalfLength4[BSCNbTheta*5+i]=xHalfLength3[BSCNbTheta*5+i]=
00424       xHalfLength2[BSCNbTheta*5+i]=xHalfLength1[BSCNbTheta*5+i]=
00425         totalThickness/2.;
00426       
00427       zHalfLength[i]=zHalfLength[i]-totalThickness/2.;
00428       yHalfLength1[i]=yHalfLength1[i]-delta;
00429       yHalfLength2[i]=yHalfLength2[i]-delta;
00430       delta=totalThickness*(1.+1./cos(angle2)/sin(angle1))/2.;
00431       xHalfLength1[i]=xHalfLength1[i]-delta;
00432       xHalfLength2[i]=xHalfLength2[i]-delta;
00433       xHalfLength3[i]=xHalfLength3[i]-delta;
00434       xHalfLength4[i]=xHalfLength4[i]-delta;
00435 
00436       oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
00437                                                   -yHalfLength1[i])
00438                +(xHalfLength3[i]+xHalfLength4[i]-xHalfLength1[i]
00439                  -xHalfLength2[i])*(xHalfLength3[i]+xHalfLength4[i]
00440                                     -xHalfLength1[i]-xHalfLength2[i])/4);
00441       thetaAxis[i]=atan(oop/CryLength);
00442       // -phi  --->180+phi 
00443       phiAxis[i]  =180.*deg+atan((yHalfLength2[i]-yHalfLength1[i])
00444                                  /(xHalfLength3[i]+xHalfLength4[i]
00445                                    -xHalfLength1[i]-xHalfLength2[i])*2.);
00446 
00447       oop=sqrt((yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
00448                *(yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
00449                +(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
00450                  -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])
00451                *(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
00452                  -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])/4);
00453       thetaAxis[BSCNbTheta+i]=atan(oop/totalThickness);
00454       phiAxis  [BSCNbTheta+i]=
00455         -atan((yHalfLength2[BSCNbTheta+i]-yHalfLength1[BSCNbTheta+i])
00456               /(xHalfLength3[BSCNbTheta+i]+xHalfLength4[BSCNbTheta+i]
00457                 -xHalfLength1[BSCNbTheta+i]-xHalfLength2[BSCNbTheta+i])*2.);
00458 
00459       oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
00460                                                   -yHalfLength1[i])*4
00461                +(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
00462                  -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])
00463                *(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
00464                  -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])
00465                /4);
00466       thetaAxis[BSCNbTheta*2+i]=atan(oop/(zHalfLength[BSCNbTheta*2+i]*2));
00467       phiAxis  [BSCNbTheta*2+i]=
00468         -atan((yHalfLength2[i]-yHalfLength1[i])
00469               /(xHalfLength3[BSCNbTheta*2+i]+xHalfLength4[BSCNbTheta*2+i]
00470                 -xHalfLength1[BSCNbTheta*2+i]-xHalfLength2[BSCNbTheta*2+i])*4);
00471 
00472       oop=sqrt((yHalfLength2[i]-yHalfLength1[i])*(yHalfLength2[i]
00473                                                   -yHalfLength1[i])*4
00474                +(xHalfLength4[i]-xHalfLength2[i])
00475                *(xHalfLength4[i]-xHalfLength2[i])*4);
00476       thetaAxis[BSCNbTheta*3+i]=atan(oop/(zHalfLength[BSCNbTheta*3+i]*2));
00477       phiAxis  [BSCNbTheta*3+i]=-atan((yHalfLength2[i]-yHalfLength1[i])
00478                                       /(xHalfLength4[i]-xHalfLength2[i]));
00479       
00480       thetaAxis[BSCNbTheta*4+i]=
00481         atan((xHalfLength4[BSCNbTheta*4+i]+xHalfLength3[BSCNbTheta*4+i]
00482               -xHalfLength2[BSCNbTheta*4+i]-xHalfLength1[BSCNbTheta*4+i])/2.
00483              /(zHalfLength[BSCNbTheta*4+i]*2));
00484       phiAxis  [BSCNbTheta*4+i]=0;
00485 
00486       thetaAxis[BSCNbTheta*5+i]=atan((xHalfLength3[BSCNbTheta*5+i]
00487                                       -xHalfLength1[BSCNbTheta*5+i])
00488                                      /(zHalfLength[BSCNbTheta*5+i]*2));
00489       phiAxis  [BSCNbTheta*5+i]=-90.*deg;
00490       
00491       tanAlpha2[BSCNbTheta+i]=tanAlpha1[BSCNbTheta+i]=tanAlpha1[i]=
00492         -(xHalfLength2[i]-xHalfLength1[i])/yHalfLength1[i]/2.;
00493       tanAlpha1[BSCNbTheta*2+i]=(xHalfLength2[BSCNbTheta*2+i]
00494                                  -xHalfLength1[BSCNbTheta*2+i])
00495         /yHalfLength1[BSCNbTheta*2+i]/2.;
00496       tanAlpha1[BSCNbTheta*3+i]=tanAlpha1[i]*2.;
00497       tanAlpha1[BSCNbTheta*4+i]=(xHalfLength2[BSCNbTheta*4+i]
00498                                  -xHalfLength1[BSCNbTheta*4+i])
00499         /yHalfLength1[BSCNbTheta*4+i]/2.;
00500       tanAlpha1[BSCNbTheta*5+i]=(xHalfLength2[BSCNbTheta*5+i]
00501                                  -xHalfLength1[BSCNbTheta*5+i])
00502         /yHalfLength1[BSCNbTheta*5+i]/2.;
00503       
00504       tanAlpha2[i]=-(xHalfLength4[i]-xHalfLength3[i])/yHalfLength2[i]/2.;
00505       //tanAlpha2[BSCNbTheta+i]=(xHalfLength4[BSCNbTheta+i]-xHalfLength3[BSCNbTheta+i])/yHalfLength2[BSCNbTheta+i]/2.;
00506       tanAlpha2[BSCNbTheta*2+i]=(xHalfLength4[BSCNbTheta*2+i]
00507                                  -xHalfLength3[BSCNbTheta*2+i])
00508         /yHalfLength2[BSCNbTheta*2+i]/2.;
00509       tanAlpha2[BSCNbTheta*3+i]=tanAlpha2[i]*2.;
00510       tanAlpha2[BSCNbTheta*4+i]=(xHalfLength4[BSCNbTheta*4+i]
00511                                  -xHalfLength3[BSCNbTheta*4+i])
00512         /yHalfLength2[BSCNbTheta*4+i]/2.;
00513       tanAlpha2[BSCNbTheta*5+i]=(xHalfLength4[BSCNbTheta*5+i]
00514                                  -xHalfLength3[BSCNbTheta*5+i])
00515         /yHalfLength2[BSCNbTheta*5+i]/2.;
00516 
00517       zPosition[BSCNbTheta*5+i]=zPosition[BSCNbTheta*3+i]=zPosition[i]=
00518         zPosition[i]+totalThickness/2.*cos(thetaPosition[i])
00519         -yHalfLength1[BSCNbTheta*2+i]*sin(thetaPosition[i]);
00520       zPosition[i]=totalThickness/2.;//for the newest method
00521       xPosition[BSCNbTheta*5+i]=xPosition[BSCNbTheta*3+i]=xPosition[i]=
00522         xPosition[i]+totalThickness/2.*sin(thetaPosition[i])
00523         +totalThickness*(1./cos(thetaPosition[i+1]-thetaPosition[i])-1)/2.
00524         *cos(thetaPosition[i]);
00525       xPosition[i]=totalThickness*(1.-1./cos(angle2)/sin(angle1))/2.;
00526                                                    //for the newest method
00527       yPosition[i]=yPosition[i]
00528         +totalThickness*(1.-1./cos(angle2)/sin(angle1))/2.;
00529       yPosition[i]=yHalfLength1[BSCNbTheta*2+i]-totalThickness/2.;//for the newest method
00530       yPosition[BSCNbTheta*3+i]=yPosition[i]*2.+xHalfLength1[BSCNbTheta*3+i];
00531       yPosition[BSCNbTheta*5+i]=xHalfLength1[BSCNbTheta*5+i];
00532 
00533       xPosition[BSCNbTheta+i]=BSCPhiRmin
00534         +zHalfLength[BSCNbTheta+i]*sin(thetaPosition[i])
00535         +(3.*yHalfLength1[BSCNbTheta+i]-yHalfLength2[BSCNbTheta+i])/2.
00536         *cos(thetaPosition[i]);
00537       yPosition[BSCNbTheta+i]=(xHalfLength1[BSCNbTheta+i]
00538                                +xHalfLength3[BSCNbTheta+i]
00539                                +xHalfLength2[BSCNbTheta+i]
00540                                +xHalfLength4[BSCNbTheta+i])/4.;
00541       zPosition[BSCNbTheta+i]=BSCPosition1+rminprojected/tan(thetaPosition[i])
00542         +(2.*yHalfLength1[BSCNbTheta+i]/tan(thetaPosition[i])
00543           +zHalfLength[BSCNbTheta+i])*cos(thetaPosition[i])
00544         +(yHalfLength1[BSCNbTheta+i]+yHalfLength2[BSCNbTheta+i])/2.
00545         *sin(thetaPosition[i]);
00546 
00547       xPosition[BSCNbTheta*2+i]=xPosition[i]
00548         +((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*2+i])
00549         *cos(thetaPosition[i]);
00550       zPosition[BSCNbTheta*2+i]=zPosition[i]
00551         -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*2+i])
00552         *sin(thetaPosition[i]);
00553       yPosition[BSCNbTheta*2+i]=(xHalfLength1[BSCNbTheta*2+i]
00554                                  +xHalfLength3[BSCNbTheta*2+i]
00555                                  +xHalfLength2[BSCNbTheta*2+i]
00556                                  +xHalfLength4[BSCNbTheta*2+i])/4.;
00557 
00558       xPosition[BSCNbTheta*4+i]=xPosition[i]
00559         -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*4+i])
00560         *cos(thetaPosition[i]);
00561       zPosition[BSCNbTheta*4+i]=zPosition[i]
00562         -((yHalfLength1[i]+yHalfLength2[i])/2.+yHalfLength1[BSCNbTheta*4+i])
00563         *sin(thetaPosition[i]);
00564       yPosition[BSCNbTheta*4+i]=(xHalfLength1[BSCNbTheta*4+i]
00565                                  +xHalfLength3[BSCNbTheta*4+i]
00566                                  +xHalfLength2[BSCNbTheta*4+i]
00567                                  +xHalfLength4[BSCNbTheta*4+i])/4.;
00568 
00569     }
00570 
00571   if(verboseLevel>1)
00572     for(i=0;i<BSCNbTheta*6;i++)
00573       {
00574         G4cout << "The sizes of the " << i+1 << " crystal are:" << G4endl
00575                << "zHalfLength =" << zHalfLength[i]/cm  << "(cm)," << G4endl
00576                << "thetaAxis   =" << thetaAxis[i]/deg   << "(deg),"<< G4endl
00577                << "phiAxis     =" << phiAxis[i]/deg     << "(deg),"<< G4endl
00578                << "yHalfLength1=" << yHalfLength1[i]/cm << "(cm)," << G4endl
00579                << "xHalfLength1=" << xHalfLength1[i]/cm << "(cm)," << G4endl
00580                << "xHalfLength2=" << xHalfLength2[i]/cm << "(cm)," << G4endl
00581                << "tanAlpha1   =" << tanAlpha1[i]                  << G4endl
00582                << "yHalfLength2=" << yHalfLength2[i]/cm << "(cm)," << G4endl
00583                << "xHalfLength3=" << xHalfLength3[i]/cm << "(cm)," << G4endl
00584                << "xHalfLength4=" << xHalfLength4[i]/cm << "(cm)," << G4endl
00585                << "tanAlpha2   =" << tanAlpha2[i]       << "."     << G4endl
00586                << "The position of the " << i+1 << " crystal is:" << G4endl
00587                << "(" << xPosition[i]/cm << ","
00588                << yPosition[i]/cm << ","
00589                << zPosition[i]/cm << ")cm" << G4endl;
00590       }
00591   
00592 }

void BesEmcGeometry::PrintEMCParameters  ) 
 

void BesEmcGeometry::PrintEMCParameters  ) 
 

00115 {
00116   // Print EMC parameters
00117   ;
00118 }

void BesEmcGeometry::ReadEMCParameters  ) 
 

void BesEmcGeometry::ReadEMCParameters  ) 
 

00025 {
00026   // Read EMC parameters from database
00027   BesEmcParameter& emcPara=BesEmcParameter::GetInstance();
00028     
00029   TaperRingDz = emcPara.GetTaperRingDz();
00030   TaperRingThickness1 = emcPara.GetTaperRingThickness1();
00031   TaperRingThickness2 = emcPara.GetTaperRingThickness2();
00032   TaperRingThickness3 = emcPara.GetTaperRingThickness3();
00033   TaperRingTheta = emcPara.GetTaperRingTheta()*deg;
00034   TaperRingInnerLength = emcPara.GetTaperRingInnerLength();
00035   TaperRingOuterLength = emcPara.GetTaperRingOuterLength();
00036  
00037   BSCRmin           = emcPara.GetBSCRmin();
00038   BSCDz             = emcPara.GetBSCDz()-TaperRingThickness3;
00039 
00040   BSCRmin1          = emcPara.GetBSCRmin1();
00041   BSCRmax1          = emcPara.GetBSCRmax1();
00042   BSCRmin2          = emcPara.GetBSCRmin2();
00043   //BSCRmax2          = emcPara.GetBSCRmax2();
00044   BSCDz1            = emcPara.GetBSCDz1()-TaperRingThickness3;
00045   
00046   BSCAngleRotat     = emcPara.GetBSCAngleRotat()*deg;
00047   BSCNbPhi          = emcPara.GetBSCNbPhi();
00048   BSCNbTheta        = emcPara.GetBSCNbTheta();
00049   
00050   BSCCryLength      = emcPara.GetCrystalLength();
00051   BSCCryLength1     = emcPara.GetCrystalLength1();
00052   BSCYFront0        = emcPara.GetBSCYFront0();
00053   BSCYFront         = emcPara.GetBSCYFront();
00054   BSCYFront1        = emcPara.GetBSCYFront1();
00055   BSCPosition0      = emcPara.GetBSCPosition0();
00056   BSCPosition1      = emcPara.GetBSCPosition1();
00057 
00058   fTyvekThickness   = emcPara.GetTyvekThickness();
00059   fAlThickness      = emcPara.GetAlThickness();
00060   fMylarThickness   = emcPara.GetMylarThickness();
00061   
00062   rearBoxLength     = emcPara.GetRearBoxLength();
00063   rearBoxDz         = emcPara.GetRearBoxDz();
00064   
00065   HangingPlateDz    = emcPara.GetHangingPlateDz();
00066   OCGirderAngle     = emcPara.GetOCGirderAngle()*deg;
00067 
00068   rearCasingThickness = emcPara.GetRearCasingThickness();
00069 
00070   orgGlassLengthX   = emcPara.GetOrgGlassLengthX();
00071   orgGlassLengthY   = emcPara.GetOrgGlassLengthY();
00072   orgGlassLengthZ   = emcPara.GetOrgGlassLengthZ();
00073 
00074   PDLengthX         = emcPara.GetPDLengthX();
00075   PDLengthY         = emcPara.GetPDLengthY();
00076   PDLengthZ         = emcPara.GetPDLengthZ();
00077 
00078   AlPlateDz         = emcPara.GetAlPlateDz();
00079   PABoxDz           = emcPara.GetPABoxDz();
00080   PABoxThickness    = emcPara.GetPABoxThickness();
00081 
00082   cableDr           = emcPara.GetCableDr();
00083   waterPipeDr       = emcPara.GetWaterPipeDr();
00084   waterPipeThickness= emcPara.GetWaterPipeThickness();
00085 
00086   SPBarThickness    = emcPara.GetSPBarThickness();
00087   SPBarThickness1   = emcPara.GetSPBarThickness1();
00088   SPBarwidth        = emcPara.GetSPBarwidth();
00089 
00090   EndRingDz         = emcPara.GetEndRingDz();
00091   EndRingDr         = emcPara.GetEndRingDr();
00092   EndRingRmin       = emcPara.GetEndRingRmin();
00093   
00094   for(G4int i=0;i<BSCNbTheta*6;i++)
00095   {
00096     zHalfLength[i]  =0;
00097     thetaAxis[i]    =0;
00098     phiAxis  [i]    =0;
00099     yHalfLength1[i] =0; 
00100     xHalfLength1[i] =0;
00101     xHalfLength2[i] =0;
00102     tanAlpha1[i]    =0;
00103     yHalfLength2[i] =0;
00104     xHalfLength3[i] =0; 
00105     xHalfLength4[i] =0;
00106     tanAlpha2[i]    =0;
00107     thetaPosition[i]=0;
00108     xPosition[i]    =0;
00109     yPosition[i]    =0;
00110     zPosition[i]    =0;
00111   }     
00112 }

void BesEmcGeometry::SetBSCAngleRotat G4double  val  )  [inline]
 

00047 {BSCAngleRotat=val;};

void BesEmcGeometry::SetBSCAngleRotat G4double  val  )  [inline]
 

00047 {BSCAngleRotat=val;};

void BesEmcGeometry::SetBSCCrystalLength G4double  val  )  [inline]
 

00041 {BSCCryLength=val;};

void BesEmcGeometry::SetBSCCrystalLength G4double  val  )  [inline]
 

00041 {BSCCryLength=val;};

void BesEmcGeometry::SetBSCCrystalLength1 G4double  val  )  [inline]
 

00042 {BSCCryLength1=val;};

void BesEmcGeometry::SetBSCCrystalLength1 G4double  val  )  [inline]
 

00042 {BSCCryLength1=val;};

void BesEmcGeometry::SetBSCDz G4double  val  )  [inline]
 

00038 { BSCDz=val;};

void BesEmcGeometry::SetBSCDz G4double  val  )  [inline]
 

00038 { BSCDz=val;};

void BesEmcGeometry::SetBSCNbPhi G4int  val  )  [inline]
 

00039 {BSCNbPhi=val;};

void BesEmcGeometry::SetBSCNbPhi G4int  val  )  [inline]
 

00039 {BSCNbPhi=val;};

void BesEmcGeometry::SetBSCNbTheta G4int  val  )  [inline]
 

00040 {BSCNbTheta=val;};

void BesEmcGeometry::SetBSCNbTheta G4int  val  )  [inline]
 

00040 {BSCNbTheta=val;};

void BesEmcGeometry::SetBSCPosition0 G4double  val  )  [inline]
 

00045 {BSCPosition0=val;};

void BesEmcGeometry::SetBSCPosition0 G4double  val  )  [inline]
 

00045 {BSCPosition0=val;};

void BesEmcGeometry::SetBSCPosition1 G4double  val  )  [inline]
 

00046 {BSCPosition1=val;};

void BesEmcGeometry::SetBSCPosition1 G4double  val  )  [inline]
 

00046 {BSCPosition1=val;};

void BesEmcGeometry::SetBSCRmin G4double  val  )  [inline]
 

00037 { BSCRmin=val;};

void BesEmcGeometry::SetBSCRmin G4double  val  )  [inline]
 

00037 { BSCRmin=val;};

void BesEmcGeometry::SetBSCYFront G4double  val  )  [inline]
 

00044 {BSCYFront=val;};

void BesEmcGeometry::SetBSCYFront G4double  val  )  [inline]
 

00044 {BSCYFront=val;};

void BesEmcGeometry::SetBSCYFront0 G4double  val  )  [inline]
 

00043 {BSCYFront0=val;};

void BesEmcGeometry::SetBSCYFront0 G4double  val  )  [inline]
 

00043 {BSCYFront0=val;};

void BesEmcGeometry::SetCasingThickness G4ThreeVector   ) 
 

void BesEmcGeometry::SetCasingThickness G4ThreeVector   ) 
 

00595 {
00596   // change Gap thickness and recompute the calorimeter parameters
00597   fTyvekThickness = val('X');
00598   fAlThickness    = val('Y');
00599   fMylarThickness = val('Z');
00600 }

void BesEmcGeometry::SetVerboseLevel G4int  val  )  [inline]
 

00035 { verboseLevel=val;}

void BesEmcGeometry::SetVerboseLevel G4int  val  )  [inline]
 

00035 { verboseLevel=val;}


Friends And Related Function Documentation

BesEmcConstruction [friend]
 

EmcGdmlWriter [friend]
 


Member Data Documentation

G4double BesEmcGeometry::AlPlateDz [private]
 

G4double BesEmcGeometry::BSCAngleRotat [private]
 

G4double BesEmcGeometry::BSCCryLength [private]
 

G4double BesEmcGeometry::BSCCryLength1 [private]
 

G4double BesEmcGeometry::BSCDz [private]
 

G4double BesEmcGeometry::BSCDz1 [private]
 

G4int BesEmcGeometry::BSCNbPhi [private]
 

G4int BesEmcGeometry::BSCNbTheta [private]
 

G4double BesEmcGeometry::BSCPhiDphi [private]
 

G4double BesEmcGeometry::BSCPhiDz [private]
 

G4double BesEmcGeometry::BSCPhiRmax [private]
 

G4double BesEmcGeometry::BSCPhiRmin [private]
 

G4double BesEmcGeometry::BSCPhiSphi [private]
 

G4double BesEmcGeometry::BSCPosition0 [private]
 

G4double BesEmcGeometry::BSCPosition1 [private]
 

G4double BesEmcGeometry::BSCRmax [private]
 

G4double BesEmcGeometry::BSCRmax1 [private]
 

G4double BesEmcGeometry::BSCRmax2 [private]
 

G4double BesEmcGeometry::BSCRmin [private]
 

G4double BesEmcGeometry::BSCRmin1 [private]
 

G4double BesEmcGeometry::BSCRmin2 [private]
 

G4double BesEmcGeometry::BSCYFront [private]
 

G4double BesEmcGeometry::BSCYFront0 [private]
 

G4double BesEmcGeometry::BSCYFront1 [private]
 

G4double BesEmcGeometry::cableDr [private]
 

G4double BesEmcGeometry::cableLength [private]
 

G4double BesEmcGeometry::cablePosX [private]
 

G4double BesEmcGeometry::cablePosY [private]
 

G4double BesEmcGeometry::cablePosZ [private]
 

G4double BesEmcGeometry::EndRingDr [private]
 

G4double BesEmcGeometry::EndRingDz [private]
 

G4double BesEmcGeometry::EndRingRmin [private]
 

G4double BesEmcGeometry::fAlThickness [private]
 

G4double BesEmcGeometry::fMylarThickness [private]
 

G4double BesEmcGeometry::fTyvekThickness [private]
 

G4double BesEmcGeometry::HangingPlateDz [private]
 

G4double BesEmcGeometry::OCGirderAngle [private]
 

G4double BesEmcGeometry::OCGirderDz [private]
 

G4double BesEmcGeometry::OCGirderPosZ [private]
 

G4double BesEmcGeometry::OCGirderRmin1 [private]
 

G4double BesEmcGeometry::OCGirderRmin2 [private]
 

G4double BesEmcGeometry::orgGlassLengthX [private]
 

G4double BesEmcGeometry::orgGlassLengthY [private]
 

G4double BesEmcGeometry::orgGlassLengthZ [private]
 

G4double BesEmcGeometry::PABoxDz [private]
 

G4double BesEmcGeometry::PABoxThickness [private]
 

G4double BesEmcGeometry::PDLengthX [private]
 

G4double BesEmcGeometry::PDLengthY [private]
 

G4double BesEmcGeometry::PDLengthZ [private]
 

G4double BesEmcGeometry::phiAxis [private]
 

G4VPhysicalVolume* BesEmcGeometry::physiBSCCrystal[50] [private]
 

G4VPhysicalVolume* BesEmcGeometry::physiBSCCrystal[50] [private]
 

G4double BesEmcGeometry::rearBoxDz [private]
 

G4double BesEmcGeometry::rearBoxLength [private]
 

G4double BesEmcGeometry::rearBoxPosX [private]
 

G4double BesEmcGeometry::rearBoxPosY [private]
 

G4double BesEmcGeometry::rearBoxPosZ [private]
 

G4double BesEmcGeometry::rearCasingThickness [private]
 

G4double BesEmcGeometry::RFBarHoleDphi [private]
 

G4double BesEmcGeometry::RFBarHoleDz [private]
 

G4int BesEmcGeometry::RFBarHoleNb [private]
 

G4double BesEmcGeometry::RFBarThickness [private]
 

G4double BesEmcGeometry::SPBarDphi [private]
 

G4double BesEmcGeometry::SPBarThickness [private]
 

G4double BesEmcGeometry::SPBarThickness1 [private]
 

G4double BesEmcGeometry::SPBarwidth [private]
 

G4double BesEmcGeometry::tanAlpha1 [private]
 

G4double BesEmcGeometry::tanAlpha2 [private]
 

G4double BesEmcGeometry::TaperRingDr [private]
 

G4double BesEmcGeometry::TaperRingDz [private]
 

G4double BesEmcGeometry::TaperRingInnerLength [private]
 

G4double BesEmcGeometry::TaperRingOuterLength [private]
 

G4double BesEmcGeometry::TaperRingOuterLength1 [private]
 

G4double BesEmcGeometry::TaperRingRmin1 [private]
 

G4double BesEmcGeometry::TaperRingRmin2 [private]
 

G4double BesEmcGeometry::TaperRingTheta [private]
 

G4double BesEmcGeometry::TaperRingThickness1 [private]
 

G4double BesEmcGeometry::TaperRingThickness2 [private]
 

G4double BesEmcGeometry::TaperRingThickness3 [private]
 

G4double BesEmcGeometry::thetaAxis [private]
 

G4double BesEmcGeometry::thetaPosition [private]
 

G4int BesEmcGeometry::verboseLevel [private]
 

G4double BesEmcGeometry::waterPipeDr [private]
 

G4double BesEmcGeometry::waterPipeThickness [private]
 

G4double BesEmcGeometry::xHalfLength1 [private]
 

G4double BesEmcGeometry::xHalfLength2 [private]
 

G4double BesEmcGeometry::xHalfLength3 [private]
 

G4double BesEmcGeometry::xHalfLength4 [private]
 

G4double BesEmcGeometry::xPosition [private]
 

G4double BesEmcGeometry::yHalfLength1 [private]
 

G4double BesEmcGeometry::yHalfLength2 [private]
 

G4double BesEmcGeometry::yPosition [private]
 

G4double BesEmcGeometry::zHalfLength [private]
 

G4double BesEmcGeometry::zPosition [private]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 15:52:17 2011 for BOSS6.5.5 by  doxygen 1.3.9.1