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 */
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
13 //*-- Author: Yves Schutz (SUBATECH)
17 // --- ROOT system ---
21 #include "TObjArray.h"
24 // --- AliRoot header files ---
26 #include "AliGeometry.h"
27 #include "AliPHOSRecPoint.h"
30 class AliPHOSGeometry : public AliGeometry {
36 // must be kept public for root persistency purposes, but should never be called by the outside world
40 AliPHOSGeometry(const AliPHOSGeometry & geom) {
41 // cpy ctor requested by Coding Convention
46 virtual ~AliPHOSGeometry(void) ;
47 static AliPHOSGeometry * GetInstance(const Text_t* name, const Text_t* title="") ;
48 static AliPHOSGeometry * GetInstance() ;
49 virtual void GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrix & gmat) ;
50 virtual void GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) ;
52 AliPHOSGeometry & operator = (const AliPHOSGeometry & rvalue) const {
53 // assignement operator requested by coding convention
56 return *(GetInstance()) ;
61 static TString Degre(void) {
62 // a global for degree (deg)
63 return TString("deg") ;
66 static TString Radian(void) {
67 // a global for radian (rad)
68 return TString("rad") ;
71 Bool_t AbsToRelNumbering(const Int_t AbsId, Int_t * RelId) ; // converts the absolute PHOS numbering to a relative
72 void EmcModuleCoverage(const Int_t m, Double_t & tm, Double_t & tM, Double_t & pm, Double_t & pM, Option_t * opt = Radian() );
73 // calculates the angular coverage in theta and phi of a EMC module
74 void EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t * opt = Radian() ) ;
75 // calculates the angular coverage in theta and phi of a
76 // single crystal in a EMC module
78 void ImpactOnEmc(const Double_t theta, const Double_t phi, Int_t & ModuleNumber, Double_t & x, Double_t & z) ;
79 // calculates the impact coordinates of a neutral particle
80 // emitted in direction theta and phi in ALICE
82 void RelPosInModule(const Int_t * RelId, Float_t & y, Float_t & z) ; // gets the position of element (pad or Xtal) relative to
83 // center of PHOS module
84 void RelPosInAlice(const Int_t AbsId, TVector3 & pos) ; // gets the position of element (pad or Xtal) relative to
86 Bool_t RelToAbsNumbering(const Int_t * RelId, Int_t & AbsId) ; // converts the absolute PHOS numbering to a relative
89 ///////////// PHOS related parameters
91 Bool_t IsInitialized(void) const {
94 Float_t GetAirFilledBoxSize(Int_t index) const {
96 return fAirFilledBoxSize[index] ;}
97 Float_t GetCrystalHolderThickness(void) const {
99 return fCrystalHolderThickness ; }
100 Float_t GetCrystalSize(Int_t index) const {
102 return fXtlSize[index] ; }
103 Float_t GetCrystalSupportHeight(void) const {
105 return fCrystalSupportHeight ; }
106 Float_t GetCrystalWrapThickness(void) const {
108 return fCrystalWrapThickness;}
109 Float_t GetGapBetweenCrystals(void) const {
111 return fGapBetweenCrystals ; }
112 Float_t GetIPtoCrystalSurface(void) const {
114 return fIPtoCrystalSurface ; }
115 Float_t GetIPtoOuterCoverDistance(void) const {
117 return fIPtoOuterCoverDistance ; }
118 Float_t GetIPtoPpsdUp(void) const {
120 return (fIPtoOuterCoverDistance - fPPSDBoxSize[1] + fPPSDModuleSize[1]/2 ); }
121 Float_t GetIPtoPpsdLow(void) const {
123 return (fIPtoOuterCoverDistance - fPPSDModuleSize[1]/2 ); }
124 Float_t GetIPtoTopLidDistance(void) const {
126 return fIPtoTopLidDistance ; }
127 Float_t GetLowerThermoPlateThickness(void) const {
129 return fLowerThermoPlateThickness ; }
130 Float_t GetLowerTextolitPlateThickness(void) const {
132 return fLowerTextolitPlateThickness ; }
133 Float_t GetModuleBoxThickness(void) const {
135 return fModuleBoxThickness ; }
136 Int_t GetNPhi(void) const {
139 Int_t GetNZ(void) const {
142 Int_t GetNModules(void) const {
145 Float_t GetOuterBoxSize(Int_t index) const {
147 return fOuterBoxSize[index] ; }
148 Float_t GetOuterBoxThickness(Int_t index) const {
150 return fOuterBoxThickness[index] ; }
151 Float_t GetPHOSAngle(Int_t index) const {
153 return fPHOSAngle[index-1] ; }
154 Float_t GetPinDiodeSize(Int_t index) const {
156 return fPinDiodeSize[index] ; }
157 Float_t GetSecondUpperPlateThickness(void) const {
159 return fSecondUpperPlateThickness ; }
160 Float_t GetSupportPlateThickness(void) const {
162 return fSupportPlateThickness ; }
163 Float_t GetTextolitBoxSize(Int_t index) const {
165 return fTextolitBoxSize[index] ; }
166 Float_t GetTextolitBoxThickness(Int_t index) const {
168 return fTextolitBoxThickness[index]; }
169 Float_t GetUpperPlateThickness(void) const {
171 return fUpperPlateThickness ; }
172 Float_t GetUpperCoolingPlateThickness(void) const {
174 return fUpperCoolingPlateThickness ; }
177 ///////////// PPSD (PHOS PRE SHOWER DETECTOR) related parameters
180 Float_t GetAnodeThickness(void) const {
182 return fAnodeThickness ; }
183 Float_t GetAvalancheGap(void) const {
185 return fAvalancheGap ; }
186 Float_t GetCathodeThickness(void) const {
188 return fCathodeThickness ; }
189 Float_t GetCompositeThickness(void) const {
191 return fCompositeThickness ; }
192 Float_t GetConversionGap(void) const {
194 return fConversionGap ; }
195 Float_t GetLeadConverterThickness(void) const {
197 return fLeadConverterThickness ; }
198 Float_t GetLeadToMicro2Gap(void) const {
200 return fLeadToMicro2Gap ; }
201 Float_t GetLidThickness(void) const {
203 return fLidThickness ; }
204 Float_t GetMicromegas1Thickness(void) const {
206 return fMicromegas1Thickness ; }
207 Float_t GetMicromegas2Thickness(void) const {
209 return fMicromegas2Thickness ; }
210 Float_t GetMicromegasWallThickness(void) const {
212 return fMicromegasWallThickness ; }
213 Float_t GetMicro1ToLeadGap(void) const {
215 return fMicro1ToLeadGap ; }
216 Int_t GetNumberOfPadsPhi(void) const {
218 return fNumberOfPadsPhi ; }
219 Int_t GetNumberOfPadsZ(void) const {
221 return fNumberOfPadsZ ; }
222 Int_t GetNumberOfModulesPhi(void) const {
224 return fNumberOfModulesPhi ; }
225 Int_t GetNumberOfModulesZ(void) const {
227 return fNumberOfModulesZ ; }
228 Float_t GetPCThickness(void) const {
230 return fPCThickness ; }
231 Float_t GetPhiDisplacement(void) const {
233 return fPhiDisplacement ; }
234 Float_t GetPPSDBoxSize(Int_t index) const {
236 return fPPSDBoxSize[index] ; }
237 Float_t GetPPSDModuleSize(Int_t index) const {
239 return fPPSDModuleSize[index] ; }
240 Float_t GetZDisplacement(void) const {
242 return fZDisplacement ; }
244 void SetLeadConverterThickness(Float_t e) ; // should ultimately disappear
248 AliPHOSGeometry(const Text_t* name, const Text_t* title="") : AliGeometry(name, title) {
249 // ctor only for internal usage (singleton)
252 void Init(void) ; // steering method for PHOS and CPV
253 void InitPHOS(void) ; // defines the various PHOS geometry parameters
254 void InitPPSD(void) ; // defines the various PPSD geometry parameters
258 void SetPHOSAngles() ; // calculates the PHOS modules PHI angle
260 ///////////// PHOS related parameters
262 Float_t fAirFilledBoxSize[3] ; // Air filled box containing one module
263 Float_t fAirThickness[3] ; // Space filled with air between the module box and the Textolit box
264 Float_t fCrystalSupportHeight ; // Height of the support of the crystal
265 Float_t fCrystalWrapThickness ; // Thickness of Tyvek wrapping the crystal
266 Float_t fCrystalHolderThickness ; // Titanium holder of the crystal
267 Float_t fGapBetweenCrystals ; // Total Gap between two adjacent crystals
268 Float_t fIPtoOuterCoverDistance ; // Distances from interaction point to outer cover
269 Float_t fIPtoCrystalSurface ; // Distances from interaction point to Xtal surface
270 Float_t fModuleBoxThickness ; // Thickness of the thermo insulating box containing one crystals module
271 Float_t fLowerTextolitPlateThickness ; // Thickness of lower textolit plate
272 Float_t fLowerThermoPlateThickness ; // Thickness of lower thermo insulating plate
273 Int_t fNModules ; // Number of modules constituing PHOS
274 Int_t fNPhi ; // Number of crystal units in X (phi) direction
275 Int_t fNZ ; // Number of crystal units in Z direction
276 Float_t fOuterBoxSize[3] ; // Size of the outer thermo insulating foam box
277 Float_t fOuterBoxThickness[3] ; // Thickness of the outer thermo insulating foam box
278 Float_t * fPHOSAngle ; //[fNModules] Position angles of modules
279 Float_t fPinDiodeSize[3] ; // Size of the PIN Diode
280 TObjArray * fRotMatrixArray ; // Liste of rotation matrices (one per phos module)
281 Float_t fSecondUpperPlateThickness ; // Thickness of upper polystyrene foam plate
282 Float_t fSupportPlateThickness ; // Thickness of the Aluminium support plate
283 Float_t fUpperCoolingPlateThickness ; // Thickness of the upper cooling plate
284 Float_t fUpperPlateThickness ; // Thickness of the uper thermo insulating foam plate
285 Float_t fTextolitBoxSize[3] ; // Size of the Textolit box inside the insulating foam box
286 Float_t fTextolitBoxThickness[3] ; // Thicknesses of th Textolit box
287 Float_t fXtlSize[3] ; // PWO4 crystal dimensions
290 ///////////// PPSD (PHOS PRE SHOWER DETECTOR) related parameters
292 Float_t fAnodeThickness ; // Thickness of the copper layer which makes the anode
293 Float_t fAvalancheGap ; // Thickness of the gas in the avalanche stage
294 Float_t fCathodeThickness ; // Thickeness of composite material ensuring rigidity of cathode
295 Float_t fCompositeThickness ; // Thickeness of composite material ensuring rigidity of anode
296 Float_t fConversionGap ; // Thickness of the gas in the conversion stage
297 Float_t fIPtoTopLidDistance ; // Distance from interaction point to top lid of PPSD
298 Float_t fLeadConverterThickness ; // Thickness of the Lead converter
299 Float_t fLeadToMicro2Gap ; // Thickness of the air gap between the Lead and Micromegas 2
300 Float_t fLidThickness ; // Thickness of top lid
301 Float_t fMicromegas1Thickness ; // Thickness of the first downstream Micromegas
302 Float_t fMicromegas2Thickness ; // Thickness of the second downstream Micromegas
303 Float_t fMicromegasWallThickness ; // Thickness of the Micromegas leak tight box
304 Float_t fMicro1ToLeadGap ; // Thickness of the air gap between Micromegas 1 and the Lead
305 Int_t fNumberOfPadsPhi ; // Number of pads on a micromegas module ;
306 Int_t fNumberOfPadsZ ; // Number of pads on a micromegas module ;
307 Int_t fNumberOfModulesPhi ; // Number of micromegas modules in phi
308 Int_t fNumberOfModulesZ ; // Number of micromegas modules in z
309 Float_t fPCThickness ; // Thickness of the printed circuit board of the anode
310 Float_t fPhiDisplacement ; // Phi displacement of micromegas1 with respect to micromegas2
311 Float_t fPPSDBoxSize[3] ; // Size of large box which contains PPSD; matches PHOS module size
312 Float_t fPPSDModuleSize[3] ; // Size of an individual micromegas module
313 Float_t fZDisplacement ; // Z displacement of micromegas1 with respect to micromegas2
315 static AliPHOSGeometry * fgGeom ; // pointer to the unique instance of the singleton
316 static Bool_t fgInit ; // Tells if geometry has been succesfully set up
318 ClassDef(AliPHOSGeometry,1) // PHOS geometry class
322 #endif // AliPHOSGEOMETRY_H