]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIEMCALGEOMETRY_H | |
2 | #define ALIEMCALGEOMETRY_H | |
3 | /* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
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 | ||
17 | // --- ROOT system --- | |
18 | #include <Riostream.h> | |
19 | #include <TMath.h> | |
20 | #include <TArrayD.h> | |
21 | #include <TMatrixF.h> | |
22 | class TVector3; | |
23 | ||
24 | // --- AliRoot header files --- | |
25 | #include "AliEMCALGeoUtils.h" | |
26 | #include "AliEMCALEMCGeometry.h" | |
27 | class AliRecPoint; | |
28 | class AliEMCALRecPoint; | |
29 | ||
30 | class AliEMCALGeometry : public AliEMCALGeoUtils { | |
31 | ||
32 | public: | |
33 | ||
34 | AliEMCALGeometry(); // default ctor only for internal usage (singleton) | |
35 | AliEMCALGeometry(const AliEMCALGeometry& geom); | |
36 | virtual ~AliEMCALGeometry(void); | |
37 | ||
38 | static AliEMCALGeometry * GetInstance(const Text_t* name, | |
39 | const Text_t* title="") ; | |
40 | static AliEMCALGeometry * GetInstance(); | |
41 | AliEMCALGeometry & operator = (const AliEMCALGeometry & /*rvalue*/) { | |
42 | // assignement operator requested by coding convention but not needed | |
43 | Fatal("operator =", "not implemented"); | |
44 | return *this; | |
45 | }; | |
46 | ||
47 | ||
48 | ////////// | |
49 | // General | |
50 | // | |
51 | Bool_t IsInitialized(void) const { return AliEMCALEMCGeometry::fgInit ; } | |
52 | static const Char_t* GetDefaultGeometryName() {return AliEMCALEMCGeometry::fgkDefaultGeometryName;} | |
53 | ||
54 | ////////////////////////// | |
55 | // Global geometry methods | |
56 | // | |
57 | using AliEMCALGeoUtils::GetGlobal; | |
58 | ||
59 | virtual void GetGlobal(const AliRecPoint *rp, TVector3 &vglob) const; | |
60 | virtual void GetGlobal(const AliRecPoint *rp, TVector3 & gpos, TMatrixF & /* gmat */) | |
61 | const {GetGlobal(rp,gpos); } | |
62 | virtual void GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 &vglob) const; | |
63 | virtual void GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 & gpos, TMatrixF & /* gmat */) | |
64 | const {GetGlobalEMCAL(rp,gpos); } | |
65 | ||
66 | // Return EMC geometry parameters | |
67 | AliEMCALEMCGeometry * GetEMCGeometry() const {return fEMCGeometry ;} | |
68 | ||
69 | ////////////////////////////////////// | |
70 | // Return EMCAL geometrical parameters | |
71 | // | |
72 | const Char_t* GetNameOfEMCALEnvelope(void) const {return fEMCGeometry->GetNameOfEMCALEnvelope();} | |
73 | Float_t GetArm1PhiMin(void) const { return fEMCGeometry->GetArm1PhiMin(); } | |
74 | Float_t GetArm1PhiMax(void) const { return fEMCGeometry->GetArm1PhiMax(); } | |
75 | Float_t GetArm1EtaMin(void) const { return fEMCGeometry->GetArm1EtaMin();} | |
76 | Float_t GetArm1EtaMax(void) const { return fEMCGeometry->GetArm1EtaMax();} | |
77 | Float_t GetIPDistance(void) const { return fEMCGeometry->GetIPDistance();} | |
78 | Float_t GetEnvelop(Int_t index) const { return fEMCGeometry->GetEnvelop(index); } | |
79 | Float_t GetShellThickness(void) const { return fEMCGeometry->GetShellThickness(); } | |
80 | Float_t GetZLength(void) const { return fEMCGeometry->GetZLength(); } | |
81 | Int_t GetNECLayers(void) const {return fEMCGeometry->GetNECLayers();} | |
82 | Int_t GetNZ(void) const {return fEMCGeometry->GetNZ();} | |
83 | Int_t GetNEta(void) const {return fEMCGeometry->GetNEta();} | |
84 | Int_t GetNPhi(void) const {return fEMCGeometry->GetNPhi();} | |
85 | Float_t GetECPbRadThick(void)const {return fEMCGeometry->GetECPbRadThick();} | |
86 | Float_t GetECScintThick(void) const {return fEMCGeometry->GetECScintThick();} | |
87 | Float_t GetSampling(void) const {return fEMCGeometry->GetSampling(); } | |
88 | Int_t GetNumberOfSuperModules(void) const {return fEMCGeometry->GetNumberOfSuperModules();} | |
89 | Float_t GetfPhiGapForSuperModules(void) const {return fEMCGeometry->GetfPhiGapForSuperModules();} | |
90 | Float_t GetPhiModuleSize(void) const {return fEMCGeometry->GetPhiModuleSize();} | |
91 | Float_t GetEtaModuleSize(void) const {return fEMCGeometry->GetEtaModuleSize();} | |
92 | Float_t GetFrontSteelStrip(void) const {return fEMCGeometry->GetFrontSteelStrip();} | |
93 | Float_t GetLateralSteelStrip(void) const {return fEMCGeometry->GetLateralSteelStrip();} | |
94 | Float_t GetPassiveScintThick(void) const {return fEMCGeometry->GetPassiveScintThick();} | |
95 | Float_t GetPhiTileSize(void) const {return fEMCGeometry->GetPhiTileSize();} | |
96 | Float_t GetEtaTileSize(void) const {return fEMCGeometry->GetEtaTileSize();} | |
97 | Int_t GetNPhiSuperModule(void) const {return fEMCGeometry->GetNPhiSuperModule();} | |
98 | Int_t GetNPHIdiv(void) const {return fEMCGeometry->GetNPHIdiv();} | |
99 | Int_t GetNETAdiv(void) const {return fEMCGeometry->GetNETAdiv();} | |
100 | Int_t GetNCells(void) const {return fEMCGeometry->GetNCells();} | |
101 | Float_t GetLongModuleSize(void) const {return fEMCGeometry->GetLongModuleSize();} | |
102 | Float_t GetTrd1Angle(void) const {return fEMCGeometry->GetTrd1Angle();} | |
103 | Float_t Get2Trd1Dx2(void) const {return fEMCGeometry->Get2Trd1Dx2();} | |
104 | // -- | |
105 | Int_t GetNCellsInSupMod(void) const {return fEMCGeometry->GetNCellsInSupMod();} | |
106 | Int_t GetNCellsInModule(void) const {return fEMCGeometry->GetNCellsInModule(); } | |
107 | Int_t GetKey110DEG(void) const {return fEMCGeometry->GetKey110DEG();} | |
108 | Int_t GetILOSS(void) const {return fEMCGeometry->GetILOSS();} | |
109 | Int_t GetIHADR(void) const {return fEMCGeometry->GetIHADR();} | |
110 | // For gamma(Jet) trigger simulations | |
111 | Int_t GetNTRU() const {return fEMCGeometry->GetNTRU(); } | |
112 | Int_t GetNTRUEta() const {return fEMCGeometry->GetNTRUEta(); } | |
113 | Int_t GetNTRUPhi() const {return fEMCGeometry->GetNTRUPhi(); } | |
114 | Int_t GetNEtaSubOfTRU() const {return fEMCGeometry->GetNEtaSubOfTRU();} | |
115 | Int_t GetNModulesInTRU() const {return fEMCGeometry->GetNModulesInTRU(); } | |
116 | Int_t GetNModulesInTRUEta() const {return fEMCGeometry->GetNModulesInTRUEta(); } | |
117 | Int_t GetNModulesInTRUPhi() const {return fEMCGeometry->GetNModulesInTRUPhi(); } | |
118 | ||
119 | // -- | |
120 | Float_t GetDeltaEta(void) const {return fEMCGeometry->GetDeltaEta();} | |
121 | Float_t GetDeltaPhi(void) const {return fEMCGeometry->GetDeltaPhi();} | |
122 | Int_t GetNTowers(void) const {return fEMCGeometry->GetNTowers();} | |
123 | // | |
124 | Double_t GetPhiCenterOfSM(Int_t nsupmod) const {return fEMCGeometry->GetPhiCenterOfSM(nsupmod);} | |
125 | Float_t *GetSuperModulesPars(void) const {return fEMCGeometry->GetSuperModulesPars();} | |
126 | // | |
127 | Bool_t GetPhiBoundariesOfSM(Int_t nSupMod, Double_t &phiMin, Double_t &phiMax) const {return fEMCGeometry->GetPhiBoundariesOfSM(nSupMod, phiMin, phiMax);} | |
128 | Bool_t GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const {return fEMCGeometry->GetPhiBoundariesOfSMGap(nPhiSec, phiMin, phiMax);} | |
129 | // | |
130 | ||
131 | // Methods for AliEMCALRecPoint with taking into account energy of rec.point - Jul 30. 2007 | |
132 | using AliEMCALGeoUtils::RelPosCellInSModule; | |
133 | Bool_t RelPosCellInSModule(Int_t absId,Double_t distEff,Double_t &xr,Double_t &yr, | |
134 | Double_t & zr) const; | |
135 | Bool_t RelPosCellInSModule(Int_t absId,Int_t maxAbsId,Double_t distEff,Double_t &xr, | |
136 | Double_t &yr,Double_t &zr) const; | |
137 | ||
138 | /////////////////////////////// | |
139 | //Geometry data member setters | |
140 | // | |
141 | void SetNZ(Int_t nz) { fEMCGeometry->SetNZ(nz);} | |
142 | void SetNPhi(Int_t nphi) { fEMCGeometry->SetNPhi(nphi);} | |
143 | ||
144 | void SetNTRUEta(Int_t ntru) { fEMCGeometry->SetNTRUEta(ntru);} | |
145 | void SetNTRUPhi(Int_t ntru) { fEMCGeometry->SetNTRUPhi(ntru);} | |
146 | void SetSampling(Float_t samp) { fEMCGeometry->SetSampling(samp);} | |
147 | ||
148 | /* /////////////////// */ | |
149 | /* // useful utilities */ | |
150 | /* // */ | |
151 | /* Float_t AngleFromEta(Float_t eta) const { // returns theta in radians for a given pseudorapidity */ | |
152 | /* return 2.0*TMath::ATan(TMath::Exp(-eta)); */ | |
153 | /* } */ | |
154 | /* Float_t ZFromEtaR(Float_t r,Float_t eta) const { // returns z in for a given */ | |
155 | /* // pseudorapidity and r=sqrt(x*x+y*y). */ | |
156 | /* return r/TMath::Tan(AngleFromEta(eta)); */ | |
157 | /* } */ | |
158 | ||
159 | ////////////////////////////////////////////////// | |
160 | // Obsolete methods to be thrown out when feasible | |
161 | Float_t GetAlFrontThickness(void) const { return fEMCGeometry->GetAlFrontThickness();} | |
162 | Float_t GetGap2Active(void) const {return fEMCGeometry->GetGap2Active();} | |
163 | Float_t GetSteelFrontThickness(void) const { return fEMCGeometry->GetSteelFrontThickness();} | |
164 | Float_t GetTrd2AngleY(void) const {return fEMCGeometry->GetTrd2AngleY();} | |
165 | Float_t Get2Trd2Dy2(void) const {return fEMCGeometry->Get2Trd2Dy2();} | |
166 | Float_t GetTubsR(void) const {return fEMCGeometry->GetTubsR();} | |
167 | Float_t GetTubsTurnAngle(void) const {return fEMCGeometry->GetTubsTurnAngle();} | |
168 | Float_t GetIP2ECASection(void) const { return fEMCGeometry->GetIP2ECASection(); } | |
169 | ////////////////////////////////////////////////// | |
170 | ||
171 | protected: | |
172 | ||
173 | // ctor only for internal usage (singleton) | |
174 | AliEMCALGeometry(const Text_t* name, const Text_t* title); | |
175 | ||
176 | void Init(void); // initializes the parameters of EMCAL | |
177 | ||
178 | private: | |
179 | ||
180 | //Member data | |
181 | static AliEMCALGeometry * fgGeom; // pointer to the unique instance of the singleton | |
182 | // static Bool_t fgInit; // Tells if geometry has been succesfully set up. | |
183 | static const Char_t* fgkDefaultGeometryName; // Default name of geometry | |
184 | ||
185 | /////////////////////////////////////////////////////////// | |
186 | ||
187 | ClassDef(AliEMCALGeometry, 15) // EMCAL geometry class | |
188 | }; | |
189 | ||
190 | #endif // AliEMCALGEOMETRY_H |