]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EMCAL/AliEMCALEMCGeometry.h
simplified time-dependent calibration corrections
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALEMCGeometry.h
CommitLineData
0c5b726e 1#ifndef ALIEMCALEMCGEOMETRY_H
2#define ALIEMCALEMCGEOMETRY_H
3/* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6/* $Id: AliEMCALEMCGeometry.h 26174 2008-05-26 20:27:16Z jklay $ */
7
8//_________________________________________________________________________
9// Geometry class for EMCAL : singleton
10// EMCAL consists of a layers of scintillator, and lead.
11//
12//*-- Author: Sahal Yacoob (LBL / UCT)
13//*-- and : Yves Schutz (Subatech)
14//*-- and : Aleksei Pavlinov (WSU) - shashlyk staff
15//*-- and : Gustavo Conesa: Add TRU mapping. TRU parameters still not fixed.
16//*-- and : Magali Estienne (Subatech): class added for new library for EMCALGeoUtils.par file
17
18// --- ROOT system ---
19#include <TMath.h>
20#include <TArrayD.h>
21#include <TNamed.h>
22class TString ;
23class TObjArray;
24class Riostream;
25
26// --- AliRoot header files ---
27class AliEMCALEMCGeometry;
28class AliEMCALShishKebabTrd1Module;
29
30class AliEMCALEMCGeometry : public TNamed {
31public:
32 AliEMCALEMCGeometry(); // default ctor only for internal usage (singleton)
33 AliEMCALEMCGeometry(const AliEMCALEMCGeometry& geom);
34 // ctor only for internal usage (singleton)
35 AliEMCALEMCGeometry(const Text_t* name, const Text_t* title);
36
37 virtual ~AliEMCALEMCGeometry(void);
38
39 AliEMCALEMCGeometry & operator = (const AliEMCALEMCGeometry & /*rvalue*/) {
40 // assignement operator requested by coding convention but not needed
41 Fatal("operator =", "not implemented");
42 return *this;
43 };
44
45 //////////
46 // General
47 //
48 Bool_t IsInitialized(void) const { return fgInit ; }
49 static const Char_t* GetDefaultGeometryName() {return fgkDefaultGeometryName;}
3d841a9f 50 void PrintGeometry(); //*MENU*
0c5b726e 51
3d841a9f 52 void Init(void); // initializes the parameters of EMCAL
0c5b726e 53 void CheckAdditionalOptions(); //
54 void DefineSamplingFraction(); // Jun 5, 2006
55
56 //////////////////////////////////////
57 // Return EMCAL geometrical parameters
58 //
59
60 TString GetGeoName() const {return fGeoName;}
61 const Char_t* GetNameOfEMCALEnvelope() const { const Char_t* env = "XEN1"; return env ;}
62 Float_t GetArm1PhiMin() const { return fArm1PhiMin ; }
63 Float_t GetArm1PhiMax() const { return fArm1PhiMax ; }
64 Float_t GetArm1EtaMin() const { return fArm1EtaMin;}
65 Float_t GetArm1EtaMax() const { return fArm1EtaMax;}
66 Float_t GetIPDistance() const { return fIPDistance;}
67 Float_t GetEnvelop(Int_t index) const { return fEnvelop[index] ; }
68 Float_t GetShellThickness() const { return fShellThickness ; }
69 Float_t GetZLength() const { return fZLength ; }
70 Int_t GetNECLayers() const {return fNECLayers ;}
71 Int_t GetNZ() const {return fNZ ;}
72 Int_t GetNEta() const {return fNZ ;}
73 Int_t GetNPhi() const {return fNPhi ;}
74 Float_t GetECPbRadThick()const {return fECPbRadThickness;}
75 Float_t GetECScintThick() const {return fECScintThick;}
76 Float_t GetSampling() const {return fSampling ; }
77 Int_t GetNumberOfSuperModules() const {return fNumberOfSuperModules;}
78 Float_t GetfPhiGapForSuperModules() const {return fPhiGapForSM;}
79 Float_t GetPhiModuleSize() const {return fPhiModuleSize;}
80 Float_t GetEtaModuleSize() const {return fEtaModuleSize;}
81 Float_t GetFrontSteelStrip() const {return fFrontSteelStrip;}
82 Float_t GetLateralSteelStrip() const {return fLateralSteelStrip;}
83 Float_t GetPassiveScintThick() const {return fPassiveScintThick;}
84 Float_t GetPhiTileSize() const {return fPhiTileSize;}
85 Float_t GetEtaTileSize() const {return fEtaTileSize;}
86 Int_t GetNPhiSuperModule() const {return fNPhiSuperModule;}
87 Int_t GetNPHIdiv() const {return fNPHIdiv ;}
88 Int_t GetNETAdiv() const {return fNETAdiv ;}
89 Int_t GetNCells() const {return fNCells;}
90 Float_t GetLongModuleSize() const {return fLongModuleSize;}
91 Float_t GetTrd1Angle() const {return fTrd1Angle;}
92 Float_t Get2Trd1Dx2() const {return f2Trd1Dx2;}
93 Float_t GetEtaMaxOfTRD1() const {return fEtaMaxOfTRD1;}
3d841a9f 94 Float_t GetTrd1AlFrontThick() const { return fTrd1AlFrontThick;}
95 Float_t GetTrd1BondPaperThick() const {return fTrd1BondPaperThick;}
0c5b726e 96 // --
97 Int_t GetNCellsInSupMod() const {return fNCellsInSupMod;}
98 Int_t GetNCellsInModule() const {return fNCellsInModule; }
99 Int_t GetKey110DEG() const {return fKey110DEG;}
100 Int_t GetILOSS() const {return fILOSS;}
101 Int_t GetIHADR() const {return fIHADR;}
102 // For gamma(Jet) trigger simulations
103 Int_t GetNTRU() const {return fNTRUEta*fNTRUPhi ; }
104 Int_t GetNTRUEta() const {return fNTRUEta ; }
105 Int_t GetNTRUPhi() const {return fNTRUPhi ; }
106 Int_t GetNEtaSubOfTRU() const {return fNEtaSubOfTRU;}
107 Int_t GetNModulesInTRU() const {return fNModulesInTRUEta*fNModulesInTRUPhi; }
108 Int_t GetNModulesInTRUEta() const {return fNModulesInTRUEta ; }
109 Int_t GetNModulesInTRUPhi() const {return fNModulesInTRUPhi ; }
110
111 // --
112 Float_t GetDeltaEta() const {return (fArm1EtaMax-fArm1EtaMin)/ ((Float_t)fNZ);}
113 Float_t GetDeltaPhi() const {return (fArm1PhiMax-fArm1PhiMin)/ ((Float_t)fNPhi);}
114 Int_t GetNTowers() const {return fNPhi * fNZ ;}
115 //
116 Double_t GetPhiCenterOfSM(Int_t nsupmod) const;
117 Float_t *GetSuperModulesPars() {return fParSM;}
118 //
119 Bool_t GetPhiBoundariesOfSM (Int_t nSupMod, Double_t &phiMin, Double_t &phiMax) const;
120 Bool_t GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const;
121 //
122 // Local Coordinates of SM
123/* TArrayD GetCentersOfCellsEtaDir() const {return fCentersOfCellsEtaDir;} // size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm) */
124/* TArrayD GetCentersOfCellsXDir() const {return fCentersOfCellsXDir;} // size fNEta*fNETAdiv (for TRD1 only) ( x in SM, in cm) */
125/* TArrayD GetCentersOfCellsPhiDir() const {return fCentersOfCellsPhiDir;} // size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm) */
126/* // */
127/* TArrayD GetEtaCentersOfCells() const {return fEtaCentersOfCells;} // [fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0); eta depend from phi position; */
128/* TArrayD GetPhiCentersOfCells() const {return fPhiCentersOfCells;} // [fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.) */
129
130 static int ParseString(const TString &topt, TObjArray &Opt) ;
131
132 ///////////////////////////////
133 //Geometry data member setters
134 //
135 void SetNZ(Int_t nz) { fNZ= nz;
136 printf("SetNZ: Number of modules in Z set to %d", fNZ) ; }
137 void SetNPhi(Int_t nphi) { fNPhi= nphi;
138 printf("SetNPhi: Number of modules in Phi set to %d", fNPhi) ; }
139 void SetNTRUEta(Int_t ntru) {fNTRUEta = ntru;
140 printf("SetNTRU: Number of TRUs per SuperModule in Etaset to %d", fNTRUEta) ;}
141 void SetNTRUPhi(Int_t ntru) {fNTRUPhi = ntru;
142 printf("SetNTRU: Number of TRUs per SuperModule in Phi set to %d", fNTRUPhi) ;}
143 void SetSampling(Float_t samp) { fSampling = samp;
144 printf("SetSampling: Sampling factor set to %f", fSampling) ; }
145
146 ///////////////////
147 // useful utilities
148 //
149 Float_t AngleFromEta(Float_t eta) const { // returns theta in radians for a given pseudorapidity
150 return 2.0*TMath::ATan(TMath::Exp(-eta));
151 }
152 Float_t ZFromEtaR(Float_t r,Float_t eta) const { // returns z in for a given
153 // pseudorapidity and r=sqrt(x*x+y*y).
154 return r/TMath::Tan(AngleFromEta(eta));
155 }
156
157 //////////////////////////////////////////////////
158 // Obsolete methods to be thrown out when feasible
0c5b726e 159 Float_t GetGap2Active() const {return fGap2Active ;}
160 Float_t GetSteelFrontThickness() const { return fSteelFrontThick;}
161 Float_t GetTrd2AngleY()const {return fTrd2AngleY;}
162 Float_t Get2Trd2Dy2() const {return f2Trd2Dy2;}
163 Float_t GetTubsR() const {return fTubsR;}
164 Float_t GetTubsTurnAngle() const {return fTubsTurnAngle;}
3d841a9f 165 // Float_t GetIP2ECASection() const { return ( GetIPDistance() + GetAlFrontThickness()
166 // + GetGap2Active() ) ; }
0c5b726e 167 //////////////////////////////////////////////////
168
169 static Bool_t fgInit; // Tells if geometry has been succesfully set up.
170 static const Char_t* fgkDefaultGeometryName; // Default name of geometry
171
172private:
173
174 // Member data
175
176 TString fGeoName; //geometry name
177
178 TObjArray *fArrayOpts; //! array of geometry options
179 const char *fkAdditionalOpts[6]; //! some additional options for the geometry type and name
180 int fNAdditionalOpts; //! size of additional options parameter
181
182 Float_t fECPbRadThickness; // cm, Thickness of the Pb radiators
183 Float_t fECScintThick; // cm, Thickness of the scintillators
184 Int_t fNECLayers; // number of scintillator layers
185
186 Float_t fArm1PhiMin; // Minimum angular position of EMCAL in Phi (degrees)
187 Float_t fArm1PhiMax; // Maximum angular position of EMCAL in Phi (degrees)
188 Float_t fArm1EtaMin; // Minimum pseudorapidity position of EMCAL in Eta
189 Float_t fArm1EtaMax; // Maximum pseudorapidity position of EMCAL in Eta
190
191 // Geometry Parameters
192 Float_t fEnvelop[3]; // the GEANT TUB for the detector
193 Float_t fIPDistance; // Radial Distance of the inner surface of the EMCAL
194 Float_t fShellThickness; // Total thickness in (x,y) direction
195 Float_t fZLength; // Total length in z direction
196 Int_t fNZ; // Number of Towers in the Z direction
197 Int_t fNPhi; // Number of Towers in the PHI direction
198 Float_t fSampling; // Sampling factor
199
200 // Shish-kebab option - 23-aug-04 by PAI; COMPACT, TWIST, TRD1 and TRD2
201 Int_t fNumberOfSuperModules; // default is 12 = 6 * 2
202 Float_t fFrontSteelStrip; // 13-may-05
203 Float_t fLateralSteelStrip; // 13-may-05
204 Float_t fPassiveScintThick; // 13-may-05
205 Float_t fPhiModuleSize; // Phi -> X
206 Float_t fEtaModuleSize; // Eta -> Y
207 Float_t fPhiTileSize; // Size of phi tile
208 Float_t fEtaTileSize; // Size of eta tile
209 Float_t fLongModuleSize; // Size of long module
210 Int_t fNPhiSuperModule; // 6 - number supermodule in phi direction
211 Int_t fNPHIdiv; // number phi divizion of module
212 Int_t fNETAdiv; // number eta divizion of module
213 //
214 Int_t fNCells; // number of cells in calo
215 Int_t fNCellsInSupMod; // number cell in super module
216 Int_t fNCellsInModule; // number cell in module)
217 //TRU parameters
218 Int_t fNTRUEta ; // Number of TRUs per module in eta
219 Int_t fNTRUPhi ; // Number of TRUs per module in phi
220 Int_t fNModulesInTRUEta; // Number of modules per TRU in eta
221 Int_t fNModulesInTRUPhi; // Number of modules per TRU in phi
222 Int_t fNEtaSubOfTRU; // Number of eta (z) subregiohi
223
224 // TRD1 options - 30-sep-04
225 Float_t fTrd1Angle; // angle in x-z plane (in degree)
226 Float_t f2Trd1Dx2; // 2*dx2 for TRD1
227 Float_t fPhiGapForSM; // Gap betweeen supermodules in phi direction
228 Int_t fKey110DEG; // for calculation abs cell id; 19-oct-05
229 TArrayD fPhiBoundariesOfSM; // phi boundaries of SM in rad; size is fNumberOfSuperModules;
230 TArrayD fPhiCentersOfSM; // phi of centers of SMl size is fNumberOfSuperModules/2
231 Float_t fEtaMaxOfTRD1; // max eta in case of TRD1 geometry (see AliEMCALShishKebabTrd1Module)
3d841a9f 232 // Oct 26,2010
233 Float_t fTrd1AlFrontThick; // Thickness of the Al front plate
234 Float_t fTrd1BondPaperThick; // Thickness of the Bond Paper sheet
0c5b726e 235 // Local Coordinates of SM
236 TArrayD fCentersOfCellsEtaDir; // size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm)
237 TArrayD fCentersOfCellsXDir; // size fNEta*fNETAdiv (for TRD1 only) ( x in SM, in cm)
238 TArrayD fCentersOfCellsPhiDir; // size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm)
239 //
240 TArrayD fEtaCentersOfCells; // [fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0); eta depend from phi position;
241 TArrayD fPhiCentersOfCells; // [fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.)
242 // Move from AliEMCALv0 - Feb 19, 2006
243 TList *fShishKebabTrd1Modules; //! list of modules
244 // Local coordinates of SM for TRD1
245 Float_t fParSM[3]; // SM sizes as in GEANT (TRD1)
246
247 Int_t fILOSS; // Options for Geant (MIP business) - will call in AliEMCAL
248 Int_t fIHADR; // Options for Geant (MIP business) - will call in AliEMCAL
249
250 ////////////////////////////////////////////////////////////
251 //Obsolete member data that will be thrown out when feasible
252 //
0c5b726e 253 Float_t fGap2Active; // Gap between the envelop and the active material
254 Float_t fSteelFrontThick; // Thickness of the front stell face of the support box - 9-sep-04
255 // TRD2 options - 27-jan-07
256 Float_t fTrd2AngleY; // angle in y-z plane (in degree)
257 Float_t f2Trd2Dy2; // 2*dy2 for TRD2
258 Float_t fEmptySpace; // 2mm om fred drawing
259 // Super module as TUBS
260 Float_t fTubsR; // radius of tubs
261 Float_t fTubsTurnAngle; // turn angle of tubs in degree
262
263 ///////////////////////////////////////////////////////////
264
3d841a9f 265 ClassDef(AliEMCALEMCGeometry, 2) // EMCAL geometry class
0c5b726e 266};
267
268#endif // AliEMCALEMCGEOMETRY_H