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