BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Simulation/BOOST/MdcSim/include/MdcSim/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(yuany@mail.ihep.ac.cn)
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#include <string>
18#include <vector>
19
20using namespace std;
21
22class BesMdcWire {
23public:
24 BesMdcWire( void ) {};
25 BesMdcWire( double length, double phi, double r, double rotateAngle );
26 ~BesMdcWire( void ) {};
27
28public:
29 // Funtions for read data
30 double Length( void ) const { return fLength; } // Full length
31 double Phi( void ) const { return fPhi; } // Phi on East Endplane
32 double Phi( double z ) const; // Phi at different Z position
33 double R( void ) const { return fRadius; }
34 double RotateCell( void ) const { return fRotateCell; }
35 double RotateAngle( void ) const {
36 return fRotateAngle;
37 } // 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; }
44
45public:
46 // Functions for set data
47 void SetLength( double x ) { fLength = x; }
48 void SetPhi( double x ) { fPhi = x; }
49 void SetRadius( double x ) { fRadius = x; }
50 void SetRotateCell( double x ) { fRotateCell = x; }
51 void SetRotateAngle( double x ) { fRotateAngle = x; }
52 void SetX( double x ) { fX = x; }
53 void SetY( double x ) { fY = x; }
54 void SetName( string x ) { fName = x; }
55
56private:
57 double fLength, fPhi, fRadius, fRotateCell, fRotateAngle, fX, fY;
58 string fName; // name of Layer
59};
60
61class BesMdcLayer : public BesMdcWire {
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; }
82
83private:
84 int fWireNo, fSumWireNo, fBeginWireNo, fFirstWire;
85 double fShiftPhi;
86};
87
88class BesMdcMember {
89 // class used for construct tube and endplane in MC
90public:
91 BesMdcMember( void ) {};
92 ~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; }
107
108private:
109 double fLength, fInnerR, fOutR, fZ;
110 string fName;
111};
112
113class BesMdcGeoParameter {
114public:
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]; }
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 );
139
140private:
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
void InitFromSvc(void)
void InitFromFile(void)
const BesMdcLayer & SignalLayer(int) const
const BesMdcLayer & Layer(int) const
BesMdcWire SignalWire(int, int)
static BesMdcGeoParameter * GetGeo(void)
BesMdcWire Wire(int)
double X(double)
double Phi(double z) const
double Y(double)
BesMdcWire(double length, double phi, double r, double rotateAngle)