]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALGeometry.h
SetSamplingFraction() removed from constructor.
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALGeometry.h
index cce1331dce21f652ad1adb57e2351720fd3e4fb2..554e62a4749fff570818daf92fca178f6c7bd698 100644 (file)
@@ -15,9 +15,9 @@
 #include <assert.h> 
 
 // --- ROOT system ---
-#include "TString.h"
-#include "TObjArray.h"
-#include "TVector3.h"
+  class TString ;
+class TObjArray ;
+class TVector3 ;
 class TParticle ; 
 
 // --- AliRoot header files ---
@@ -43,6 +43,8 @@ public:
     assert(0==1) ;
     return *(GetInstance()) ; 
   };
+
+  const Bool_t AreInSameTower(Int_t id1, Int_t id2) const ;  
   virtual void GetGlobal(const AliRecPoint *, TVector3 &, TMatrix &) const {}
   virtual void GetGlobal(const AliRecPoint *, TVector3 &) const {}
   virtual Bool_t Impact(const TParticle * particle) const {return kTRUE;}
@@ -56,8 +58,9 @@ public:
   const Float_t GetArm1EtaMin() const { return fArm1EtaMin;}
   const Float_t GetArm1EtaMax() const { return fArm1EtaMax;}
   const Float_t GetIPDistance() const { return fIPDistance  ; } 
-  const Float_t GetIP2PreShower()  const { return (GetIPDistance() + GetAlFrontThickness() +  GetGap2Active() ) ;}
-  const Float_t GetIP2Tower() const { return ( GetIP2PreShower() + 2 * (  GetPreSintThick() +  GetPbRadThick() ) ) ; }  
+  const Float_t GetIP2PRESection()  const { return (GetIPDistance() + GetAlFrontThickness() +  GetGap2Active() ) ;}
+  const Float_t GetIP2ECALSection() const { return ( GetIP2PRESection() + GetNPRLayers() * (  GetPRScintThick() +  GetPRPbRadThick() ) ) ; }  
+  const Float_t GetIP2HCALSection() const { return ( GetIP2ECALSection() + GetNECLayers() * ( GetECScintThick() +  GetECPbRadThick() ) ) ; }  
   const Float_t GetEnvelop(Int_t index) const { return fEnvelop[index] ; }  
   const Float_t GetShellThickness() const { return fShellThickness ; }
   const Float_t GetZLength() const { return fZLength ; } 
@@ -73,16 +76,19 @@ public:
   const Int_t   GetNEta() const {return fNZ ;}
   const Int_t   GetNPhi() const {return fNPhi ;}
   const Int_t   GetNTowers() const {return fNPhi * fNZ ;}
-  const Float_t GetPbRadThick()const {return fPbRadThickness;}
-  const Float_t GetCuRadThick()const {return fCuRadThickness;}
-  const Float_t GetFullSintThick() const { // returns Full tower sintilator
-    // thickness in cm.
-    return fFullShowerSintThick;
-  }
-  const Float_t GetPreSintThick() const { // returns PreShower tower sintilator
-    // thickness in cm.
-    return fPreShowerSintThick;
-  }
+  const Float_t GetPRPbRadThick()const {return fPRPbRadThickness;}
+  const Float_t GetECPbRadThick()const {return fECPbRadThickness;}
+  const Float_t GetHCCuRadThick()const {return fHCCuRadThickness;}
+  const Float_t GetPRScintThick() const {return fPRScintThick;}
+  const Float_t GetECScintThick() const {return fECScintThick;}
+  const Float_t GetHCScintThick() const {return fECScintThick;}
+  const Float_t GetSampling() const {return fSampling ; } 
+  const Float_t GetSummationFraction() const {return fSummationFraction ; } 
+  
+  const Bool_t IsInPRE(Int_t index) const  { if ( (index > (GetNZ() * GetNPhi()) && (index <= 2 * (GetNZ() * GetNPhi())))) return kTRUE; else return kFALSE ;} 
+  const Bool_t IsInECAL(Int_t index) const { if ( (index > 0 && (index <= GetNZ() * GetNPhi()))) return kTRUE; else return kFALSE ;}
+  const Bool_t IsInHCAL(Int_t index) const { if ( (index > 2*(GetNZ() * GetNPhi()) && (index <= 3 * (GetNZ() * GetNPhi())))) return kTRUE; else return kFALSE ;} ; 
+
   Float_t AngleFromEta(Float_t eta){ // returns angle in radians for a given
     // pseudorapidity.
     return 2.0*TMath::ATan(TMath::Exp(-eta));
@@ -91,21 +97,21 @@ public:
     // pseudorapidity and r=sqrt(x*x+y*y).
     return r/TMath::Tan(AngleFromEta(eta));
   }
-  Int_t TowerIndex(Int_t iz,Int_t iphi,Int_t ipre) const; // returns tower index
+  Int_t TowerIndex(Int_t iz,Int_t iphi) const; // returns tower index
   // returns tower indexs iz, iphi.
   void TowerIndexes(Int_t index,Int_t &iz,Int_t &iphi,Int_t &ipre) const;
   // for a given tower index it returns eta and phi of center of that tower.
   void EtaPhiFromIndex(Int_t index,Float_t &eta,Float_t &phi) const;
   // returns x, y, and z (cm) on the inner surface of a given EMCAL Cell specified by relid.
   void XYZFromIndex(const Int_t *relid,Float_t &x,Float_t &y, Float_t &z) const;
+  void XYZFromIndex(const Int_t absid, TVector3 &v) const;
   // for a given eta and phi in the EMCAL it returns the tower index.
   Int_t TowerIndexFromEtaPhi(Float_t eta,Float_t phi) const;
   // for a given eta and phi in the EMCAL it returns the pretower index.
   Int_t PreTowerIndexFromEtaPhi(Float_t eta,Float_t phi) const;
-  // Returns theta and phi (degree) for a given EMCAL cell indecated by relid
-  void PosInAlice(const Int_t *relid,Float_t &theta,Float_t &phi) const ;
-  // Returns an array indicating the Tower/preshower, iz, and iphi for a
-  // specific EMCAL indes.
+  // Returns theta and phi (degree) for a given EMCAL cell indicated by relid or absid
+  void PosInAlice(const Int_t *relid, Float_t &theta, Float_t &phi) const ;
+  void PosInAlice(const Int_t absid, Float_t &theta, Float_t &phi) const ;
   Bool_t AbsToRelNumbering(Int_t AbsId, Int_t *relid) const;
   /*
   // Returns kTRUE if the two indexs are neighboring towers or preshowers.
@@ -114,7 +120,8 @@ public:
   
   void SetNZ(Int_t nz) { fNZ= nz ; Info("SetNZ", "Number of modules in Z set to %d", fNZ) ; }
   void SetNPhi(Int_t nphi) { fNPhi= nphi ; Info("SetNPhi", "Number of modules in Phi set to %d", fNPhi) ; }
-  
+  void SetSampling(Float_t samp) { fSampling = samp; Info("SetSampling", "Sampling factor set to %f", fSampling) ; }
+
 protected:
   AliEMCALGeometry(const Text_t* name, const Text_t* title="") :
     AliGeometry(name, title) {// ctor only for internal usage (singleton)
@@ -127,28 +134,34 @@ private:
   // of the singleton 
   static Bool_t fgInit;// Tells if geometry has been succesfully set up.
   Float_t fAlFrontThick; // Thickness of the front Al face of the support box
-  Float_t fPreShowerSintThick; // Thickness of the sintilator for the
-  // preshower part of the calorimeter
-  Float_t fFullShowerSintThick;// Thickness of the sintilaor for the full
-  // shower part of the calorimeter
-  Float_t fPbRadThickness; // Thickness of Pb radiators cm.
-  Float_t fCuRadThickness; // Thickness of Cu radiators cm.
+
+  Float_t fPRPbRadThickness ;  // cm, Thickness of the Pb radiators for the preshower section 
+  Float_t fPRScintThick      ;  // cm, Thickness of the sintilator for the preshower section of the tower
+  Int_t   fNPRLayers        ;  // number of scintillator layers in the preshower section 
+  
+  Float_t fECPbRadThickness ;  // cm, Thickness of the Pb radiators for the EM calorimeter  section 
+  Float_t fECScintThick      ;  // cm, Thickness of the sintilator for the EM alorimeter section of the tower  
+  Int_t   fNECLayers        ;  // number of scintillator layers in the EM calorimeter section 
+  
+  Float_t fHCCuRadThickness ;  // cm, Thickness of the Cu radiators.
+  Float_t fHCScintThick      ;  // cm, Thickness of the sintilator for the hadronic alorimeter section of the tower  
+  Int_t   fNHCLayers        ;  // number of scintillator layers in the hadronic calorimeter section
+  
   Float_t fArm1PhiMin; // Minimum angular position of EMCAL in Phi (degrees)
   Float_t fArm1PhiMax; // Maximum angular position of EMCAL in Phi (degrees)
   Float_t fArm1EtaMin; // Minimum pseudorapidity position of EMCAL in Eta
   Float_t fArm1EtaMax; // Maximum pseudorapidity position of EMCAL in Eta
   
   // It is assumed that Arm1 and Arm2 have the same following parameters
-  Float_t fEnvelop[3];     // the GEANT TUB for the detector 
-  Float_t fIPDistance;     // Radial Distance of the inner surface of the EMCAL
-  Float_t fShellThickness; // Total thickness in (x,y) direction
-  Float_t fZLength;        // Total length in z direction
-  Float_t fGap2Active;     // Gap between the envelop and the active material
-  Int_t   fNECLayers;        // Number of layers of material in the R direction for the electromagnetic calorimeter 
-  Int_t   fNPRLayers;      // Number of layers of material in the R direction for the preshower
-  Int_t   fNHCLayers;      // Number of layers of material in the R direction for the hadron calorimeter
+  Float_t fEnvelop[3];      // the GEANT TUB for the detector 
+  Float_t fIPDistance;      // Radial Distance of the inner surface of the EMCAL
+  Float_t fShellThickness;  // Total thickness in (x,y) direction
+  Float_t fZLength;         // Total length in z direction
+  Float_t fGap2Active;      // Gap between the envelop and the active material
   Int_t   fNZ;             // Number of Towers in the Z direction
   Int_t   fNPhi;           // Number of Towers in the Phi Direction
+  Float_t fSampling;       // Sampling factor
+  Float_t fSummationFraction; // Fraction of the energy collected in the PRE section to be added to the EC section
   
   ClassDef(AliEMCALGeometry,5) // EMCAL geometry class