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 */
8 #include "AliGeometry.h"
10 class AliTRDgeometry : public AliGeometry {
14 enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 };
17 virtual ~AliTRDgeometry();
19 virtual void CreateGeometry(Int_t *idtmed);
20 virtual Int_t IsVersion() const = 0;
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;
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; };
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; };
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 MyThick() { return fgkMyThick; };
42 static Float_t DrThick() { return fgkDrThick; };
43 static Float_t RaThick() { return fgkRaThick; };
45 virtual void SetPHOShole() = 0;
46 virtual void SetRICHhole() = 0;
48 virtual void SetNRowPad(Int_t p, Int_t c, Int_t npad) {};
49 virtual void SetNColPad(Int_t npad);
50 virtual void SetNTimeBin(Int_t nbin);
52 virtual Bool_t GetPHOShole() const = 0;
53 virtual Bool_t GetRICHhole() const = 0;
55 virtual Int_t GetDetector(Int_t p, Int_t c, Int_t s) const;
56 virtual Int_t GetPlane(Int_t d) const;
57 virtual Int_t GetChamber(Int_t d) const;
58 virtual Int_t GetSector(Int_t d) const;
60 virtual Float_t GetChamberWidth(Int_t p) const { return fCwidth[p]; };
62 virtual Int_t GetRowMax(Int_t p, Int_t c, Int_t s) const { return fRowMax[p][c][s]; };
63 virtual Int_t GetColMax(Int_t p) const { return fColMax[p]; };
64 virtual Int_t GetTimeMax() const { return fTimeMax; };
66 virtual Float_t GetRow0(Int_t p, Int_t c, Int_t s) const { return fRow0[p][c][s]; };
67 virtual Float_t GetCol0(Int_t p) const { return fCol0[p]; };
68 virtual Float_t GetTime0(Int_t p) const { return fTime0[p]; };
70 virtual Float_t GetRowPadSize(Int_t p, Int_t c, Int_t s) const { return fRowPadSize[p][c][s]; };
71 virtual Float_t GetColPadSize(Int_t p) const { return fColPadSize[p]; };
72 virtual Float_t GetTimeBinSize() const { return fTimeBinSize; };
74 virtual void GetGlobal(const AliRecPoint *p, TVector3 &pos, TMatrix &mat) const;
75 virtual void GetGlobal(const AliRecPoint *p, TVector3 &pos) const;
77 static Double_t GetAlpha() { return 2 * 3.14159265358979323846 / fgkNsect; };
81 static const Int_t fgkNsect; // Number of sectors in the full detector (18)
82 static const Int_t fgkNplan; // Number of planes of the TRD (6)
83 static const Int_t fgkNcham; // Number of chambers in z-direction (5)
84 static const Int_t fgkNdet; // Total number of detectors (18 * 6 * 5 = 540)
86 static const Float_t fgkRmin; // Minimal radius of the TRD
87 static const Float_t fgkRmax; // Maximal radius of the TRD
89 static const Float_t fgkZmax1; // Half-length of the TRD at outer radius
90 static const Float_t fgkZmax2; // Half-length of the TRD at inner radius
92 static const Float_t fgkSheight; // Height of the TRD-volume in spaceframe (BTR1-3)
93 static const Float_t fgkSwidth1; // Lower width of the TRD-volume in spaceframe (BTR1-3)
94 static const Float_t fgkSwidth2; // Upper width of the TRD-volume in spaceframe (BTR1-3)
95 static const Float_t fgkSlenTR1; // Length of the TRD-volume in spaceframe (BTR1)
96 static const Float_t fgkSlenTR2; // Length of the TRD-volume in spaceframe (BTR2)
97 static const Float_t fgkSlenTR3; // Length of the TRD-volume in spaceframe (BTR3)
99 static const Float_t fgkCheight; // Height of the chambers
100 static const Float_t fgkCspace; // Vertical spacing of the chambers
101 static const Float_t fgkCaframe; // Height of the aluminum frame
102 static const Float_t fgkCcframe; // Height of the carbon frame
103 static const Float_t fgkCathick; // Thickness of the aluminum frame
104 static const Float_t fgkCcthick; // Thickness of the carbon frame
106 static const Float_t fgkSeThick; // Thickness of the radiator seal
107 static const Float_t fgkRaThick; // Thickness of the radiator
108 static const Float_t fgkPeThick; // Thickness of the PE-layer in the radiator
109 static const Float_t fgkMyThick; // Thickness of the mylar-layer
110 static const Float_t fgkXeThick; // Thickness of the gas volume
111 static const Float_t fgkDrThick; // Thickness of the drift region
112 static const Float_t fgkAmThick; // Thickness of the amplification region
113 static const Float_t fgkCuThick; // Thickness of the pad plane
114 static const Float_t fgkSuThick; // Thickness of the HEXCEL+G10 support structure
115 static const Float_t fgkFeThick; // Thickness of the FEE + signal lines
116 static const Float_t fgkCoThick; // Thickness of the PE of the cooling device
117 static const Float_t fgkWaThick; // Thickness of the cooling water
119 static const Float_t fgkSeZpos; // Position of the radiator seal
120 static const Float_t fgkRaZpos; // Position of the radiator
121 static const Float_t fgkPeZpos; // Position of the PE-layer in the radiator
122 static const Float_t fgkMyZpos; // Position of the mylar-layer
123 static const Float_t fgkDrZpos; // Position of the drift region
124 static const Float_t fgkAmZpos; // Position of the amplification region
125 static const Float_t fgkCuZpos; // Position of the pad plane
126 static const Float_t fgkSuZpos; // Position of the HEXCEL+G10 support structure
127 static const Float_t fgkFeZpos; // Position of the FEE + signal lines
128 static const Float_t fgkCoZpos; // Position of the PE of the cooling device
129 static const Float_t fgkWaZpos; // Position of the colling water
131 Int_t fRowMax[kNplan][kNcham][kNsect]; // Number of pad-rows
132 Int_t fColMax[kNplan]; // Number of pad-columns
133 Int_t fTimeMax; // Number of time buckets
135 Float_t fCwidth[kNplan]; // Width of the chambers
137 Float_t fRow0[kNplan][kNcham][kNsect]; // Row-position of pad 0
138 Float_t fCol0[kNplan]; // Column-position of pad 0
139 Float_t fTime0[kNplan]; // Time-position of pad 0
141 Float_t fRowPadSize[kNplan][kNcham][kNsect]; // Pad size in z-direction
142 Float_t fColPadSize[kNplan]; // Pad size in rphi-direction
143 Float_t fTimeBinSize; // Size of the time buckets
145 Float_t fRotA11[kNsect]; // Matrix elements for the rotation
146 Float_t fRotA12[kNsect]; // Matrix elements for the rotation
147 Float_t fRotA21[kNsect]; // Matrix elements for the rotation
148 Float_t fRotA22[kNsect]; // Matrix elements for the rotation
150 Float_t fRotB11[kNsect]; // Matrix elements for the backward rotation
151 Float_t fRotB12[kNsect]; // Matrix elements for the backward rotation
152 Float_t fRotB21[kNsect]; // Matrix elements for the backward rotation
153 Float_t fRotB22[kNsect]; // Matrix elements for the backward rotation
155 ClassDef(AliTRDgeometry,3) // TRD geometry base class