]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALGeometry.h
AliTOFv2FHoles allowed
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALGeometry.h
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                               */
5
6 /* $Id$ */
7
8 //_________________________________________________________________________
9 // Geometry class  for EMCAL : singleton
10 // EMCAL consists of a layers of scintillator, and lead.
11 //                  
12 //*-- Author: Sahal Yacoob (LBL / UCT)
13 //*--   and : Yves Schutz (Subatech)
14         
15 #include <assert.h> 
16
17 // --- ROOT system ---
18 #include "TString.h"
19 #include "TObjArray.h"
20 #include "TVector3.h"
21
22 //class TObjArray ;  
23 //class TVector3; 
24 //class TMatrix ; 
25
26 // --- AliRoot header files ---
27
28 #include "AliGeometry.h"
29
30
31 class AliEMCALGeometry : public AliGeometry {
32
33 public: 
34
35   AliEMCALGeometry() {
36     // default ctor 
37     // must be kept public for root persistency purposes, but should never be called by the outside world
38   } ;  
39
40   AliEMCALGeometry(const AliEMCALGeometry & geom) {
41     // cpy ctor requested by Coding Convention but not yet needed
42     assert(0==1) ;
43   } 
44   
45   virtual ~AliEMCALGeometry(void) ; 
46   static AliEMCALGeometry * GetInstance(const Text_t* name, const Text_t* title="") ; 
47   static AliEMCALGeometry * GetInstance() ; 
48
49   AliEMCALGeometry & operator = (const AliEMCALGeometry  & rvalue) const {
50     // assignement operator requested by coding convention but not needed
51     assert(0==1) ;
52     return *(GetInstance()) ; 
53   }
54   virtual void GetGlobal(const AliRecPoint *, TVector3 &, TMatrix &) const {}
55   virtual void GetGlobal(const AliRecPoint *, TVector3 &) const {}
56   // General
57
58   Bool_t  IsInitialized(void) const { return fgInit ; }  
59                                                                        
60   // Return EMCA geometrical parameters
61
62   // geometry
63   const Float_t GetAirGap() const { return fAirGap ; }
64   const Float_t GetArm1PhiMin() const { return fArm1PhiMin ; }
65   const Float_t GetArm1PhiMax() const { return fArm1PhiMax ; }
66   const Float_t GetArm1ZOffset() const {return fArm1ZOffset ;}
67   const Float_t GetIPDistance()   const { return  fIPDistance  ; } 
68   const Float_t GetEnvelop(Int_t index) const { return fEnvelop[index] ; }  
69   const Float_t GetShellThickness() const { return fShellThickness ; }
70   const Float_t GetZLength() const { return fZLength ; } 
71   const Float_t GetGap2Active() const {return  fGap2Active ; }
72   const Int_t   GetNLayers() const {return fNLayers ;}
73   const Int_t   GetNZ() const {return fNZ ;}
74   const Int_t   GetNPhi() const {return fNPhi ;}
75   
76 protected:
77
78   AliEMCALGeometry(const Text_t* name, const Text_t* title="") : AliGeometry(name, title) { 
79     // ctor only for internal usage (singleton)
80     Init() ; 
81   }
82   void Init(void) ;            // initializes the parameters of EMCAL 
83
84 private:
85
86   static AliEMCALGeometry * fgGeom ; // pointer to the unique instance of the singleton 
87   static Bool_t fgInit ;             // Tells if geometry has been succesfully set up 
88
89   // geometry
90   Float_t fAirGap ;                  // Distance between envelop and active material 
91   Float_t fArm1PhiMin ;              // Minimum phi angle covered by Arm 1 
92   Float_t fArm1PhiMax ;              // Maximum phi angle covered by Arm 1       
93   Float_t fArm1ZOffset ;             // Distance from z = 0 of Arm 1
94
95 // It is assumed that Arm1 and Arm2 have the same following parameters
96   Float_t fEnvelop[3] ;              // the GEANT TUB that contains the 2 arms
97   Float_t fIPDistance ;              // Distance of the inner surface to the interaction point
98   Float_t fShellThickness ;          // Total thickness in (x,y) direction
99   Float_t fZLength ;                 // Total length in z direction
100   Float_t fGap2Active ;              // Gap between the envelop and the active material
101   Int_t fNLayers ;                  // Number of layers of material in the R direction
102   Int_t fNZ ;                      // Number of Towers in the Z direction
103   Int_t fNPhi ;                    //Number of Towers in the Phi Direction
104  
105   ClassDef(AliEMCALGeometry,1)       // EMCAL geometry class 
106
107 } ;
108
109 #endif // AliEMCALGEOMETRY_H