]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFGeometry.cxx
Add classes for TOF Calibration (C.Zampolli)
[u/mrichter/AliRoot.git] / TOF / AliTOFGeometry.cxx
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$
18 Revision 1.10  2005/12/15 08:55:32  decaro
19 New TOF geometry description (V5) -G. Cara Romeo and A. De Caro
20
21 Revision 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
28 Revision 1.9  2005/10/20 12:41:35  hristov
29 Implementation of parallel tracking. It is not the default version, one can use it passing option MI from AliReconstruction to TOF (M.Ivanov)
30
31 Revision 1.8  2004/11/29 08:28:01  decaro
32 Introduction of a new TOF constant (i.e. TDC bin width)
33
34 Revision 1.7  2004/11/05 07:20:08  decaro
35 TOF library splitting and conversion of some printout messages in AliLog schema (T.Kuhr)
36
37 Revision 1.6  2004/06/15 15:27:59  decaro
38 TOF raw data: preliminary implementation and style changes
39
40 Revision 1.5  2004/04/20 14:37:22  hristov
41 Using TMath::Abs instead of fabs, arrays of variable size created/deleted correctly (HP,Sun)
42
43 Revision 1.4  2004/04/13 09:42:51  decaro
44 Track reconstruction code for TOF: updating
45
46 Revision 1.3  2003/12/29 18:40:39  hristov
47 Copy/paste error corrected
48
49 Revision 1.2  2003/12/29 17:26:01  hristov
50 Using enum to initaialize static ints in the header file, the initialization of static floats moved to the implementation file
51
52 Revision 1.1  2003/12/29 15:18:03  decaro
53 TOF geometry updating (addition of AliTOFGeometry)
54
55 Revision 0.05  2004/6/11 A.De Caro
56         Implement Global method NpadXStrip
57         Insert four float constants (originally  in AliTOF class)
58 Revision 0.04  2004/4/05 S.Arcelli
59         Implement Global methods IsInsideThePad 
60                                   DistanceToPad 
61 Revision 0.03  2003/12/14 S.Arcelli
62         Set Phi range [-180,180]->[0,360] 
63 Revision 0.02  2003/12/10 S.Arcelli:
64         Implement Global methods GetPos & GetDetID 
65 Revision 0.01  2003/12/04 S.Arcelli
66 */
67
68 #include <stdlib.h>
69 #include <Riostream.h>
70 ///////////////////////////////////////////////////////////////////////////////
71 //                                                                           //
72 //  TOF Geometry class                                                       //
73 //                                                                           //
74 ///////////////////////////////////////////////////////////////////////////////
75
76 #include "AliLog.h"
77 #include "AliConst.h"
78 #include "AliTOFGeometry.h"
79
80 ClassImp(AliTOFGeometry)
81
82 const Int_t AliTOFGeometry::fgkTimeDiff   = 25000;  // Min signal separation (ps)
83
84 const Float_t AliTOFGeometry::fgkXPad     = 2.5;    // Pad size in the x direction (cm)
85 const Float_t AliTOFGeometry::fgkZPad     = 3.5;    // Pad size in the z direction (cm)
86
87 const Float_t AliTOFGeometry::fgkSigmaForTail1= 2.; //Sig1 for simulation of TDC tails 
88 const Float_t AliTOFGeometry::fgkSigmaForTail2= 0.5;//Sig2 for simulation of TDC tails
89
90 const Float_t AliTOFGeometry::fgkTdcBin = 24.4;     // time-window for the TDC bins [ps]
91
92 //_____________________________________________________________________________
93 AliTOFGeometry::AliTOFGeometry()
94 {
95   //
96   // AliTOFGeometry default constructor
97   //
98
99   kNStripC     = 20;  // number of strips in C type module 
100   kMaxNstrip   = 20;  // Max. number of strips 
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)
105   kStripLength = 122.;// Strip Length (rho X phi direction) (cm)
106
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)
110
111   Init();
112
113 }
114
115 //_____________________________________________________________________________
116 AliTOFGeometry::~AliTOFGeometry()
117 {
118   //
119   // AliTOFGeometry destructor
120   //
121
122 }
123 //_____________________________________________________________________________
124 void AliTOFGeometry::Init()
125 {
126   //
127   // Initialize strip Tilt Angles and Heights
128   //
129  
130   fPhiSec   = 360./kNSectors;
131
132 }
133
134 //_____________________________________________________________________________
135 void 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 //_____________________________________________________________________________
148 void 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 //_____________________________________________________________________________