Line data Source code
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 : //_________________________________________________________________________
7 : /// \class AliEMCALEMCGeometry
8 : /// \brief EMCal geometry, singleton
9 : ///
10 : /// Geometry class for EMCAL : singleton
11 : /// EMCAL consists of layers of scintillator and lead
12 : /// with scintillator fiber arranged as "shish-kebab" skewers
13 : /// Places the the Barrel Geometry of The EMCAL at Midrapidity
14 : /// between 80 and 180(or 190) degrees of Phi and
15 : /// -0.7 to 0.7 in eta
16 : ///
17 : /// EMCAL geometry tree:
18 : /// EMCAL -> superModule -> module -> tower(cell)
19 : /// Indexes
20 : /// absId -> nSupMod -> nModule -> (nIphi,nIeta)
21 : ///
22 : /// Name choices:
23 : /// EMCAL_PDC06 (geometry used for PDC06 simulations, kept for backward compatibility)
24 : /// = equivalent to SHISH_77_TRD1_2X2_FINAL_110DEG in old notation
25 : /// EMCAL_COMPLETE (geometry for expected complete detector)
26 : /// = equivalent to SHISH_77_TRD1_2X2_FINAL_110DEG scTh=0.176 pbTh=0.144
27 : /// in old notation
28 : ///
29 : /// EMCAL_FIRSTYEAR - geometry for December 2009 to December 2010 run period
30 : /// with four Super Modules
31 : ///
32 : /// Adding V1 (EMCAL_FIRSTYEARV1, EMCAL_COMPLETEV1) - geometry from December 2009 ;
33 : /// 1. Fixed bug for positions of modules inside SM
34 : /// (first module has tilt 0.75 degree);
35 : /// 2. Added Al front plate (width 1 cm) and 2 paper sheets per sampling
36 : /// layer (additional 0.2 mm)
37 : /// The sizes have updated with last information from production
38 : /// drawing (end of October 2010).
39 : /// 3. COMPLETEV1 contains now only 10 SM for runs for year 2011
40 : /// 4. COMPLETE12SMV1 contains 12 SM for runs from year 2012 and on
41 : /// 5. COMPLETE12SMV1_DCAL contains 12 SM and 6 DCal SM
42 : /// 6. COMPLETE12SMV1_DCAL_DEV contains 12 SM and 10 DCal SM
43 : /// 7. COMPLETE12SMV1_DCAL_8SM contains 12 SM and 6 DCal SM and 2 extentions
44 : ///
45 : /// EMCAL_WSUC (Wayne State test stand)
46 : /// = no definite equivalent in old notation, was only used by
47 : /// Aleksei, but kept for testing purposes
48 : ///
49 : /// etc.
50 : ///
51 : /// \author Sahal Yacoob (LBL / UCT)
52 : /// \author Yves Schutz (SUBATECH)
53 : /// \author Jennifer Klay (LBL)
54 : /// \author Aleksei Pavlinov (WSU)
55 : /// \author Magali Estienne (SUBATECH)
56 : /// \author M.L. Wang CCNU Wuhan & Subatech. Adapted for DCAL
57 : //_________________________________________________________________________
58 :
59 : // --- ROOT system ---
60 : #include <TMath.h>
61 : #include <TArrayD.h>
62 : #include <TNamed.h>
63 : class TString ;
64 : class TObjArray;
65 : class Riostream;
66 :
67 : // --- AliRoot header files ---
68 : class AliEMCALEMCGeometry;
69 : class AliEMCALShishKebabTrd1Module;
70 :
71 : class AliEMCALEMCGeometry : public TNamed {
72 : public:
73 : enum fEMCSMType { kNotExistent = -1, kEMCAL_Standard = 0, kEMCAL_Half = 1, kEMCAL_3rd = 2, kDCAL_Standard = 3, kDCAL_Ext= 4 }; // possible SM Type
74 : AliEMCALEMCGeometry(); // default ctor only for internal usage (singleton)
75 : AliEMCALEMCGeometry(const AliEMCALEMCGeometry& geom);
76 : // ctor only for internal usage (singleton)
77 : AliEMCALEMCGeometry(const Text_t* name, const Text_t* title,
78 : const Text_t* mcname="", const Text_t* mctitle="");
79 :
80 : virtual ~AliEMCALEMCGeometry(void);
81 :
82 : AliEMCALEMCGeometry & operator = (const AliEMCALEMCGeometry & /*rvalue*/) {
83 : // assignement operator requested by coding convention but not needed
84 0 : Fatal("operator =", "not implemented");
85 0 : return *this;
86 : };
87 :
88 : //////////
89 : // General
90 : //
91 0 : Bool_t IsInitialized(void) const { return fgInit ; }
92 0 : static const Char_t* GetDefaultGeometryName() {return fgkDefaultGeometryName;}
93 : void PrintGeometry(); //*MENU*
94 :
95 : void Init(const Text_t* mcname="", const Text_t* mctitle=""); // initializes the parameters of EMCAL
96 : void CheckAdditionalOptions(); //
97 : void DefineSamplingFraction(const Text_t* mcname="", const Text_t* mctitle="");
98 :
99 : //////////////////////////////////////
100 : // Return EMCAL geometrical parameters
101 : //
102 :
103 152 : TString GetGeoName() const {return fGeoName;}
104 0 : const Int_t *GetEMCSystem() const {return fEMCSMSystem;}
105 4132560 : Int_t * GetEMCSystem() {return fEMCSMSystem;}
106 4 : const Char_t* GetNameOfEMCALEnvelope() const { const Char_t* env = "XEN1"; return env ;}
107 22 : Float_t GetArm1PhiMin() const { return fArm1PhiMin ; }
108 20 : Float_t GetArm1PhiMax() const { return fArm1PhiMax ; }
109 18 : Float_t GetArm1EtaMin() const { return fArm1EtaMin;}
110 18 : Float_t GetArm1EtaMax() const { return fArm1EtaMax;}
111 28 : Float_t GetIPDistance() const { return fIPDistance;}
112 46 : Float_t GetEnvelop(Int_t index) const { return fEnvelop[index] ; }
113 22 : Float_t GetShellThickness() const { return fShellThickness ; }
114 10 : Float_t GetZLength() const { return fZLength ; }
115 444 : Float_t GetDCALInnerEdge() const { return fDCALInnerEdge ; }
116 10 : Float_t GetDCALPhiMin() const { return fDCALPhiMin ; }
117 10 : Float_t GetDCALPhiMax() const { return fDCALPhiMax ; }
118 10 : Float_t GetDCALInnerExtandedEta() const { return fDCALInnerExtandedEta ; }
119 10 : Float_t GetEMCALPhiMax() const { return fEMCALPhiMax ; }
120 10 : Float_t GetDCALStandardPhiMax() const { return fDCALStandardPhiMax ; }
121 162 : Int_t GetNECLayers() const {return fNECLayers ;}
122 468 : Int_t GetNZ() const {return fNZ ;}
123 2 : Int_t GetNEta() const {return fNZ ;}
124 222 : Int_t GetNPhi() const {return fNPhi ;}
125 314 : Float_t GetECPbRadThick()const {return fECPbRadThickness;}
126 162 : Float_t GetECScintThick() const {return fECScintThick;}
127 34 : Float_t GetSampling() const {return fSampling ; }
128 4263932 : Int_t GetNumberOfSuperModules() const {return fNumberOfSuperModules;}
129 0 : Float_t GetPhiGapForSuperModules() const {return fPhiGapForSM;}
130 1370 : Float_t GetPhiModuleSize() const {return fPhiModuleSize;}
131 26 : Float_t GetEtaModuleSize() const {return fEtaModuleSize;}
132 0 : Float_t GetFrontSteelStrip() const {return fFrontSteelStrip;}
133 6 : Float_t GetLateralSteelStrip() const {return fLateralSteelStrip;}
134 0 : Float_t GetPassiveScintThick() const {return fPassiveScintThick;}
135 10 : Float_t GetPhiTileSize() const {return fPhiTileSize;}
136 10 : Float_t GetEtaTileSize() const {return fEtaTileSize;}
137 4 : Float_t GetPhiSuperModule() const {return fPhiSuperModule;}
138 0 : Int_t GetNPhiSuperModule() const {return fNPhiSuperModule;}
139 12 : Int_t GetNPHIdiv() const {return fNPHIdiv ;}
140 14 : Int_t GetNETAdiv() const {return fNETAdiv ;}
141 12 : Int_t GetNCells() const {return fNCells;}
142 22 : Float_t GetLongModuleSize() const {return fLongModuleSize;}
143 14 : Float_t GetTrd1Angle() const {return fTrd1Angle;}
144 12 : Float_t Get2Trd1Dx2() const {return f2Trd1Dx2;}
145 0 : Float_t GetEtaMaxOfTRD1() const {return fEtaMaxOfTRD1;}
146 12 : Float_t GetTrd1AlFrontThick() const { return fTrd1AlFrontThick;}
147 310 : Float_t GetTrd1BondPaperThick() const {return fTrd1BondPaperThick;}
148 : // --
149 10 : Int_t GetNCellsInSupMod() const {return fNCellsInSupMod;}
150 0 : Int_t GetNCellsInModule() const {return fNCellsInModule; }
151 10 : Int_t GetKey110DEG() const {return fKey110DEG;}
152 10 : Int_t GetnSupModInDCAL() const {return fnSupModInDCAL;}
153 0 : Int_t GetILOSS() const {return fILOSS;}
154 0 : Int_t GetIHADR() const {return fIHADR;}
155 :
156 : // --
157 0 : Float_t GetDeltaEta() const {return (fArm1EtaMax-fArm1EtaMin)/ ((Float_t)fNZ);}
158 0 : Float_t GetDeltaPhi() const {return (fArm1PhiMax-fArm1PhiMin)/ ((Float_t)fNPhi);}
159 0 : Int_t GetNTowers() const {return fNPhi * fNZ ;}
160 : //
161 : Double_t GetPhiCenterOfSM(Int_t nsupmod) const;
162 : Double_t GetPhiCenterOfSMSec(Int_t nsupmod) const;
163 42 : Float_t GetSuperModulesPar(Int_t ipar) const {return fParSM[ipar];}
164 520 : Int_t GetSMType(Int_t nSupMod) const { if( nSupMod > GetNumberOfSuperModules() ) return kNotExistent;
165 520 : return fEMCSMSystem[nSupMod]; }
166 : //
167 : Bool_t GetPhiBoundariesOfSM (Int_t nSupMod, Double_t &phiMin, Double_t &phiMax) const;
168 : Bool_t GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const;
169 : //
170 : // Local Coordinates of SM
171 : /* TArrayD GetCentersOfCellsEtaDir() const {return fCentersOfCellsEtaDir;} // size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm) */
172 : /* TArrayD GetCentersOfCellsXDir() const {return fCentersOfCellsXDir;} // size fNEta*fNETAdiv (for TRD1 only) ( x in SM, in cm) */
173 : /* TArrayD GetCentersOfCellsPhiDir() const {return fCentersOfCellsPhiDir;} // size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm) */
174 : /* // */
175 : /* TArrayD GetEtaCentersOfCells() const {return fEtaCentersOfCells;} // [fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0); eta depend from phi position; */
176 : /* TArrayD GetPhiCentersOfCells() const {return fPhiCentersOfCells;} // [fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.) */
177 :
178 : static int ParseString(const TString &topt, TObjArray &Opt) ;
179 :
180 : ///////////////////////////////
181 : //Geometry data member setters
182 : //
183 0 : void SetNZ(Int_t nz) { fNZ= nz;
184 0 : printf("SetNZ: Number of modules in Z set to %d", fNZ) ; }
185 0 : void SetNPhi(Int_t nphi) { fNPhi= nphi;
186 0 : printf("SetNPhi: Number of modules in Phi set to %d", fNPhi) ; }
187 0 : void SetSampling(Float_t samp) { fSampling = samp;
188 0 : printf("SetSampling: Sampling factor set to %f", fSampling) ; }
189 :
190 : ///////////////////
191 : // useful utilities
192 : //
193 : Float_t AngleFromEta(Float_t eta) const { // returns theta in radians for a given pseudorapidity
194 0 : return 2.0*TMath::ATan(TMath::Exp(-eta));
195 : }
196 : Float_t ZFromEtaR(Float_t r,Float_t eta) const { // returns z in for a given
197 : // pseudorapidity and r=sqrt(x*x+y*y).
198 0 : return r/TMath::Tan(AngleFromEta(eta));
199 : }
200 :
201 : //////////////////////////////////////////////////
202 : // Obsolete methods to be thrown out when feasible
203 0 : Float_t GetGap2Active() const {return fGap2Active ;}
204 204 : Float_t GetSteelFrontThickness() const { return fSteelFrontThick;}
205 0 : Float_t GetTrd2AngleY()const {return fTrd2AngleY;}
206 0 : Float_t Get2Trd2Dy2() const {return f2Trd2Dy2;}
207 0 : Float_t GetTubsR() const {return fTubsR;}
208 0 : Float_t GetTubsTurnAngle() const {return fTubsTurnAngle;}
209 : // Float_t GetIP2ECASection() const { return ( GetIPDistance() + GetAlFrontThickness()
210 : // + GetGap2Active() ) ; }
211 : //////////////////////////////////////////////////
212 : static const Char_t* fgkDefaultGeometryName; // Default name of geometry
213 : static Bool_t fgInit; // Tells if geometry has been succesfully set up.
214 :
215 : private:
216 :
217 : // Member data
218 :
219 : TString fGeoName; // geometry name
220 :
221 : TObjArray *fArrayOpts; //! array of geometry options
222 : const char *fkAdditionalOpts[6]; //! some additional options for the geometry type and name
223 : int fNAdditionalOpts; //! size of additional options parameter
224 :
225 : Float_t fECPbRadThickness; // cm, Thickness of the Pb radiators
226 : Float_t fECScintThick; // cm, Thickness of the scintillators
227 : Int_t fNECLayers; // number of scintillator layers
228 :
229 : Float_t fArm1PhiMin; // Minimum angular position of EMCAL in Phi (degrees)
230 : Float_t fArm1PhiMax; // Maximum angular position of EMCAL in Phi (degrees)
231 : Float_t fArm1EtaMin; // Minimum pseudorapidity position of EMCAL in Eta
232 : Float_t fArm1EtaMax; // Maximum pseudorapidity position of EMCAL in Eta
233 :
234 : // Geometry Parameters
235 : Float_t fEnvelop[3]; // the GEANT TUB for the detector
236 : Float_t fIPDistance; // Radial Distance of the inner surface of the EMCAL
237 : Float_t fShellThickness; // Total thickness in (x,y) direction
238 : Float_t fZLength; // Total length in z direction
239 : Float_t fDCALInnerEdge; // Inner edge for DCAL
240 : Float_t fDCALPhiMin; // Minimum angular position of DCAL in Phi (degrees)
241 : Float_t fDCALPhiMax; // Maximum angular position of DCAL in Phi (degrees)
242 : Float_t fEMCALPhiMax; // Maximum angular position of EMCAL in Phi (degrees)
243 : Float_t fDCALStandardPhiMax; // special edge for the case that DCAL contian extension
244 : Float_t fDCALInnerExtandedEta; // DCAL inner edge in Eta (with some extension)
245 : Int_t fNZ; // Number of Towers in the Z direction
246 : Int_t fNPhi; // Number of Towers in the PHI direction
247 : Float_t fSampling; // Sampling factor
248 :
249 : // Shish-kebab option - 23-aug-04 by PAI; COMPACT, TWIST, TRD1 and TRD2
250 : Int_t fNumberOfSuperModules; // default is 12 = 6 * 2
251 : Int_t *fEMCSMSystem; //[fNumberOfSuperModules] geometry structure
252 : Float_t fFrontSteelStrip; // 13-may-05
253 : Float_t fLateralSteelStrip; // 13-may-05
254 : Float_t fPassiveScintThick; // 13-may-05
255 : Float_t fPhiModuleSize; // Phi -> X
256 : Float_t fEtaModuleSize; // Eta -> Y
257 : Float_t fPhiTileSize; // Size of phi tile
258 : Float_t fEtaTileSize; // Size of eta tile
259 : Float_t fLongModuleSize; // Size of long module
260 : Float_t fPhiSuperModule; // Phi of normal supermodule (20, in degree)
261 : Int_t fNPhiSuperModule; // 9 - number supermodule in phi direction
262 : Int_t fNPHIdiv; // number phi divizion of module
263 : Int_t fNETAdiv; // number eta divizion of module
264 : //
265 : Int_t fNCells; // number of cells in calo
266 : Int_t fNCellsInSupMod; // number cell in super module
267 : Int_t fNCellsInModule; // number cell in module)
268 :
269 : // TRD1 options - 30-sep-04
270 : Float_t fTrd1Angle; // angle in x-z plane (in degree)
271 : Float_t f2Trd1Dx2; // 2*dx2 for TRD1
272 : Float_t fPhiGapForSM; // Gap betweeen supermodules in phi direction
273 : Int_t fKey110DEG; // for calculation abs cell id; 19-oct-05
274 : Int_t fnSupModInDCAL; // for calculation abs cell id;
275 : TArrayD fPhiBoundariesOfSM; // phi boundaries of SM in rad; size is fNumberOfSuperModules;
276 : TArrayD fPhiCentersOfSM; // phi of centers of SM; size is fNumberOfSuperModules/2
277 : TArrayD fPhiCentersOfSMSec; // phi of centers of section where SM lies; size is fNumberOfSuperModules/2
278 : Float_t fEtaMaxOfTRD1; // max eta in case of TRD1 geometry (see AliEMCALShishKebabTrd1Module)
279 : // Oct 26,2010
280 : Float_t fTrd1AlFrontThick; // Thickness of the Al front plate
281 : Float_t fTrd1BondPaperThick; // Thickness of the Bond Paper sheet
282 : // Local Coordinates of SM
283 : TArrayD fCentersOfCellsEtaDir; // size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm)
284 : TArrayD fCentersOfCellsXDir; // size fNEta*fNETAdiv (for TRD1 only) ( x in SM, in cm)
285 : TArrayD fCentersOfCellsPhiDir; // size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm)
286 : //
287 : TArrayD fEtaCentersOfCells; // [fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0); eta depend from phi position;
288 : TArrayD fPhiCentersOfCells; // [fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.)
289 : // Move from AliEMCALv0 - Feb 19, 2006
290 : TList *fShishKebabTrd1Modules; //! list of modules
291 : // Local coordinates of SM for TRD1
292 : Float_t fParSM[3]; // SM sizes as in GEANT (TRD1)
293 :
294 : Int_t fILOSS; // Options for Geant (MIP business) - will call in AliEMCAL
295 : Int_t fIHADR; // Options for Geant (MIP business) - will call in AliEMCAL
296 :
297 : ////////////////////////////////////////////////////////////
298 : //Obsolete member data that will be thrown out when feasible
299 : //
300 : Float_t fGap2Active; // Gap between the envelop and the active material
301 : Float_t fSteelFrontThick; // Thickness of the front stell face of the support box - 9-sep-04
302 : // TRD2 options - 27-jan-07
303 : Float_t fTrd2AngleY; // angle in y-z plane (in degree)
304 : Float_t f2Trd2Dy2; // 2*dy2 for TRD2
305 : Float_t fEmptySpace; // 2mm om fred drawing
306 : // Super module as TUBS
307 : Float_t fTubsR; // radius of tubs
308 : Float_t fTubsTurnAngle; // turn angle of tubs in degree
309 :
310 : ///////////////////////////////////////////////////////////
311 :
312 94 : ClassDef(AliEMCALEMCGeometry, 3) // EMCAL geometry class
313 : };
314 :
315 : #endif // AliEMCALEMCGEOMETRY_H
|