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 */
6 /* $Id: AliEMCALEMCGeometry.h 26174 2008-05-26 20:27:16Z jklay $ */
8 //_________________________________________________________________________
9 // Geometry class for EMCAL : singleton
10 // EMCAL consists of a layers of scintillator, and lead.
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 //*-- and : Adapted for DCAL by M.L. Wang CCNU Wuhan & Subatech Oct-23-2009
19 // --- ROOT system ---
27 // --- AliRoot header files ---
28 class AliEMCALEMCGeometry;
29 class AliEMCALShishKebabTrd1Module;
31 class AliEMCALEMCGeometry : public TNamed {
33 enum fEMCSMType { kEMCAL_Standard = 0, kEMCAL_Half = 1, kEMCAL_3rd = 2, kDCAL_Standard = 3, kDCAL_Ext= 4 }; // possible SM Type
34 AliEMCALEMCGeometry(); // default ctor only for internal usage (singleton)
35 AliEMCALEMCGeometry(const AliEMCALEMCGeometry& geom);
36 // ctor only for internal usage (singleton)
37 AliEMCALEMCGeometry(const Text_t* name, const Text_t* title,
38 const Text_t* mcname="", const Text_t* mctitle="");
40 virtual ~AliEMCALEMCGeometry(void);
42 AliEMCALEMCGeometry & operator = (const AliEMCALEMCGeometry & /*rvalue*/) {
43 // assignement operator requested by coding convention but not needed
44 Fatal("operator =", "not implemented");
51 Bool_t IsInitialized(void) const { return fgInit ; }
52 static const Char_t* GetDefaultGeometryName() {return fgkDefaultGeometryName;}
53 void PrintGeometry(); //*MENU*
55 void Init(const Text_t* mcname="", const Text_t* mctitle=""); // initializes the parameters of EMCAL
56 void CheckAdditionalOptions(); //
57 void DefineSamplingFraction(const Text_t* mcname="", const Text_t* mctitle="");
59 //////////////////////////////////////
60 // Return EMCAL geometrical parameters
63 TString GetGeoName() const {return fGeoName;}
64 Int_t * GetEMCSystem() const {return fEMCSMSystem;}
65 const Char_t* GetNameOfEMCALEnvelope() const { const Char_t* env = "XEN1"; return env ;}
66 Float_t GetArm1PhiMin() const { return fArm1PhiMin ; }
67 Float_t GetArm1PhiMax() const { return fArm1PhiMax ; }
68 Float_t GetArm1EtaMin() const { return fArm1EtaMin;}
69 Float_t GetArm1EtaMax() const { return fArm1EtaMax;}
70 Float_t GetIPDistance() const { return fIPDistance;}
71 Float_t GetEnvelop(Int_t index) const { return fEnvelop[index] ; }
72 Float_t GetShellThickness() const { return fShellThickness ; }
73 Float_t GetZLength() const { return fZLength ; }
74 Float_t GetDCALInnerEdge() const { return fDCALInnerEdge ; }
75 Float_t GetDCALPhiMin() const { return fDCALPhiMin ; }
76 Float_t GetDCALPhiMax() const { return fDCALPhiMax ; }
77 Float_t GetDCALInnerExtandedEta() const { return fDCALInnerExtandedEta ; }
78 Float_t GetEMCALPhiMax() const { return fEMCALPhiMax ; }
79 Float_t GetDCALStandardPhiMax() const { return fDCALStandardPhiMax ; }
80 Int_t GetNECLayers() const {return fNECLayers ;}
81 Int_t GetNZ() const {return fNZ ;}
82 Int_t GetNEta() const {return fNZ ;}
83 Int_t GetNPhi() const {return fNPhi ;}
84 Float_t GetECPbRadThick()const {return fECPbRadThickness;}
85 Float_t GetECScintThick() const {return fECScintThick;}
86 Float_t GetSampling() const {return fSampling ; }
87 Int_t GetNumberOfSuperModules() const {return fNumberOfSuperModules;}
88 Float_t GetPhiGapForSuperModules() const {return fPhiGapForSM;}
89 Float_t GetPhiModuleSize() const {return fPhiModuleSize;}
90 Float_t GetEtaModuleSize() const {return fEtaModuleSize;}
91 Float_t GetFrontSteelStrip() const {return fFrontSteelStrip;}
92 Float_t GetLateralSteelStrip() const {return fLateralSteelStrip;}
93 Float_t GetPassiveScintThick() const {return fPassiveScintThick;}
94 Float_t GetPhiTileSize() const {return fPhiTileSize;}
95 Float_t GetEtaTileSize() const {return fEtaTileSize;}
96 Float_t GetPhiSuperModule() const {return fPhiSuperModule;}
97 Int_t GetNPhiSuperModule() const {return fNPhiSuperModule;}
98 Int_t GetNPHIdiv() const {return fNPHIdiv ;}
99 Int_t GetNETAdiv() const {return fNETAdiv ;}
100 Int_t GetNCells() const {return fNCells;}
101 Float_t GetLongModuleSize() const {return fLongModuleSize;}
102 Float_t GetTrd1Angle() const {return fTrd1Angle;}
103 Float_t Get2Trd1Dx2() const {return f2Trd1Dx2;}
104 Float_t GetEtaMaxOfTRD1() const {return fEtaMaxOfTRD1;}
105 Float_t GetTrd1AlFrontThick() const { return fTrd1AlFrontThick;}
106 Float_t GetTrd1BondPaperThick() const {return fTrd1BondPaperThick;}
108 Int_t GetNCellsInSupMod() const {return fNCellsInSupMod;}
109 Int_t GetNCellsInModule() const {return fNCellsInModule; }
110 Int_t GetKey110DEG() const {return fKey110DEG;}
111 Int_t GetnSupModInDCAL() const {return fnSupModInDCAL;}
112 Int_t GetILOSS() const {return fILOSS;}
113 Int_t GetIHADR() const {return fIHADR;}
116 Float_t GetDeltaEta() const {return (fArm1EtaMax-fArm1EtaMin)/ ((Float_t)fNZ);}
117 Float_t GetDeltaPhi() const {return (fArm1PhiMax-fArm1PhiMin)/ ((Float_t)fNPhi);}
118 Int_t GetNTowers() const {return fNPhi * fNZ ;}
120 Double_t GetPhiCenterOfSM(Int_t nsupmod) const;
121 Double_t GetPhiCenterOfSMSec(Int_t nsupmod) const;
122 Float_t GetSuperModulesPar(Int_t ipar) const {return fParSM[ipar];}
123 Int_t GetSMType(Int_t nSupMod) const { if( nSupMod > GetNumberOfSuperModules() ) return -1;
124 return fEMCSMSystem[nSupMod] ; }
126 Bool_t GetPhiBoundariesOfSM (Int_t nSupMod, Double_t &phiMin, Double_t &phiMax) const;
127 Bool_t GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const;
129 // Local Coordinates of SM
130 /* TArrayD GetCentersOfCellsEtaDir() const {return fCentersOfCellsEtaDir;} // size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm) */
131 /* TArrayD GetCentersOfCellsXDir() const {return fCentersOfCellsXDir;} // size fNEta*fNETAdiv (for TRD1 only) ( x in SM, in cm) */
132 /* TArrayD GetCentersOfCellsPhiDir() const {return fCentersOfCellsPhiDir;} // size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm) */
134 /* TArrayD GetEtaCentersOfCells() const {return fEtaCentersOfCells;} // [fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0); eta depend from phi position; */
135 /* TArrayD GetPhiCentersOfCells() const {return fPhiCentersOfCells;} // [fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.) */
137 static int ParseString(const TString &topt, TObjArray &Opt) ;
139 ///////////////////////////////
140 //Geometry data member setters
142 void SetNZ(Int_t nz) { fNZ= nz;
143 printf("SetNZ: Number of modules in Z set to %d", fNZ) ; }
144 void SetNPhi(Int_t nphi) { fNPhi= nphi;
145 printf("SetNPhi: Number of modules in Phi set to %d", fNPhi) ; }
146 void SetSampling(Float_t samp) { fSampling = samp;
147 printf("SetSampling: Sampling factor set to %f", fSampling) ; }
152 Float_t AngleFromEta(Float_t eta) const { // returns theta in radians for a given pseudorapidity
153 return 2.0*TMath::ATan(TMath::Exp(-eta));
155 Float_t ZFromEtaR(Float_t r,Float_t eta) const { // returns z in for a given
156 // pseudorapidity and r=sqrt(x*x+y*y).
157 return r/TMath::Tan(AngleFromEta(eta));
160 //////////////////////////////////////////////////
161 // Obsolete methods to be thrown out when feasible
162 Float_t GetGap2Active() const {return fGap2Active ;}
163 Float_t GetSteelFrontThickness() const { return fSteelFrontThick;}
164 Float_t GetTrd2AngleY()const {return fTrd2AngleY;}
165 Float_t Get2Trd2Dy2() const {return f2Trd2Dy2;}
166 Float_t GetTubsR() const {return fTubsR;}
167 Float_t GetTubsTurnAngle() const {return fTubsTurnAngle;}
168 // Float_t GetIP2ECASection() const { return ( GetIPDistance() + GetAlFrontThickness()
169 // + GetGap2Active() ) ; }
170 //////////////////////////////////////////////////
171 static const Char_t* fgkDefaultGeometryName; // Default name of geometry
172 static Bool_t fgInit; // Tells if geometry has been succesfully set up.
178 TString fGeoName; //geometry name
179 Int_t *fEMCSMSystem; // geometry structure
181 TObjArray *fArrayOpts; //! array of geometry options
182 const char *fkAdditionalOpts[6]; //! some additional options for the geometry type and name
183 int fNAdditionalOpts; //! size of additional options parameter
185 Float_t fECPbRadThickness; // cm, Thickness of the Pb radiators
186 Float_t fECScintThick; // cm, Thickness of the scintillators
187 Int_t fNECLayers; // number of scintillator layers
189 Float_t fArm1PhiMin; // Minimum angular position of EMCAL in Phi (degrees)
190 Float_t fArm1PhiMax; // Maximum angular position of EMCAL in Phi (degrees)
191 Float_t fArm1EtaMin; // Minimum pseudorapidity position of EMCAL in Eta
192 Float_t fArm1EtaMax; // Maximum pseudorapidity position of EMCAL in Eta
194 // Geometry Parameters
195 Float_t fEnvelop[3]; // the GEANT TUB for the detector
196 Float_t fIPDistance; // Radial Distance of the inner surface of the EMCAL
197 Float_t fShellThickness; // Total thickness in (x,y) direction
198 Float_t fZLength; // Total length in z direction
199 Float_t fDCALInnerEdge; // Inner edge for DCAL
200 Float_t fDCALPhiMin; // Minimum angular position of DCAL in Phi (degrees)
201 Float_t fDCALPhiMax; // Maximum angular position of DCAL in Phi (degrees)
202 Float_t fEMCALPhiMax; // Maximum angular position of EMCAL in Phi (degrees)
203 Float_t fDCALStandardPhiMax; // special edge for the case that DCAL contian extension
204 Float_t fDCALInnerExtandedEta; // DCAL inner edge in Eta (with some extension)
205 Int_t fNZ; // Number of Towers in the Z direction
206 Int_t fNPhi; // Number of Towers in the PHI direction
207 Float_t fSampling; // Sampling factor
209 // Shish-kebab option - 23-aug-04 by PAI; COMPACT, TWIST, TRD1 and TRD2
210 Int_t fNumberOfSuperModules; // default is 12 = 6 * 2
211 Float_t fFrontSteelStrip; // 13-may-05
212 Float_t fLateralSteelStrip; // 13-may-05
213 Float_t fPassiveScintThick; // 13-may-05
214 Float_t fPhiModuleSize; // Phi -> X
215 Float_t fEtaModuleSize; // Eta -> Y
216 Float_t fPhiTileSize; // Size of phi tile
217 Float_t fEtaTileSize; // Size of eta tile
218 Float_t fLongModuleSize; // Size of long module
219 Float_t fPhiSuperModule; // Phi of normal supermodule (20, in degree)
220 Int_t fNPhiSuperModule; // 9 - number supermodule in phi direction
221 Int_t fNPHIdiv; // number phi divizion of module
222 Int_t fNETAdiv; // number eta divizion of module
224 Int_t fNCells; // number of cells in calo
225 Int_t fNCellsInSupMod; // number cell in super module
226 Int_t fNCellsInModule; // number cell in module)
228 // TRD1 options - 30-sep-04
229 Float_t fTrd1Angle; // angle in x-z plane (in degree)
230 Float_t f2Trd1Dx2; // 2*dx2 for TRD1
231 Float_t fPhiGapForSM; // Gap betweeen supermodules in phi direction
232 Int_t fKey110DEG; // for calculation abs cell id; 19-oct-05
233 Int_t fnSupModInDCAL; // for calculation abs cell id;
234 TArrayD fPhiBoundariesOfSM; // phi boundaries of SM in rad; size is fNumberOfSuperModules;
235 TArrayD fPhiCentersOfSM; // phi of centers of SM; size is fNumberOfSuperModules/2
236 TArrayD fPhiCentersOfSMSec; // phi of centers of section where SM lies; size is fNumberOfSuperModules/2
237 Float_t fEtaMaxOfTRD1; // max eta in case of TRD1 geometry (see AliEMCALShishKebabTrd1Module)
239 Float_t fTrd1AlFrontThick; // Thickness of the Al front plate
240 Float_t fTrd1BondPaperThick; // Thickness of the Bond Paper sheet
241 // Local Coordinates of SM
242 TArrayD fCentersOfCellsEtaDir; // size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm)
243 TArrayD fCentersOfCellsXDir; // size fNEta*fNETAdiv (for TRD1 only) ( x in SM, in cm)
244 TArrayD fCentersOfCellsPhiDir; // size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm)
246 TArrayD fEtaCentersOfCells; // [fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0); eta depend from phi position;
247 TArrayD fPhiCentersOfCells; // [fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.)
248 // Move from AliEMCALv0 - Feb 19, 2006
249 TList *fShishKebabTrd1Modules; //! list of modules
250 // Local coordinates of SM for TRD1
251 Float_t fParSM[3]; // SM sizes as in GEANT (TRD1)
253 Int_t fILOSS; // Options for Geant (MIP business) - will call in AliEMCAL
254 Int_t fIHADR; // Options for Geant (MIP business) - will call in AliEMCAL
256 ////////////////////////////////////////////////////////////
257 //Obsolete member data that will be thrown out when feasible
259 Float_t fGap2Active; // Gap between the envelop and the active material
260 Float_t fSteelFrontThick; // Thickness of the front stell face of the support box - 9-sep-04
261 // TRD2 options - 27-jan-07
262 Float_t fTrd2AngleY; // angle in y-z plane (in degree)
263 Float_t f2Trd2Dy2; // 2*dy2 for TRD2
264 Float_t fEmptySpace; // 2mm om fred drawing
265 // Super module as TUBS
266 Float_t fTubsR; // radius of tubs
267 Float_t fTubsTurnAngle; // turn angle of tubs in degree
269 ///////////////////////////////////////////////////////////
271 ClassDef(AliEMCALEMCGeometry, 3) // EMCAL geometry class
274 #endif // AliEMCALEMCGEOMETRY_H