Major Changes to comply with the modifications in Alireconstruction (->still private).
[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
2d0eca96 14#include "AliGeometry.h"
5443e65e 15
2d0eca96 16class TGeoHMatrix;
f162af62 17
18class AliTRDpadPlane;
19
f7336fa3 20class AliTRDgeometry : public AliGeometry {
21
22 public:
23
053767a4 24 enum { kNlayer = 6
25 , kNstack = 5
26 , kNsector = 18
27 , kNdet = 540
28 , kNdets = 30 };
dd56b762 29
f7336fa3 30 AliTRDgeometry();
2745a409 31 AliTRDgeometry(const AliTRDgeometry &g);
8230f242 32 virtual ~AliTRDgeometry();
2745a409 33 AliTRDgeometry &operator=(const AliTRDgeometry &g);
f7336fa3 34
793ff80c 35 virtual void Init();
030b4415 36 virtual void CreateGeometry(Int_t *idtmed);
053767a4 37 virtual Int_t IsVersion() { return 1; }
38 virtual Bool_t Impact(const TParticle* ) const { return kTRUE; }
2f504fcc 39 virtual Bool_t IsHole(Int_t la, Int_t st, Int_t se) const;
eb2b4f91 40 virtual Bool_t IsOnBoundary(Int_t det, Float_t y, Float_t z, Float_t eps = .5) const;
e74d6d1b 41 virtual Bool_t RotateBack(Int_t det, const Double_t * const loc, Double_t *glb) const;
793ff80c 42
9bf8c575 43 Bool_t ChamberInGeometry(Int_t det);
44
053a5ea0 45 void AssembleChamber(Int_t ilayer, Int_t istack);
bd0f8685 46 void CreateFrame(Int_t *idtmed);
47 void CreateServices(Int_t *idtmed);
48
225096c8 49 static Bool_t CreateClusterMatrixArray();
50 static TGeoHMatrix *GetClusterMatrix(Int_t det);
030b4415 51
18c05eb3 52 void SetSMstatus(Int_t sm, Char_t status) { fSMstatus[sm] = status; }
030b4415 53
053767a4 54 static Int_t GetDetectorSec(Int_t layer, Int_t stack);
55 static Int_t GetDetector(Int_t layer, Int_t stack, Int_t sector);
56 static Int_t GetLayer(Int_t det);
44024ed3 57 static Int_t GetStack(Int_t det);
58 Int_t GetStack(Double_t z, Int_t layer);
59 static Int_t GetSector(Int_t det);
afc51ac2 60
225096c8 61 static void CreatePadPlaneArray();
62 static AliTRDpadPlane *CreatePadPlane(Int_t layer, Int_t stack);
63 static AliTRDpadPlane *GetPadPlane(Int_t layer, Int_t stack);
64 static AliTRDpadPlane *GetPadPlane(Int_t det) { return GetPadPlane(GetLayer(det)
053767a4 65 ,GetStack(det)); }
225096c8 66 static Int_t GetRowMax(Int_t layer, Int_t stack, Int_t /*sector*/);
67 static Int_t GetColMax(Int_t layer);
68 static Double_t GetRow0(Int_t layer, Int_t stack, Int_t /*sector*/);
69 static Double_t GetCol0(Int_t layer);
053767a4 70
71 static Float_t GetTime0(Int_t layer) { return fgkTime0[layer]; }
72
cff68175 73 static Double_t GetXtrdBeg() { return fgkXtrdBeg; }
74 static Double_t GetXtrdEnd() { return fgkXtrdEnd; }
75
18c05eb3 76 Char_t GetSMstatus(Int_t sm) const { return fSMstatus[sm]; }
225096c8 77 static Float_t GetChamberWidth(Int_t layer) { return fgkCwidth[layer] ; }
78 static Float_t GetChamberLength(Int_t layer, Int_t stack) { return fgkClength[layer][stack]; }
f7336fa3 79
25ca55ce 80 virtual void GetGlobal(const AliRecPoint*, TVector3&, TMatrixF& ) const { };
81 virtual void GetGlobal(const AliRecPoint*, TVector3& ) const { };
9a96f175 82
053767a4 83 static Double_t GetAlpha() { return 2.0
84 * 3.14159265358979324
85 / fgkNsector; }
86
87 static Int_t Nsector() { return fgkNsector; }
88 static Int_t Nlayer() { return fgkNlayer; }
89 static Int_t Nstack() { return fgkNstack; }
90 static Int_t Ndet() { return fgkNdet; }
91
92 static Float_t Cheight() { return fgkCH; }
053a5ea0 93 static Float_t CheightSV() { return fgkCHsv; }
053767a4 94 static Float_t Cspace() { return fgkVspace; }
95 static Float_t CraHght() { return fgkCraH; }
96 static Float_t CdrHght() { return fgkCdrH; }
97 static Float_t CamHght() { return fgkCamH; }
98 static Float_t CroHght() { return fgkCroH; }
053a5ea0 99 static Float_t CsvHght() { return fgkCsvH; }
053767a4 100 static Float_t CroWid() { return fgkCroW; }
a72494bb 101
102 static Float_t AnodePos() { return fgkAnodePos; }
103
053a5ea0 104 static Float_t MyThick() { return fgkRMyThick; }
053767a4 105 static Float_t DrThick() { return fgkDrThick; }
106 static Float_t AmThick() { return fgkAmThick; }
107 static Float_t DrZpos() { return fgkDrZpos; }
108 static Float_t RpadW() { return fgkRpadW; }
109 static Float_t CpadW() { return fgkCpadW; }
110
111 static Float_t Cwidcha() { return (fgkSwidth2 - fgkSwidth1)
112 / fgkSheight
113 * (fgkCH + fgkVspace); }
114
115 static Int_t MCMmax() { return fgkMCMmax; }
116 static Int_t MCMrow() { return fgkMCMrow; }
117 static Int_t ROBmaxC0() { return fgkROBmaxC0; }
118 static Int_t ROBmaxC1() { return fgkROBmaxC1; }
119 static Int_t ADCmax() { return fgkADCmax; }
120 static Int_t TBmax() { return fgkTBmax; }
121 static Int_t Padmax() { return fgkPadmax; }
122 static Int_t Colmax() { return fgkColmax; }
123 static Int_t RowmaxC0() { return fgkRowmaxC0; }
124 static Int_t RowmaxC1() { return fgkRowmaxC1; }
7925de54 125
793ff80c 126 protected:
0a5f3331 127
053767a4 128 static const Int_t fgkNsector; // Number of sectors in the full detector (18)
129 static const Int_t fgkNlayer; // Number of layers of the TRD (6)
130 static const Int_t fgkNstack; // Number of stacks in z-direction (5)
030b4415 131 static const Int_t fgkNdet; // Total number of detectors (18 * 6 * 5 = 540)
132
b640260a 133 static const Float_t fgkTlength; // Length of the TRD-volume in spaceframe (BTRD)
134
135 static const Float_t fgkSheight; // Height of the supermodule
136 static const Float_t fgkSwidth1; // Lower width of the supermodule
137 static const Float_t fgkSwidth2; // Upper width of the supermodule
138 static const Float_t fgkSlength; // Length of the supermodule
139
140 static const Float_t fgkFlength; // Length of the service space in front of a supermodule
030b4415 141
142 static const Float_t fgkSMpltT; // Thickness of the super module side plates
143
144 static const Float_t fgkCraH; // Height of the radiator part of the chambers
145 static const Float_t fgkCdrH; // Height of the drift region of the chambers
146 static const Float_t fgkCamH; // Height of the amplification region of the chambers
147 static const Float_t fgkCroH; // Height of the readout of the chambers
053a5ea0 148 static const Float_t fgkCsvH; // Height of the services on top of the chambers
149 static const Float_t fgkCH; // Total height of the chambers (w/o services)
150 static const Float_t fgkCHsv; // Total height of the chambers (with services)
030b4415 151
a72494bb 152 static const Float_t fgkAnodePos; // Distance of anode wire plane relative to alignabl volume
153
030b4415 154 static const Float_t fgkVspace; // Vertical spacing of the chambers
155 static const Float_t fgkHspace; // Horizontal spacing of the chambers
156 static const Float_t fgkVrocsm; // Radial distance of the first ROC to the outer SM plates
053a5ea0 157
030b4415 158 static const Float_t fgkCalT; // Thickness of the lower aluminum frame
053a5ea0 159 static const Float_t fgkCalW; // Width of additional aluminum ledge on lower frame
160 static const Float_t fgkCalH; // Height of additional aluminum ledge on lower frame
161 static const Float_t fgkCalWmod; // Width of additional aluminum ledge on lower frame
162 static const Float_t fgkCalHmod; // Height of additional aluminum ledge on lower frame
163 static const Float_t fgkCwsW; // Width of additional wacosit ledge on lower frame
164 static const Float_t fgkCwsH; // Height of additional wacosit ledge on lower frame
0a5f3331 165 static const Float_t fgkCclsT; // Thickness of the lower Wacosit frame sides
166 static const Float_t fgkCclfT; // Thickness of the lower Wacosit frame front
167 static const Float_t fgkCglT; // Thichness of the glue around the radiator
053a5ea0 168 static const Float_t fgkCcuTa; // Thickness of the upper Wacosit frame around amp. region
169 static const Float_t fgkCcuTb; // Thickness of the upper Wacosit frame around amp. region
0a5f3331 170 static const Float_t fgkCauT; // Thickness of the aluminum frame of the back panel
030b4415 171 static const Float_t fgkCroW; // Additional width of the readout chamber frames
172
173 static const Float_t fgkCpadW; // Difference of outer chamber width and pad plane width
174 static const Float_t fgkRpadW; // Difference of outer chamber width and pad plane width
175
030b4415 176 static const Float_t fgkXeThick; // Thickness of the gas volume
177 static const Float_t fgkDrThick; // Thickness of the drift region
178 static const Float_t fgkAmThick; // Thickness of the amplification region
0a5f3331 179 static const Float_t fgkWrThick; // Thickness of the wire planes
053a5ea0 180
181 static const Float_t fgkPPdThick; // Thickness of copper of the pad plane
182 static const Float_t fgkPPpThick; // Thickness of PCB board of the pad plane
183 static const Float_t fgkPGlThick; // Thickness of the glue layer
184 static const Float_t fgkPCbThick; // Thickness of the carbon layers
185 static const Float_t fgkPHcThick; // Thickness of the honeycomb support structure
186 static const Float_t fgkPPcThick; // Thickness of the PCB readout boards
187 static const Float_t fgkPRbThick; // Thickness of the PCB copper layers
188 static const Float_t fgkPElThick; // Thickness of all other electronics components (caps, etc.)
189
190 static const Float_t fgkRFbThick; // Thickness of the fiber layers in the radiator
191 static const Float_t fgkRRhThick; // Thickness of the rohacell layers in the radiator
192 static const Float_t fgkRGlThick; // Thickness of the glue layers in the radiator
193 static const Float_t fgkRCbThick; // Thickness of the carbon layers in the radiator
194 static const Float_t fgkRMyThick; // Thickness of the mylar layers in the radiator
195
030b4415 196 static const Float_t fgkDrZpos; // Position of the drift region
197 static const Float_t fgkAmZpos; // Position of the amplification region
053a5ea0 198 static const Float_t fgkWrZposA; // Position of the wire planes
199 static const Float_t fgkWrZposB; // Position of the wire planes
200 static const Float_t fgkCalZpos; // Position of the additional aluminum ledges
030b4415 201
7925de54 202 static const Int_t fgkMCMmax; // Maximum number of MCMs per ROB
203 static const Int_t fgkMCMrow; // Maximum number of MCMs per ROB Row
204 static const Int_t fgkROBmaxC0; // Maximum number of ROBs per C0 chamber
205 static const Int_t fgkROBmaxC1; // Maximum number of ROBs per C1 chamber
206 static const Int_t fgkADCmax; // Maximum number of ADC channels per MCM
207 static const Int_t fgkTBmax; // Maximum number of Time bins
208 static const Int_t fgkPadmax; // Maximum number of pads per MCM
209 static const Int_t fgkColmax; // Maximum number of pads per padplane row
210 static const Int_t fgkRowmaxC0; // Maximum number of Rows per C0 chamber
211 static const Int_t fgkRowmaxC1; // Maximum number of Rows per C1 chamber
212
225096c8 213 static const Float_t fgkCwidth[kNlayer]; // Outer widths of the chambers
214 static const Float_t fgkClength[kNlayer][kNstack]; // Outer lengths of the chambers
030b4415 215
225096c8 216 Float_t fRotB11[kNsector]; // Matrix elements for the backward rotation
217 Float_t fRotB12[kNsector]; // Matrix elements for the backward rotation
218 Float_t fRotB21[kNsector]; // Matrix elements for the backward rotation
219 Float_t fRotB22[kNsector]; // Matrix elements for the backward rotation
030b4415 220
221 static const Double_t fgkTime0Base; // Base value for calculation of Time-position of pad 0
053767a4 222 static const Float_t fgkTime0[kNlayer]; // Time-position of pad 0
cff68175 223
224 static const Double_t fgkXtrdBeg; // X-coordinate in tracking system of begin of TRD mother volume
225 static const Double_t fgkXtrdEnd; // X-coordinate in tracking system of end of TRD mother volume
226
225096c8 227 static TObjArray *fgClusterMatrixArray; //! Transformation matrices loc. cluster to tracking cs
228 static TObjArray *fgPadPlaneArray; //! Array of pad plane objects
f162af62 229
18c05eb3 230 Char_t fSMstatus[kNsector]; // Super module status byte
231
65248927 232 ClassDef(AliTRDgeometry,24) // TRD geometry class
f7336fa3 233
234};
f7336fa3 235#endif