1 #ifndef ALIEMCALGEOMETRY_H
2 #define ALIEMCALGEOMETRY_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
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)
17 // --- ROOT system ---
19 #include "TObjArray.h"
22 // --- AliRoot header files ---
24 #include "AliGeometry.h"
26 class AliEMCALGeometry : public AliGeometry {
29 // default ctor, must be kept public for root persistency purposes,
30 // but should never be called by the outside world
32 AliEMCALGeometry(const AliEMCALGeometry & geom) {
33 // cpy ctor requested by Coding Convention but not yet needed
36 virtual ~AliEMCALGeometry(void) ;
37 static AliEMCALGeometry * GetInstance(const Text_t* name,
38 const Text_t* title="") ;
39 static AliEMCALGeometry * GetInstance() ;
40 AliEMCALGeometry & operator = (const AliEMCALGeometry & rvalue) const {
41 // assignement operator requested by coding convention but not needed
43 return *(GetInstance()) ;
45 virtual void GetGlobal(const AliRecPoint *, TVector3 &, TMatrix &) const {}
46 virtual void GetGlobal(const AliRecPoint *, TVector3 &) const {}
48 Bool_t IsInitialized(void) const { return fgInit ; }
49 // Return EMCA geometrical parameters
51 const Float_t GetAirGap() const { return fAirGap ; }
52 const Float_t GetAlFrontThickness() const { return fAlFrontThick;}
53 const Float_t GetArm1PhiMin() const { return fArm1PhiMin ; }
54 const Float_t GetArm1PhiMax() const { return fArm1PhiMax ; }
55 const Float_t GetArm1EtaMin() const { return fArm1EtaMin;}
56 const Float_t GetArm1EtaMax() const { return fArm1EtaMax;}
57 const Float_t GetIPDistance() const { return fIPDistance ; }
58 const Float_t GetEnvelop(Int_t index) const { return fEnvelop[index] ; }
59 const Float_t GetShellThickness() const { return fShellThickness ; }
60 const Float_t GetZLength() const { return fZLength ; }
61 const Float_t GetGap2Active() const {return fGap2Active ; }
62 const Float_t GetDeltaEta() const {return (fArm1EtaMax-fArm1EtaMin)/
64 const Float_t GetDeltaPhi() const {return (fArm1PhiMax-fArm1PhiMin)/
66 const Int_t GetNLayers() const {return fNLayers ;}
67 const Int_t GetNZ() const {return fNZ ;}
68 const Int_t GetNEta() const {return fNZ ;}
69 const Int_t GetNPhi() const {return fNPhi ;}
70 const Float_t GetPbRadThick(){ // returns Pb radiator thickness in cm.
71 return fPbRadThickness;
73 const Float_t GetFullSintThick(){ // returns Full tower sintilator
75 return fFullShowerSintThick;
77 const Float_t GetPreSintThick(){ // returns PreShower tower sintilator
79 return fPreShowerSintThick;
81 Float_t AngleFromEta(Float_t eta){ // returns angle in radians for a given
83 return 2.0*TMath::ATan(TMath::Exp(-eta));
85 Float_t ZFromEtaR(Float_t r,Float_t eta){ // returns z in for a given
86 // pseudorapidity and r=sqrt(x*x+y*y).
87 return r/TMath::Tan(AngleFromEta(eta));
89 Int_t TowerIndex(Int_t iz,Int_t iphi,Int_t ipre); // returns tower index
90 // returns tower indexs iz, iphi.
91 void TowerIndexes(Int_t index,Int_t &iz,Int_t &iphi,Int_t &ipre);
92 // for a given tower index it returns eta and phi of center of that tower.
93 void EtaPhiFromIndex(Int_t index,Float_t &eta,Float_t &phi);
94 // for a given eta and phi in the EMCAL it returns the tower index.
95 Int_t TowerIndexFromEtaPhi(Float_t eta,Float_t phi);
96 // for a given eta and phi in the EMCAL it returns the pretower index.
97 Int_t PreTowerIndexFromEtaPhi(Float_t eta,Float_t phi);
98 // Returns theta and phi (degree) for a given EMCAL cell indecated by relid
99 void PosInAlice(const Int_t *relid,Float_t &theta,Float_t &phi);
100 // Returns an array indicating the Tower/preshower, iz, and iphi for a
101 // specific EMCAL indes.
102 Bool_t AbsToRelNumbering(Int_t AbsId, Int_t *relid);
104 // Returns kTRUE if the two indexs are neighboring towers or preshowers.
105 Boot_t AliEMCALGeometry::AreNeighbours(Int_t index1,Int_t index2);
109 AliEMCALGeometry(const Text_t* name, const Text_t* title="") :
110 AliGeometry(name, title) {// ctor only for internal usage (singleton)
113 void Init(void) ; // initializes the parameters of EMCAL
116 static AliEMCALGeometry * fgGeom ; // pointer to the unique instance
118 static Bool_t fgInit;// Tells if geometry has been succesfully set up.
119 Float_t fAirGap; // Distance between envelop and active material
120 Float_t fAlFrontThick; // Thickness of the front Al face of the support box
121 Float_t fPreShowerSintThick; // Thickness of the sintilator for the
122 // preshower part of the calorimeter
123 Float_t fFullShowerSintThick;// Thickness of the sintilaor for the full
124 // shower part of the calorimeter
125 Float_t fPbRadThickness; // Thickness of Pb radiators cm.
126 Float_t fArm1PhiMin; // Minimum angular position of EMCAL in Phi (degrees)
127 Float_t fArm1PhiMax; // Maximum angular position of EMCAL in Phi (degrees)
128 Float_t fArm1EtaMin; // Minimum pseudorapidity position of EMCAL in Eta
129 Float_t fArm1EtaMax; // Maximum pseudorapidity position of EMCAL in Eta
131 // It is assumed that Arm1 and Arm2 have the same following parameters
132 Float_t fEnvelop[3]; // the GEANT TUB for the detector
133 Float_t fIPDistance; // Radial Distance of the inner surface of the EMCAL
134 Float_t fShellThickness; // Total thickness in (x,y) direction
135 Float_t fZLength; // Total length in z direction
136 Float_t fGap2Active; // Gap between the envelop and the active material
137 Int_t fNLayers; // Number of layers of material in the R direction
138 Int_t fNZ; // Number of Towers in the Z direction
139 Int_t fNPhi; //Number of Towers in the Phi Direction
141 ClassDef(AliEMCALGeometry,3) // EMCAL geometry class
145 #endif // AliEMCALGEOMETRY_H