]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFGeometry.h
Obsolete medium 609 commented out (I.Hrivnacova). Sum of G10 fractions normalized...
[u/mrichter/AliRoot.git] / TOF / AliTOFGeometry.h
1 #ifndef ALITOFGEOMETRY_H
2 #define ALITOFGEOMETRY_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 //                                                                           //
10 //  TOF geometry class                                                       //
11 //                                                                           //
12 ///////////////////////////////////////////////////////////////////////////////
13
14
15
16 class AliTOFGeometry{
17
18  public:
19   AliTOFGeometry();
20   virtual ~AliTOFGeometry();
21
22   static  Int_t NStripA()     { return kNStripA;};
23   static  Int_t NStripB()     { return kNStripB;};
24   static  Int_t NStripC()     { return kNStripC;};
25   static  Int_t NpadX()       { return kNpadX;};
26   static  Int_t NpadZ()       { return kNpadZ;};
27   static  Int_t NpadXStrip()  { return kNpadX*kNpadZ;};
28   static  Int_t NSectors()    { return kNSectors;};
29   static  Int_t NPlates()     { return kNPlates;};
30   static  Int_t NPadXSector() { return (kNStripA + 2*kNStripB +
31                                        2*kNStripC)*kNpadX*kNpadZ;};
32   static  Int_t TimeDiff()    { return fgkTimeDiff;};
33   static  Int_t MaxTOFTree()  { return kMaxTOFTree;};
34
35
36   static  Float_t RinTOF()      { return fgkxTOF;};
37   static  Float_t Rmin()        { return fgkRmin;};
38   static  Float_t Rmax()        { return fgkRmax;};
39   static  Float_t ZlenA()       { return fgkZlenA;};
40   static  Float_t ZlenB()       { return fgkZlenB;};
41   static  Float_t ZlenC()       { return fgkZlenC;};
42   static  Float_t XPad()        { return fgkXPad;};
43   static  Float_t ZPad()        { return fgkZPad;};
44   static  Float_t MaxhZtof()    { return fgkMaxhZtof;};
45   static  Float_t StripLength() { return fgkStripLength;};
46   static  Float_t DeadBndX()    { return fgkDeadBndX;};
47   static  Float_t DeadBndZ()    { return fgkDeadBndZ;};
48   static  Float_t OverSpc()     { return fgkOverSpc;};
49
50   static  Float_t SigmaForTail1() { return fgkSigmaForTail1;};
51   static  Float_t SigmaForTail2() { return fgkSigmaForTail2;};
52   static  Float_t SpeedOfLight()  { return fgkSpeedOfLight;};
53   static  Float_t PionMass()      { return fgkPionMass;};
54   static  Float_t KaonMass()      { return fgkKaonMass;};
55   static  Float_t ProtonMass()    { return fgkProtonMass;};
56   static  Float_t ElectronMass()  { return fgkElectronMass;};
57   static  Float_t MuonMass()      { return fgkMuonMass;};
58  
59   static  Double_t GetAlpha()  { return 2 * 3.14159265358979323846 / kNSectors; }; 
60  
61
62   virtual void    Init();
63   virtual void    SetHoles(Bool_t holes) {fHoles = holes;};
64   virtual Bool_t  GetHoles() const {return fHoles;};
65   virtual Bool_t  IsInsideThePad(Int_t *det, Float_t *pos); 
66   virtual Float_t DistanceToPad(Int_t *det, Float_t *pos); 
67   virtual void    GetPos(Int_t *det,Float_t *pos);
68   virtual void    GetDetID(Float_t *pos,Int_t *det);
69   virtual Int_t   GetPlate(Float_t *pos);
70   virtual Int_t   GetStrip(Float_t *pos);
71   virtual Int_t   GetSector(Float_t *pos);
72   virtual Int_t   GetPadX(Float_t *pos);
73   virtual Int_t   GetPadZ(Float_t *pos);
74   virtual Float_t GetX(Int_t *det);
75   virtual Float_t GetY(Int_t *det);
76   virtual Float_t GetZ(Int_t *det);
77   virtual Float_t GetMinPlateTheta(Int_t iPlate);
78   virtual Float_t GetMaxPlateTheta(Int_t iPlate);
79   virtual Float_t GetMinStripTheta(Int_t iPlate, Int_t iStrip);
80   virtual Float_t GetMaxStripTheta(Int_t iPlate, Int_t iStrip);
81   virtual Float_t GetStripTheta(Int_t iPlate, Int_t iStrip);
82   virtual Float_t GetAngles(Int_t iplate, Int_t istrip)  const {return fAngles[iplate][istrip];};
83   virtual Float_t GetHeights(Int_t iplate, Int_t istrip) const {return fHeights[iplate][istrip];};
84
85   private:
86
87   enum {
88     kNStripA    = 15, // number of strips in A type module 
89     kNStripB    = 19, // number of strips in B type module 
90     kNStripC    = 20, // number of strips in C type module 
91     kNpadX      = 48, // Number of pads along X 
92     kNpadZ      = 2,  // Number of pads along Z
93     kNSectors   = 18, // Number of Sectors
94     kNPlates    = 5,  // Number of Plates
95     kMaxNstrip  = 20, // Max. number of strips
96     kMaxTOFTree = 5   // numer of geom. levels: 
97   };
98
99   static const Int_t fgkTimeDiff;      // Min signal separation (ps)
100
101   static const Float_t fgkRmin;        // Inner radius of the TOF (cm)
102   static const Float_t fgkRmax;        // Outer radius of the TOF (cm)
103   static const Float_t fgkZlenA;       // length (cm) of the A module
104   static const Float_t fgkZlenB;       // length (cm) of the B module
105   static const Float_t fgkZlenC;       // length (cm) of the C module
106   static const Float_t fgkXPad;        // Pad size in the x direction (cm)
107   static const Float_t fgkZPad;        // Pad size in the z direction (cm)
108   static const Float_t fgkMaxhZtof;    // Max half z-size of TOF (cm)
109   static const Float_t fgkStripLength; // Strip Length (rho X phi direction) (cm)
110   static const Float_t fgkDeadBndX;    // Dead Boundaries of a Strip along Z direction (width)
111   static const Float_t fgkDeadBndZ;    // Dead Boundaries of a Strip along X direction (length)
112   static const Float_t fgkOverSpc;     // Space available for sensitive layers in radial direction (cm)
113
114   static const Float_t fgkxTOF;// Inner TOF Radius used in Reconstruction (cm)
115
116   static const Float_t fgkSigmaForTail1;//Sig1 for simulation of TDC tails 
117   static const Float_t fgkSigmaForTail2;//Sig2 for simulation of TDC tails
118   static const Float_t fgkSpeedOfLight;// c (10^9 m/s)
119   static const Float_t fgkPionMass;// pion mass (Gev/c^2)
120   static const Float_t fgkKaonMass;// kaon mass (Gev/c^2)
121   static const Float_t fgkProtonMass;// proton mass (Gev/c^2)
122   static const Float_t fgkElectronMass;// electron mass (Gev/c^2)
123   static const Float_t fgkMuonMass;// muon mass (Gev/c^2)
124
125
126   static const Float_t fgkDprecMin;//num.prec.tolerance on Thmin 
127   static const Float_t fgkDprecMax;//num.prec.tolerance on Thma 
128   static const Float_t fgkDprecCen;//num.prec.tolerance on <Theta> 
129   Bool_t fHoles; //logical for geometry version (w/wo holes) 
130   Float_t fAngles[kNPlates][kMaxNstrip]; //Strip Tilt Angles
131   Float_t fHeights[kNPlates][kMaxNstrip];//Strip heights
132   Float_t fPhiSec; //sector Phi width (deg)
133
134   ClassDef(AliTOFGeometry,1) // TOF Geometry base class
135 };
136
137 #endif