]>
Commit | Line | Data |
---|---|---|
dd9a6ee3 | 1 | #ifndef ALITRDGEOMETRY_H |
2 | #define ALITRDGEOMETRY_H | |
f7336fa3 | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
db30bf0f | 6 | /* $Id$ */ |
f7336fa3 | 7 | |
0a29d0f1 | 8 | /////////////////////////////////////////////////////////////////////////////// |
9 | // // | |
10 | // TRD geometry class // | |
11 | // // | |
12 | /////////////////////////////////////////////////////////////////////////////// | |
13 | ||
94de3818 | 14 | #include "AliGeometry.h" |
2745a409 | 15 | |
b4a9cd27 | 16 | #include "TObjArray.h" |
2745a409 | 17 | |
bdbb05bb | 18 | class AliRunLoader; |
b4a9cd27 | 19 | class TGeoHMatrix; |
5443e65e | 20 | |
f7336fa3 | 21 | class AliTRDgeometry : public AliGeometry { |
22 | ||
23 | public: | |
24 | ||
9c782af4 | 25 | enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540, kNdets = 30 }; |
dd56b762 | 26 | |
f7336fa3 | 27 | AliTRDgeometry(); |
2745a409 | 28 | AliTRDgeometry(const AliTRDgeometry &g); |
8230f242 | 29 | virtual ~AliTRDgeometry(); |
2745a409 | 30 | AliTRDgeometry &operator=(const AliTRDgeometry &g); |
f7336fa3 | 31 | |
cbba4394 | 32 | virtual void CreateGeometry(Int_t *idtmed); |
bd0f8685 | 33 | virtual Int_t IsVersion() { return 1; }; |
793ff80c | 34 | virtual void Init(); |
73ae7b59 | 35 | virtual Bool_t Impact(const TParticle* ) const { return kTRUE; }; |
bd0f8685 | 36 | |
dde59437 | 37 | virtual Bool_t Local2Global(Int_t d, Double_t *local, Double_t *global) const; |
a5cadd36 | 38 | virtual Bool_t Local2Global(Int_t p, Int_t c, Int_t s |
dde59437 | 39 | , Double_t *local, Double_t *global) const; |
a5cadd36 | 40 | virtual Bool_t Global2Local(Int_t mode, Double_t *local, Double_t *global |
7754cd1f | 41 | , Int_t* index) const; |
3551db50 | 42 | virtual Bool_t Global2Detector(Double_t global[3], Int_t index[3]); |
a5cadd36 | 43 | virtual Bool_t Rotate(Int_t d, Double_t *pos, Double_t *rot) const; |
44 | virtual Bool_t RotateBack(Int_t d, Double_t *rot, Double_t *pos) const; | |
793ff80c | 45 | |
bd0f8685 | 46 | void GroupChamber(Int_t iplan, Int_t icham, Int_t *idtmed); |
47 | void CreateFrame(Int_t *idtmed); | |
48 | void CreateServices(Int_t *idtmed); | |
49 | ||
50 | Bool_t ReadGeoMatrices(); | |
2745a409 | 51 | TGeoHMatrix *GetGeoMatrix(Int_t det) { return (TGeoHMatrix *) fMatrixGeo->At(det); } |
52 | TGeoHMatrix *GetMatrix(Int_t det) { return (TGeoHMatrix *) fMatrixArray->At(det); } | |
53 | TGeoHMatrix *GetCorrectionMatrix(Int_t det) { return (TGeoHMatrix *) fMatrixCorrectionArray->At(det); } | |
b4a9cd27 | 54 | |
793ff80c | 55 | static Int_t Nsect() { return fgkNsect; }; |
56 | static Int_t Nplan() { return fgkNplan; }; | |
57 | static Int_t Ncham() { return fgkNcham; }; | |
58 | static Int_t Ndet() { return fgkNdet; }; | |
59 | ||
60 | static Float_t Rmin() { return fgkRmin; }; | |
61 | static Float_t Rmax() { return fgkRmax; }; | |
62 | static Float_t Zmax1() { return fgkZmax1; }; | |
63 | static Float_t Zmax2() { return fgkZmax2; }; | |
64 | ||
65 | static Float_t Cwidcha() { return (fgkSwidth2 - fgkSwidth1) | |
0a770ac9 | 66 | / fgkSheight * (fgkCH + fgkVspace); }; |
67 | static Float_t Cheight() { return fgkCH; }; | |
68 | static Float_t Cspace() { return fgkVspace; }; | |
69 | static Float_t CraHght() { return fgkCraH; }; | |
70 | static Float_t CdrHght() { return fgkCdrH; }; | |
71 | static Float_t CamHght() { return fgkCamH; }; | |
72 | static Float_t CroHght() { return fgkCroH; }; | |
287c5d50 | 73 | static Float_t CroWid() { return fgkCroW; }; |
793ff80c | 74 | static Float_t MyThick() { return fgkMyThick; }; |
75 | static Float_t DrThick() { return fgkDrThick; }; | |
a2b90f83 | 76 | static Float_t AmThick() { return fgkAmThick; }; |
a2b90f83 | 77 | static Float_t DrZpos() { return fgkDrZpos; }; |
17b26de4 | 78 | static Float_t RpadW() { return fgkRpadW; }; |
79 | static Float_t CpadW() { return fgkCpadW; }; | |
793ff80c | 80 | |
8107bd7f | 81 | void SetSMstatus(Int_t sm, Char_t status) { fSMstatus[sm] = status; }; |
793ff80c | 82 | |
bd0f8685 | 83 | virtual Bool_t IsHole(Int_t /*iplan*/, Int_t /*icham*/, Int_t /*isect*/) const { return kFALSE; }; |
9c782af4 | 84 | static Int_t GetDetectorSec(Int_t p, Int_t c); |
85 | static Int_t GetDetector(Int_t p, Int_t c, Int_t s); | |
afc51ac2 | 86 | virtual Int_t GetPlane(Int_t d) const; |
87 | virtual Int_t GetChamber(Int_t d) const; | |
88 | virtual Int_t GetSector(Int_t d) const; | |
89 | ||
8107bd7f | 90 | Char_t GetSMstatus(Int_t sm) const { return fSMstatus[sm]; }; |
a5cadd36 | 91 | Float_t GetChamberWidth(Int_t p) const { return fCwidth[p]; }; |
afc51ac2 | 92 | Float_t GetChamberLength(Int_t p, Int_t c) const { return fClength[p][c]; }; |
0a770ac9 | 93 | |
e8d02863 | 94 | virtual void GetGlobal(const AliRecPoint* , TVector3& , TMatrixF& ) const { }; |
73ae7b59 | 95 | virtual void GetGlobal(const AliRecPoint* , TVector3& ) const { }; |
5443e65e | 96 | |
a2b90f83 | 97 | static Double_t GetAlpha() { return 2 * 3.14159265358979323846 / fgkNsect; }; |
f7336fa3 | 98 | |
bdbb05bb | 99 | static AliTRDgeometry* GetGeometry(AliRunLoader* runLoader = NULL); |
3551db50 | 100 | |
bd0f8685 | 101 | static Float_t GetTime0(Int_t p) { return fgkTime0[p]; }; |
bdbb05bb | 102 | |
793ff80c | 103 | protected: |
3d7b6a24 | 104 | |
2745a409 | 105 | static const Int_t fgkNsect; // Number of sectors in the full detector (18) |
106 | static const Int_t fgkNplan; // Number of planes of the TRD (6) | |
107 | static const Int_t fgkNcham; // Number of chambers in z-direction (5) | |
108 | static const Int_t fgkNdet; // Total number of detectors (18 * 6 * 5 = 540) | |
109 | ||
110 | static const Float_t fgkRmin; // Minimal radius of the TRD | |
111 | static const Float_t fgkRmax; // Maximal radius of the TRD | |
112 | ||
113 | static const Float_t fgkZmax1; // Half-length of the TRD at outer radius | |
114 | static const Float_t fgkZmax2; // Half-length of the TRD at inner radius | |
115 | ||
116 | static const Float_t fgkSheight; // Height of the TRD-volume in spaceframe (BTR1-3) | |
117 | static const Float_t fgkSwidth1; // Lower width of the TRD-volume in spaceframe (BTR1-3) | |
118 | static const Float_t fgkSwidth2; // Upper width of the TRD-volume in spaceframe (BTR1-3) | |
119 | static const Float_t fgkSlenTR1; // Length of the TRD-volume in spaceframe (BTR1) | |
120 | static const Float_t fgkSlenTR2; // Length of the TRD-volume in spaceframe (BTR2) | |
121 | static const Float_t fgkSlenTR3; // Length of the TRD-volume in spaceframe (BTR3) | |
122 | ||
123 | static const Float_t fgkSMpltT; // Thickness of the super module side plates | |
124 | ||
125 | static const Float_t fgkCraH; // Height of the radiator part of the chambers | |
126 | static const Float_t fgkCdrH; // Height of the drift region of the chambers | |
127 | static const Float_t fgkCamH; // Height of the amplification region of the chambers | |
128 | static const Float_t fgkCroH; // Height of the readout of the chambers | |
129 | static const Float_t fgkCH; // Total height of the chambers | |
130 | ||
131 | static const Float_t fgkVspace; // Vertical spacing of the chambers | |
132 | static const Float_t fgkHspace; // Horizontal spacing of the chambers | |
133 | static const Float_t fgkVrocsm; // Radial distance of the first ROC to the outer plates of the SM | |
134 | static const Float_t fgkCalT; // Thickness of the lower aluminum frame | |
135 | static const Float_t fgkCclsT; // Thickness of the lower G10 frame sides | |
136 | static const Float_t fgkCclfT; // Thickness of the lower G10 frame front | |
137 | static const Float_t fgkCcuT; // Thickness of the upper G10 frame | |
138 | static const Float_t fgkCauT; // Thickness of the upper aluminum frame | |
139 | ||
140 | static const Float_t fgkCroW; // Additional width of the readout chamber frames | |
141 | ||
142 | static const Float_t fgkCpadW; // Difference of outer chamber width and pad plane width | |
143 | static const Float_t fgkRpadW; // Difference of outer chamber width and pad plane width | |
144 | ||
145 | static const Float_t fgkRaThick; // Thickness of the radiator | |
146 | static const Float_t fgkMyThick; // Thickness of the mylar-layer | |
147 | static const Float_t fgkXeThick; // Thickness of the gas volume | |
148 | static const Float_t fgkDrThick; // Thickness of the drift region | |
149 | static const Float_t fgkAmThick; // Thickness of the amplification region | |
150 | static const Float_t fgkCuThick; // Thickness of the pad plane | |
151 | static const Float_t fgkSuThick; // Thickness of the HEXCEL+G10 support structure | |
152 | static const Float_t fgkFeThick; // Thickness of the FEE + signal lines | |
153 | static const Float_t fgkCoThick; // Thickness of the PE of the cooling device | |
154 | static const Float_t fgkWaThick; // Thickness of the cooling water | |
155 | static const Float_t fgkRpThick; // Thickness of the PCB readout boards | |
156 | static const Float_t fgkRcThick; // Thickness of the PCB copper layers | |
157 | ||
158 | static const Float_t fgkRaZpos; // Position of the radiator | |
159 | static const Float_t fgkMyZpos; // Position of the mylar-layer | |
160 | static const Float_t fgkDrZpos; // Position of the drift region | |
161 | static const Float_t fgkAmZpos; // Position of the amplification region | |
162 | static const Float_t fgkCuZpos; // Position of the pad plane | |
163 | static const Float_t fgkSuZpos; // Position of the HEXCEL+G10 support structure | |
164 | static const Float_t fgkFeZpos; // Position of the FEE + signal lines | |
165 | static const Float_t fgkCoZpos; // Position of the PE of the cooling device | |
166 | static const Float_t fgkWaZpos; // Position of the cooling water | |
167 | static const Float_t fgkRpZpos; // Position of the PCB readout boards | |
168 | static const Float_t fgkRcZpos; // Position of the PCB copper layers | |
169 | ||
170 | Char_t fSMstatus[kNsect]; // Super module status byte | |
171 | ||
172 | Float_t fCwidth[kNplan]; // Outer widths of the chambers | |
173 | Float_t fClength[kNplan][kNcham]; // Outer lengths of the chambers | |
174 | ||
175 | Float_t fRotA11[kNsect]; // Matrix elements for the rotation | |
176 | Float_t fRotA12[kNsect]; // Matrix elements for the rotation | |
177 | Float_t fRotA21[kNsect]; // Matrix elements for the rotation | |
178 | Float_t fRotA22[kNsect]; // Matrix elements for the rotation | |
179 | ||
180 | Float_t fRotB11[kNsect]; // Matrix elements for the backward rotation | |
181 | Float_t fRotB12[kNsect]; // Matrix elements for the backward rotation | |
182 | Float_t fRotB21[kNsect]; // Matrix elements for the backward rotation | |
183 | Float_t fRotB22[kNsect]; // Matrix elements for the backward rotation | |
184 | ||
185 | static const Double_t fgkTime0Base; // Base value for calculation of Time-position of pad 0 | |
186 | static const Float_t fgkTime0[kNplan]; // Time-position of pad 0 | |
3551db50 | 187 | |
2745a409 | 188 | Float_t fChamberUAorig[3*kNdets][3]; // Volumes origin in |
189 | Float_t fChamberUDorig[3*kNdets][3]; // the chamber | |
190 | Float_t fChamberUForig[3*kNdets][3]; // [3] = x, y, z | |
191 | Float_t fChamberUUorig[3*kNdets][3]; // | |
9c782af4 | 192 | |
2745a409 | 193 | Float_t fChamberUAboxd[3*kNdets][3]; // Volumes box |
194 | Float_t fChamberUDboxd[3*kNdets][3]; // dimensions (half) | |
195 | Float_t fChamberUFboxd[3*kNdets][3]; // [3] = x, y, z | |
196 | Float_t fChamberUUboxd[3*kNdets][3]; // | |
bd0f8685 | 197 | |
2745a409 | 198 | TObjArray * fMatrixArray; //! array of matrix - Transformation Global to Local |
199 | TObjArray * fMatrixCorrectionArray; //! array of Matrix - Transformation Cluster to Tracking systerm | |
200 | TObjArray * fMatrixGeo; //! geo matrices | |
bd0f8685 | 201 | |
2745a409 | 202 | ClassDef(AliTRDgeometry,10) // TRD geometry class |
f7336fa3 | 203 | |
204 | }; | |
205 | ||
206 | #endif |