Added Copy ctor and assignment operator to fulfill Coding Conventions
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGeometry.h
CommitLineData
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 30class AliPHOSGeometry : public AliGeometry {
31
32public:
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
6c370def 50 AliPHOSGeometry & operator = (AliPHOSGeometry const & rvalue) const {
51 // assignement operator requested by coding convention
52 // but not needed
53 assert(0==1) ;
54 return *(GetInstance()) ;
55 }
56 static TString fgDegre ; // a global for degree (deg)
57 static TString fgRadian ; // a global for radian (rad)
daa2ae2f 58
59 // General
60
b2a60966 61 Bool_t AbsToRelNumbering(const Int_t AbsId, Int_t * RelId) ; // converts the absolute PHOS numbering to a relative
6c370def 62 void EmcModuleCoverage(const Int_t m, Double_t & tm, Double_t & tM, Double_t & pm, Double_t & pM, Option_t * opt = fgRadian);
b2a60966 63 // calculates the angular coverage in theta and phi of a EMC module
6c370def 64 void EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t * opt = fgRadian) ;
9f616d61 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
daa2ae2f 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
73 // Alice
74 Bool_t RelToAbsNumbering(const Int_t * RelId, Int_t & AbsId) ; // converts the absolute PHOS numbering to a relative
c198e326 75
daa2ae2f 76
77 ///////////// PHOS related parameters
78
6c370def 79 Bool_t IsInitialized(void) const {
80 //
81 return fInit ; }
82 Float_t GetAirFilledBoxSize(Int_t index) const {
83 // Getter
84 return fAirFilledBoxSize[index] ;}
85 Float_t GetCrystalHolderThickness(void) const {
86 // Getter
87 return fCrystalHolderThickness ; }
88 Float_t GetCrystalSize(Int_t index) const {
89 // Getter
90 return fXtlSize[index] ; }
91 Float_t GetCrystalSupportHeight(void) const {
92 // Getter
93 return fCrystalSupportHeight ; }
94 Float_t GetCrystalWrapThickness(void) const {
95 // Getter
96 return fCrystalWrapThickness;}
97 Float_t GetGapBetweenCrystals(void) const {
98 // Getter
99 return fGapBetweenCrystals ; }
100 Float_t GetIPtoCrystalSurface(void) const {
101 // Getter
102 return fIPtoCrystalSurface ; }
103 Float_t GetIPtoOuterCoverDistance(void) const {
104 // Getter
105 return fIPtoOuterCoverDistance ; }
106 Float_t GetIPtoPpsdUp(void) const {
107 // Getter
108 return (fIPtoOuterCoverDistance - fPPSDBoxSize[1] + fPPSDModuleSize[1]/2 ); }
109 Float_t GetIPtoPpsdLow(void) const {
110 // Getter
111 return (fIPtoOuterCoverDistance - fPPSDModuleSize[1]/2 ); }
112 Float_t GetIPtoTopLidDistance(void) const {
113 // Getter
114 return fIPtoTopLidDistance ; }
115 Float_t GetLowerThermoPlateThickness(void) const {
116 // Getter
117 return fLowerThermoPlateThickness ; }
118 Float_t GetLowerTextolitPlateThickness(void) const {
119 // Getter
120 return fLowerTextolitPlateThickness ; }
121 Float_t GetModuleBoxThickness(void) const {
122 // Getter
123 return fModuleBoxThickness ; }
124 Int_t GetNPhi(void) const {
125 // Getter
126 return fNPhi ; }
127 Int_t GetNZ(void) const {
128 // Getter
129 return fNZ ; }
130 Int_t GetNModules(void) const {
131 // Getter
132 return fNModules ; }
133 Float_t GetOuterBoxSize(Int_t index) const {
134 // Getter
135 return fOuterBoxSize[index] ; }
136 Float_t GetOuterBoxThickness(Int_t index) const {
137 // Getter
138 return fOuterBoxThickness[index] ; }
139 Float_t GetPHOSAngle(Int_t index) const {
140 // Getter
141 return fPHOSAngle[index-1] ; }
142 Float_t GetPinDiodeSize(Int_t index) const {
143 // Getter
144 return fPinDiodeSize[index] ; }
145 Float_t GetSecondUpperPlateThickness(void) const {
146 // Getter
147 return fSecondUpperPlateThickness ; }
148 Float_t GetSupportPlateThickness(void) const {
149 // Getter
150 return fSupportPlateThickness ; }
151 Float_t GetTextolitBoxSize(Int_t index) const {
152 // Getter
153 return fTextolitBoxSize[index] ; }
154 Float_t GetTextolitBoxThickness(Int_t index) const {
155 // Getter
156 return fTextolitBoxThickness[index]; }
157 Float_t GetUpperPlateThickness(void) const {
158 // Getter
159 return fUpperPlateThickness ; }
160 Float_t GetUpperCoolingPlateThickness(void) const {
161 // Getter
162 return fUpperCoolingPlateThickness ; }
daa2ae2f 163
d15a28e7 164
daa2ae2f 165 ///////////// PPSD (PHOS PRE SHOWER DETECTOR) related parameters
166
167
6c370def 168 Float_t GetAnodeThickness(void) const {
169 // Getter
170 return fAnodeThickness ; }
171 Float_t GetAvalancheGap(void) const {
172 // Getter
173 return fAvalancheGap ; }
174 Float_t GetCathodeThickness(void) const {
175 // Getter
176 return fCathodeThickness ; }
177 Float_t GetCompositeThickness(void) const {
178 // Getter
179 return fCompositeThickness ; }
180 Float_t GetConversionGap(void) const {
181 // Getter
182 return fConversionGap ; }
183 Float_t GetLeadConverterThickness(void) const {
184 // Getter
185 return fLeadConverterThickness ; }
186 Float_t GetLeadToMicro2Gap(void) const {
187 // Getter
188 return fLeadToMicro2Gap ; }
189 Float_t GetLidThickness(void) const {
190 // Getter
191 return fLidThickness ; }
192 Float_t GetMicromegas1Thickness(void) const {
193 // Getter
194 return fMicromegas1Thickness ; }
195 Float_t GetMicromegas2Thickness(void) const {
196 // Getter
197 return fMicromegas2Thickness ; }
198 Float_t GetMicromegasWallThickness(void) const {
199 // Getter
200 return fMicromegasWallThickness ; }
201 Float_t GetMicro1ToLeadGap(void) const {
202 // Getter
203 return fMicro1ToLeadGap ; }
204 Int_t GetNumberOfPadsPhi(void) const {
205 // Getter
206 return fNumberOfPadsPhi ; }
207 Int_t GetNumberOfPadsZ(void) const {
208 // Getter
209 return fNumberOfPadsZ ; }
210 Int_t GetNumberOfModulesPhi(void) const {
211 // Getter
212 return fNumberOfModulesPhi ; }
213 Int_t GetNumberOfModulesZ(void) const {
214 // Getter
215 return fNumberOfModulesZ ; }
216 Float_t GetPCThickness(void) const {
217 // Getter
218 return fPCThickness ; }
219 Float_t GetPhiDisplacement(void) const {
220 // Getter
221 return fPhiDisplacement ; }
222 Float_t GetPPSDBoxSize(Int_t index) const {
223 // Getter
224 return fPPSDBoxSize[index] ; }
225 Float_t GetPPSDModuleSize(Int_t index) const {
226 // Getter
227 return fPPSDModuleSize[index] ; }
228 Float_t GetZDisplacement(void) const {
229 // Getter
230 return fZDisplacement ; }
2f3366b6 231
232 void SetLeadConverterThickness(Float_t e) ; // should ultimately disappear
daa2ae2f 233
6c370def 234protected:
235
236 AliPHOSGeometry(const Text_t* name, const Text_t* title) : AliGeometry(name, title) {
237 // ctor only for internal usage (singleton)
238 Init() ;
239 }
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
243
daa2ae2f 244private:
6c370def 245
246 void SetPHOSAngles() ; // calculates the PHOS modules PHI angle
daa2ae2f 247
248 ///////////// PHOS related parameters
249
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
4697edca 267 Float_t * fPHOSAngle ; //[fNModules] Position angles of modules
daa2ae2f 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
277
278
279 ///////////// PPSD (PHOS PRE SHOWER DETECTOR) related parameters
280
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
303
88714635 304 static AliPHOSGeometry * fgGeom ; // pointer to the unique instance of the singleton
daa2ae2f 305
b2a60966 306 ClassDef(AliPHOSGeometry,1) // PHOS geometry class
daa2ae2f 307
308} ;
309
310#endif // AliPHOSGEOMETRY_H