]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFGeometry.cxx
Removing wrong inline from the implementation file
[u/mrichter/AliRoot.git] / TOF / AliTOFGeometry.cxx
CommitLineData
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$
340693af 18Revision 1.13 2006/03/12 14:37:54 arcelli
19 Changes for TOF Reconstruction using TGeo
20
c0545837 21Revision 1.12 2006/02/28 10:38:00 decaro
22AliTOFGeometry::fAngles, AliTOFGeometry::fHeights, AliTOFGeometry::fDistances arrays: dimension definition in the right location
23
4402e7cb 24Revision 1.11 2005/12/15 14:17:29 decaro
25Correction of some parameter values
26
6fbc8979 27Revision 1.10 2005/12/15 08:55:32 decaro
28New TOF geometry description (V5) -G. Cara Romeo and A. De Caro
29
d3c7bfac 30Revision 1.9.1 2005/07/19 A. De Caro
31 Created daughter-classes AliTOFGeometryV4 and AliTOFGeometryV5
32 => moved global methods IsInsideThePad, DistanceToPad,
33 GetPlate, GetSector, GetStrip, GetPadX, GetPadZ,
34 GetX, GetY, GetZ, GetPadDx, GetPadDy and GetPadDz
35 in daughter-classes
36
37Revision 1.9 2005/10/20 12:41:35 hristov
38Implementation of parallel tracking. It is not the default version, one can use it passing option MI from AliReconstruction to TOF (M.Ivanov)
39
d88fbf15 40Revision 1.8 2004/11/29 08:28:01 decaro
41Introduction of a new TOF constant (i.e. TDC bin width)
42
43f77f2d 43Revision 1.7 2004/11/05 07:20:08 decaro
44TOF library splitting and conversion of some printout messages in AliLog schema (T.Kuhr)
45
d076c8d5 46Revision 1.6 2004/06/15 15:27:59 decaro
47TOF raw data: preliminary implementation and style changes
48
7e6dce66 49Revision 1.5 2004/04/20 14:37:22 hristov
50Using TMath::Abs instead of fabs, arrays of variable size created/deleted correctly (HP,Sun)
51
9b49e4c9 52Revision 1.4 2004/04/13 09:42:51 decaro
53Track reconstruction code for TOF: updating
54
74ea065c 55Revision 1.3 2003/12/29 18:40:39 hristov
56Copy/paste error corrected
57
fb9747d4 58Revision 1.2 2003/12/29 17:26:01 hristov
59Using enum to initaialize static ints in the header file, the initialization of static floats moved to the implementation file
60
58eb5b61 61Revision 1.1 2003/12/29 15:18:03 decaro
62TOF geometry updating (addition of AliTOFGeometry)
63
7e6dce66 64Revision 0.05 2004/6/11 A.De Caro
65 Implement Global method NpadXStrip
66 Insert four float constants (originally in AliTOF class)
67Revision 0.04 2004/4/05 S.Arcelli
74ea065c 68 Implement Global methods IsInsideThePad
69 DistanceToPad
7e6dce66 70Revision 0.03 2003/12/14 S.Arcelli
71 Set Phi range [-180,180]->[0,360]
72Revision 0.02 2003/12/10 S.Arcelli:
73 Implement Global methods GetPos & GetDetID
74Revision 0.01 2003/12/04 S.Arcelli
0f4a7374 75*/
76
77#include <stdlib.h>
78#include <Riostream.h>
79///////////////////////////////////////////////////////////////////////////////
80// //
81// TOF Geometry class //
82// //
83///////////////////////////////////////////////////////////////////////////////
84
d076c8d5 85#include "AliLog.h"
0f4a7374 86#include "AliConst.h"
87#include "AliTOFGeometry.h"
88
89ClassImp(AliTOFGeometry)
90
7e6dce66 91const Int_t AliTOFGeometry::fgkTimeDiff = 25000; // Min signal separation (ps)
58eb5b61 92
7e6dce66 93const Float_t AliTOFGeometry::fgkXPad = 2.5; // Pad size in the x direction (cm)
94const Float_t AliTOFGeometry::fgkZPad = 3.5; // Pad size in the z direction (cm)
58eb5b61 95
4402e7cb 96const Float_t AliTOFGeometry::fgkStripLength = 122.;// Strip Length (rho X phi direction) (cm)
97
d3c7bfac 98const Float_t AliTOFGeometry::fgkSigmaForTail1= 2.; //Sig1 for simulation of TDC tails
fb9747d4 99const Float_t AliTOFGeometry::fgkSigmaForTail2= 0.5;//Sig2 for simulation of TDC tails
58eb5b61 100
d3c7bfac 101const Float_t AliTOFGeometry::fgkTdcBin = 24.4; // time-window for the TDC bins [ps]
43f77f2d 102
0f4a7374 103//_____________________________________________________________________________
104AliTOFGeometry::AliTOFGeometry()
105{
106 //
107 // AliTOFGeometry default constructor
108 //
d3c7bfac 109
340693af 110 kNStripC = 19; // number of strips in C type module
d3c7bfac 111 kZlenA = 106.0; // length (cm) of the A module
112 kZlenB = 141.0; // length (cm) of the B module
113 kZlenC = 177.5; // length (cm) of the C module
114 kMaxhZtof = 371.5; // Max half z-size of TOF (cm)
d3c7bfac 115
6fbc8979 116 fgkxTOF = 371.; // Inner radius of the TOF for Reconstruction (cm)
117 fgkRmin = 370.; // Inner radius of the TOF (cm)
118 fgkRmax = 399.; // Outer radius of the TOF (cm)
d3c7bfac 119
0f4a7374 120 Init();
121
122}
123
124//_____________________________________________________________________________
125AliTOFGeometry::~AliTOFGeometry()
126{
127 //
128 // AliTOFGeometry destructor
129 //
130
131}
132//_____________________________________________________________________________
133void AliTOFGeometry::Init()
134{
135 //
136 // Initialize strip Tilt Angles and Heights
137 //
0f4a7374 138
74ea065c 139 fPhiSec = 360./kNSectors;
74ea065c 140
4402e7cb 141 Float_t const kangles[kNPlates][kMaxNstrip] ={
142
143 {44.494, 43.725, 42.946, 42.156, 41.357, 40.548, 39.729, 38.899,
144 38.060, 37.211, 36.353, 35.484, 34.606, 33.719, 32.822, 31.916,
145 31.001, 30.077, 29.144, 28.202 },
146
147 {26.884, 25.922, 24.952, 23.975, 22.989, 22.320, 21.016, 20.309,
148 19.015, 18.270, 16.989, 16.205, 14.941, 14.117, 12.871, 12.008,
149 10.784, 9.8807, 8.681, 0.0 },
150
151 { 7.5835, 6.4124, 5.4058, 4.2809, 3.2448, 2.1424, 1.078, -0., -1.078,
152 -2.1424, -3.2448, -4.2809, -5.4058, -6.4124, -7.5835, 0.0, 0.0, 0.0,
153 0.0, 0.0 },
154
155 {-8.681, -9.8807, -10.784, -12.008, -12.871, -14.117, -14.941, -16.205,
156 -16.989, -18.27, -19.015, -20.309, -21.016, -22.32, -22.989,
157 -23.975, -24.952, -25.922, -26.884, 0. },
158
159 {-28.202, -29.144, -30.077, -31.001, -31.916, -32.822, -33.719, -34.606,
160 -35.484, -36.353, -37.211, -38.06, -38.899, -39.729, -40.548,
161 -41.357, -42.156, -42.946, -43.725, -44.494 }};
162
163
164 //Strips Heights
165
166 Float_t const kheights[kNPlates][kMaxNstrip]= {
167
168 {-5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5,
169 -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5, -5.5 },
170
171 {-6.3, -7.1, -7.9, -8.7, -9.5, -3, -9.5, -3, -9.5, -3,
172 -9.5, -3.0, -9.5, -3.0, -9.5, -3, -9.5, -3, -9 , 0.},
173
174 { -3, -9, -4.5, -9, -4.5, -9, -4.5, -9, -4.5, -9,
175 -4.5, -9, -4.5, -9, -3, 0.0, 0.0, 0.0, 0.0, 0.0 },
176
177 { -9, -3, -9.5, -3, -9.5, -3, -9.5, -3, -9.5, -3, -9.5,
178 -3, -9.5, -3, -9.5, -8.7, -7.9, -7.1, -6.3, 0. },
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 for (Int_t iplate = 0; iplate < kNPlates; iplate++) {
184 for (Int_t istrip = 0; istrip < kMaxNstrip; istrip++) {
185 fAngles[iplate][istrip] = kangles[iplate][istrip];
186 fHeights[iplate][istrip] = kheights[iplate][istrip];
187 }
188 }
189
0f4a7374 190}
191
192//_____________________________________________________________________________
c0545837 193void AliTOFGeometry::GetPosPar(Int_t *det, Float_t *pos)
0f4a7374 194{
195//
196// Returns space point coor (x,y,z) (cm) for Detector
197// Indices (iSect,iPlate,iStrip,iPadX,iPadZ)
198//
199
200 pos[0]=GetX(det);
201 pos[1]=GetY(det);
202 pos[2]=GetZ(det);
203
204}
205//_____________________________________________________________________________
206void AliTOFGeometry::GetDetID( Float_t *pos, Int_t *det)
207{
208 //
209 // Returns Detector Indices (iSect,iPlate,iStrip,iPadX,iPadZ)
210 // space point coor (x,y,z) (cm)
211
212
213 det[0]=GetSector(pos);
214 det[1]=GetPlate(pos);
215 det[2]=GetStrip(pos);
216 det[3]=GetPadZ(pos);
217 det[4]=GetPadX(pos);
218
219}
220//_____________________________________________________________________________