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