]>
Commit | Line | Data |
---|---|---|
daa2ae2f | 1 | #ifndef ALIPHOSGEOMETRY_H |
2 | #define ALIPHOSGEOMETRY_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6ad0bfa0 | 6 | /* $Id$ */ |
7 | ||
b2a60966 | 8 | //_________________________________________________________________________ |
9 | // Geometry class for PHOS : singleton | |
10 | // The EMC modules are parametrized so that any configuration can be easily implemented | |
11 | // The title is used to identify the type of CPV used. So far only PPSD implemented | |
12 | // | |
13 | //*-- Author: Yves Schutz (SUBATECH) | |
d15a28e7 | 14 | |
6c370def | 15 | #include <assert.h> |
16 | ||
d15a28e7 | 17 | // --- ROOT system --- |
18 | ||
daa2ae2f | 19 | #include "TNamed.h" |
20 | #include "TString.h" | |
21 | #include "TObjArray.h" | |
22 | #include "TVector3.h" | |
d15a28e7 | 23 | |
24 | // --- AliRoot header files --- | |
25 | ||
daa2ae2f | 26 | #include "AliGeometry.h" |
27 | #include "AliPHOSRecPoint.h" | |
28 | ||
9f616d61 | 29 | |
daa2ae2f | 30 | class AliPHOSGeometry : public AliGeometry { |
31 | ||
32 | public: | |
33 | ||
88714635 | 34 | AliPHOSGeometry() { |
35 | // default ctor | |
36 | // must be kept public for root persistency purposes, but should never be called by the outside world | |
37 | } ; | |
6c370def | 38 | AliPHOSGeometry(const AliPHOSGeometry & geom) { |
39 | // cpy ctor requested by Coding Convention | |
40 | // but not yet needed | |
41 | assert(0==1) ; | |
42 | } | |
43 | ||
daa2ae2f | 44 | virtual ~AliPHOSGeometry(void) ; |
45 | static AliPHOSGeometry * GetInstance(const Text_t* name, const Text_t* title) ; | |
46 | static AliPHOSGeometry * GetInstance() ; | |
47 | virtual void GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrix & gmat) ; | |
48 | virtual void GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) ; | |
49 | ||
c6e196df | 50 | AliPHOSGeometry & operator = (const AliPHOSGeometry & rvalue) const { |
6c370def | 51 | // assignement operator requested by coding convention |
52 | // but not needed | |
53 | assert(0==1) ; | |
54 | return *(GetInstance()) ; | |
55 | } | |
cf0c2bc1 | 56 | |
daa2ae2f | 57 | // General |
58 | ||
cf0c2bc1 | 59 | static TString Degre(void) { |
60 | // a global for degree (deg) | |
61 | return TString("deg") ; | |
62 | } | |
63 | ||
64 | static TString Radian(void) { | |
65 | // a global for radian (rad) | |
66 | return TString("rad") ; | |
67 | } | |
68 | ||
b2a60966 | 69 | Bool_t AbsToRelNumbering(const Int_t AbsId, Int_t * RelId) ; // converts the absolute PHOS numbering to a relative |
cf0c2bc1 | 70 | void EmcModuleCoverage(const Int_t m, Double_t & tm, Double_t & tM, Double_t & pm, Double_t & pM, Option_t * opt = Radian() ); |
b2a60966 | 71 | // calculates the angular coverage in theta and phi of a EMC module |
cf0c2bc1 | 72 | void EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t * opt = Radian() ) ; |
9f616d61 | 73 | // calculates the angular coverage in theta and phi of a |
74 | // single crystal in a EMC module | |
cf0c2bc1 | 75 | |
9f616d61 | 76 | void ImpactOnEmc(const Double_t theta, const Double_t phi, Int_t & ModuleNumber, Double_t & x, Double_t & z) ; |
cf0c2bc1 | 77 | // calculates the impact coordinates of a neutral particle |
78 | // emitted in direction theta and phi in ALICE | |
79 | ||
daa2ae2f | 80 | void RelPosInModule(const Int_t * RelId, Float_t & y, Float_t & z) ; // gets the position of element (pad or Xtal) relative to |
81 | // center of PHOS module | |
82 | void RelPosInAlice(const Int_t AbsId, TVector3 & pos) ; // gets the position of element (pad or Xtal) relative to | |
83 | // Alice | |
84 | Bool_t RelToAbsNumbering(const Int_t * RelId, Int_t & AbsId) ; // converts the absolute PHOS numbering to a relative | |
c198e326 | 85 | |
daa2ae2f | 86 | |
87 | ///////////// PHOS related parameters | |
88 | ||
6c370def | 89 | Bool_t IsInitialized(void) const { |
90 | // | |
91 | return fInit ; } | |
92 | Float_t GetAirFilledBoxSize(Int_t index) const { | |
93 | // Getter | |
94 | return fAirFilledBoxSize[index] ;} | |
95 | Float_t GetCrystalHolderThickness(void) const { | |
96 | // Getter | |
97 | return fCrystalHolderThickness ; } | |
98 | Float_t GetCrystalSize(Int_t index) const { | |
99 | // Getter | |
100 | return fXtlSize[index] ; } | |
101 | Float_t GetCrystalSupportHeight(void) const { | |
102 | // Getter | |
103 | return fCrystalSupportHeight ; } | |
104 | Float_t GetCrystalWrapThickness(void) const { | |
105 | // Getter | |
106 | return fCrystalWrapThickness;} | |
107 | Float_t GetGapBetweenCrystals(void) const { | |
108 | // Getter | |
109 | return fGapBetweenCrystals ; } | |
110 | Float_t GetIPtoCrystalSurface(void) const { | |
111 | // Getter | |
112 | return fIPtoCrystalSurface ; } | |
113 | Float_t GetIPtoOuterCoverDistance(void) const { | |
114 | // Getter | |
115 | return fIPtoOuterCoverDistance ; } | |
116 | Float_t GetIPtoPpsdUp(void) const { | |
117 | // Getter | |
118 | return (fIPtoOuterCoverDistance - fPPSDBoxSize[1] + fPPSDModuleSize[1]/2 ); } | |
119 | Float_t GetIPtoPpsdLow(void) const { | |
120 | // Getter | |
121 | return (fIPtoOuterCoverDistance - fPPSDModuleSize[1]/2 ); } | |
122 | Float_t GetIPtoTopLidDistance(void) const { | |
123 | // Getter | |
124 | return fIPtoTopLidDistance ; } | |
125 | Float_t GetLowerThermoPlateThickness(void) const { | |
126 | // Getter | |
127 | return fLowerThermoPlateThickness ; } | |
128 | Float_t GetLowerTextolitPlateThickness(void) const { | |
129 | // Getter | |
130 | return fLowerTextolitPlateThickness ; } | |
131 | Float_t GetModuleBoxThickness(void) const { | |
132 | // Getter | |
133 | return fModuleBoxThickness ; } | |
134 | Int_t GetNPhi(void) const { | |
135 | // Getter | |
136 | return fNPhi ; } | |
137 | Int_t GetNZ(void) const { | |
138 | // Getter | |
139 | return fNZ ; } | |
140 | Int_t GetNModules(void) const { | |
141 | // Getter | |
142 | return fNModules ; } | |
143 | Float_t GetOuterBoxSize(Int_t index) const { | |
144 | // Getter | |
145 | return fOuterBoxSize[index] ; } | |
146 | Float_t GetOuterBoxThickness(Int_t index) const { | |
147 | // Getter | |
148 | return fOuterBoxThickness[index] ; } | |
149 | Float_t GetPHOSAngle(Int_t index) const { | |
150 | // Getter | |
151 | return fPHOSAngle[index-1] ; } | |
152 | Float_t GetPinDiodeSize(Int_t index) const { | |
153 | // Getter | |
154 | return fPinDiodeSize[index] ; } | |
155 | Float_t GetSecondUpperPlateThickness(void) const { | |
156 | // Getter | |
157 | return fSecondUpperPlateThickness ; } | |
158 | Float_t GetSupportPlateThickness(void) const { | |
159 | // Getter | |
160 | return fSupportPlateThickness ; } | |
161 | Float_t GetTextolitBoxSize(Int_t index) const { | |
162 | // Getter | |
163 | return fTextolitBoxSize[index] ; } | |
164 | Float_t GetTextolitBoxThickness(Int_t index) const { | |
165 | // Getter | |
166 | return fTextolitBoxThickness[index]; } | |
167 | Float_t GetUpperPlateThickness(void) const { | |
168 | // Getter | |
169 | return fUpperPlateThickness ; } | |
170 | Float_t GetUpperCoolingPlateThickness(void) const { | |
171 | // Getter | |
172 | return fUpperCoolingPlateThickness ; } | |
daa2ae2f | 173 | |
d15a28e7 | 174 | |
daa2ae2f | 175 | ///////////// PPSD (PHOS PRE SHOWER DETECTOR) related parameters |
176 | ||
177 | ||
6c370def | 178 | Float_t GetAnodeThickness(void) const { |
179 | // Getter | |
180 | return fAnodeThickness ; } | |
181 | Float_t GetAvalancheGap(void) const { | |
182 | // Getter | |
183 | return fAvalancheGap ; } | |
184 | Float_t GetCathodeThickness(void) const { | |
185 | // Getter | |
186 | return fCathodeThickness ; } | |
187 | Float_t GetCompositeThickness(void) const { | |
188 | // Getter | |
189 | return fCompositeThickness ; } | |
190 | Float_t GetConversionGap(void) const { | |
191 | // Getter | |
192 | return fConversionGap ; } | |
193 | Float_t GetLeadConverterThickness(void) const { | |
194 | // Getter | |
195 | return fLeadConverterThickness ; } | |
196 | Float_t GetLeadToMicro2Gap(void) const { | |
197 | // Getter | |
198 | return fLeadToMicro2Gap ; } | |
199 | Float_t GetLidThickness(void) const { | |
200 | // Getter | |
201 | return fLidThickness ; } | |
202 | Float_t GetMicromegas1Thickness(void) const { | |
203 | // Getter | |
204 | return fMicromegas1Thickness ; } | |
205 | Float_t GetMicromegas2Thickness(void) const { | |
206 | // Getter | |
207 | return fMicromegas2Thickness ; } | |
208 | Float_t GetMicromegasWallThickness(void) const { | |
209 | // Getter | |
210 | return fMicromegasWallThickness ; } | |
211 | Float_t GetMicro1ToLeadGap(void) const { | |
212 | // Getter | |
213 | return fMicro1ToLeadGap ; } | |
214 | Int_t GetNumberOfPadsPhi(void) const { | |
215 | // Getter | |
216 | return fNumberOfPadsPhi ; } | |
217 | Int_t GetNumberOfPadsZ(void) const { | |
218 | // Getter | |
219 | return fNumberOfPadsZ ; } | |
220 | Int_t GetNumberOfModulesPhi(void) const { | |
221 | // Getter | |
222 | return fNumberOfModulesPhi ; } | |
223 | Int_t GetNumberOfModulesZ(void) const { | |
224 | // Getter | |
225 | return fNumberOfModulesZ ; } | |
226 | Float_t GetPCThickness(void) const { | |
227 | // Getter | |
228 | return fPCThickness ; } | |
229 | Float_t GetPhiDisplacement(void) const { | |
230 | // Getter | |
231 | return fPhiDisplacement ; } | |
232 | Float_t GetPPSDBoxSize(Int_t index) const { | |
233 | // Getter | |
234 | return fPPSDBoxSize[index] ; } | |
235 | Float_t GetPPSDModuleSize(Int_t index) const { | |
236 | // Getter | |
237 | return fPPSDModuleSize[index] ; } | |
238 | Float_t GetZDisplacement(void) const { | |
239 | // Getter | |
240 | return fZDisplacement ; } | |
2f3366b6 | 241 | |
242 | void SetLeadConverterThickness(Float_t e) ; // should ultimately disappear | |
daa2ae2f | 243 | |
6c370def | 244 | protected: |
245 | ||
246 | AliPHOSGeometry(const Text_t* name, const Text_t* title) : AliGeometry(name, title) { | |
247 | // ctor only for internal usage (singleton) | |
248 | Init() ; | |
249 | } | |
250 | void Init(void) ; // steering method for PHOS and CPV | |
251 | void InitPHOS(void) ; // defines the various PHOS geometry parameters | |
252 | void InitPPSD(void) ; // defines the various PPSD geometry parameters | |
253 | ||
daa2ae2f | 254 | private: |
6c370def | 255 | |
256 | void SetPHOSAngles() ; // calculates the PHOS modules PHI angle | |
daa2ae2f | 257 | |
258 | ///////////// PHOS related parameters | |
259 | ||
260 | Float_t fAirFilledBoxSize[3] ; // Air filled box containing one module | |
261 | Float_t fAirThickness[3] ; // Space filled with air between the module box and the Textolit box | |
262 | Float_t fCrystalSupportHeight ; // Height of the support of the crystal | |
263 | Float_t fCrystalWrapThickness ; // Thickness of Tyvek wrapping the crystal | |
264 | Float_t fCrystalHolderThickness ; // Titanium holder of the crystal | |
265 | Float_t fGapBetweenCrystals ; // Total Gap between two adjacent crystals | |
266 | Bool_t fInit ; // Tells if geometry has been succesfully set up | |
267 | Float_t fIPtoOuterCoverDistance ; // Distances from interaction point to outer cover | |
268 | Float_t fIPtoCrystalSurface ; // Distances from interaction point to Xtal surface | |
269 | Float_t fModuleBoxThickness ; // Thickness of the thermo insulating box containing one crystals module | |
270 | Float_t fLowerTextolitPlateThickness ; // Thickness of lower textolit plate | |
271 | Float_t fLowerThermoPlateThickness ; // Thickness of lower thermo insulating plate | |
272 | Int_t fNModules ; // Number of modules constituing PHOS | |
273 | Int_t fNPhi ; // Number of crystal units in X (phi) direction | |
274 | Int_t fNZ ; // Number of crystal units in Z direction | |
275 | Float_t fOuterBoxSize[3] ; // Size of the outer thermo insulating foam box | |
276 | Float_t fOuterBoxThickness[3] ; // Thickness of the outer thermo insulating foam box | |
4697edca | 277 | Float_t * fPHOSAngle ; //[fNModules] Position angles of modules |
daa2ae2f | 278 | Float_t fPinDiodeSize[3] ; // Size of the PIN Diode |
279 | TObjArray * fRotMatrixArray ; // Liste of rotation matrices (one per phos module) | |
280 | Float_t fSecondUpperPlateThickness ; // Thickness of upper polystyrene foam plate | |
281 | Float_t fSupportPlateThickness ; // Thickness of the Aluminium support plate | |
282 | Float_t fUpperCoolingPlateThickness ; // Thickness of the upper cooling plate | |
283 | Float_t fUpperPlateThickness ; // Thickness of the uper thermo insulating foam plate | |
284 | Float_t fTextolitBoxSize[3] ; // Size of the Textolit box inside the insulating foam box | |
285 | Float_t fTextolitBoxThickness[3] ; // Thicknesses of th Textolit box | |
286 | Float_t fXtlSize[3] ; // PWO4 crystal dimensions | |
287 | ||
288 | ||
289 | ///////////// PPSD (PHOS PRE SHOWER DETECTOR) related parameters | |
290 | ||
291 | Float_t fAnodeThickness ; // Thickness of the copper layer which makes the anode | |
292 | Float_t fAvalancheGap ; // Thickness of the gas in the avalanche stage | |
293 | Float_t fCathodeThickness ; // Thickeness of composite material ensuring rigidity of cathode | |
294 | Float_t fCompositeThickness ; // Thickeness of composite material ensuring rigidity of anode | |
295 | Float_t fConversionGap ; // Thickness of the gas in the conversion stage | |
296 | Float_t fIPtoTopLidDistance ; // Distance from interaction point to top lid of PPSD | |
297 | Float_t fLeadConverterThickness ; // Thickness of the Lead converter | |
298 | Float_t fLeadToMicro2Gap ; // Thickness of the air gap between the Lead and Micromegas 2 | |
299 | Float_t fLidThickness ; // Thickness of top lid | |
300 | Float_t fMicromegas1Thickness ; // Thickness of the first downstream Micromegas | |
301 | Float_t fMicromegas2Thickness ; // Thickness of the second downstream Micromegas | |
302 | Float_t fMicromegasWallThickness ; // Thickness of the Micromegas leak tight box | |
303 | Float_t fMicro1ToLeadGap ; // Thickness of the air gap between Micromegas 1 and the Lead | |
304 | Int_t fNumberOfPadsPhi ; // Number of pads on a micromegas module ; | |
305 | Int_t fNumberOfPadsZ ; // Number of pads on a micromegas module ; | |
306 | Int_t fNumberOfModulesPhi ; // Number of micromegas modules in phi | |
307 | Int_t fNumberOfModulesZ ; // Number of micromegas modules in z | |
308 | Float_t fPCThickness ; // Thickness of the printed circuit board of the anode | |
309 | Float_t fPhiDisplacement ; // Phi displacement of micromegas1 with respect to micromegas2 | |
310 | Float_t fPPSDBoxSize[3] ; // Size of large box which contains PPSD; matches PHOS module size | |
311 | Float_t fPPSDModuleSize[3] ; // Size of an individual micromegas module | |
312 | Float_t fZDisplacement ; // Z displacement of micromegas1 with respect to micromegas2 | |
313 | ||
88714635 | 314 | static AliPHOSGeometry * fgGeom ; // pointer to the unique instance of the singleton |
daa2ae2f | 315 | |
b2a60966 | 316 | ClassDef(AliPHOSGeometry,1) // PHOS geometry class |
daa2ae2f | 317 | |
318 | } ; | |
319 | ||
320 | #endif // AliPHOSGEOMETRY_H |