]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - HLT/TPCLib/tracking-ca/AliHLTTPCCAParam.cxx
- update track points definition used for alignment
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCAParam.cxx
... / ...
CommitLineData
1// @(#) $Id$
2// **************************************************************************
3// This file is property of and copyright by the ALICE HLT Project *
4// ALICE Experiment at CERN, All rights reserved. *
5// *
6// Primary Authors: Sergey Gorbunov <sergey.gorbunov@kip.uni-heidelberg.de> *
7// Ivan Kisel <kisel@kip.uni-heidelberg.de> *
8// for The ALICE HLT Project. *
9// *
10// Permission to use, copy, modify and distribute this software and its *
11// documentation strictly for non-commercial purposes is hereby granted *
12// without fee, provided that the above copyright notice appears in all *
13// copies and that both the copyright notice and this permission notice *
14// appear in the supporting documentation. The authors make no claims *
15// about the suitability of this software for any purpose. It is *
16// provided "as is" without express or implied warranty. *
17// *
18//***************************************************************************
19
20
21#include "AliHLTTPCCAParam.h"
22#include "AliHLTTPCCAMath.h"
23
24
25#if !defined(HLTCA_GPUCODE)
26
27GPUd() AliHLTTPCCAParam::AliHLTTPCCAParam()
28 : fISlice(0),fNRows(63),fAlpha(0.174533), fDAlpha(0.349066),
29 fCosAlpha(0), fSinAlpha(0), fAngleMin(0), fAngleMax(0), fRMin(83.65), fRMax(133.3),
30 fZMin(0.0529937), fZMax(249.778), fErrX(0), fErrY(0), fErrZ(0.228808),fPadPitch(0.4),fBz(-5.),
31 fHitPickUpFactor(1.),
32 fMaxTrackMatchDRow(4), fTrackConnectionFactor(3.5), fTrackChiCut(3.5), fTrackChi2Cut(10)
33{
34 // constructor
35 fParamS0Par[0][0][0] = 0.00047013;
36 fParamS0Par[0][0][1] = 2.00135e-05;
37 fParamS0Par[0][0][2] = 0.0106533;
38 fParamS0Par[0][0][3] = 5.27104e-08;
39 fParamS0Par[0][0][4] = 0.012829;
40 fParamS0Par[0][0][5] = 0.000147125;
41 fParamS0Par[0][0][6] = 4.99432;
42 fParamS0Par[0][1][0] = 0.000883342;
43 fParamS0Par[0][1][1] = 1.07011e-05;
44 fParamS0Par[0][1][2] = 0.0103187;
45 fParamS0Par[0][1][3] = 4.25141e-08;
46 fParamS0Par[0][1][4] = 0.0224292;
47 fParamS0Par[0][1][5] = 8.27274e-05;
48 fParamS0Par[0][1][6] = 4.17233;
49 fParamS0Par[0][2][0] = 0.000745399;
50 fParamS0Par[0][2][1] = 5.62408e-06;
51 fParamS0Par[0][2][2] = 0.0151562;
52 fParamS0Par[0][2][3] = 5.08757e-08;
53 fParamS0Par[0][2][4] = 0.0601004;
54 fParamS0Par[0][2][5] = 7.97129e-05;
55 fParamS0Par[0][2][6] = 4.84913;
56 fParamS0Par[1][0][0] = 0.00215126;
57 fParamS0Par[1][0][1] = 6.82233e-05;
58 fParamS0Par[1][0][2] = 0.0221867;
59 fParamS0Par[1][0][3] = -6.27825e-09;
60 fParamS0Par[1][0][4] = -0.00745378;
61 fParamS0Par[1][0][5] = 0.000172629;
62 fParamS0Par[1][0][6] = 6.24987;
63 fParamS0Par[1][1][0] = 0.00181667;
64 fParamS0Par[1][1][1] = -4.17772e-06;
65 fParamS0Par[1][1][2] = 0.0253429;
66 fParamS0Par[1][1][3] = 1.3011e-07;
67 fParamS0Par[1][1][4] = -0.00362827;
68 fParamS0Par[1][1][5] = 0.00030406;
69 fParamS0Par[1][1][6] = 17.7775;
70 fParamS0Par[1][2][0] = 0.00158251;
71 fParamS0Par[1][2][1] = -3.55911e-06;
72 fParamS0Par[1][2][2] = 0.0247899;
73 fParamS0Par[1][2][3] = 7.20604e-08;
74 fParamS0Par[1][2][4] = 0.0179946;
75 fParamS0Par[1][2][5] = 0.000425504;
76 fParamS0Par[1][2][6] = 20.9294;
77
78 Update();
79}
80#endif
81
82GPUd() void AliHLTTPCCAParam::Initialize( Int_t iSlice,
83 Int_t nRows, Float_t rowX[],
84 Float_t alpha, Float_t dAlpha,
85 Float_t rMin, Float_t rMax,
86 Float_t zMin, Float_t zMax,
87 Float_t padPitch, Float_t zSigma,
88 Float_t bz
89 )
90{
91 // initialization
92 fISlice = iSlice;
93 fAlpha = alpha;
94 fDAlpha = dAlpha;
95 fRMin = rMin;
96 fRMax = rMax;
97 fZMin = zMin;
98 fZMax = zMax;
99 fPadPitch = padPitch;
100 fErrY = 1.; // not in use
101 fErrZ = zSigma;
102 fBz = bz;
103 fNRows = nRows;
104 for( Int_t irow=0; irow<nRows; irow++ ){
105 fRowX[irow] = rowX[irow];
106 }
107
108 Update();
109}
110
111GPUd() void AliHLTTPCCAParam::Update()
112{
113 // update of calculated values
114 fCosAlpha = CAMath::Cos(fAlpha);
115 fSinAlpha = CAMath::Sin(fAlpha);
116 fAngleMin = fAlpha - fDAlpha/2.;
117 fAngleMax = fAlpha + fDAlpha/2.;
118 fErrX = fPadPitch/CAMath::Sqrt(12.);
119 fTrackChi2Cut = fTrackChiCut * fTrackChiCut;
120}
121
122GPUd() void AliHLTTPCCAParam::Slice2Global( Float_t x, Float_t y, Float_t z,
123 Float_t *X, Float_t *Y, Float_t *Z ) const
124{
125 // conversion of coorinates sector->global
126 *X = x*fCosAlpha - y*fSinAlpha;
127 *Y = y*fCosAlpha + x*fSinAlpha;
128 *Z = z;
129}
130
131GPUd() void AliHLTTPCCAParam::Global2Slice( Float_t X, Float_t Y, Float_t Z,
132 Float_t *x, Float_t *y, Float_t *z ) const
133{
134 // conversion of coorinates global->sector
135 *x = X*fCosAlpha + Y*fSinAlpha;
136 *y = Y*fCosAlpha - X*fSinAlpha;
137 *z = Z;
138}
139
140GPUd() Float_t AliHLTTPCCAParam::GetClusterError2( Int_t yz, Int_t type, Float_t z, Float_t angle ) const
141{
142 //* recalculate the cluster error wih respect to the track slope
143 Float_t angle2 = angle*angle;
144 const Float_t *c = fParamS0Par[yz][type];
145 Float_t v = c[0] + z*(c[1] + c[3]*z) + angle2*(c[2] + angle2*c[4] + c[5]*z );
146 return CAMath::Abs(v);
147}
148
149GPUh() void AliHLTTPCCAParam::WriteSettings( std::ostream &out ) const
150{
151 // write settings to the file
152 out << fISlice<<std::endl;
153 out << fNRows<<std::endl;
154 out << fAlpha<<std::endl;
155 out << fDAlpha<<std::endl;
156 out << fCosAlpha<<std::endl;
157 out << fSinAlpha<<std::endl;
158 out << fAngleMin<<std::endl;
159 out << fAngleMax<<std::endl;
160 out << fRMin<<std::endl;
161 out << fRMax<<std::endl;
162 out << fZMin<<std::endl;
163 out << fZMax<<std::endl;
164 out << fErrX<<std::endl;
165 out << fErrY<<std::endl;
166 out << fErrZ<<std::endl;
167 out << fPadPitch<<std::endl;
168 out << fBz<<std::endl;
169 out << fHitPickUpFactor<<std::endl;
170 out << fMaxTrackMatchDRow<<std::endl;
171 out << fTrackConnectionFactor<<std::endl;
172 out << fTrackChiCut<<std::endl;
173 out << fTrackChi2Cut<<std::endl;
174 for( Int_t iRow = 0; iRow<fNRows; iRow++ ){
175 out << fRowX[iRow]<<std::endl;
176 }
177 out<<std::endl;
178 for( Int_t i=0; i<2; i++ )
179 for( Int_t j=0; j<3; j++ )
180 for( Int_t k=0; k<7; k++ )
181 out << fParamS0Par[i][j][k]<<std::endl;
182 out<<std::endl;
183}
184
185GPUh() void AliHLTTPCCAParam::ReadSettings( std::istream &in )
186{
187 // Read settings from the file
188
189 in >> fISlice;
190 in >> fNRows;
191 in >> fAlpha;
192 in >> fDAlpha;
193 in >> fCosAlpha;
194 in >> fSinAlpha;
195 in >> fAngleMin;
196 in >> fAngleMax;
197 in >> fRMin;
198 in >> fRMax;
199 in >> fZMin;
200 in >> fZMax;
201 in >> fErrX;
202 in >> fErrY;
203 in >> fErrZ;
204 in >> fPadPitch;
205 in >> fBz;
206 in >> fHitPickUpFactor;
207 in >> fMaxTrackMatchDRow;
208 in >> fTrackConnectionFactor;
209 in >> fTrackChiCut;
210 in >> fTrackChi2Cut;
211 for( Int_t iRow = 0; iRow<fNRows; iRow++ ){
212 in >> fRowX[iRow];
213 }
214 for( Int_t i=0; i<2; i++ )
215 for( Int_t j=0; j<3; j++ )
216 for( Int_t k=0; k<7; k++ )
217 in >> fParamS0Par[i][j][k];
218}