00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
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
00032 double Length(void) const {return fLength;}
00033 double Phi(void) const {return fPhi;}
00034 double Phi(double z) const;
00035 double R(void) const {return fRadius;}
00036 double RotateCell(void) const {return fRotateCell;}
00037 double RotateAngle(void) const {return fRotateAngle;}
00038
00039 double X(void) const {return fX;}
00040 double Y(void) const{return fY;}
00041 double X(double);
00042 double Y(double);
00043 const string Name(void) const {return fName;}
00044 public:
00045
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;
00058 };
00059
00060
00061 class BesMdcLayer:public BesMdcWire{
00062
00063 public:
00064 BesMdcLayer(void){};
00065 ~BesMdcLayer(void){};
00066
00067 public:
00068 int WireNo(void) const {return fWireNo;}
00069 int SumWireNo(void) const {return fSumWireNo;}
00070
00071 int BeginWireNo(void) const{return fBeginWireNo;}
00072
00073 int FirstWire(void) const{return fFirstWire;}
00074 double ShiftPhi(void) const{return fShiftPhi;}
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
00090 public:
00091 BesMdcMember(void){};
00092 ~BesMdcMember(void){};
00093
00094 public:
00095 double Length(void){return fLength;}
00096 double InnerR(void) {return fInnerR;}
00097 double OutR(void) {return fOutR;}
00098 double Z(void) {return fZ;}
00099 string Name(void) {return fName;}
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);
00119 void InitFromSvc(void);
00120 void Dump(void);
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
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;
00143 int fSignalLayerNo;
00144 int fSignalLayer[50];
00145
00146 BesMdcLayer fLayer[100];
00147
00148 double fWirePhi[30000];
00149
00150 int fSegmentNo;
00151 BesMdcMember fMdcSegment[100];
00152
00153 static BesMdcGeoParameter * fPointer;
00154 };
00155
00156 #endif