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