]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALGeoUtils.h
Added function to make relative calibration objects
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALGeoUtils.h
index a7071bf165457916f9a0eeba7fe76f6e526faad5..9bd8fd91f5802191ed8b200d673105325f8f0344 100644 (file)
@@ -21,6 +21,7 @@ class TParticle ;
 
 // --- AliRoot header files ---
 #include "AliEMCALEMCGeometry.h"
+#include "AliEMCALGeoParams.h"
 class AliEMCALShishKebabTrd1Module;
 #include "AliLog.h"
 
@@ -41,8 +42,9 @@ public:
   TList  *GetShishKebabTrd1Modules() const {return fShishKebabTrd1Modules;}
   AliEMCALShishKebabTrd1Module *GetShishKebabModule(Int_t neta) const;
 
-  void PrintGeometry(); 
+  void PrintGeometryGeoUtils();   // *MENU*  
   void PrintCellIndexes(Int_t absId=0, int pri=0, const char *tit="") const ;  //*MENU*
+  void PrintLocalTrd1(Int_t pri=0) const;  // *MENU*
   virtual void Browse(TBrowser* b);
   virtual Bool_t  IsFolder() const;
 
@@ -126,14 +128,23 @@ public:
   void     GetModulePhiEtaIndexInSModuleFromTRUIndex(
               Int_t itru, Int_t iphitru, Int_t ietatru, Int_t &ietaSM, Int_t &iphiSM) const;
   Int_t   GetAbsTRUNumberFromNumberInSm(const Int_t row, const Int_t col, const Int_t sm) const ;
+
+       
+  void     BuildFastOR2DMap();
   Bool_t   GetAbsFastORIndexFromTRU(const Int_t iTRU, const Int_t iADC, Int_t& id) const;
   Bool_t                    GetAbsFastORIndexFromPositionInTRU(const Int_t iTRU, const Int_t iEta, const Int_t iPhi, Int_t& id) const; 
+  Bool_t                    GetAbsFastORIndexFromPositionInSM( const Int_t  iSM, const Int_t iEta, const Int_t iPhi, Int_t& id) const; 
+  Bool_t                    GetAbsFastORIndexFromPositionInEMCAL(                const Int_t iEta, const Int_t iPhi, Int_t& id) const;
   Bool_t             GetTRUFromAbsFastORIndex(const Int_t id, Int_t& iTRU, Int_t& iADC) const;
   Bool_t   GetPositionInTRUFromAbsFastORIndex(const Int_t id, Int_t& iTRU, Int_t& iEta, Int_t& iPhi) const;
   Bool_t    GetPositionInSMFromAbsFastORIndex(const Int_t id, Int_t& iSM, Int_t& iEta, Int_t& iPhi) const;
-  
-
-
+  Bool_t GetPositionInEMCALFromAbsFastORIndex(const Int_t id, Int_t& iEta, Int_t& iPhi) const;
+  Bool_t          GetFastORIndexFromCellIndex(const Int_t id, Int_t& idx) const;
+  Bool_t          GetCellIndexFromFastORIndex(const Int_t id, Int_t idx[4]) const;
+  Bool_t              GetTRUIndexFromSTUIndex(const Int_t id, Int_t& idx) const;
+  Int_t               GetTRUIndexFromSTUIndex(const Int_t id) const;
+  Bool_t            GetFastORIndexFromL0Index(const Int_t iTRU, const Int_t id, Int_t idx[], const Int_t size) const;
+       
   ///////////////////
   // useful utilities
   //
@@ -153,7 +164,10 @@ public:
          else AliFatal(Form("Wrong supermodule index -> %d",smod));
   }
        
-protected:
+  //Alternate geometry that allows to calculate tower position for different particles and different alignments
+  void RecalculateTowerPosition(Float_t drow, Float_t dcol, const Int_t sm, const Float_t depth,
+                                     const Float_t misaligTransShifts[15], const Float_t misaligRotShifts[15],Float_t global[3]) const;
+  
   //Returns shift-rotational matrixes for different volumes
   const TGeoHMatrix * GetMatrixForSuperModule(Int_t smod)const ;
        
@@ -189,7 +203,7 @@ protected:
   Float_t  fArm1PhiMax;              // Maximum angular position of EMCAL in Phi (degrees)
   Float_t  fEtaMaxOfTRD1;            // Max eta in case of TRD1 geometry (see AliEMCALShishKebabTrd1Module)
   TList    *fShishKebabTrd1Modules;  //! list of modules
-  Float_t  *fParSM;                  // SM sizes as in GEANT (TRD1)
+  Float_t  fParSM[3];                  // SM sizes as in GEANT (TRD1)
   Float_t  fPhiModuleSize;           // Phi -> X 
   Float_t  fEtaModuleSize;           // Eta -> Y 
   Float_t  fPhiTileSize;             // Size of phi tile
@@ -198,11 +212,13 @@ protected:
   Float_t  fIPDistance;                         // Radial Distance of the inner surface of the EMCAL
   Float_t  fLongModuleSize;          // Size of long module
   // Geometry Parameters
-  Float_t  fShellThickness;                 // Total thickness in (x,y) direction
-  Float_t  fZLength;                        // Total length in z direction
-  Float_t  fSampling;                       // Sampling factor
+  Float_t  fShellThickness;         // Total thickness in (x,y) direction
+  Float_t  fZLength;                // Total length in z direction
+  Float_t  fSampling;               // Sampling factor
 
-  TGeoHMatrix* fkSModuleMatrix[12] ; //Orientations of EMCAL super modules
+  Int_t    fFastOR2DMap[48][64];        // FastOR 2D Map over full EMCal
+       
+  TGeoHMatrix* fkSModuleMatrix[AliEMCALGeoParams::fgkEMCALModules] ; //Orientations of EMCAL super modules
 
        
   ClassDef(AliEMCALGeoUtils,1)       // EMCAL geometry class 
@@ -210,3 +226,4 @@ protected:
 } ;
 
 #endif // AliEMCALGEOUTILS_H
+