CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
Cgem/CgemGeomSvc/CgemGeomSvc-00-00-31-p01/CgemGeomSvc/CgemGeomSvc.h
Go to the documentation of this file.
1// length unit is mm
2
3#ifndef CGEMGEOMSVC_H
4#define CGEMGEOMSVC_H
5
6#include <CLHEP/Units/PhysicalConstants.h>
7#include <CLHEP/Geometry/Point3D.h>
8#include <vector>
9#include <iostream>
10
11#include "GaudiKernel/Algorithm.h"
12#include "GaudiKernel/Property.h"
13#include "GaudiKernel/MsgStream.h"
14
15#include "GaudiKernel/IIncidentListener.h"
16#include "GaudiKernel/Service.h"
17#include "GaudiKernel/IInterface.h"
18#include "CgemGeomSvc/ICgemGeomSvc.h"
19#include "GaudiKernel/IDataProviderSvc.h"
20#include "GaudiKernel/IIncidentListener.h"
21
22#include "CLHEP/Vector/ThreeVector.h"
23
24class CgemGeomSvc : public Service, virtual public ICgemGeomSvc, virtual public IIncidentListener{
25
26 public:
27 CgemGeomSvc(const std::string& name, ISvcLocator* pSvcLocator);
28 ~CgemGeomSvc();
29
30 virtual StatusCode queryInterface(const InterfaceID& riid, void** ppvUnknown);
31 virtual StatusCode initialize();
32 virtual StatusCode finalize();
33 void handle(const Incident& inc);
34 bool initGeom();
35
36 void readAlignPar();
37
38 /* Information of Cgem */
39 double getInnerROfCgem() const {return m_R_i_Cgem;}
40 double getOuterROfCgem() const {return m_R_o_Cgem;}
41 double getLengthOfCgem() const {return m_L_Cgem;}
42
43 /* Information of CgemLayer */
44 double getNumberOfCgemLayer() const {return m_N_CgemLayer ;}
45 double getNumberOfCgemFoil() const {return m_N_GemFoil ;}
46 double getThicknessOfCgemLayer(int i) const {return m_T_CgemLayer[i] ;}
47 CgemGeoLayer* getCgemLayer(int i) const {return m_CgemLayer[i];}
48
49 /* Information of Cathode */
50 double getThicknessOfCathodeKapton1() const {return m_T_Cathode_Kapton1 ;}
51 double getThicknessOfCathodeEpoxy1() const {return m_T_Cathode_Epoxy1 ;}
52 double getThicknessOfCathodeRohacell1() const {return m_T_Cathode_Rohacell1 ;}
53 double getThicknessOfCathodeEpoxy2() const {return m_T_Cathode_Epoxy2 ;}
54 double getThicknessOfCathodeKapton2() const {return m_T_Cathode_Kapton2 ;}
55 double getThicknessOfCathodeEpoxy3() const {return m_T_Cathode_Epoxy3 ;}
56 double getThicknessOfCathodeRohacell2() const {return m_T_Cathode_Rohacell2 ;}
57 double getThicknessOfCathodeEpoxy4() const {return m_T_Cathode_Epoxy4 ;}
58 double getThicknessOfCathodeKapton3() const {return m_T_Cathode_Kapton3 ;}
59 double getThicknessOfCathodeCu() const {return m_T_Cathode_Cu ;}
60 double getThicknessOfCathode() const {return m_T_Cathode ;}
61
62 /* Information of Gap */
63 double getThicknessOfGapD(int i) const {return m_T_Gap_D[i] ;}
64 double getThicknessOfGapT1() const {return m_T_Gap_T1 ;}
65 double getThicknessOfGapT2() const {return m_T_Gap_T2 ;}
66 double getThicknessOfGapI() const {return m_T_Gap_I ;}
67
68 /* Information of CgemFoil and Hole */
69 double getThicknessOfCgemFoilCu1() const {return m_T_GemFoil_Cu1 ;}
70 double getThicknessOfCgemFoilKapton() const {return m_T_GemFoil_Kapton ;}
71 double getThicknessOfCgemFoilCu2() const {return m_T_GemFoil_Cu2 ;}
72 double getThicknessOfCgemFoil() const {return m_T_GemFoil ;}
73 double getInnerROfCgemFoilHole() const {return m_R_i_GemFoil_Hole ;}
74 double getOuterROfCgemFoilHole() const {return m_R_o_GemFoil_Hole ;}
75 double getLengthOfCgemFoilHole() const {return m_L_GemFoil_Hole ;}
76
77 /* Information of Anode */
78 double getThicknessOfAnodeCu1() const {return m_T_Anode_Cu1 ;}
79 double getThicknessOfAnodeKapton1() const {return m_T_Anode_Kapton1 ;}
80 double getThicknessOfAnodeCu2() const {return m_T_Anode_Cu2 ;}
81 double getThicknessOfAnodeEpoxy1() const {return m_T_Anode_Epoxy1 ;}
82 double getThicknessOfAnodeKapton2() const {return m_T_Anode_Kapton2 ;}
83 double getThicknessOfAnodeEpoxy2() const {return m_T_Anode_Epoxy2 ;}
84 double getThicknessOfAnodeRohacell1()const {return m_T_Anode_Rohacell1;}
85 double getThicknessOfAnodeEpoxy3() const {return m_T_Anode_Epoxy3 ;}
86 double getThicknessOfAnodeKapton3() const {return m_T_Anode_Kapton3 ;}
87 double getThicknessOfAnodeEpoxy4() const {return m_T_Anode_Epoxy4 ;}
88 double getThicknessOfAnodeRohacell2()const {return m_T_Anode_Rohacell2;}
89 double getThicknessOfAnodeEpoxy5() const {return m_T_Anode_Epoxy5 ;}
90 double getThicknessOfAnodeCu3() const {return m_T_Anode_Cu3 ;}
91 double getThicknessOfAnodeKapton4() const {return m_T_Anode_Kapton4 ;}
92 double getThicknessOfAnode() const {return m_T_Anode ;}
93 CgemGeoReadoutPlane* getReadoutPlane(int iLayer, int iSheet) const;
94 /* information about strip description */
95 bool isXStripDescriptionOn() const {return m_B_strip_x_on; }
96 bool isVStripDescriptionOn() const {return m_B_strip_v_on; }
97
98 void setDensityOfCable(double rho) {m_Rho_Cable = rho;}
99 double getDensityOfCable() const {return m_Rho_Cable;}
100
101 /* Information of CGEM/MDC Separator */
102 double getInnerRadiusOfSeparator() const {return m_R_in_Separator ;}
103 double getOuterRadiusOfSeparator() const {return m_R_out_Separator ;}
104 double getLengthOfSeparator() const {return m_L_Separator ;}
105 CgemGeoSeparator* getCgemSeparator() const {return m_CgemSeparator;}
106 double getThickOfInnerAlOfSeparator() const {return m_T_Separator_Al1;}
107 double getThickOfCarbonFiberOfSeparator() const {return m_T_Separator_CarFib; }
108 double getThickOfOuterAlOfSeparator() const {return m_T_Separator_Al2;}
109
110 /* get Alignment pointer */
111 CgemGeoAlign* getAlignPtr() const{ return m_align; }
112
113 /* get the pointer of mid-drift plane */
114 CgemMidDriftPlane* getMidDriftPtr() const{ return m_midDrift; }
115
116 bool isPassive() const { return m_passive; }
117 bool isEffDensity() const {return m_effDensity;}
118
119 static const int NLAYER_MAX = 3;
120 static const int NFOIL_MAX = 3;
121 static const int NSHEET_MAX = 2;
122 static const int N_MATERIAL_MAX = 30;
123
124 private:
125 int m_iFile;
126 bool m_effDensity;
127 bool m_debugCout;
128 bool m_testReadoutPlane;
129 /* std::string m_geomFile; */
130 std::string m_alignFile;
131 CgemGeoAlign* m_align;
132 CgemMidDriftPlane* m_midDrift;
133
134 /* passive elements on/off */
135 bool m_passive;
136
137 /* Information of Cgem */
138 double m_R_i_Cgem, m_R_o_Cgem, m_L_Cgem;
139
140 /* Information of CgemLayer */
141 int m_N_CgemLayer ;
142 int m_N_GemFoil ;
143 double m_T_CgemLayer[NLAYER_MAX] ;
144 CgemGeoLayer* m_CgemLayer[NLAYER_MAX];
146 CgemGeoSeparator *m_CgemSeparator;
147
148 /* Information of Cathode */
149 int m_N_Cathode_Materials ;
150 double m_T_Cathode_Kapton1 ;
151 double m_T_Cathode_Epoxy1 ;
152 double m_T_Cathode_Rohacell1 ;
153 double m_T_Cathode_Epoxy2 ;
154 double m_T_Cathode_Kapton2 ;
155 double m_T_Cathode_Epoxy3 ;
156 double m_T_Cathode_Rohacell2 ;
157 double m_T_Cathode_Epoxy4 ;
158 double m_T_Cathode_Kapton3 ;
159 double m_T_Cathode_Cu ;
160 double m_T_Cathode ;
161
162 /* Information of Gap */
163 double m_T_Gap_D[NLAYER_MAX] ;
164 double m_T_Gap_T1 ;
165 double m_T_Gap_T2 ;
166 double m_T_Gap_I ;
167
168 /* Orientation
169 0 = straight
170 1 = reversed */
171 bool m_Orientation;
172
173 /* Information of GemFoil and Hole */
174 int m_N_GemFoil_Materials ;
175 double m_T_GemFoil_Cu1 ;
176 double m_T_GemFoil_Kapton ;
177 double m_T_GemFoil_Cu2 ;
178 double m_T_GemFoil ;
179 double m_R_i_GemFoil_Hole ;
180 double m_R_o_GemFoil_Hole ;
181 double m_L_GemFoil_Hole ;
182
183 /* Information of Anode */
184 int m_N_Anode_Materials;
185 double m_T_Anode_Cu1 ;
186 double m_T_Anode_Kapton1 ;
187 double m_T_Anode_Cu2 ;
188 double m_T_Anode_Epoxy1 ;
189 double m_T_Anode_Kapton2 ;
190 double m_T_Anode_Epoxy2 ;
191 double m_T_Anode_Rohacell1;
192 double m_T_Anode_Epoxy3 ;
193 double m_T_Anode_Kapton3 ;
194 double m_T_Anode_Epoxy4 ;
195 double m_T_Anode_Rohacell2;
196 double m_T_Anode_Epoxy5 ;
197 double m_T_Anode_Cu3 ;
198 double m_T_Anode_Kapton4 ;
199 double m_T_Anode ;
200 /* Do we want to use the strip description in the anode? */
201 bool m_B_strip_x_on;
202 bool m_B_strip_v_on;
203 CgemGeoReadoutPlane* m_ReadoutPlane[NLAYER_MAX][NSHEET_MAX];
204 void TestReadoutPlane();
205 /** density of cables
206 taking into account fill factor and weight/volume of HV, LV, signal cables
207 **/
208 double m_Rho_Cable;
209
210 /* Information of CGEM/MDC Separator */
211 double m_R_in_Separator ;
212 double m_R_out_Separator ;
213 double m_L_Separator ;
214 double m_T_Separator_Al1 ;
215 double m_T_Separator_CarFib;
216 double m_T_Separator_Al2 ;
217
218};
219
220inline CgemGeoReadoutPlane* CgemGeomSvc::getReadoutPlane(int iLayer, int iSheet) const {
221 if( (iLayer<NLAYER_MAX) && (iSheet<NSHEET_MAX) ) return m_ReadoutPlane[iLayer][iSheet];
222 else return 0;
223}
224
225
226#endif /* CGEMGEOMSVC_H */
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvUnknown)
Definition: CgemGeomSvc.cxx:49
void handle(const Incident &inc)
virtual StatusCode finalize()
bool initGeom()
CgemGeoReadoutPlane * getReadoutPlane(int iLayer, int iSheet) const
virtual StatusCode initialize()
Definition: CgemGeomSvc.cxx:60
void readAlignPar()