]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDgeometry.h
Add Boost() method to boost all particles to LHC lab frame. Needed for asymmetric...
[u/mrichter/AliRoot.git] / TRD / AliTRDgeometry.h
1 #ifndef ALITRDGEOMETRY_H
2 #define ALITRDGEOMETRY_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 #include "AliGeometry.h"
9
10 class AliTRDgeometry : public AliGeometry {
11
12  public:
13
14   enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
15
16   AliTRDgeometry();
17   virtual ~AliTRDgeometry();
18
19   virtual void     CreateGeometry(Int_t *idtmed);
20   virtual Int_t    IsVersion() const = 0;
21   virtual void     Init();
22   virtual Bool_t   Local2Global(Int_t d, Float_t *local, Float_t *global) const;
23   virtual Bool_t   Local2Global(Int_t p, Int_t c, Int_t s, Float_t *local, Float_t *global) const;
24   virtual Bool_t   Rotate(Int_t d, Float_t *pos, Float_t *rot) const;
25   virtual Bool_t   RotateBack(Int_t d, Float_t *rot, Float_t *pos) const;
26
27   static  Int_t    Nsect()   { return fgkNsect; };
28   static  Int_t    Nplan()   { return fgkNplan; };
29   static  Int_t    Ncham()   { return fgkNcham; };
30   static  Int_t    Ndet()    { return fgkNdet;  };
31
32   static  Float_t  Rmin()    { return fgkRmin;  };
33   static  Float_t  Rmax()    { return fgkRmax;  };
34   static  Float_t  Zmax1()   { return fgkZmax1; };
35   static  Float_t  Zmax2()   { return fgkZmax2; };
36
37   static  Float_t  Cwidcha() { return (fgkSwidth2 - fgkSwidth1) 
38                              / fgkSheight * (fgkCheight + fgkCspace); };
39   static  Float_t  Cheight() { return fgkCheight; };
40   static  Float_t  Cspace()  { return fgkCspace;  };
41   static  Float_t  Ccframe() { return fgkCcframe; };
42   static  Float_t  MyThick() { return fgkMyThick; };
43   static  Float_t  DrThick() { return fgkDrThick; };
44   static  Float_t  AmThick() { return fgkAmThick; };
45   static  Float_t  DrZpos()  { return fgkDrZpos;  };
46
47   virtual void     SetPHOShole() = 0;
48   virtual void     SetRICHhole() = 0;
49
50   virtual void     SetNRowPad(const Int_t p, const Int_t c, const Int_t npad) {};
51   virtual void     SetNColPad(const Int_t npad);
52   virtual void     SetNTimeBin(const Int_t nbin);
53   virtual void     SetExpandTimeBin(const Int_t nbefore, const Int_t nafter)
54                                                                   { fTimeBefore = nbefore;
55                                                                     fTimeAfter  = nafter; };
56
57   virtual Bool_t   GetPHOShole() const = 0;
58   virtual Bool_t   GetRICHhole() const = 0;
59
60   virtual Int_t    GetDetector(const Int_t p, const Int_t c, const Int_t s) const;
61   virtual Int_t    GetPlane(const Int_t d)   const;
62   virtual Int_t    GetChamber(const Int_t d) const;
63   virtual Int_t    GetSector(const Int_t d)  const;
64
65           Float_t  GetChamberWidth(const Int_t p)           const { return fCwidth[p]; };
66    
67           Int_t    GetRowMax(const Int_t p, const Int_t c, const Int_t s)     
68                                                             const { return fRowMax[p][c][s]; };
69           Int_t    GetColMax(const Int_t p)                 const { return fColMax[p];       };
70           Int_t    GetTimeMax()                             const { return fTimeMax;         };
71           Int_t    GetTimeBefore()                          const { return fTimeBefore;      }; 
72           Int_t    GetTimeAfter()                           const { return fTimeAfter;       }; 
73           Int_t    GetTimeTotal()                           const { return fTimeMax 
74                                                                          + fTimeBefore 
75                                                                          + fTimeAfter; };
76
77           Float_t  GetRow0(const Int_t p, const Int_t c, const Int_t s)       
78                                                             const { return fRow0[p][c][s]; };
79           Float_t  GetCol0(const Int_t p)                   const { return fCol0[p];       };
80           Float_t  GetTime0(const Int_t p)                  const { return fTime0[p];      };
81
82           Float_t  GetRowPadSize(const Int_t p, const Int_t c, const Int_t s) 
83                                                             const { return fRowPadSize[p][c][s]; };
84           Float_t  GetColPadSize(const Int_t p)             const { return fColPadSize[p];       };
85           Float_t  GetTimeBinSize()                         const { return fTimeBinSize;         };
86
87   virtual void     GetGlobal(const AliRecPoint *p, TVector3 &pos, TMatrix &mat) const; 
88   virtual void     GetGlobal(const AliRecPoint *p, TVector3 &pos) const;   
89
90   static  Double_t GetAlpha()  { return 2 * 3.14159265358979323846 / fgkNsect; }; 
91
92  protected:
93
94   static const Int_t   fgkNsect;                            // Number of sectors in the full detector (18)
95   static const Int_t   fgkNplan;                            // Number of planes of the TRD (6)
96   static const Int_t   fgkNcham;                            // Number of chambers in z-direction (5)
97   static const Int_t   fgkNdet;                             // Total number of detectors (18 * 6 * 5 = 540)
98
99   static const Float_t fgkRmin;                             // Minimal radius of the TRD
100   static const Float_t fgkRmax;                             // Maximal radius of the TRD
101
102   static const Float_t fgkZmax1;                            // Half-length of the TRD at outer radius
103   static const Float_t fgkZmax2;                            // Half-length of the TRD at inner radius
104
105   static const Float_t fgkSheight;                          // Height of the TRD-volume in spaceframe (BTR1-3)
106   static const Float_t fgkSwidth1;                          // Lower width of the TRD-volume in spaceframe (BTR1-3)
107   static const Float_t fgkSwidth2;                          // Upper width of the TRD-volume in spaceframe (BTR1-3)
108   static const Float_t fgkSlenTR1;                          // Length of the TRD-volume in spaceframe (BTR1)
109   static const Float_t fgkSlenTR2;                          // Length of the TRD-volume in spaceframe (BTR2)
110   static const Float_t fgkSlenTR3;                          // Length of the TRD-volume in spaceframe (BTR3)
111
112   static const Float_t fgkCheight;                          // Height of the chambers
113   static const Float_t fgkCspace;                           // Vertical spacing of the chambers
114   static const Float_t fgkCaframe;                          // Height of the aluminum frame
115   static const Float_t fgkCcframe;                          // Height of the carbon frame
116   static const Float_t fgkCathick;                          // Thickness of the aluminum frame
117   static const Float_t fgkCcthick;                          // Thickness of the carbon frame
118
119   static const Float_t fgkRaThick;                          // Thickness of the radiator
120   static const Float_t fgkMyThick;                          // Thickness of the mylar-layer
121   static const Float_t fgkXeThick;                          // Thickness of the gas volume
122   static const Float_t fgkDrThick;                          // Thickness of the drift region
123   static const Float_t fgkAmThick;                          // Thickness of the amplification region
124   static const Float_t fgkCuThick;                          // Thickness of the pad plane
125   static const Float_t fgkSuThick;                          // Thickness of the HEXCEL+G10 support structure
126   static const Float_t fgkFeThick;                          // Thickness of the FEE + signal lines
127   static const Float_t fgkCoThick;                          // Thickness of the PE of the cooling device
128   static const Float_t fgkWaThick;                          // Thickness of the cooling water
129
130   static const Float_t fgkRaZpos;                           // Position of the radiator
131   static const Float_t fgkMyZpos;                           // Position of the mylar-layer
132   static const Float_t fgkDrZpos;                           // Position of the drift region
133   static const Float_t fgkAmZpos;                           // Position of the amplification region
134   static const Float_t fgkCuZpos;                           // Position of the pad plane
135   static const Float_t fgkSuZpos;                           // Position of the HEXCEL+G10 support structure
136   static const Float_t fgkFeZpos;                           // Position of the FEE + signal lines
137   static const Float_t fgkCoZpos;                           // Position of the PE of the cooling device
138   static const Float_t fgkWaZpos;                           // Position of the colling water
139
140   Int_t                fRowMax[kNplan][kNcham][kNsect];     // Number of pad-rows
141   Int_t                fColMax[kNplan];                     // Number of pad-columns
142   Int_t                fTimeMax;                            // Number of timebins in the drift region
143   Int_t                fTimeBefore;                         // Number of timebins before the drift region
144   Int_t                fTimeAfter;                          // Number of timebins after the drift region
145
146   Float_t              fCwidth[kNplan];                     // Width of the chambers
147
148   Float_t              fRow0[kNplan][kNcham][kNsect];       // Row-position of pad 0
149   Float_t              fCol0[kNplan];                       // Column-position of pad 0
150   Float_t              fTime0[kNplan];                      // Time-position of pad 0
151
152   Float_t              fRowPadSize[kNplan][kNcham][kNsect]; // Pad size in z-direction
153   Float_t              fColPadSize[kNplan];                 // Pad size in rphi-direction
154   Float_t              fTimeBinSize;                        // Size of the time buckets
155
156   Float_t              fRotA11[kNsect];                     // Matrix elements for the rotation
157   Float_t              fRotA12[kNsect];                     // Matrix elements for the rotation
158   Float_t              fRotA21[kNsect];                     // Matrix elements for the rotation
159   Float_t              fRotA22[kNsect];                     // Matrix elements for the rotation
160
161   Float_t              fRotB11[kNsect];                     // Matrix elements for the backward rotation
162   Float_t              fRotB12[kNsect];                     // Matrix elements for the backward rotation
163   Float_t              fRotB21[kNsect];                     // Matrix elements for the backward rotation
164   Float_t              fRotB22[kNsect];                     // Matrix elements for the backward rotation
165
166   ClassDef(AliTRDgeometry,3)                                // TRD geometry base class
167
168 };
169
170 #endif