]>
Commit | Line | Data |
---|---|---|
2012850d | 1 | #ifndef ALIEMCALGEOMETRY_H |
2 | #define ALIEMCALGEOMETRY_H | |
e8c0d6bb | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2012850d | 4 | * See cxx source for full Copyright notice */ |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //_________________________________________________________________________ | |
9 | // Geometry class for EMCAL : singleton | |
b13bbe81 | 10 | // EMCAL consists of a layers of scintillator, and lead. |
2012850d | 11 | // |
b13bbe81 | 12 | //*-- Author: Sahal Yacoob (LBL / UCT) |
13 | //*-- and : Yves Schutz (Subatech) | |
3d841a9f | 14 | //*-- and : Alexei Pavlinov (WSU) - shashlyk staff |
f0377b23 | 15 | //*-- and : Gustavo Conesa: Add TRU mapping. TRU parameters still not fixed. |
e8c0d6bb | 16 | //*-- and : Magali Estienne : analysis access adaptations |
8cc543cb | 17 | //*-- and : Adapted for DCAL, M.L. Wang CCNU & Subatech Oct-18-2012 |
2012850d | 18 | |
19 | // --- ROOT system --- | |
e8c0d6bb | 20 | #include <TNamed.h> |
37890aaf | 21 | #include <TMath.h> |
22 | #include <TArrayD.h> | |
e8c0d6bb | 23 | #include <TVector3.h> |
24 | #include <TGeoMatrix.h> | |
25 | class TBrowser ; | |
26 | class TParticle ; | |
2012850d | 27 | |
2012850d | 28 | // --- AliRoot header files --- |
0c5b726e | 29 | #include "AliEMCALEMCGeometry.h" |
e8c0d6bb | 30 | #include "AliEMCALGeoParams.h" |
787342d6 | 31 | #include "AliEMCALTriggerMapping.h" |
e8c0d6bb | 32 | class AliEMCALShishKebabTrd1Module; |
a520bcd0 | 33 | class AliLog; |
090026bf | 34 | |
e8c0d6bb | 35 | class AliEMCALGeometry : public TNamed { |
2012850d | 36 | |
e8c0d6bb | 37 | public: |
8cc543cb | 38 | enum fEMCSMType { kEMCAL_Standard = 0, kEMCAL_Half = 1, kEMCAL_3rd = 2, kDCAL_Standard = 3, kDCAL_Ext= 4 }; // possible SM Type |
0c5b726e | 39 | |
e8c0d6bb | 40 | AliEMCALGeometry(); |
126215a5 | 41 | AliEMCALGeometry(const Text_t* name, const Text_t* title="", |
42 | const Text_t* mcname="", const Text_t* mctitle=""); | |
e8c0d6bb | 43 | AliEMCALGeometry(const AliEMCALGeometry & geom); |
44 | ||
d434833b | 45 | virtual ~AliEMCALGeometry(void); |
e8c0d6bb | 46 | AliEMCALGeometry & operator = (const AliEMCALGeometry & rvalue); |
47 | ||
126215a5 | 48 | static AliEMCALGeometry * GetInstance(const Text_t* name, const Text_t* title="", |
49 | const Text_t* mcname="TGeant3", const Text_t* mctitle="") ; | |
89557f6d | 50 | static AliEMCALGeometry * GetInstance(); |
937d0661 | 51 | |
937d0661 | 52 | |
53 | ////////// | |
54 | // General | |
55 | // | |
000bb28f | 56 | static Bool_t IsInitialized(void) {return AliEMCALEMCGeometry::fgInit; } |
0c5b726e | 57 | static const Char_t* GetDefaultGeometryName() {return AliEMCALEMCGeometry::fgkDefaultGeometryName;} |
e8c0d6bb | 58 | |
59 | ///////////// | |
60 | // TRD1 stuff | |
61 | void CreateListOfTrd1Modules(); | |
62 | TList *GetShishKebabTrd1Modules() const {return fShishKebabTrd1Modules;} | |
63 | AliEMCALShishKebabTrd1Module *GetShishKebabModule(Int_t neta) const; | |
0c5b726e | 64 | |
e8c0d6bb | 65 | void PrintGeometryGeoUtils(); // *MENU* |
66 | void PrintCellIndexes(Int_t absId=0, int pri=0, const char *tit="") const ; //*MENU* | |
67 | void PrintLocalTrd1(Int_t pri=0) const; // *MENU* | |
68 | virtual void Browse(TBrowser* b); | |
69 | virtual Bool_t IsFolder() const; | |
ab37d09c | 70 | |
bccc4a4f | 71 | virtual Bool_t Impact(const TParticle *particle) const; |
e8c0d6bb | 72 | void ImpactOnEmcal(TVector3 vtx, Double_t theta, Double_t phi, Int_t & absId, TVector3 & vimpact) const; |
73 | Bool_t IsInEMCAL(Double_t x, Double_t y, Double_t z) const; | |
8cc543cb | 74 | Bool_t IsInDCAL(Double_t x, Double_t y, Double_t z) const; |
75 | Int_t IsInEMCALOrDCAL(Double_t x, Double_t y, Double_t z) const; | |
937d0661 | 76 | |
77 | ////////////////////////////////////// | |
c63c3c5d | 78 | // Return EMCAL geometrical parameters |
937d0661 | 79 | // |
e8c0d6bb | 80 | |
81 | AliEMCALEMCGeometry* GetEMCGeometry() const { return fEMCGeometry ; } | |
787342d6 | 82 | |
83 | AliEMCALTriggerMapping* GetTriggerMapping() const { return fTriggerMapping; } | |
84 | ||
e8c0d6bb | 85 | // |
86 | const Char_t* GetNameOfEMCALEnvelope(void) const { return fEMCGeometry->GetNameOfEMCALEnvelope() ; } | |
87 | Float_t GetArm1PhiMin(void) const { return fEMCGeometry->GetArm1PhiMin() ; } | |
88 | Float_t GetArm1PhiMax(void) const { return fEMCGeometry->GetArm1PhiMax() ; } | |
89 | Float_t GetArm1EtaMin(void) const { return fEMCGeometry->GetArm1EtaMin() ; } | |
90 | Float_t GetArm1EtaMax(void) const { return fEMCGeometry->GetArm1EtaMax() ; } | |
91 | Float_t GetIPDistance(void) const { return fEMCGeometry->GetIPDistance() ; } | |
92 | Float_t GetEnvelop(Int_t index) const { return fEMCGeometry->GetEnvelop(index) ; } | |
93 | Float_t GetShellThickness(void) const { return fEMCGeometry->GetShellThickness() ; } | |
94 | Float_t GetZLength(void) const { return fEMCGeometry->GetZLength() ; } | |
8cc543cb | 95 | Float_t GetDCALInnerEdge(void) const { return fEMCGeometry->GetDCALInnerEdge() ; } |
96 | Float_t GetDCALPhiMin(void) const { return fEMCGeometry->GetDCALPhiMin() ; } | |
97 | Float_t GetDCALPhiMax(void) const { return fEMCGeometry->GetDCALPhiMax() ; } | |
98 | Float_t GetEMCALPhiMax(void) const { return fEMCGeometry->GetEMCALPhiMax() ; } | |
e8c0d6bb | 99 | Int_t GetNECLayers(void) const { return fEMCGeometry->GetNECLayers() ; } |
8cc543cb | 100 | Float_t GetDCALInnerExtandedEta(void) const { return fEMCGeometry->GetDCALInnerExtandedEta() ; } |
e8c0d6bb | 101 | Int_t GetNZ(void) const { return fEMCGeometry->GetNZ() ; } |
102 | Int_t GetNEta(void) const { return fEMCGeometry->GetNEta() ; } | |
103 | Int_t GetNPhi(void) const { return fEMCGeometry->GetNPhi() ; } | |
104 | Float_t GetECPbRadThick(void) const { return fEMCGeometry->GetECPbRadThick() ; } | |
105 | Float_t GetECScintThick(void) const { return fEMCGeometry->GetECScintThick() ; } | |
106 | Float_t GetSampling(void) const { return fEMCGeometry->GetSampling() ; } | |
107 | Int_t GetNumberOfSuperModules(void) const { return fEMCGeometry->GetNumberOfSuperModules() ; } | |
8cc543cb | 108 | Float_t GetPhiGapForSuperModules(void) const { return fEMCGeometry->GetPhiGapForSuperModules(); } |
e8c0d6bb | 109 | Float_t GetPhiModuleSize(void) const { return fEMCGeometry->GetPhiModuleSize() ; } |
110 | Float_t GetEtaModuleSize(void) const { return fEMCGeometry->GetEtaModuleSize() ; } | |
111 | Float_t GetFrontSteelStrip(void) const { return fEMCGeometry->GetFrontSteelStrip() ; } | |
112 | Float_t GetLateralSteelStrip(void) const { return fEMCGeometry->GetLateralSteelStrip() ; } | |
113 | Float_t GetPassiveScintThick(void) const { return fEMCGeometry->GetPassiveScintThick() ; } | |
114 | Float_t GetPhiTileSize(void) const { return fEMCGeometry->GetPhiTileSize() ; } | |
115 | Float_t GetEtaTileSize(void) const { return fEMCGeometry->GetEtaTileSize() ; } | |
8cc543cb | 116 | Float_t GetPhiSuperModule(void) const { return fEMCGeometry->GetPhiSuperModule() ; } |
e8c0d6bb | 117 | Int_t GetNPhiSuperModule(void) const { return fEMCGeometry->GetNPhiSuperModule() ; } |
118 | Int_t GetNPHIdiv(void) const { return fEMCGeometry->GetNPHIdiv() ; } | |
119 | Int_t GetNETAdiv(void) const { return fEMCGeometry->GetNETAdiv() ; } | |
120 | Int_t GetNCells(void) const { return fEMCGeometry->GetNCells() ; } | |
121 | Float_t GetLongModuleSize(void) const { return fEMCGeometry->GetLongModuleSize() ; } | |
122 | Float_t GetTrd1Angle(void) const { return fEMCGeometry->GetTrd1Angle() ; } | |
123 | Float_t Get2Trd1Dx2(void) const { return fEMCGeometry->Get2Trd1Dx2() ; } | |
124 | Float_t GetTrd1AlFrontThick() const { return fEMCGeometry->GetTrd1AlFrontThick() ; } | |
125 | Float_t GetTrd1BondPaperThick() const { return fEMCGeometry->GetTrd1BondPaperThick() ; } | |
126 | // -- | |
127 | Int_t GetNCellsInSupMod(void) const { return fEMCGeometry->GetNCellsInSupMod() ; } | |
128 | Int_t GetNCellsInModule(void) const { return fEMCGeometry->GetNCellsInModule() ; } | |
129 | Int_t GetKey110DEG(void) const { return fEMCGeometry->GetKey110DEG() ; } | |
8cc543cb | 130 | Int_t GetnSupModInDCAL(void) const { return fEMCGeometry->GetnSupModInDCAL() ; } |
e8c0d6bb | 131 | Int_t GetILOSS(void) const { return fEMCGeometry->GetILOSS() ; } |
132 | Int_t GetIHADR(void) const { return fEMCGeometry->GetIHADR() ; } | |
85c25c2e | 133 | // -- |
e8c0d6bb | 134 | Float_t GetDeltaEta(void) const { return fEMCGeometry->GetDeltaEta() ; } |
135 | Float_t GetDeltaPhi(void) const { return fEMCGeometry->GetDeltaPhi() ; } | |
136 | Int_t GetNTowers(void) const { return fEMCGeometry->GetNTowers() ; } | |
937d0661 | 137 | // |
e8c0d6bb | 138 | Double_t GetPhiCenterOfSM(Int_t nsupmod) const { return fEMCGeometry->GetPhiCenterOfSM(nsupmod) ; } |
8cc543cb | 139 | Double_t GetPhiCenterOfSMSec(Int_t nsupmod) const { return fEMCGeometry->GetPhiCenterOfSMSec(nsupmod) ; } |
e8c0d6bb | 140 | Float_t GetSuperModulesPar(Int_t ipar) const { return fEMCGeometry->GetSuperModulesPar(ipar) ; } |
937d0661 | 141 | // |
8cc543cb | 142 | Int_t GetSMType(Int_t nSupMod) const { if( nSupMod > fEMCGeometry->GetNumberOfSuperModules() ) return -1; |
143 | return fEMCSMSystem[nSupMod] ; } | |
144 | Bool_t IsDCALSM(Int_t nSupMod) const; | |
145 | Bool_t IsDCALExtSM(Int_t nSupMod) const; | |
e8c0d6bb | 146 | Bool_t GetPhiBoundariesOfSM(Int_t nSupMod, Double_t &phiMin, Double_t &phiMax) const |
147 | { return fEMCGeometry->GetPhiBoundariesOfSM(nSupMod, phiMin, phiMax) ; } | |
148 | Bool_t GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const | |
149 | { return fEMCGeometry->GetPhiBoundariesOfSMGap(nPhiSec, phiMin, phiMax); } | |
937d0661 | 150 | // |
8cc543cb | 151 | // especially for SM in extension, where center of SM != center of the SM-section. |
152 | // Used in AliEMCALv0 to calculate position. | |
225cd96d | 153 | |
e8c0d6bb | 154 | ////////////////////////////////////////////////// |
155 | // Obsolete methods to be thrown out when feasible | |
156 | Float_t GetGap2Active(void) const { return fEMCGeometry->GetGap2Active() ; } | |
157 | Float_t GetSteelFrontThickness(void) const { return fEMCGeometry->GetSteelFrontThickness() ; } | |
158 | Float_t GetTrd2AngleY(void) const { return fEMCGeometry->GetTrd2AngleY() ; } | |
159 | Float_t Get2Trd2Dy2(void) const { return fEMCGeometry->Get2Trd2Dy2() ; } | |
160 | Float_t GetTubsR(void) const { return fEMCGeometry->GetTubsR() ; } | |
161 | Float_t GetTubsTurnAngle(void) const { return fEMCGeometry->GetTubsTurnAngle() ; } | |
162 | //Float_t GetAlFrontThickness(void) const { return fEMCGeometry->GetAlFrontThickness() ; } | |
163 | //Float_t GetIP2ECASection(void) const { return fEMCGeometry->GetIP2ECASection() ; } | |
164 | ////////////////////////////////////////////////// | |
165 | ||
937d0661 | 166 | /////////////////////////////// |
167 | //Geometry data member setters | |
168 | // | |
e8c0d6bb | 169 | void SetNZ(Int_t nz) { fEMCGeometry->SetNZ(nz) ; } |
170 | void SetNPhi(Int_t nphi) { fEMCGeometry->SetNPhi(nphi) ; } | |
e8c0d6bb | 171 | // |
172 | void SetSampling(Float_t samp) { fEMCGeometry->SetSampling(samp) ; } | |
173 | // | |
174 | void PrintGeometry() { fEMCGeometry->PrintGeometry() ; } //*MENU* | |
175 | ||
176 | ////////////////////////// | |
177 | // Global geometry methods | |
178 | // | |
179 | void GetGlobal(const Double_t *loc, Double_t *glob, int ind) const; | |
180 | void GetGlobal(const TVector3 &vloc, TVector3 &vglob, int ind) const; | |
181 | void GetGlobal(Int_t absId, Double_t glob[3]) const; | |
182 | void GetGlobal(Int_t absId, TVector3 &vglob) const; | |
183 | ||
184 | //////////////////////////////////////// | |
185 | // May 31, 2006; ALICE numbering scheme: | |
186 | // see ALICE-INT-2003-038: ALICE Coordinate System and Software Numbering Convention | |
187 | // All indexes are stared from zero now. | |
188 | // | |
189 | // abs id <-> indexes; Shish-kebab case, only TRD1 now. | |
190 | // EMCAL -> Super Module -> module -> tower(or cell) - logic tree of EMCAL | |
191 | // | |
192 | //** Usual name of variable - Dec 18,2006 ** | |
193 | // nSupMod - index of super module (SM) | |
194 | // nModule - index of module in SM | |
195 | // nIphi - phi index of tower(cell) in module | |
196 | // nIeta - eta index of tower(cell) in module | |
197 | // | |
198 | // Inside SM | |
199 | // iphim - phi index of module in SM | |
200 | // ietam - eta index of module in SM | |
201 | // | |
202 | // iphi - phi index of tower(cell) in SM | |
203 | // ieta - eta index of tower(cell) in SM | |
204 | // | |
205 | // for a given tower index absId returns eta and phi of gravity center of tower. | |
206 | void EtaPhiFromIndex(Int_t absId, Double_t &eta, Double_t &phi) const; | |
207 | void EtaPhiFromIndex(Int_t absId, Float_t &eta, Float_t &phi) const; | |
937d0661 | 208 | |
e8c0d6bb | 209 | Bool_t GetAbsCellIdFromEtaPhi(Double_t eta,Double_t phi, Int_t &absId) const; |
210 | Bool_t SuperModuleNumberFromEtaPhi(Double_t eta, Double_t phi, Int_t &nSupMod) const; | |
211 | Int_t GetAbsCellId(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta) const; | |
212 | Bool_t CheckAbsCellId(Int_t absId) const; | |
213 | Bool_t GetCellIndex(Int_t absId, Int_t &nSupMod, Int_t &nModule, Int_t &nIphi, | |
214 | Int_t &nIeta) const; | |
215 | // Local coordinate of Super Module | |
216 | void GetModulePhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule, Int_t &iphim, | |
217 | Int_t &ietam) const; | |
218 | void GetCellPhiEtaIndexInSModule(Int_t nSupMod, Int_t nModule, Int_t nIphi, Int_t nIeta, | |
219 | Int_t &iphi, Int_t &ieta) const ; | |
220 | Int_t GetSuperModuleNumber(Int_t absId) const; | |
221 | Int_t GetNumberOfModuleInPhiDirection(Int_t nSupMod) const | |
222 | { | |
8cc543cb | 223 | if( GetSMType(nSupMod) == kEMCAL_Half) return fNPhi/2; |
224 | else if(GetSMType(nSupMod) == kEMCAL_3rd) return fNPhi/3; | |
225 | else if(GetSMType(nSupMod) == kDCAL_Ext) return fNPhi/3; | |
226 | else return fNPhi; | |
e8c0d6bb | 227 | } |
228 | // From cell indexes to abs cell id | |
229 | void GetModuleIndexesFromCellIndexesInSModule(Int_t nSupMod, Int_t iphi, Int_t ieta, | |
230 | Int_t &iphim, Int_t &ietam, Int_t &nModule) const; | |
231 | Int_t GetAbsCellIdFromCellIndexes(Int_t nSupMod, Int_t iphi, Int_t ieta) const; | |
3d841a9f | 232 | |
e8c0d6bb | 233 | // Methods for AliEMCALRecPoint - Feb 19, 2006 |
234 | Bool_t RelPosCellInSModule(Int_t absId, | |
235 | Double_t &xr, Double_t &yr, Double_t &zr) const; | |
236 | Bool_t RelPosCellInSModule(Int_t absId, Double_t distEff, | |
237 | Double_t &xr, Double_t &yr, Double_t &zr) const; | |
238 | Bool_t RelPosCellInSModule(Int_t absId, Double_t loc[3]) const; | |
239 | Bool_t RelPosCellInSModule(Int_t absId, TVector3 &vloc) const; | |
f0377b23 | 240 | |
8cc543cb | 241 | Int_t * GetEMCSystem() const { return fEMCSMSystem ; } //EMC System, SM type list |
e8c0d6bb | 242 | // Local Coordinates of SM |
243 | TArrayD GetCentersOfCellsEtaDir() const { return fCentersOfCellsEtaDir ; } // size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm) | |
244 | TArrayD GetCentersOfCellsXDir() const { return fCentersOfCellsXDir ; } // size fNEta*fNETAdiv (for TRD1 only) ( x in SM, in cm) | |
245 | TArrayD GetCentersOfCellsPhiDir() const { return fCentersOfCellsPhiDir ; } // size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm) | |
246 | // | |
247 | TArrayD GetEtaCentersOfCells() const { return fEtaCentersOfCells ; } // [fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0); eta depend from phi position; | |
248 | TArrayD GetPhiCentersOfCells() const { return fPhiCentersOfCells ; } // [fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.) | |
e8c0d6bb | 249 | |
250 | /////////////////// | |
251 | // useful utilities | |
252 | // | |
253 | Float_t AngleFromEta(Float_t eta) const { // returns theta in radians for a given pseudorapidity | |
254 | return 2.0*TMath::ATan(TMath::Exp(-eta)); | |
255 | } | |
256 | Float_t ZFromEtaR(Float_t r,Float_t eta) const { // returns z in for a given | |
257 | // pseudorapidity and r=sqrt(x*x+y*y). | |
258 | return r/TMath::Tan(AngleFromEta(eta)); | |
259 | } | |
d434833b | 260 | |
e8c0d6bb | 261 | //Method to set shift-rotational matrixes from ESDHeader |
bccc4a4f | 262 | void SetMisalMatrix(const TGeoHMatrix * m, Int_t smod); |
e8c0d6bb | 263 | |
264 | //Alternate geometry that allows to calculate tower position for different particles and different alignments | |
265 | void RecalculateTowerPosition(Float_t drow, Float_t dcol, const Int_t sm, const Float_t depth, | |
266 | const Float_t misaligTransShifts[15], const Float_t misaligRotShifts[15],Float_t global[3]) const; | |
a97849a9 | 267 | |
e8c0d6bb | 268 | //Returns shift-rotational matrixes for different volumes |
269 | const TGeoHMatrix * GetMatrixForSuperModule(Int_t smod)const ; | |
270 | ||
787342d6 | 271 | Bool_t GetAbsFastORIndexFromTRU(const Int_t iTRU, const Int_t iADC, Int_t& id) const { |
272 | return fTriggerMapping->GetAbsFastORIndexFromTRU(iTRU, iADC, id); | |
273 | } | |
274 | Bool_t GetAbsFastORIndexFromPositionInTRU(const Int_t iTRU, const Int_t iEta, const Int_t iPhi, Int_t& id) const { | |
275 | return fTriggerMapping->GetAbsFastORIndexFromPositionInTRU(iTRU, iEta, iPhi, id); | |
276 | } | |
277 | Bool_t GetAbsFastORIndexFromPositionInSM(const Int_t iSM, const Int_t iEta, const Int_t iPhi, Int_t& id) const { | |
278 | return fTriggerMapping->GetAbsFastORIndexFromPositionInSM( iSM, iEta, iPhi, id); | |
279 | } | |
280 | Bool_t GetAbsFastORIndexFromPositionInEMCAL(const Int_t iEta, const Int_t iPhi, Int_t& id) const { | |
281 | return fTriggerMapping->GetAbsFastORIndexFromPositionInEMCAL(iEta, iPhi, id); | |
282 | } | |
283 | Bool_t GetTRUFromAbsFastORIndex(const Int_t id, Int_t& iTRU, Int_t& iADC) const { | |
284 | return fTriggerMapping->GetTRUFromAbsFastORIndex(id, iTRU, iADC); | |
285 | } | |
286 | Bool_t GetPositionInTRUFromAbsFastORIndex(const Int_t id, Int_t& iTRU, Int_t& iEta, Int_t& iPhi) const { | |
287 | return fTriggerMapping->GetPositionInTRUFromAbsFastORIndex(id, iTRU, iEta, iPhi); | |
288 | } | |
289 | Bool_t GetPositionInSMFromAbsFastORIndex(const Int_t id, Int_t& iSM, Int_t& iEta, Int_t& iPhi) const { | |
290 | return fTriggerMapping->GetPositionInSMFromAbsFastORIndex(id, iSM, iEta, iPhi); | |
291 | } | |
292 | Bool_t GetPositionInEMCALFromAbsFastORIndex(const Int_t id, Int_t& iEta, Int_t& iPhi) const { | |
293 | return fTriggerMapping->GetPositionInEMCALFromAbsFastORIndex(id, iEta, iPhi); | |
294 | } | |
295 | Bool_t GetFastORIndexFromCellIndex(const Int_t id, Int_t& idx) const { | |
296 | return fTriggerMapping->GetFastORIndexFromCellIndex(id, idx); | |
297 | } | |
298 | Bool_t GetCellIndexFromFastORIndex(const Int_t id, Int_t idx[4]) const { | |
299 | return fTriggerMapping->GetCellIndexFromFastORIndex(id, idx); | |
300 | } | |
301 | Bool_t GetTRUIndexFromSTUIndex(const Int_t id, Int_t& idx) const { | |
302 | return fTriggerMapping->GetTRUIndexFromSTUIndex(id, idx); | |
303 | } | |
304 | Bool_t GetTRUIndexFromOnlineIndex(const Int_t id, Int_t& idx) const { | |
305 | return fTriggerMapping->GetTRUIndexFromOnlineIndex(id, idx); | |
306 | } | |
307 | Bool_t GetOnlineIndexFromTRUIndex(const Int_t id, Int_t& idx) const { | |
308 | return fTriggerMapping->GetOnlineIndexFromTRUIndex(id, idx); | |
309 | } | |
310 | Bool_t GetFastORIndexFromL0Index(const Int_t iTRU, const Int_t id, Int_t idx[], const Int_t size) const { | |
311 | return fTriggerMapping->GetFastORIndexFromL0Index(iTRU, id, idx, size); | |
312 | } | |
313 | Int_t GetTRUIndexFromSTUIndex(const Int_t id) const { | |
314 | return fTriggerMapping->GetTRUIndexFromSTUIndex(id); | |
315 | } | |
316 | Int_t GetTRUIndexFromOnlineIndex(const Int_t id) const { | |
317 | return fTriggerMapping->GetTRUIndexFromOnlineIndex(id); | |
318 | } | |
319 | Int_t GetOnlineIndexFromTRUIndex(const Int_t id) const { | |
320 | return fTriggerMapping->GetOnlineIndexFromTRUIndex(id); | |
321 | } | |
322 | Int_t GetNTotalTRU() const { | |
323 | return fTriggerMapping->GetNTRU(); | |
324 | } | |
325 | ||
326 | ||
e8c0d6bb | 327 | protected: |
328 | ||
35a1bfe6 | 329 | void Init(void); // initializes the parameters of EMCAL |
ee8f18d6 | 330 | |
35a1bfe6 | 331 | AliEMCALEMCGeometry * fEMCGeometry;// Geometry object for Electromagnetic calorimeter |
e8c0d6bb | 332 | |
787342d6 | 333 | AliEMCALTriggerMapping* fTriggerMapping; // Trigger mapping |
334 | ||
e8c0d6bb | 335 | TString fGeoName; // geometry name |
0663d9e3 | 336 | Int_t *fEMCSMSystem; // geometry structure |
e8c0d6bb | 337 | Int_t fKey110DEG; // for calculation abs cell id; 19-oct-05 |
0663d9e3 | 338 | Int_t fnSupModInDCAL; // for calculation abs cell id; 06-nov-12 |
e8c0d6bb | 339 | Int_t fNCellsInSupMod; // number cell in super module |
340 | Int_t fNETAdiv; // number eta divizion of module | |
341 | Int_t fNPHIdiv; // number phi divizion of module | |
342 | Int_t fNCellsInModule; // number cell in module | |
343 | TArrayD fPhiBoundariesOfSM; // phi boundaries of SM in rad; size is fNumberOfSuperModules; | |
8cc543cb | 344 | TArrayD fPhiCentersOfSM; // phi of centers of SM; size is fNumberOfSuperModules/2 |
345 | TArrayD fPhiCentersOfSMSec; // phi of centers of section where SM lies; size is fNumberOfSuperModules/2 | |
e8c0d6bb | 346 | // Local Coordinates of SM |
347 | TArrayD fPhiCentersOfCells; // [fNPhi*fNPHIdiv] from center of SM (-10. < phi < +10.) | |
348 | TArrayD fCentersOfCellsEtaDir; // size fNEta*fNETAdiv (for TRD1 only) (eta or z in SM, in cm) | |
349 | TArrayD fCentersOfCellsPhiDir; // size fNPhi*fNPHIdiv (for TRD1 only) (phi or y in SM, in cm) | |
350 | TArrayD fEtaCentersOfCells; // [fNEta*fNETAdiv*fNPhi*fNPHIdiv], positive direction (eta>0); eta depend from phi position; | |
351 | Int_t fNCells; // number of cells in calo | |
8cc543cb | 352 | Int_t fNPhi; // Number of Towers in the PHI direction |
e8c0d6bb | 353 | TArrayD fCentersOfCellsXDir; // size fNEta*fNETAdiv (for TRD1 only) ( x in SM, in cm) |
354 | Float_t fEnvelop[3]; // the GEANT TUB for the detector | |
355 | Float_t fArm1EtaMin; // Minimum pseudorapidity position of EMCAL in Eta | |
356 | Float_t fArm1EtaMax; // Maximum pseudorapidity position of EMCAL in Eta | |
357 | Float_t fArm1PhiMin; // Minimum angular position of EMCAL in Phi (degrees) | |
358 | Float_t fArm1PhiMax; // Maximum angular position of EMCAL in Phi (degrees) | |
359 | Float_t fEtaMaxOfTRD1; // Max eta in case of TRD1 geometry (see AliEMCALShishKebabTrd1Module) | |
8cc543cb | 360 | Float_t fDCALPhiMin; // Minimum angular position of DCAL in Phi (degrees) |
361 | Float_t fDCALPhiMax; // Maximum angular position of DCAL in Phi (degrees) | |
362 | Float_t fEMCALPhiMax; // Maximum angular position of EMCAL in Phi (degrees) | |
363 | Float_t fDCALStandardPhiMax; // special edge for the case that DCAL contian extension | |
364 | Float_t fDCALInnerExtandedEta; // DCAL inner edge in Eta (with some extension) | |
35a1bfe6 | 365 | TList *fShishKebabTrd1Modules; // list of modules |
e8c0d6bb | 366 | Float_t fParSM[3]; // SM sizes as in GEANT (TRD1) |
367 | Float_t fPhiModuleSize; // Phi -> X | |
368 | Float_t fEtaModuleSize; // Eta -> Y | |
369 | Float_t fPhiTileSize; // Size of phi tile | |
370 | Float_t fEtaTileSize; // Size of eta tile | |
371 | Int_t fNZ; // Number of Towers in the Z direction | |
0663d9e3 | 372 | Float_t fIPDistance; // Radial Distance of the inner surface of the EMCAL |
e8c0d6bb | 373 | Float_t fLongModuleSize; // Size of long module |
374 | // Geometry Parameters | |
0663d9e3 | 375 | Float_t fShellThickness; // Total thickness in (x,y) direction |
376 | Float_t fZLength; // Total length in z direction | |
377 | Float_t fSampling; // Sampling factor | |
e8c0d6bb | 378 | |
379 | TGeoHMatrix* fkSModuleMatrix[AliEMCALGeoParams::fgkEMCALModules] ; //Orientations of EMCAL super modules | |
35a1bfe6 | 380 | Bool_t fUseExternalMatrices; // Use the matrices set in fkSModuleMatrix and not those in the geoManager |
e8c0d6bb | 381 | |
382 | private: | |
383 | ||
384 | static AliEMCALGeometry *fgGeom; // Pointer to the unique instance of the singleton | |
385 | static Bool_t fgInit; // Tells if geometry has been succesfully set up. | |
386 | static const Char_t *fgkDefaultGeometryName; // Default name of geometry | |
387 | ||
388 | ||
8cc543cb | 389 | ClassDef(AliEMCALGeometry,17) // EMCAL geometry class |
937d0661 | 390 | |
e8c0d6bb | 391 | } ; |
937d0661 | 392 | |
e8c0d6bb | 393 | #endif // AliEMCALGEOUTILS_H |
2012850d | 394 |