CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
BesMdcGeoParameter.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//---------------------------------------------------------------------------//
4//Description: Handle database I/O and user interface
5// for MDC geometry parameters
6//Author: Yuan Ye([email protected])
7//Created: 4 Dec, 2003
8//Modified:
9//Comment: Used in "BesMdc" now, should be insert in framwork later
10// The units are "mm" and "rad".
11// Datum plane is the East Endplane of MDC.
12//---------------------------------------------------------------------------//
13
14#ifndef BesMdcGeoParameter_H
15#define BesMdcGeoParameter_H
16
17
18#include <string>
19#include <vector>
20
21
22using namespace std;
23
25public:
26 BesMdcWire(void){};
27 BesMdcWire(double length, double phi, double r, double rotateAngle);
28 ~BesMdcWire(void){};
29
30public:
31 //Funtions for read data
32 double Length(void) const {return fLength;} //Full length
33 double Phi(void) const {return fPhi;} //Phi on East Endplane
34 double Phi(double z) const; //Phi at different Z position
35 double R(void) const {return fRadius;}
36 double RotateCell(void) const {return fRotateCell;}
37 double RotateAngle(void) const {return fRotateAngle;} // Half twist angle of stereo wire,
38 // for staight wire =0.
39 double X(void) const {return fX;} // X,Y on endplane
40 double Y(void) const{return fY;}
41 double X(double); // X,Y at different Z position
42 double Y(double);
43 const string Name(void) const {return fName;}
44public:
45 //Functions for set data
46 void SetLength(double x) {fLength=x;}
47 void SetPhi(double x) {fPhi=x;}
48 void SetRadius(double x) {fRadius=x;}
49 void SetRotateCell(double x) {fRotateCell=x;}
50 void SetRotateAngle(double x) {fRotateAngle=x;}
51 void SetX(double x) {fX=x;}
52 void SetY(double x) {fY=x;}
53 void SetName(string x) {fName=x;}
54
55private:
56 double fLength, fPhi, fRadius, fRotateCell,fRotateAngle, fX, fY;
57 string fName; //name of Layer
58};
59
60
62//Derived from BesMdcWire, "fPhi" now is the shift angle of first wire.
63public:
64 BesMdcLayer(void){};
65 ~BesMdcLayer(void){};
66
67public:
68 int WireNo(void) const {return fWireNo;} //Wire number of this layer.
69 int SumWireNo(void) const {return fSumWireNo;} //Total wire number from layer 1 to
70 //this layer (include this layer).
71 int BeginWireNo(void) const{return fBeginWireNo;} //Total wire number from layer 1 to
72 //this layer (not include this layer).
73 int FirstWire(void) const{return fFirstWire;} //0: first is field wire; 1: signal wire.
74 double ShiftPhi(void) const{return fShiftPhi;} // Phi between 2 wire of this layer.
75
76public:
77 void SetWireNo(int x) {fWireNo=x;}
78 void SetSumWireNo(int x) {fSumWireNo=x;}
79 void SetBeginWireNo(int x) {fBeginWireNo=x;}
80 void SetShiftPhi(double x) {fShiftPhi=x;}
81 void SetFirstWire(int x) {fFirstWire=x;}
82private:
83 int fWireNo, fSumWireNo, fBeginWireNo, fFirstWire;
84 double fShiftPhi;
85};
86
87
89//class used for construct tube and endplane in MC
90public:
91 BesMdcMember(void){};
93
94public:
95 double Length(void){return fLength;} //Full length In Z direction
96 double InnerR(void) {return fInnerR;} //From Z axes to bottom surface of those segments.
97 double OutR(void) {return fOutR;} //From Z axes to upper surface of those segments.
98 double Z(void) {return fZ;} //Offset value of segment center from Z=0
99 string Name(void) {return fName;} //Name of segment
100
101public:
102 void SetLength(double x) {fLength=x;}
103 void SetInnerR(double x) {fInnerR=x;}
104 void SetOutR(double x) {fOutR=x;}
105 void SetZ(double x) {fZ=x;}
106 void SetName(string x) {fName=x;}
107private:
108 double fLength, fInnerR, fOutR, fZ;
109 string fName;
110};
111
112
114public:
115 BesMdcGeoParameter(void);
117
118 void InitFromFile(void); //Get BesMdcGeoParameter from Mdc.txt
119 void InitFromSvc(void); //Get BesMdcGeoParameter from MdcGeomSvc
120 void Dump(void); //Output info
121
122public:
123 double SignalWireR() {return fSignalWireR;}
124 double FieldWireR() {return fFieldWireR;}
125 int Signal2Global(int x) {return fSignalLayer[x];}
126 BesMdcWire Wire(int);
127 BesMdcWire SignalWire(int, int);
128
129// Remember there are 2 F8, F20, F36, F43!!!!!!!!!!!!!!!!!
130 int LayerNo(void){return fLayerNo;}
131 int SignalLayerNo(void){return fSignalLayerNo;}
132 const BesMdcLayer& Layer(int) const;
133 const BesMdcLayer& SignalLayer(int) const;
134
135 int SegmentNo(void) {return fSegmentNo;}
136 BesMdcMember Segment(int x) {return fMdcSegment[x];}
137
138 static BesMdcGeoParameter * GetGeo(void);
139private:
140
141 double fSignalWireR, fFieldWireR;
142 int fLayerNo, fWireNo; // Total layers & wires number of Mdc.
143 int fSignalLayerNo; // Total signal layers number.
144 int fSignalLayer[50]; // Global layer number of signal layers.
145
146 BesMdcLayer fLayer[100];
147
148 double fWirePhi[30000];
149
150 int fSegmentNo; //Total number of Tube and Endplane segments.
151 BesMdcMember fMdcSegment[100];
152
153 static BesMdcGeoParameter * fPointer;
154};
155
156#endif
double length
Double_t x[10]
static BesMdcGeoParameter * GetGeo(void)
const BesMdcLayer & SignalLayer(int) const
const BesMdcLayer & Layer(int) const
BesMdcWire SignalWire(int, int)
BesMdcMember Segment(int x)
int BeginWireNo(void) const
void SetWireNo(int x)
int FirstWire(void) const
int SumWireNo(void) const
void SetSumWireNo(int x)
double ShiftPhi(void) const
void SetShiftPhi(double x)
int WireNo(void) const
void SetFirstWire(int x)
void SetBeginWireNo(int x)
void SetLength(double x)
void SetName(string x)
double InnerR(void)
void SetZ(double x)
void SetInnerR(double x)
string Name(void)
double OutR(void)
void SetOutR(double x)
double Length(void)
double R(void) const
void SetX(double x)
double RotateCell(void) const
const string Name(void) const
double Length(void) const
void SetRotateCell(double x)
void SetPhi(double x)
double X(void) const
double Y(void) const
void SetRotateAngle(double x)
double RotateAngle(void) const
void SetRadius(double x)
void SetLength(double x)
void SetY(double x)
void SetName(string x)
double Phi(void) const