]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSGeometry.h
AliITSgeom taken from AliITSLoader
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGeometry.h
index 015a9f755655288537ac700d83d708b7bbb70101..fa6e3893af871d141052916a6d31c54d414d6b17 100644 (file)
@@ -39,7 +39,7 @@ public:
   virtual ~AliPHOSGeometry(void) ; 
   static AliPHOSGeometry * GetInstance(const Text_t* name, const Text_t* title="") ; 
   static AliPHOSGeometry * GetInstance() ; 
-  virtual void   GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrix & gmat) const ;
+  virtual void   GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrixF & gmat) const ;
   virtual void   GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) const ;
   virtual Bool_t Impact(const TParticle * particle) const ;
 
@@ -63,9 +63,9 @@ public:
                                          // single crystal in a EMC module
   void ImpactOnEmc(Double_t theta, Double_t phi, Int_t & ModuleNumber, 
                         Double_t & z, Double_t & x) const ; 
-  void ImpactOnEmc(TVector3 vec, Int_t & ModuleNumber, 
+  void ImpactOnEmc(const TVector3& vec, Int_t & ModuleNumber, 
                         Double_t & z, Double_t & x) const ; 
-  void ImpactOnEmc(TParticle p, Int_t & ModuleNumber, 
+  void ImpactOnEmc(const TParticle& p, Int_t & ModuleNumber, 
                         Double_t & z, Double_t & x) const ; 
                                         // calculates the impact coordinates of a neutral particle  
                                          // emitted in direction theta and phi in ALICE
@@ -77,7 +77,7 @@ public:
                                          // gets the position of element (pad or Xtal) relative to Alice
   Bool_t RelToAbsNumbering(const Int_t * RelId, Int_t & AbsId) const ;         
                                          // converts the absolute PHOS numbering to a relative 
-  void  RelPosToAbsId(const Int_t module, const Double_t x, const Double_t z, Int_t & AbsId) const; 
+  void  RelPosToAbsId(Int_t module, Double_t x, Double_t z, Int_t & AbsId) const; 
                                          // converts local PHOS-module (x, z) coordinates to absId 
 
   Bool_t IsInitialized(void)                  const { return fgInit ; }  
@@ -92,6 +92,12 @@ public:
   Float_t  GetCellStep(void)                    const { return 2*(fGeometryEMCA->GetAirCellHalfSize()[0] + 
                                                                  fGeometryEMCA->GetStripWallWidthOut()) ;}
 
+  Float_t GetModuleCenter(Int_t module, Int_t axis) const {
+    return fModuleCenter[module][axis];}
+  Float_t GetModuleAngle(Int_t module, Int_t axis, Int_t angle) const {
+    return fModuleAngle[module][axis][angle];}
+  
+
   // Return EMCA geometry parameters
 
   AliPHOSEMCAGeometry * GetEMCAGeometry()      const {return fGeometryEMCA ;}
@@ -119,8 +125,10 @@ public:
   Float_t GetCPVBoxSize(Int_t index)           const { return fGeometryCPV ->GetCPVBoxSize(index);        } 
   Float_t GetIPtoCPVDistance(void)             const { return  GetIPtoOuterCoverDistance() - 
                                                               GetCPVBoxSize(1) - 1.0; }
-  TVector3 GetModuleCenter(const char *det, Int_t module) const;
-  TVector3 Global2Local(TVector3 globalPosition, Int_t module) const;
+  void GetModuleCenter(TVector3& center, const char *det, Int_t module) const;
+  void Global2Local(TVector3& localPosition,
+                   const TVector3& globalPosition,
+                   Int_t module) const;
 
   // Return PHOS' support geometry parameters
 
@@ -136,6 +144,8 @@ public:
   Float_t GetCradleWallThickness(void)   const { return fGeometrySUPP->GetCradleWallThickness();}
   Float_t GetCradleWall   (Int_t index)  const { return fGeometrySUPP->GetCradleWall   (index); }
   Float_t GetCradleWheel  (Int_t index)  const { return fGeometrySUPP->GetCradleWheel  (index); }
+  void Init(void) ;            // steering method for PHOS and PPSD/CPV
+
 
 protected:
 
@@ -143,8 +153,6 @@ protected:
     // ctor only for internal usage (singleton)
     Init() ; 
   }
-  void Init(void) ;            // steering method for PHOS and PPSD/CPV
-
 private:
 
   Int_t                    fNModules ;       // Number of modules constituing PHOS
@@ -156,13 +164,15 @@ private:
   AliPHOSEMCAGeometry     *fGeometryEMCA ;   // Geometry object for Electromagnetic calorimeter
   AliPHOSCPVGeometry      *fGeometryCPV ;    // Geometry object for CPV  (IHEP)
   AliPHOSSupportGeometry  *fGeometrySUPP ;   // Geometry object for PHOS support
+  Float_t fModuleCenter[5][3];   // xyz-position of the module center
+  Float_t fModuleAngle[5][3][2]; // polar and azymuth angles for 3 axes of modules
 
   void                     SetPHOSAngles();  // calculates the PHOS modules PHI angle
 
   static AliPHOSGeometry * fgGeom ; // pointer to the unique instance of the singleton 
   static Bool_t fgInit ;            // Tells if geometry has been succesfully set up 
 
-  ClassDef(AliPHOSGeometry,1)       // PHOS geometry class 
+  ClassDef(AliPHOSGeometry,2)       // PHOS geometry class 
 
 } ;