/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Simulation/BOOST/MdcSim/MdcSim-00-00-73/MdcSim/BesMdcGeoParameter.hh

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------//
00002 //      BOOST --- BESIII Object_Oriented Simulation Tool                     //
00003 //---------------------------------------------------------------------------//
00004 //Description: Handle database I/O and user interface 
00005 //             for MDC geometry parameters
00006 //Author: Yuan Ye(yuany@mail.ihep.ac.cn)
00007 //Created: 4 Dec, 2003
00008 //Modified:
00009 //Comment: Used in "BesMdc" now, should be insert in framwork later
00010 //         The units are "mm" and "rad". 
00011 //         Datum plane is the East Endplane of MDC.
00012 //---------------------------------------------------------------------------//
00013 
00014 #ifndef BesMdcGeoParameter_H
00015 #define BesMdcGeoParameter_H 
00016 
00017 
00018 #include <string>
00019 #include <vector>
00020 
00021 
00022 using namespace std;
00023 
00024 class BesMdcWire{
00025 public:
00026   BesMdcWire(void){};
00027   BesMdcWire(double length, double phi, double r, double rotateAngle);
00028   ~BesMdcWire(void){};
00029 
00030 public:
00031   //Funtions for read data
00032   double Length(void)  const   {return fLength;}      //Full length
00033   double Phi(void) const       {return fPhi;}         //Phi on East Endplane
00034   double Phi(double z) const;   //Phi at different Z position
00035   double R(void) const         {return fRadius;}      
00036   double RotateCell(void) const {return fRotateCell;}
00037   double RotateAngle(void) const {return fRotateAngle;} // Half twist angle of stereo wire, 
00038                                                  // for staight wire =0.
00039   double X(void) const {return fX;} // X,Y on endplane
00040   double Y(void) const{return fY;} 
00041   double X(double);           // X,Y at different Z position 
00042   double Y(double);
00043   const string Name(void) const {return fName;} 
00044 public:
00045   //Functions for set data
00046   void SetLength(double x)      {fLength=x;}
00047   void SetPhi(double x)         {fPhi=x;}
00048   void SetRadius(double x)      {fRadius=x;}
00049   void SetRotateCell(double x) {fRotateCell=x;}
00050   void SetRotateAngle(double x) {fRotateAngle=x;}
00051   void SetX(double x) {fX=x;}
00052   void SetY(double x) {fY=x;}
00053   void SetName(string x) {fName=x;}  
00054 
00055 private:
00056   double fLength, fPhi, fRadius, fRotateCell,fRotateAngle, fX, fY;
00057   string fName;   //name of Layer
00058 };
00059 
00060 
00061 class BesMdcLayer:public BesMdcWire{
00062 //Derived from BesMdcWire, "fPhi" now is the shift angle of first wire. 
00063 public:
00064   BesMdcLayer(void){};
00065   ~BesMdcLayer(void){};
00066 
00067 public:
00068   int WireNo(void)  const   {return fWireNo;}     //Wire number of this layer.
00069   int SumWireNo(void) const {return fSumWireNo;}  //Total wire number from layer 1 to 
00070                                              //this layer (include this layer).
00071   int BeginWireNo(void) const{return fBeginWireNo;} //Total wire number from layer 1 to 
00072                                               //this layer (not include this layer).
00073   int FirstWire(void) const{return fFirstWire;}     //0: first is field wire; 1: signal wire.
00074   double ShiftPhi(void) const{return fShiftPhi;}    // Phi between 2 wire of this layer.
00075 
00076 public:
00077   void SetWireNo(int x)    {fWireNo=x;}
00078   void SetSumWireNo(int x) {fSumWireNo=x;}
00079   void SetBeginWireNo(int x) {fBeginWireNo=x;}
00080   void SetShiftPhi(double x) {fShiftPhi=x;}
00081   void SetFirstWire(int x) {fFirstWire=x;}
00082 private:
00083   int fWireNo, fSumWireNo, fBeginWireNo, fFirstWire;
00084   double fShiftPhi;
00085 };
00086 
00087 
00088 class BesMdcMember{
00089 //class used for construct tube and endplane in MC
00090 public:
00091   BesMdcMember(void){};
00092   ~BesMdcMember(void){};
00093 
00094 public:
00095   double Length(void){return fLength;} //Full length In Z direction
00096   double InnerR(void)     {return fInnerR;} //From Z axes to bottom surface of those segments.
00097   double OutR(void) {return fOutR;}  //From Z axes to upper surface of those segments.
00098   double Z(void) {return fZ;}  //Offset value of segment center from Z=0 
00099   string Name(void) {return fName;} //Name of segment
00100 
00101 public:
00102   void SetLength(double x) {fLength=x;}
00103   void SetInnerR(double x) {fInnerR=x;}
00104   void SetOutR(double x)  {fOutR=x;}
00105   void SetZ(double x)  {fZ=x;}
00106   void SetName(string x) {fName=x;}
00107 private:
00108   double fLength, fInnerR, fOutR, fZ;
00109   string fName;
00110 };
00111 
00112 
00113 class BesMdcGeoParameter{
00114 public:
00115   BesMdcGeoParameter(void);
00116   ~BesMdcGeoParameter(void){};
00117   
00118   void InitFromFile(void);  //Get BesMdcGeoParameter from Mdc.txt
00119   void InitFromSvc(void);  //Get BesMdcGeoParameter from MdcGeomSvc
00120   void Dump(void);  //Output info
00121 
00122 public:
00123   double SignalWireR() {return fSignalWireR;}
00124   double FieldWireR() {return fFieldWireR;}
00125   int Signal2Global(int x) {return  fSignalLayer[x];}
00126   BesMdcWire Wire(int);
00127   BesMdcWire SignalWire(int, int);
00128 
00129 //  Remember there are 2 F8, F20, F36, F43!!!!!!!!!!!!!!!!!
00130   int LayerNo(void){return fLayerNo;}  
00131   int SignalLayerNo(void){return fSignalLayerNo;}
00132   const BesMdcLayer& Layer(int) const;
00133   const BesMdcLayer& SignalLayer(int) const;   
00134 
00135   int SegmentNo(void) {return fSegmentNo;}
00136   BesMdcMember Segment(int x) {return fMdcSegment[x];}
00137 
00138   static BesMdcGeoParameter * GetGeo(void);
00139 private:
00140 
00141   double fSignalWireR, fFieldWireR;
00142   int fLayerNo, fWireNo; // Total layers & wires number of Mdc.
00143   int fSignalLayerNo;    // Total signal layers number.
00144   int fSignalLayer[50];  // Global layer number of signal layers. 
00145 
00146   BesMdcLayer fLayer[100];
00147 
00148   double fWirePhi[30000]; 
00149 
00150   int fSegmentNo; //Total number of Tube and Endplane segments.
00151   BesMdcMember fMdcSegment[100];
00152 
00153   static  BesMdcGeoParameter * fPointer;
00154 };
00155 
00156 #endif

Generated on Tue Nov 29 23:14:26 2016 for BOSS_7.0.2 by  doxygen 1.4.7