]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDgeometry.h
Update of tracking code for tilted pads
[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 ///////////////////////////////////////////////////////////////////////////////
9 //                                                                           //
10 //  TRD geometry class                                                       //
11 //                                                                           //
12 ///////////////////////////////////////////////////////////////////////////////
13
14 #include "AliGeometry.h"
15
16 class AliTRDparameter;
17
18 class AliTRDgeometry : public AliGeometry {
19
20  public:
21
22   enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
23
24   AliTRDgeometry();
25   virtual ~AliTRDgeometry();
26
27   virtual void     CreateGeometry(Int_t *idtmed);
28   virtual Int_t    IsVersion() const = 0;
29   virtual void     Init();
30   virtual Bool_t   Impact(const TParticle * particle) const { return kTRUE; };
31   virtual Bool_t   Local2Global(Int_t d, Float_t *local, Float_t *global, AliTRDparameter *par) const;
32   virtual Bool_t   Local2Global(Int_t p, Int_t c, Int_t s, Float_t *local, Float_t *global, AliTRDparameter *par) const;
33   virtual Bool_t   Rotate(Int_t d, Float_t *pos, Float_t *rot) const;
34   virtual Bool_t   RotateBack(Int_t d, Float_t *rot, Float_t *pos) const;
35
36   static  Int_t    Nsect()   { return fgkNsect; };
37   static  Int_t    Nplan()   { return fgkNplan; };
38   static  Int_t    Ncham()   { return fgkNcham; };
39   static  Int_t    Ndet()    { return fgkNdet;  };
40
41   static  Float_t  Rmin()    { return fgkRmin;  };
42   static  Float_t  Rmax()    { return fgkRmax;  };
43   static  Float_t  Zmax1()   { return fgkZmax1; };
44   static  Float_t  Zmax2()   { return fgkZmax2; };
45
46   static  Float_t  Cwidcha() { return (fgkSwidth2 - fgkSwidth1) 
47                              / fgkSheight * (fgkCH + fgkVspace); };
48   static  Float_t  Cheight() { return fgkCH;      };
49   static  Float_t  Cspace()  { return fgkVspace;  };
50   static  Float_t  CraHght() { return fgkCraH;    };
51   static  Float_t  CdrHght() { return fgkCdrH;    };
52   static  Float_t  CamHght() { return fgkCamH;    };
53   static  Float_t  CroHght() { return fgkCroH;    };
54   static  Float_t  MyThick() { return fgkMyThick; };
55   static  Float_t  DrThick() { return fgkDrThick; };
56   static  Float_t  AmThick() { return fgkAmThick; };
57   static  Float_t  DrZpos()  { return fgkDrZpos;  };
58   static  Float_t  RpadW()   { return fgkRpadW;   };
59   static  Float_t  CpadW()   { return fgkCpadW;   };
60
61   virtual void     SetPHOShole() = 0;
62   virtual void     SetRICHhole() = 0;
63
64   virtual void     SetOldGeometry();
65
66   virtual Bool_t   GetPHOShole() const = 0;
67   virtual Bool_t   GetRICHhole() const = 0;
68
69   virtual Int_t    GetDetectorSec(const Int_t p, const Int_t c) const;
70   virtual Int_t    GetDetector(const Int_t p, const Int_t c, const Int_t s) const;
71   virtual Int_t    GetPlane(const Int_t d)   const;
72   virtual Int_t    GetChamber(const Int_t d) const;
73   virtual Int_t    GetSector(const Int_t d)  const;
74
75           Float_t  GetChamberWidth(const Int_t p)                 const { return fCwidth[p];     };
76           Float_t  GetChamberLength(const Int_t p, const Int_t c) const { return fClength[p][c]; }; 
77
78   virtual void     GetGlobal(const AliRecPoint *p, TVector3 &pos, TMatrix &mat) const { }; 
79   virtual void     GetGlobal(const AliRecPoint *p, TVector3 &pos) const { };
80  
81   static  Double_t GetAlpha()  { return 2 * 3.14159265358979323846 / fgkNsect; }; 
82
83  protected:
84
85   static const Int_t   fgkNsect;                            // Number of sectors in the full detector (18)
86   static const Int_t   fgkNplan;                            // Number of planes of the TRD (6)
87   static const Int_t   fgkNcham;                            // Number of chambers in z-direction (5)
88   static const Int_t   fgkNdet;                             // Total number of detectors (18 * 6 * 5 = 540)
89
90   static const Float_t fgkRmin;                             // Minimal radius of the TRD
91   static const Float_t fgkRmax;                             // Maximal radius of the TRD
92
93   static const Float_t fgkZmax1;                            // Half-length of the TRD at outer radius
94   static const Float_t fgkZmax2;                            // Half-length of the TRD at inner radius
95
96   static const Float_t fgkSheight;                          // Height of the TRD-volume in spaceframe (BTR1-3)
97   static const Float_t fgkSwidth1;                          // Lower width of the TRD-volume in spaceframe (BTR1-3)
98   static const Float_t fgkSwidth2;                          // Upper width of the TRD-volume in spaceframe (BTR1-3)
99   static const Float_t fgkSlenTR1;                          // Length of the TRD-volume in spaceframe (BTR1)
100   static const Float_t fgkSlenTR2;                          // Length of the TRD-volume in spaceframe (BTR2)
101   static const Float_t fgkSlenTR3;                          // Length of the TRD-volume in spaceframe (BTR3)
102
103   static const Float_t fgkCraH;                             // Height of the radiator part of the chambers
104   static const Float_t fgkCdrH;                             // Height of the drift region of the chambers
105   static const Float_t fgkCamH;                             // Height of the amplification region of the chambers
106   static const Float_t fgkCroH;                             // Height of the readout of the chambers
107   static const Float_t fgkCH;                               // Total height of the chambers
108
109   static const Float_t fgkVspace;                           // Vertical spacing of the chambers
110   static const Float_t fgkHspace;                           // Horizontal spacing of the chambers
111
112   static const Float_t fgkCalT;                             // Thickness of the lower aluminum frame
113   static const Float_t fgkCclsT;                            // Thickness of the lower G10 frame sides
114   static const Float_t fgkCclfT;                            // Thickness of the lower G10 frame front
115   static const Float_t fgkCcuT;                             // Thickness of the upper G10 frame
116   static const Float_t fgkCauT;                             // Thickness of the upper aluminum frame
117
118   static const Float_t fgkCroW;                             // Additional width of the readout chamber frames
119
120   static const Float_t fgkCpadW;                            // Difference of outer chamber width and pad plane width
121   static const Float_t fgkRpadW;                            // Difference of outer chamber width and pad plane width
122
123   static const Float_t fgkRaThick;                          // Thickness of the radiator
124   static const Float_t fgkMyThick;                          // Thickness of the mylar-layer
125   static const Float_t fgkXeThick;                          // Thickness of the gas volume
126   static const Float_t fgkDrThick;                          // Thickness of the drift region
127   static const Float_t fgkAmThick;                          // Thickness of the amplification region
128   static const Float_t fgkCuThick;                          // Thickness of the pad plane
129   static const Float_t fgkSuThick;                          // Thickness of the HEXCEL+G10 support structure
130   static const Float_t fgkFeThick;                          // Thickness of the FEE + signal lines
131   static const Float_t fgkCoThick;                          // Thickness of the PE of the cooling device
132   static const Float_t fgkWaThick;                          // Thickness of the cooling water
133
134   static const Float_t fgkRaZpos;                           // Position of the radiator
135   static const Float_t fgkMyZpos;                           // Position of the mylar-layer
136   static const Float_t fgkDrZpos;                           // Position of the drift region
137   static const Float_t fgkAmZpos;                           // Position of the amplification region
138   static const Float_t fgkCuZpos;                           // Position of the pad plane
139   static const Float_t fgkSuZpos;                           // Position of the HEXCEL+G10 support structure
140   static const Float_t fgkFeZpos;                           // Position of the FEE + signal lines
141   static const Float_t fgkCoZpos;                           // Position of the PE of the cooling device
142   static const Float_t fgkWaZpos;                           // Position of the colling water
143
144   Float_t              fCwidth[kNplan];                     // Outer widths of the chambers
145   Float_t              fClength[kNplan][kNcham];            // Outer lengths of the chambers
146   Float_t              fClengthPH[kNplan][kNcham];          // For sectors with holes for the PHOS
147   Float_t              fClengthRH[kNplan][kNcham];          // For sectors with holes for the RICH
148
149   Float_t              fRotA11[kNsect];                     // Matrix elements for the rotation
150   Float_t              fRotA12[kNsect];                     // Matrix elements for the rotation
151   Float_t              fRotA21[kNsect];                     // Matrix elements for the rotation
152   Float_t              fRotA22[kNsect];                     // Matrix elements for the rotation
153
154   Float_t              fRotB11[kNsect];                     // Matrix elements for the backward rotation
155   Float_t              fRotB12[kNsect];                     // Matrix elements for the backward rotation
156   Float_t              fRotB21[kNsect];                     // Matrix elements for the backward rotation
157   Float_t              fRotB22[kNsect];                     // Matrix elements for the backward rotation
158
159   ClassDef(AliTRDgeometry,5)                                // TRD geometry base class
160
161 };
162
163 #endif