]>
Commit | Line | Data |
---|---|---|
0f4a7374 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | /* | |
17 | $Log$ | |
48e6af28 | 18 | Revision 1.17.1 2006/12/15 |
19 | Added method DetToStripRF(...) to get | |
20 | a pad corner coordinates in its strip reference frame | |
21 | (A.De Caro, M.Di Stefano) | |
22 | Revision 1.17 2006/08/22 13:30:02 arcelli | |
23 | removal of effective c++ warnings (C.Zampolli) | |
24 | ||
655e379f | 25 | Revision 1.16 2006/04/20 22:30:50 hristov |
26 | Coding conventions (Annalisa) | |
27 | ||
0e46b9ae | 28 | Revision 1.15 2006/04/16 22:29:05 hristov |
29 | Coding conventions (Annalisa) | |
30 | ||
7aeeaf38 | 31 | Revision 1.14 2006/04/05 08:35:38 hristov |
32 | Coding conventions (S.Arcelli, C.Zampolli) | |
33 | ||
340693af | 34 | Revision 1.13 2006/03/12 14:37:54 arcelli |
35 | Changes for TOF Reconstruction using TGeo | |
36 | ||
c0545837 | 37 | Revision 1.12 2006/02/28 10:38:00 decaro |
38 | AliTOFGeometry::fAngles, AliTOFGeometry::fHeights, AliTOFGeometry::fDistances arrays: dimension definition in the right location | |
39 | ||
4402e7cb | 40 | Revision 1.11 2005/12/15 14:17:29 decaro |
41 | Correction of some parameter values | |
42 | ||
6fbc8979 | 43 | Revision 1.10 2005/12/15 08:55:32 decaro |
44 | New TOF geometry description (V5) -G. Cara Romeo and A. De Caro | |
45 | ||
d3c7bfac | 46 | Revision 1.9.1 2005/07/19 A. De Caro |
47 | Created daughter-classes AliTOFGeometryV4 and AliTOFGeometryV5 | |
48 | => moved global methods IsInsideThePad, DistanceToPad, | |
49 | GetPlate, GetSector, GetStrip, GetPadX, GetPadZ, | |
50 | GetX, GetY, GetZ, GetPadDx, GetPadDy and GetPadDz | |
51 | in daughter-classes | |
52 | ||
53 | Revision 1.9 2005/10/20 12:41:35 hristov | |
54 | Implementation of parallel tracking. It is not the default version, one can use it passing option MI from AliReconstruction to TOF (M.Ivanov) | |
55 | ||
d88fbf15 | 56 | Revision 1.8 2004/11/29 08:28:01 decaro |
57 | Introduction of a new TOF constant (i.e. TDC bin width) | |
58 | ||
43f77f2d | 59 | Revision 1.7 2004/11/05 07:20:08 decaro |
60 | TOF library splitting and conversion of some printout messages in AliLog schema (T.Kuhr) | |
61 | ||
d076c8d5 | 62 | Revision 1.6 2004/06/15 15:27:59 decaro |
63 | TOF raw data: preliminary implementation and style changes | |
64 | ||
7e6dce66 | 65 | Revision 1.5 2004/04/20 14:37:22 hristov |
66 | Using TMath::Abs instead of fabs, arrays of variable size created/deleted correctly (HP,Sun) | |
67 | ||
9b49e4c9 | 68 | Revision 1.4 2004/04/13 09:42:51 decaro |
69 | Track reconstruction code for TOF: updating | |
70 | ||
74ea065c | 71 | Revision 1.3 2003/12/29 18:40:39 hristov |
72 | Copy/paste error corrected | |
73 | ||
fb9747d4 | 74 | Revision 1.2 2003/12/29 17:26:01 hristov |
75 | Using enum to initaialize static ints in the header file, the initialization of static floats moved to the implementation file | |
76 | ||
58eb5b61 | 77 | Revision 1.1 2003/12/29 15:18:03 decaro |
78 | TOF geometry updating (addition of AliTOFGeometry) | |
79 | ||
7e6dce66 | 80 | Revision 0.05 2004/6/11 A.De Caro |
81 | Implement Global method NpadXStrip | |
82 | Insert four float constants (originally in AliTOF class) | |
83 | Revision 0.04 2004/4/05 S.Arcelli | |
74ea065c | 84 | Implement Global methods IsInsideThePad |
85 | DistanceToPad | |
7e6dce66 | 86 | Revision 0.03 2003/12/14 S.Arcelli |
87 | Set Phi range [-180,180]->[0,360] | |
88 | Revision 0.02 2003/12/10 S.Arcelli: | |
89 | Implement Global methods GetPos & GetDetID | |
90 | Revision 0.01 2003/12/04 S.Arcelli | |
0f4a7374 | 91 | */ |
92 | ||
0f4a7374 | 93 | /////////////////////////////////////////////////////////////////////////////// |
94 | // // | |
95 | // TOF Geometry class // | |
96 | // // | |
97 | /////////////////////////////////////////////////////////////////////////////// | |
98 | ||
0f4a7374 | 99 | #include "AliTOFGeometry.h" |
100 | ||
101 | ClassImp(AliTOFGeometry) | |
102 | ||
7e6dce66 | 103 | const Int_t AliTOFGeometry::fgkTimeDiff = 25000; // Min signal separation (ps) |
58eb5b61 | 104 | |
7e6dce66 | 105 | const Float_t AliTOFGeometry::fgkXPad = 2.5; // Pad size in the x direction (cm) |
106 | const Float_t AliTOFGeometry::fgkZPad = 3.5; // Pad size in the z direction (cm) | |
58eb5b61 | 107 | |
4402e7cb | 108 | const Float_t AliTOFGeometry::fgkStripLength = 122.;// Strip Length (rho X phi direction) (cm) |
109 | ||
d3c7bfac | 110 | const Float_t AliTOFGeometry::fgkSigmaForTail1= 2.; //Sig1 for simulation of TDC tails |
fb9747d4 | 111 | const Float_t AliTOFGeometry::fgkSigmaForTail2= 0.5;//Sig2 for simulation of TDC tails |
58eb5b61 | 112 | |
48e6af28 | 113 | const Float_t AliTOFGeometry::fgkTdcBin = 24.4; // time-of-flight bin width [ps] |
114 | const Float_t AliTOFGeometry::fgkToTBin = 48.8; // time-over-threshold bin width [ps] | |
43f77f2d | 115 | |
0f4a7374 | 116 | //_____________________________________________________________________________ |
655e379f | 117 | AliTOFGeometry::AliTOFGeometry(): |
118 | fNStripC(19), // number of strips in C type module | |
119 | fZlenA(106.0), // length (cm) of the A module | |
120 | fZlenB(141.0), // length (cm) of the B module | |
121 | fZlenC(177.5), // length (cm) of the C module | |
122 | fMaxhZtof(371.5), // Max half z-size of TOF (cm) | |
123 | fRmin(370.), // Inner radius of the TOF (cm) | |
124 | fRmax(399.), // Outer radius of the TOF (cm) | |
125 | fxTOF(371.), // Inner radius of the TOF for Reconstruction (cm) | |
126 | fHoles(0), // Flag for Holes | |
127 | fPhiSec(20.) // sector Phi width (deg) | |
0f4a7374 | 128 | { |
129 | // | |
130 | // AliTOFGeometry default constructor | |
131 | // | |
132 | Init(); | |
133 | ||
134 | } | |
135 | ||
136 | //_____________________________________________________________________________ | |
137 | AliTOFGeometry::~AliTOFGeometry() | |
138 | { | |
139 | // | |
140 | // AliTOFGeometry destructor | |
141 | // | |
142 | ||
143 | } | |
144 | //_____________________________________________________________________________ | |
145 | void AliTOFGeometry::Init() | |
146 | { | |
147 | // | |
148 | // Initialize strip Tilt Angles and Heights | |
149 | // | |
0f4a7374 | 150 | |
74ea065c | 151 | fPhiSec = 360./kNSectors; |
74ea065c | 152 | |
4402e7cb | 153 | Float_t const kangles[kNPlates][kMaxNstrip] ={ |
154 | ||
155 | {44.494, 43.725, 42.946, 42.156, 41.357, 40.548, 39.729, 38.899, | |
156 | 38.060, 37.211, 36.353, 35.484, 34.606, 33.719, 32.822, 31.916, | |
157 | 31.001, 30.077, 29.144, 28.202 }, | |
158 | ||
159 | {26.884, 25.922, 24.952, 23.975, 22.989, 22.320, 21.016, 20.309, | |
160 | 19.015, 18.270, 16.989, 16.205, 14.941, 14.117, 12.871, 12.008, | |
161 | 10.784, 9.8807, 8.681, 0.0 }, | |
162 | ||
163 | { 7.5835, 6.4124, 5.4058, 4.2809, 3.2448, 2.1424, 1.078, -0., -1.078, | |
164 | -2.1424, -3.2448, -4.2809, -5.4058, -6.4124, -7.5835, 0.0, 0.0, 0.0, | |
165 | 0.0, 0.0 }, | |
166 | ||
167 | {-8.681, -9.8807, -10.784, -12.008, -12.871, -14.117, -14.941, -16.205, | |
168 | -16.989, -18.27, -19.015, -20.309, -21.016, -22.32, -22.989, | |
169 | -23.975, -24.952, -25.922, -26.884, 0. }, | |
170 | ||
171 | {-28.202, -29.144, -30.077, -31.001, -31.916, -32.822, -33.719, -34.606, | |
172 | -35.484, -36.353, -37.211, -38.06, -38.899, -39.729, -40.548, | |
173 | -41.357, -42.156, -42.946, -43.725, -44.494 }}; | |
174 | ||
175 | ||
176 | //Strips Heights | |
177 | ||
178 | Float_t const kheights[kNPlates][kMaxNstrip]= { | |
179 | ||
180 | {-5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, | |
181 | -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5 }, | |
182 | ||
183 | {-6.3, -7.1, -7.9, -8.7, -9.5, -3, -9.5, -3, -9.5, -3, | |
184 | -9.5, -3.0, -9.5, -3.0, -9.5, -3, -9.5, -3, -9 , 0.}, | |
185 | ||
186 | { -3, -9, -4.5, -9, -4.5, -9, -4.5, -9, -4.5, -9, | |
187 | -4.5, -9, -4.5, -9, -3, 0.0, 0.0, 0.0, 0.0, 0.0 }, | |
188 | ||
189 | { -9, -3, -9.5, -3, -9.5, -3, -9.5, -3, -9.5, -3, -9.5, | |
190 | -3, -9.5, -3, -9.5, -8.7, -7.9, -7.1, -6.3, 0. }, | |
191 | ||
192 | {-5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, | |
193 | -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5 }}; | |
194 | ||
195 | for (Int_t iplate = 0; iplate < kNPlates; iplate++) { | |
196 | for (Int_t istrip = 0; istrip < kMaxNstrip; istrip++) { | |
197 | fAngles[iplate][istrip] = kangles[iplate][istrip]; | |
198 | fHeights[iplate][istrip] = kheights[iplate][istrip]; | |
199 | } | |
200 | } | |
201 | ||
0f4a7374 | 202 | } |
203 | ||
204 | //_____________________________________________________________________________ | |
7aeeaf38 | 205 | void AliTOFGeometry::GetPosPar(Int_t *det, Float_t *pos) const |
0f4a7374 | 206 | { |
207 | // | |
208 | // Returns space point coor (x,y,z) (cm) for Detector | |
209 | // Indices (iSect,iPlate,iStrip,iPadX,iPadZ) | |
210 | // | |
211 | ||
212 | pos[0]=GetX(det); | |
213 | pos[1]=GetY(det); | |
214 | pos[2]=GetZ(det); | |
215 | ||
216 | } | |
217 | //_____________________________________________________________________________ | |
7aeeaf38 | 218 | void AliTOFGeometry::GetDetID( Float_t *pos, Int_t *det) const |
0f4a7374 | 219 | { |
220 | // | |
221 | // Returns Detector Indices (iSect,iPlate,iStrip,iPadX,iPadZ) | |
222 | // space point coor (x,y,z) (cm) | |
223 | ||
224 | ||
225 | det[0]=GetSector(pos); | |
226 | det[1]=GetPlate(pos); | |
227 | det[2]=GetStrip(pos); | |
228 | det[3]=GetPadZ(pos); | |
229 | det[4]=GetPadX(pos); | |
230 | ||
231 | } | |
232 | //_____________________________________________________________________________ | |
48e6af28 | 233 | |
234 | void AliTOFGeometry::DetToStripRF(Int_t nPadX, Int_t nPadZ, Float_t &x, Float_t &z) const | |
235 | { | |
236 | // | |
237 | // Returns the local coordinates (x, z) in strip reference frame | |
238 | // for the bottom corner of the pad number (nPadX, nPadZ) | |
239 | // | |
240 | /* | |
241 | const Float_t xCenterStrip = kNpadX * fgkXPad / 2.; | |
242 | const Float_t zCenterStrip = kNpadZ * fgkZPad / 2.; | |
243 | ||
244 | const Float_t xCenterPad = nPadX*fgkXPad + fgkXPad / 2.; | |
245 | const Float_t zCenterPad = nPadZ*fgkZPad + fgkZPad / 2.; | |
246 | ||
247 | x = xCenterPad - xCenterStrip; | |
248 | z = zCenterPad - zCenterStrip; | |
249 | */ | |
250 | ||
251 | ||
252 | x = (nPadX - kNpadX*0.5) * fgkXPad; | |
253 | z = (nPadZ - kNpadZ*0.5) * fgkZPad; | |
254 | ||
255 | ||
256 | } | |
257 | //_____________________________________________________________________________ |