]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/AliTOFGeometry.cxx
Size of data member arrays corrected
[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$
6fbc8979 18Revision 1.10 2005/12/15 08:55:32 decaro
19New TOF geometry description (V5) -G. Cara Romeo and A. De Caro
20
d3c7bfac 21Revision 1.9.1 2005/07/19 A. De Caro
22 Created daughter-classes AliTOFGeometryV4 and AliTOFGeometryV5
23 => moved global methods IsInsideThePad, DistanceToPad,
24 GetPlate, GetSector, GetStrip, GetPadX, GetPadZ,
25 GetX, GetY, GetZ, GetPadDx, GetPadDy and GetPadDz
26 in daughter-classes
27
28Revision 1.9 2005/10/20 12:41:35 hristov
29Implementation of parallel tracking. It is not the default version, one can use it passing option MI from AliReconstruction to TOF (M.Ivanov)
30
d88fbf15 31Revision 1.8 2004/11/29 08:28:01 decaro
32Introduction of a new TOF constant (i.e. TDC bin width)
33
43f77f2d 34Revision 1.7 2004/11/05 07:20:08 decaro
35TOF library splitting and conversion of some printout messages in AliLog schema (T.Kuhr)
36
d076c8d5 37Revision 1.6 2004/06/15 15:27:59 decaro
38TOF raw data: preliminary implementation and style changes
39
7e6dce66 40Revision 1.5 2004/04/20 14:37:22 hristov
41Using TMath::Abs instead of fabs, arrays of variable size created/deleted correctly (HP,Sun)
42
9b49e4c9 43Revision 1.4 2004/04/13 09:42:51 decaro
44Track reconstruction code for TOF: updating
45
74ea065c 46Revision 1.3 2003/12/29 18:40:39 hristov
47Copy/paste error corrected
48
fb9747d4 49Revision 1.2 2003/12/29 17:26:01 hristov
50Using enum to initaialize static ints in the header file, the initialization of static floats moved to the implementation file
51
58eb5b61 52Revision 1.1 2003/12/29 15:18:03 decaro
53TOF geometry updating (addition of AliTOFGeometry)
54
7e6dce66 55Revision 0.05 2004/6/11 A.De Caro
56 Implement Global method NpadXStrip
57 Insert four float constants (originally in AliTOF class)
58Revision 0.04 2004/4/05 S.Arcelli
74ea065c 59 Implement Global methods IsInsideThePad
60 DistanceToPad
7e6dce66 61Revision 0.03 2003/12/14 S.Arcelli
62 Set Phi range [-180,180]->[0,360]
63Revision 0.02 2003/12/10 S.Arcelli:
64 Implement Global methods GetPos & GetDetID
65Revision 0.01 2003/12/04 S.Arcelli
0f4a7374 66*/
67
68#include <stdlib.h>
69#include <Riostream.h>
70///////////////////////////////////////////////////////////////////////////////
71// //
72// TOF Geometry class //
73// //
74///////////////////////////////////////////////////////////////////////////////
75
d076c8d5 76#include "AliLog.h"
0f4a7374 77#include "AliConst.h"
78#include "AliTOFGeometry.h"
79
80ClassImp(AliTOFGeometry)
81
7e6dce66 82const Int_t AliTOFGeometry::fgkTimeDiff = 25000; // Min signal separation (ps)
58eb5b61 83
7e6dce66 84const Float_t AliTOFGeometry::fgkXPad = 2.5; // Pad size in the x direction (cm)
85const Float_t AliTOFGeometry::fgkZPad = 3.5; // Pad size in the z direction (cm)
58eb5b61 86
d3c7bfac 87const Float_t AliTOFGeometry::fgkSigmaForTail1= 2.; //Sig1 for simulation of TDC tails
fb9747d4 88const Float_t AliTOFGeometry::fgkSigmaForTail2= 0.5;//Sig2 for simulation of TDC tails
58eb5b61 89
d3c7bfac 90const Float_t AliTOFGeometry::fgkTdcBin = 24.4; // time-window for the TDC bins [ps]
43f77f2d 91
0f4a7374 92//_____________________________________________________________________________
93AliTOFGeometry::AliTOFGeometry()
94{
95 //
96 // AliTOFGeometry default constructor
97 //
d3c7bfac 98
6fbc8979 99 kNStripC = 20; // number of strips in C type module
100 kMaxNstrip = 20; // Max. number of strips
d3c7bfac 101 kZlenA = 106.0; // length (cm) of the A module
102 kZlenB = 141.0; // length (cm) of the B module
103 kZlenC = 177.5; // length (cm) of the C module
104 kMaxhZtof = 371.5; // Max half z-size of TOF (cm)
6fbc8979 105 kStripLength = 122.;// Strip Length (rho X phi direction) (cm)
d3c7bfac 106
6fbc8979 107 fgkxTOF = 371.; // Inner radius of the TOF for Reconstruction (cm)
108 fgkRmin = 370.; // Inner radius of the TOF (cm)
109 fgkRmax = 399.; // Outer radius of the TOF (cm)
d3c7bfac 110
0f4a7374 111 Init();
112
113}
114
115//_____________________________________________________________________________
116AliTOFGeometry::~AliTOFGeometry()
117{
118 //
119 // AliTOFGeometry destructor
120 //
121
122}
123//_____________________________________________________________________________
124void AliTOFGeometry::Init()
125{
126 //
127 // Initialize strip Tilt Angles and Heights
128 //
0f4a7374 129
74ea065c 130 fPhiSec = 360./kNSectors;
74ea065c 131
0f4a7374 132}
133
134//_____________________________________________________________________________
135void AliTOFGeometry::GetPos(Int_t *det, Float_t *pos)
136{
137//
138// Returns space point coor (x,y,z) (cm) for Detector
139// Indices (iSect,iPlate,iStrip,iPadX,iPadZ)
140//
141
142 pos[0]=GetX(det);
143 pos[1]=GetY(det);
144 pos[2]=GetZ(det);
145
146}
147//_____________________________________________________________________________
148void AliTOFGeometry::GetDetID( Float_t *pos, Int_t *det)
149{
150 //
151 // Returns Detector Indices (iSect,iPlate,iStrip,iPadX,iPadZ)
152 // space point coor (x,y,z) (cm)
153
154
155 det[0]=GetSector(pos);
156 det[1]=GetPlate(pos);
157 det[2]=GetStrip(pos);
158 det[3]=GetPadZ(pos);
159 det[4]=GetPadX(pos);
160
161}
162//_____________________________________________________________________________