]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/AliPHOSGeometry.h
A change in AliPHOSGeometry.h
[u/mrichter/AliRoot.git] / PHOS / AliPHOSGeometry.h
1 #ifndef ALIPHOSGEOMETRY_H
2 #define ALIPHOSGEOMETRY_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 ////////////////////////////////////////////////
7 //  Geometry class  for PHOS : singleton      //
8 //  Version SUBATECH                          //
9 //  Author  Y. Schutz SUBATECH                //
10 //       geometry parametrized for any        //  
11 //       shape of modules                     //
12 ////////////////////////////////////////////////
13
14 // --- ROOT system ---
15
16 #include "TNamed.h"
17 #include "TString.h"
18 #include "TObjArray.h"
19 #include "TVector3.h" 
20
21 // --- AliRoot header files ---
22
23 #include "AliGeometry.h"
24 #include "AliPHOSRecPoint.h"
25
26 class AliPHOSGeometry : public AliGeometry {
27
28 public: 
29
30   AliPHOSGeometry() {} ;  // must be kept public for root persistency purposes
31   virtual ~AliPHOSGeometry(void) ; 
32   static AliPHOSGeometry * GetInstance(const Text_t* name, const Text_t* title) ; 
33   static AliPHOSGeometry * GetInstance() ; 
34   virtual void  GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrix & gmat)  ;
35   virtual void  GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos)  ; 
36
37 protected:
38
39   AliPHOSGeometry(const Text_t* name, const Text_t* title) : AliGeometry(name, title) { Init() ; }  
40   void Init(void) ;            // steering method for PHOS and CPV
41   void InitPHOS(void) ;        // defines the various PHOS geometry parameters
42   void InitPPSD(void) ;        // defines the various PPSD geometry parameters
43
44 public: 
45
46   // General
47
48   Bool_t AbsToRelNumbering(const Int_t AbsId, Int_t * RelId) ;           // converts the absolute PHOS numbering to a relative 
49   void   RelPosInModule(const Int_t * RelId, Float_t & y, Float_t & z) ; // gets the position of element (pad or Xtal) relative to 
50                                                                          // center of PHOS module  
51   void   RelPosInAlice(const Int_t AbsId, TVector3 &  pos) ;             // gets the position of element (pad or Xtal) relative to 
52                                                                          // Alice
53   Bool_t RelToAbsNumbering(const Int_t * RelId, Int_t & AbsId) ;         // converts the absolute PHOS numbering to a relative 
54                                                                          // inlines
55
56   ///////////// PHOS related parameters
57
58   Bool_t     IsInitialized(void)                  const { return fInit ; }  
59   Float_t    GetAirFilledBoxSize(Int_t index)     const { return fAirFilledBoxSize[index] ;}
60   Float_t    GetCrystalHolderThickness(void)      const { return fCrystalHolderThickness ; } 
61   Float_t    GetCrystalSize(Int_t index)          const { return fXtlSize[index] ; }
62   Float_t    GetCrystalSupportHeight(void)        const { return fCrystalSupportHeight ; } 
63   Float_t    GetCrystalWrapThickness(void)        const { return fCrystalWrapThickness;}
64   Float_t    GetGapBetweenCrystals(void)          const { return fGapBetweenCrystals ; }
65   Float_t    GetIPtoCrystalSurface(void)          const { return fIPtoCrystalSurface ; }
66   Float_t    GetIPtoOuterCoverDistance(void)      const { return fIPtoOuterCoverDistance ; }
67   Float_t    GetIPtoTopLidDistance(void)          const { return fIPtoTopLidDistance ; }
68   Float_t    GetLowerThermoPlateThickness(void)   const { return fLowerThermoPlateThickness ; }
69   Float_t    GetLowerTextolitPlateThickness(void) const { return fLowerTextolitPlateThickness ; }
70   Float_t    GetModuleBoxThickness(void)          const { return fModuleBoxThickness ; }
71   Int_t      GetNPhi(void)                        const { return fNPhi ; }
72   Int_t      GetNZ(void)                          const { return fNZ ; }
73   Int_t      GetNModules(void)                    const { return fNModules ; }
74   Float_t    GetOuterBoxSize(Int_t index)         const { return fOuterBoxSize[index] ;    }
75   Float_t    GetOuterBoxThickness(Int_t index)    const { return fOuterBoxThickness[index] ; } 
76   Float_t    GetPHOSAngle(Int_t index)            const { return fPHOSAngle[index-1] ; } 
77   Float_t    GetPinDiodeSize(Int_t index)         const { return fPinDiodeSize[index] ; }
78   Float_t    GetSecondUpperPlateThickness(void)   const { return fSecondUpperPlateThickness ; }
79   Float_t    GetSupportPlateThickness(void)       const { return fSupportPlateThickness ; }    
80   Float_t    GetTextolitBoxSize(Int_t index)      const { return fTextolitBoxSize[index] ; }
81   Float_t    GetTextolitBoxThickness(Int_t index) const { return fTextolitBoxThickness[index]; } 
82   Float_t    GetUpperPlateThickness(void)         const { return fUpperPlateThickness ; }
83   Float_t    GetUpperCoolingPlateThickness(void)  const { return fUpperCoolingPlateThickness ; }
84
85 private:
86
87   void       SetPHOSAngles() ; // calculates the PHOS modules PHI angle
88
89 public: 
90  
91   ///////////// PPSD (PHOS PRE SHOWER DETECTOR)  related parameters
92
93
94   Float_t GetAnodeThickness(void)          const { return fAnodeThickness ; } 
95   Float_t GetAvalancheGap(void)            const { return fAvalancheGap ; }
96   Float_t GetCathodeThickness(void)        const { return fCathodeThickness ; } 
97   Float_t GetCompositeThickness(void)      const { return fCompositeThickness ; } 
98   Float_t GetConversionGap(void)           const { return fConversionGap ; } 
99   Float_t GetLeadConverterThickness(void)  const { return fLeadConverterThickness ; }
100   Float_t GetLeadToMicro2Gap(void)         const { return fLeadToMicro2Gap ; }       
101   Float_t GetLidThickness(void)            const { return fLidThickness ; }
102   Float_t GetMicromegas1Thickness(void)    const { return fMicromegas1Thickness ; } 
103   Float_t GetMicromegas2Thickness(void)    const { return fMicromegas2Thickness ; } 
104   Float_t GetMicromegasWallThickness(void) const { return fMicromegasWallThickness ; } 
105   Float_t GetMicro1ToLeadGap(void)         const { return fMicro1ToLeadGap ; } 
106   Int_t   GetNumberOfPadsPhi(void)         const { return fNumberOfPadsPhi ; }
107   Int_t   GetNumberOfPadsZ(void)           const { return fNumberOfPadsZ ; }
108   Int_t   GetNumberOfModulesPhi(void)      const { return fNumberOfModulesPhi ; }          
109   Int_t   GetNumberOfModulesZ(void)        const { return fNumberOfModulesZ ; }               
110   Float_t GetPCThickness(void)             const { return fPCThickness ; }   
111   Float_t GetPhiDisplacement(void)         const { return fPhiDisplacement ; }                           
112   Float_t GetPPSDBoxSize(Int_t index)      const { return fPPSDBoxSize[index] ; }
113   Float_t GetPPSDModuleSize(Int_t index)   const { return fPPSDModuleSize[index] ; } 
114   Float_t GetZDisplacement(void)           const { return fZDisplacement ; }                           
115
116 private:
117   
118   ///////////// PHOS related parameters
119
120   Float_t fAirFilledBoxSize[3] ;          // Air filled box containing one module
121   Float_t fAirThickness[3] ;              // Space filled with air between the module box and the Textolit box
122   Float_t fCrystalSupportHeight ;         // Height of the support of the crystal    
123   Float_t fCrystalWrapThickness ;         // Thickness of Tyvek wrapping the crystal
124   Float_t fCrystalHolderThickness ;       // Titanium holder of the crystal
125   Float_t fGapBetweenCrystals ;           // Total Gap between two adjacent crystals 
126   Bool_t  fInit ;                         // Tells if geometry has been succesfully set up 
127   Float_t fIPtoOuterCoverDistance ;       // Distances from interaction point to outer cover 
128   Float_t fIPtoCrystalSurface ;           // Distances from interaction point to Xtal surface
129   Float_t fModuleBoxThickness ;           // Thickness of the thermo insulating box containing one crystals module 
130   Float_t fLowerTextolitPlateThickness ;  // Thickness of lower textolit plate
131   Float_t fLowerThermoPlateThickness ;    // Thickness of lower thermo insulating plate
132   Int_t   fNModules ;                     // Number of modules constituing PHOS
133   Int_t   fNPhi ;                         // Number of crystal units in X (phi) direction
134   Int_t   fNZ ;                           // Number of crystal units in Z direction
135   Float_t fOuterBoxSize[3] ;              // Size of the outer  thermo insulating foam box
136   Float_t fOuterBoxThickness[3] ;         // Thickness of the outer thermo insulating foam box
137   Float_t fPHOSAngle[4] ;                 // Position angles of modules
138   Float_t fPinDiodeSize[3] ;              // Size of the PIN Diode 
139   TObjArray *  fRotMatrixArray ;          // Liste of rotation matrices (one per phos module)
140   Float_t fSecondUpperPlateThickness ;    // Thickness of  upper polystyrene foam plate
141   Float_t fSupportPlateThickness ;        // Thickness of the Aluminium support plate  
142   Float_t fUpperCoolingPlateThickness ;   // Thickness of the upper cooling plate 
143   Float_t fUpperPlateThickness ;          // Thickness of the uper thermo insulating foam plate 
144   Float_t fTextolitBoxSize[3] ;           // Size of the Textolit box inside the insulating foam box
145   Float_t fTextolitBoxThickness[3] ;      // Thicknesses of th Textolit box
146   Float_t fXtlSize[3] ;                   // PWO4 crystal dimensions
147
148
149   ///////////// PPSD (PHOS PRE SHOWER DETECTOR)  related parameters
150
151   Float_t fAnodeThickness ;               // Thickness of the copper layer which makes the anode 
152   Float_t fAvalancheGap ;                 // Thickness of the gas in the avalanche stage
153   Float_t fCathodeThickness ;             // Thickeness of composite material ensuring rigidity of cathode
154   Float_t fCompositeThickness ;           // Thickeness of composite material ensuring rigidity of anode
155   Float_t fConversionGap ;                // Thickness of the gas in the conversion stage
156   Float_t fIPtoTopLidDistance ;           // Distance from interaction point to top lid of PPSD
157   Float_t fLeadConverterThickness ;       // Thickness of the Lead converter 
158   Float_t fLeadToMicro2Gap ;              // Thickness of the air gap between the Lead and Micromegas 2        
159   Float_t fLidThickness ;                 // Thickness of top lid 
160   Float_t fMicromegas1Thickness ;         // Thickness of the first downstream Micromegas 
161   Float_t fMicromegas2Thickness ;         // Thickness of the second downstream Micromegas 
162   Float_t fMicromegasWallThickness ;      // Thickness of the Micromegas leak tight box
163   Float_t fMicro1ToLeadGap ;              // Thickness of the air gap between Micromegas 1 and the Lead
164   Int_t   fNumberOfPadsPhi ;              // Number of pads on a micromegas module ;  
165   Int_t   fNumberOfPadsZ ;                // Number of pads on a micromegas module ;  
166   Int_t   fNumberOfModulesPhi ;           // Number of micromegas modules in phi
167   Int_t   fNumberOfModulesZ ;             // Number of micromegas modules in z
168   Float_t fPCThickness ;                  // Thickness of the printed circuit board of the anode   
169   Float_t fPhiDisplacement ;              // Phi displacement of micromegas1 with respect to micromegas2  
170   Float_t fPPSDBoxSize[3] ;               // Size of large box which contains PPSD; matches PHOS module size
171   Float_t fPPSDModuleSize[3] ;            // Size of an individual micromegas module
172   Float_t fZDisplacement ;                // Z displacement of micromegas1 with respect to micromegas2  
173
174   static AliPHOSGeometry * fGeom ; // pointer to the unique instance of the singleton 
175
176   ClassDef(AliPHOSGeometry,1)  // PHOS geometry class , version subatech
177
178 } ;
179
180 #endif // AliPHOSGEOMETRY_H