]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALGeometry.h
updates to derive AliEMCALRecPoint from AliCluster, remove calls to hard-coded geomet...
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALGeometry.h
index f575ccdbfb8abf793b6f231808b8a0b767927739..12069361f1c0009653eff29d71922ce67e82e0f8 100644 (file)
@@ -20,6 +20,7 @@ class TObjArray;
 class TVector3;
 class TGeoMatrix;
 class TParticle ; 
+class AliEMCALGeometry;
 class AliEMCALShishKebabTrd1Module;
 class AliEMCALRecPoint;
 class TClonesArray ;
@@ -51,7 +52,6 @@ public:
 
   void GetCellPhiEtaIndexInSModuleFromTRUIndex(Int_t itru, Int_t iphitru, Int_t ietatru, Int_t &ietaSM, Int_t &iphiSM) const ; // Tranforms Eta-Phi Cell index in TRU into Eta-Phi index in Super Module
   
-  // Have to call GetTransformationForSM() before calculation global charachteristics 
   void GetGlobal(const Double_t *loc, Double_t *glob, int ind) const;
   void GetGlobal(const TVector3 &vloc, TVector3 &vglob, int ind) const;
   void GetGlobal(Int_t absId, Double_t glob[3]) const;
@@ -66,13 +66,13 @@ public:
 
   Bool_t GetAbsCellIdFromEtaPhi(Double_t eta,Double_t phi, Int_t &absId) const;
 
-  //  virtual void GetGlobal(const AliEMCALRecPoint *rp, TVector3 &vglob) const;
-
   virtual void GetGlobal(const AliRecPoint *rp, TVector3 &vglob) const;
-  // Bool_t AreInSameTower(Int_t id1, Int_t id2) const ;  
-
-  virtual void GetGlobal(const AliRecPoint *, TVector3 &, TMatrixF &) const {}
-
+  virtual void GetGlobal(const AliRecPoint *rp, TVector3 & gpos, TMatrixF & /* gmat */) const
+               {GetGlobal(rp,gpos); }
+  virtual void GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 &vglob) const;
+  virtual void GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 & gpos, TMatrixF & /* gmat */) const
+               {GetGlobalEMCAL(rp,gpos); }
+  
   virtual Bool_t Impact(const TParticle *) const {return kTRUE;}
 
   Bool_t IsInEMCAL(Double_t x, Double_t y, Double_t z) const;
@@ -120,10 +120,14 @@ public:
   Int_t   GetNETAdiv() const {return fNETAdiv ;}
   Int_t   GetNCells()  const {return fNCells;}
 
-  Int_t   GetNTRU() const    {return fNTRU ; }  
+  Int_t   GetNTRU() const    {return fNTRUEta*fNTRUPhi ; }  
   Int_t   GetNTRUEta() const {return fNTRUEta ; }  
   Int_t   GetNTRUPhi() const {return fNTRUPhi ; }  
 
+  Int_t   GetNCellsInTRU() const    {return fNCellsInTRUEta*fNCellsInTRUPhi; }  
+  Int_t   GetNCellsInTRUEta() const {return fNCellsInTRUEta ; }  
+  Int_t   GetNCellsInTRUPhi() const {return fNCellsInTRUPhi ; }  
+
   Float_t GetSteelFrontThickness() const { return fSteelFrontThick;}
   Float_t GetLongModuleSize() const {return fLongModuleSize;}
 
@@ -137,13 +141,12 @@ public:
   // TRD1 staff
   void    CreateListOfTrd1Modules();
   TList  *GetShishKebabTrd1Modules() const {return fShishKebabTrd1Modules;}
-  AliEMCALShishKebabTrd1Module *GetShishKebabModule(Int_t neta);
+  AliEMCALShishKebabTrd1Module *GetShishKebabModule(Int_t neta) const;
+
+  Double_t GetPhiCenterOfSM(Int_t nsupmod) const;
 
-  void     GetTransformationForSM();
   Float_t *GetSuperModulesPars() {return fParSM;}
-  TGeoMatrix *GetTransformationForSM(int i) {
-  if(i>=0 && i<GetNumberOfSuperModules()) return fMatrixOfSM[i]; 
-                                        else return 0;}
+
   // May 31, 2006; ALICE numbering scheme: 
   // see ALICE-INT-2003-038: ALICE Coordinate System and Software Numbering Convention
   // All indexes are stared from zero now.
@@ -185,6 +188,10 @@ public:
   Bool_t   RelPosCellInSModule(Int_t absId, Double_t &xr, Double_t &yr, Double_t &zr) const;
   Bool_t   RelPosCellInSModule(Int_t absId, Double_t loc[3]) const;
   Bool_t   RelPosCellInSModule(Int_t absId, TVector3 &vloc) const;
+  //  Methods for AliEMCALRecPoint with taking into account energy of rec.point - Jul 30. 2007
+  Bool_t RelPosCellInSModule(Int_t absId,Double_t distEff,Double_t &xr,Double_t &yr,Double_t & zr) const; 
+  Bool_t RelPosCellInSModule(Int_t absId,Int_t maxAbsId,Double_t distEff,Double_t &xr,Double_t &yr,Double_t &zr) const;
+
   // ---
   Float_t AngleFromEta(Float_t eta) const { // returns theta in radians for a given pseudorapidity
     return 2.0*TMath::ATan(TMath::Exp(-eta));
@@ -196,7 +203,6 @@ public:
   void SetNZ(Int_t nz) { fNZ= nz ; printf("SetNZ: Number of modules in Z set to %d", fNZ) ; }
   void SetNPhi(Int_t nphi) { fNPhi= nphi ; printf("SetNPhi: Number of modules in Phi set to %d", fNPhi) ; }
 
-  void SetNTRU(Int_t ntru)    {fNTRU    = ntru; printf("SetNTRU: Number of TRUs per SuperModule set to %d", fNTRU) ; }
   void SetNTRUEta(Int_t ntru) {fNTRUEta = ntru; ; printf("SetNTRU: Number of TRUs per SuperModule in Etaset to %d", fNTRUEta) ;}
   void SetNTRUPhi(Int_t ntru) {fNTRUPhi = ntru; ; printf("SetNTRU: Number of TRUs per SuperModule in Phi set to %d", fNTRUPhi) ;}
 
@@ -265,9 +271,11 @@ private:
   Int_t   fNCellsInSupMod;               // number cell in super module
   Int_t   fNCellsInModule;               // number cell in module)
   //TRU parameters
-  Int_t   fNTRU ;                        //! Number of TRUs per module
-  Int_t   fNTRUEta ;                     //! Number of cell rows per Z in one TRU
-  Int_t   fNTRUPhi ;                     //! Number of cell rows per Phi in one TRU
+  Int_t   fNTRUEta ;                     // Number of TRUs per module in eta
+  Int_t   fNTRUPhi ;                     // Number of TRUs per module in phi
+  Int_t   fNCellsInTRUEta;               // Number of cells per TRU in eta 
+  Int_t   fNCellsInTRUPhi;               // Number of cells per TRU in phi 
+
   // TRD1 options - 30-sep-04
   Float_t fTrd1Angle;                    // angle in x-z plane (in degree) 
   Float_t f2Trd1Dx2;                     // 2*dx2 for TRD1
@@ -294,7 +302,6 @@ private:
   TList *fShishKebabTrd1Modules; //! list of modules
   // Local coordinates of SM for TRD1
   Float_t     fParSM[3];       // SM sizes as in GEANT (TRD1)
-  TGeoMatrix* fMatrixOfSM[12]; //![fNumberOfSuperModules]; get from gGeoManager;
 
   char *fAdditionalOpts[6];  //! some additional options for the geometry type and name
   int  fNAdditionalOpts;     //! size of additional options parameter
@@ -303,7 +310,7 @@ private:
   Int_t fILOSS;
   Int_t fIHADR;
 
-  ClassDef(AliEMCALGeometry, 11) // EMCAL geometry class 
-  };
+  ClassDef(AliEMCALGeometry, 13) // EMCAL geometry class 
+};
 
 #endif // AliEMCALGEOMETRY_H