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
38 AliPHOSGeometry(const AliPHOSGeometry & geom) {
39 // cpy ctor requested by Coding Convention
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) ;
50 AliPHOSGeometry & operator = (AliPHOSGeometry const & rvalue) const {
51 // assignement operator requested by coding convention
54 return *(GetInstance()) ;
56 static TString fgDegre ; // a global for degree (deg)
57 static TString fgRadian ; // a global for radian (rad)
61 Bool_t AbsToRelNumbering(const Int_t AbsId, Int_t * RelId) ; // converts the absolute PHOS numbering to a relative
62 void EmcModuleCoverage(const Int_t m, Double_t & tm, Double_t & tM, Double_t & pm, Double_t & pM, Option_t * opt = fgRadian);
63 // calculates the angular coverage in theta and phi of a EMC module
64 void EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t * opt = fgRadian) ;
65 // calculates the angular coverage in theta and phi of a
66 // single crystal in a EMC module
67 void ImpactOnEmc(const Double_t theta, const Double_t phi, Int_t & ModuleNumber, Double_t & x, Double_t & z) ;
68 // calculates the impact coordinates of a neutral particle
69 // emitted in direction theta and phi in ALICE
70 void RelPosInModule(const Int_t * RelId, Float_t & y, Float_t & z) ; // gets the position of element (pad or Xtal) relative to
71 // center of PHOS module
72 void RelPosInAlice(const Int_t AbsId, TVector3 & pos) ; // gets the position of element (pad or Xtal) relative to
74 Bool_t RelToAbsNumbering(const Int_t * RelId, Int_t & AbsId) ; // converts the absolute PHOS numbering to a relative
77 ///////////// PHOS related parameters
79 Bool_t IsInitialized(void) const {
82 Float_t GetAirFilledBoxSize(Int_t index) const {
84 return fAirFilledBoxSize[index] ;}
85 Float_t GetCrystalHolderThickness(void) const {
87 return fCrystalHolderThickness ; }
88 Float_t GetCrystalSize(Int_t index) const {
90 return fXtlSize[index] ; }
91 Float_t GetCrystalSupportHeight(void) const {
93 return fCrystalSupportHeight ; }
94 Float_t GetCrystalWrapThickness(void) const {
96 return fCrystalWrapThickness;}
97 Float_t GetGapBetweenCrystals(void) const {
99 return fGapBetweenCrystals ; }
100 Float_t GetIPtoCrystalSurface(void) const {
102 return fIPtoCrystalSurface ; }
103 Float_t GetIPtoOuterCoverDistance(void) const {
105 return fIPtoOuterCoverDistance ; }
106 Float_t GetIPtoPpsdUp(void) const {
108 return (fIPtoOuterCoverDistance - fPPSDBoxSize[1] + fPPSDModuleSize[1]/2 ); }
109 Float_t GetIPtoPpsdLow(void) const {
111 return (fIPtoOuterCoverDistance - fPPSDModuleSize[1]/2 ); }
112 Float_t GetIPtoTopLidDistance(void) const {
114 return fIPtoTopLidDistance ; }
115 Float_t GetLowerThermoPlateThickness(void) const {
117 return fLowerThermoPlateThickness ; }
118 Float_t GetLowerTextolitPlateThickness(void) const {
120 return fLowerTextolitPlateThickness ; }
121 Float_t GetModuleBoxThickness(void) const {
123 return fModuleBoxThickness ; }
124 Int_t GetNPhi(void) const {
127 Int_t GetNZ(void) const {
130 Int_t GetNModules(void) const {
133 Float_t GetOuterBoxSize(Int_t index) const {
135 return fOuterBoxSize[index] ; }
136 Float_t GetOuterBoxThickness(Int_t index) const {
138 return fOuterBoxThickness[index] ; }
139 Float_t GetPHOSAngle(Int_t index) const {
141 return fPHOSAngle[index-1] ; }
142 Float_t GetPinDiodeSize(Int_t index) const {
144 return fPinDiodeSize[index] ; }
145 Float_t GetSecondUpperPlateThickness(void) const {
147 return fSecondUpperPlateThickness ; }
148 Float_t GetSupportPlateThickness(void) const {
150 return fSupportPlateThickness ; }
151 Float_t GetTextolitBoxSize(Int_t index) const {
153 return fTextolitBoxSize[index] ; }
154 Float_t GetTextolitBoxThickness(Int_t index) const {
156 return fTextolitBoxThickness[index]; }
157 Float_t GetUpperPlateThickness(void) const {
159 return fUpperPlateThickness ; }
160 Float_t GetUpperCoolingPlateThickness(void) const {
162 return fUpperCoolingPlateThickness ; }
165 ///////////// PPSD (PHOS PRE SHOWER DETECTOR) related parameters
168 Float_t GetAnodeThickness(void) const {
170 return fAnodeThickness ; }
171 Float_t GetAvalancheGap(void) const {
173 return fAvalancheGap ; }
174 Float_t GetCathodeThickness(void) const {
176 return fCathodeThickness ; }
177 Float_t GetCompositeThickness(void) const {
179 return fCompositeThickness ; }
180 Float_t GetConversionGap(void) const {
182 return fConversionGap ; }
183 Float_t GetLeadConverterThickness(void) const {
185 return fLeadConverterThickness ; }
186 Float_t GetLeadToMicro2Gap(void) const {
188 return fLeadToMicro2Gap ; }
189 Float_t GetLidThickness(void) const {
191 return fLidThickness ; }
192 Float_t GetMicromegas1Thickness(void) const {
194 return fMicromegas1Thickness ; }
195 Float_t GetMicromegas2Thickness(void) const {
197 return fMicromegas2Thickness ; }
198 Float_t GetMicromegasWallThickness(void) const {
200 return fMicromegasWallThickness ; }
201 Float_t GetMicro1ToLeadGap(void) const {
203 return fMicro1ToLeadGap ; }
204 Int_t GetNumberOfPadsPhi(void) const {
206 return fNumberOfPadsPhi ; }
207 Int_t GetNumberOfPadsZ(void) const {
209 return fNumberOfPadsZ ; }
210 Int_t GetNumberOfModulesPhi(void) const {
212 return fNumberOfModulesPhi ; }
213 Int_t GetNumberOfModulesZ(void) const {
215 return fNumberOfModulesZ ; }
216 Float_t GetPCThickness(void) const {
218 return fPCThickness ; }
219 Float_t GetPhiDisplacement(void) const {
221 return fPhiDisplacement ; }
222 Float_t GetPPSDBoxSize(Int_t index) const {
224 return fPPSDBoxSize[index] ; }
225 Float_t GetPPSDModuleSize(Int_t index) const {
227 return fPPSDModuleSize[index] ; }
228 Float_t GetZDisplacement(void) const {
230 return fZDisplacement ; }
232 void SetLeadConverterThickness(Float_t e) ; // should ultimately disappear
236 AliPHOSGeometry(const Text_t* name, const Text_t* title) : AliGeometry(name, title) {
237 // ctor only for internal usage (singleton)
240 void Init(void) ; // steering method for PHOS and CPV
241 void InitPHOS(void) ; // defines the various PHOS geometry parameters
242 void InitPPSD(void) ; // defines the various PPSD geometry parameters
246 void SetPHOSAngles() ; // calculates the PHOS modules PHI angle
248 ///////////// PHOS related parameters
250 Float_t fAirFilledBoxSize[3] ; // Air filled box containing one module
251 Float_t fAirThickness[3] ; // Space filled with air between the module box and the Textolit box
252 Float_t fCrystalSupportHeight ; // Height of the support of the crystal
253 Float_t fCrystalWrapThickness ; // Thickness of Tyvek wrapping the crystal
254 Float_t fCrystalHolderThickness ; // Titanium holder of the crystal
255 Float_t fGapBetweenCrystals ; // Total Gap between two adjacent crystals
256 Bool_t fInit ; // Tells if geometry has been succesfully set up
257 Float_t fIPtoOuterCoverDistance ; // Distances from interaction point to outer cover
258 Float_t fIPtoCrystalSurface ; // Distances from interaction point to Xtal surface
259 Float_t fModuleBoxThickness ; // Thickness of the thermo insulating box containing one crystals module
260 Float_t fLowerTextolitPlateThickness ; // Thickness of lower textolit plate
261 Float_t fLowerThermoPlateThickness ; // Thickness of lower thermo insulating plate
262 Int_t fNModules ; // Number of modules constituing PHOS
263 Int_t fNPhi ; // Number of crystal units in X (phi) direction
264 Int_t fNZ ; // Number of crystal units in Z direction
265 Float_t fOuterBoxSize[3] ; // Size of the outer thermo insulating foam box
266 Float_t fOuterBoxThickness[3] ; // Thickness of the outer thermo insulating foam box
267 Float_t * fPHOSAngle ; //[fNModules] Position angles of modules
268 Float_t fPinDiodeSize[3] ; // Size of the PIN Diode
269 TObjArray * fRotMatrixArray ; // Liste of rotation matrices (one per phos module)
270 Float_t fSecondUpperPlateThickness ; // Thickness of upper polystyrene foam plate
271 Float_t fSupportPlateThickness ; // Thickness of the Aluminium support plate
272 Float_t fUpperCoolingPlateThickness ; // Thickness of the upper cooling plate
273 Float_t fUpperPlateThickness ; // Thickness of the uper thermo insulating foam plate
274 Float_t fTextolitBoxSize[3] ; // Size of the Textolit box inside the insulating foam box
275 Float_t fTextolitBoxThickness[3] ; // Thicknesses of th Textolit box
276 Float_t fXtlSize[3] ; // PWO4 crystal dimensions
279 ///////////// PPSD (PHOS PRE SHOWER DETECTOR) related parameters
281 Float_t fAnodeThickness ; // Thickness of the copper layer which makes the anode
282 Float_t fAvalancheGap ; // Thickness of the gas in the avalanche stage
283 Float_t fCathodeThickness ; // Thickeness of composite material ensuring rigidity of cathode
284 Float_t fCompositeThickness ; // Thickeness of composite material ensuring rigidity of anode
285 Float_t fConversionGap ; // Thickness of the gas in the conversion stage
286 Float_t fIPtoTopLidDistance ; // Distance from interaction point to top lid of PPSD
287 Float_t fLeadConverterThickness ; // Thickness of the Lead converter
288 Float_t fLeadToMicro2Gap ; // Thickness of the air gap between the Lead and Micromegas 2
289 Float_t fLidThickness ; // Thickness of top lid
290 Float_t fMicromegas1Thickness ; // Thickness of the first downstream Micromegas
291 Float_t fMicromegas2Thickness ; // Thickness of the second downstream Micromegas
292 Float_t fMicromegasWallThickness ; // Thickness of the Micromegas leak tight box
293 Float_t fMicro1ToLeadGap ; // Thickness of the air gap between Micromegas 1 and the Lead
294 Int_t fNumberOfPadsPhi ; // Number of pads on a micromegas module ;
295 Int_t fNumberOfPadsZ ; // Number of pads on a micromegas module ;
296 Int_t fNumberOfModulesPhi ; // Number of micromegas modules in phi
297 Int_t fNumberOfModulesZ ; // Number of micromegas modules in z
298 Float_t fPCThickness ; // Thickness of the printed circuit board of the anode
299 Float_t fPhiDisplacement ; // Phi displacement of micromegas1 with respect to micromegas2
300 Float_t fPPSDBoxSize[3] ; // Size of large box which contains PPSD; matches PHOS module size
301 Float_t fPPSDModuleSize[3] ; // Size of an individual micromegas module
302 Float_t fZDisplacement ; // Z displacement of micromegas1 with respect to micromegas2
304 static AliPHOSGeometry * fgGeom ; // pointer to the unique instance of the singleton
306 ClassDef(AliPHOSGeometry,1) // PHOS geometry class
310 #endif // AliPHOSGEOMETRY_H