Setting arbitrary Magnetic field while track reading
[u/mrichter/AliRoot.git] / TPC / AliTPCtrack.cxx
CommitLineData
73042f01 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
0938c7d3 16/*
17$Log$
2b5dc063 18Revision 1.20 2003/04/10 10:36:54 hristov
19Code for unified TPC/TRD tracking (S.Radomski)
20
9c9d2487 21Revision 1.19 2003/03/03 16:56:53 hristov
22Corrections to obey coding conventions
23
7c27857f 24Revision 1.18 2003/02/19 08:57:04 hristov
25Control^M removed
26
0d2d27b0 27Revision 1.17 2003/02/19 08:49:46 hristov
28Track time measurement (S.Radomski)
29
e3f7105e 30Revision 1.16 2003/02/06 11:11:36 kowal2
31Added a few get methods by Jiri Chudoba
32
77e58468 33Revision 1.15 2002/11/25 09:33:30 hristov
34Tracking of secondaries (M.Ivanov)
35
1627d1c4 36Revision 1.14 2002/10/23 13:45:00 hristov
37Fatal if no magnetic field set for the reconstruction (Y.Belikov)
38
e1a65e92 39Revision 1.13 2002/10/23 07:17:34 alibrary
40Introducing Riostream.h
41
19364939 42Revision 1.12 2002/10/14 14:57:43 hristov
43Merging the VirtualMC branch to the main development branch (HEAD)
44
b9d0a01d 45Revision 1.9.6.1 2002/10/11 08:34:48 hristov
46Updating VirtualMC to v3-09-02
47
48Revision 1.11 2002/07/19 07:34:42 kowal2
49Logs added
50
0938c7d3 51*/
52
53
73042f01 54//-----------------------------------------------------------------
55// Implementation of the TPC track class
7c27857f 56// This class is used by the AliTPCtracker class
57// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
73042f01 58//-----------------------------------------------------------------
59
19364939 60#include <Riostream.h>
b19a0509 61
73042f01 62#include "AliTPCtrack.h"
7c27857f 63#include "AliCluster.h"
9c9d2487 64#include "AliBarrelTrack.h"
73042f01 65
66ClassImp(AliTPCtrack)
b9de75e1 67
e3f7105e 68//_________________________________________________________________________
69AliTPCtrack::AliTPCtrack(): AliKalmanTrack()
70{
71 fX = fP0 = fP1 = fP2 = fP3 = fP3 = fP4 = 0.0;
72 fAlpha = fdEdx = 0.0;
9c9d2487 73 fNWrong = fNRotation = fNumber = 0; // [SR, 01.04.2003]
e3f7105e 74}
75
73042f01 76//_________________________________________________________________________
77AliTPCtrack::AliTPCtrack(UInt_t index, const Double_t xx[5],
b19a0509 78const Double_t cc[15], Double_t xref, Double_t alpha) : AliKalmanTrack() {
73042f01 79 //-----------------------------------------------------------------
80 // This is the main track constructor.
81 //-----------------------------------------------------------------
73042f01 82 fX=xref;
be9c5115 83 fAlpha=alpha;
84 if (fAlpha<-TMath::Pi()) fAlpha += 2*TMath::Pi();
85 if (fAlpha>=TMath::Pi()) fAlpha -= 2*TMath::Pi();
86 fdEdx=0.;
73042f01 87
b19a0509 88 fP0=xx[0]; fP1=xx[1]; fP2=xx[2]; fP3=xx[3]; fP4=xx[4];
73042f01 89
b19a0509 90 fC00=cc[0];
91 fC10=cc[1]; fC11=cc[2];
92 fC20=cc[3]; fC21=cc[4]; fC22=cc[5];
93 fC30=cc[6]; fC31=cc[7]; fC32=cc[8]; fC33=cc[9];
94 fC40=cc[10]; fC41=cc[11]; fC42=cc[12]; fC43=cc[13]; fC44=cc[14];
73042f01 95
be9c5115 96 fIndex[0]=index;
97 SetNumberOfClusters(1);
b9de75e1 98
99}
100
101//_____________________________________________________________________________
e1a65e92 102AliTPCtrack::AliTPCtrack(const AliKalmanTrack& t,Double_t alpha) :
103AliKalmanTrack(t) {
b9de75e1 104 //-----------------------------------------------------------------
105 // Conversion AliKalmanTrack -> AliTPCtrack.
106 //-----------------------------------------------------------------
b9de75e1 107 SetChi2(0.);
108 SetNumberOfClusters(0);
b9de75e1 109
110 fdEdx = 0.;
111 fAlpha = alpha;
112 if (fAlpha < -TMath::Pi()) fAlpha += 2*TMath::Pi();
113 else if (fAlpha >= TMath::Pi()) fAlpha -= 2*TMath::Pi();
114
115 //Conversion of the track parameters
116 Double_t x,p[5]; t.GetExternalParameters(x,p);
117 fX=x; x=GetConvConst();
118 fP0=p[0];
119 fP1=p[1];
120 fP3=p[3];
121 fP4=p[4]/x;
122 fP2=fP4*fX - p[2];
123
124 //Conversion of the covariance matrix
125 Double_t c[15]; t.GetExternalCovariance(c);
126 c[10]/=x; c[11]/=x; c[12]/=x; c[13]/=x; c[14]/=x*x;
127
128 Double_t c22=fX*fX*c[14] - 2*fX*c[12] + c[5];
129 Double_t c32=fX*c[13] - c[8];
130 Double_t c20=fX*c[10] - c[3], c21=fX*c[11] - c[4], c42=fX*c[14] - c[12];
131
132 fC00=c[0 ];
133 fC10=c[1 ]; fC11=c[2 ];
134 fC20=c20; fC21=c21; fC22=c22;
135 fC30=c[6 ]; fC31=c[7 ]; fC32=c32; fC33=c[9 ];
136 fC40=c[10]; fC41=c[11]; fC42=c42; fC43=c[13]; fC44=c[14];
137
73042f01 138}
139
140//_____________________________________________________________________________
b19a0509 141AliTPCtrack::AliTPCtrack(const AliTPCtrack& t) : AliKalmanTrack(t) {
73042f01 142 //-----------------------------------------------------------------
143 // This is a track copy constructor.
144 //-----------------------------------------------------------------
be9c5115 145 fX=t.fX;
146 fAlpha=t.fAlpha;
73042f01 147 fdEdx=t.fdEdx;
148
be9c5115 149 fP0=t.fP0; fP1=t.fP1; fP2=t.fP2; fP3=t.fP3; fP4=t.fP4;
150
151 fC00=t.fC00;
152 fC10=t.fC10; fC11=t.fC11;
153 fC20=t.fC20; fC21=t.fC21; fC22=t.fC22;
154 fC30=t.fC30; fC31=t.fC31; fC32=t.fC32; fC33=t.fC33;
155 fC40=t.fC40; fC41=t.fC41; fC42=t.fC42; fC43=t.fC43; fC44=t.fC44;
156
157 Int_t n=GetNumberOfClusters();
158 for (Int_t i=0; i<n; i++) fIndex[i]=t.fIndex[i];
159}
9c9d2487 160//_____________________________________________________________________________
161
162void AliTPCtrack::GetBarrelTrack(AliBarrelTrack *track) {
163 //
164 // Create a Barrel Track out of this track
165 // Current track is propagated to the reference plane
166 // by the tracker
167 //
168 // [SR, 01.04.2003]
169
170 if (!track) return;
171 Double_t xr, vec[5], cov[15];
172
173 track->SetLabel(GetLabel());
174 track->SetX(fX, fAlpha);
175 track->SetNClusters(GetNumberOfClusters(), GetChi2());
2b5dc063 176 Double_t times[10];
177 GetIntegratedTimes(times);
178 track->SetTime(times, GetIntegratedLength());
9c9d2487 179
2b5dc063 180 track->SetMass(GetMass());
181 track->SetdEdX(GetdEdx());
9c9d2487 182
183 track->SetNWrongClusters(fNWrong);
184 track->SetNRotate(fNRotation);
be9c5115 185
9c9d2487 186 GetExternalParameters(xr, vec);
187 track->SetStateVector(vec);
188
189 GetExternalCovariance(cov);
190 track->SetCovarianceMatrix(cov);
191
192}
be9c5115 193//_____________________________________________________________________________
194Int_t AliTPCtrack::Compare(const TObject *o) const {
195 //-----------------------------------------------------------------
196 // This function compares tracks according to the their curvature
197 //-----------------------------------------------------------------
198 AliTPCtrack *t=(AliTPCtrack*)o;
024a7fe9 199 //Double_t co=TMath::Abs(t->Get1Pt());
200 //Double_t c =TMath::Abs(Get1Pt());
201 Double_t co=t->GetSigmaY2()*t->GetSigmaZ2();
202 Double_t c =GetSigmaY2()*GetSigmaZ2();
be9c5115 203 if (c>co) return 1;
204 else if (c<co) return -1;
205 return 0;
206}
207
208//_____________________________________________________________________________
209void AliTPCtrack::GetExternalCovariance(Double_t cc[15]) const {
210 //-------------------------------------------------------------------------
211 // This function returns an external representation of the covriance matrix.
212 // (See comments in AliTPCtrack.h about external track representation)
213 //-------------------------------------------------------------------------
9b280d80 214 Double_t a=GetConvConst();
be9c5115 215
b9de75e1 216 Double_t c22=fX*fX*fC44-2*fX*fC42+fC22;
217 Double_t c32=fX*fC43-fC32;
218 Double_t c20=fX*fC40-fC20, c21=fX*fC41-fC21, c42=fX*fC44-fC42;
be9c5115 219
220 cc[0 ]=fC00;
221 cc[1 ]=fC10; cc[2 ]=fC11;
222 cc[3 ]=c20; cc[4 ]=c21; cc[5 ]=c22;
b9de75e1 223 cc[6 ]=fC30; cc[7 ]=fC31; cc[8 ]=c32; cc[9 ]=fC33;
224 cc[10]=fC40*a; cc[11]=fC41*a; cc[12]=c42*a; cc[13]=fC43*a; cc[14]=fC44*a*a;
be9c5115 225
226}
227
228//_____________________________________________________________________________
229Double_t AliTPCtrack::GetPredictedChi2(const AliCluster *c) const
230{
231 //-----------------------------------------------------------------
232 // This function calculates a predicted chi2 increment.
233 //-----------------------------------------------------------------
234 Double_t r00=c->GetSigmaY2(), r01=0., r11=c->GetSigmaZ2();
235 r00+=fC00; r01+=fC10; r11+=fC11;
236
237 Double_t det=r00*r11 - r01*r01;
238 if (TMath::Abs(det) < 1.e-10) {
239 Int_t n=GetNumberOfClusters();
240 if (n>4) cerr<<n<<" AliKalmanTrack warning: Singular matrix !\n";
241 return 1e10;
242 }
243 Double_t tmp=r00; r00=r11; r11=tmp; r01=-r01;
244
245 Double_t dy=c->GetY() - fP0, dz=c->GetZ() - fP1;
246
247 return (dy*r00*dy + 2*r01*dy*dz + dz*r11*dz)/det;
73042f01 248}
249
250//_____________________________________________________________________________
7f6ddf58 251Int_t AliTPCtrack::PropagateTo(Double_t xk,Double_t x0,Double_t rho) {
73042f01 252 //-----------------------------------------------------------------
253 // This function propagates a track to a reference plane x=xk.
254 //-----------------------------------------------------------------
1627d1c4 255 if (TMath::Abs(fP4*xk - fP2) >= 0.9) {
256 // Int_t n=GetNumberOfClusters();
257 //if (n>4) cerr<<n<<" AliTPCtrack warning: Propagation failed !\n";
73042f01 258 return 0;
259 }
e3f7105e 260
261 // old position for time [SR, GSI 17.02.2003]
262 Double_t oldX = fX;
263 Double_t oldY = fP0;
264 Double_t oldZ = fP1;
265 //
73042f01 266
b19a0509 267 Double_t x1=fX, x2=x1+(xk-x1), dx=x2-x1, y1=fP0, z1=fP1;
b9de75e1 268 Double_t c1=fP4*x1 - fP2, r1=sqrt(1.- c1*c1);
269 Double_t c2=fP4*x2 - fP2, r2=sqrt(1.- c2*c2);
73042f01 270
b19a0509 271 fP0 += dx*(c1+c2)/(r1+r2);
b9de75e1 272 fP1 += dx*(c1+c2)/(c1*r2 + c2*r1)*fP3;
73042f01 273
274 //f = F - 1
275 Double_t rr=r1+r2, cc=c1+c2, xx=x1+x2;
b19a0509 276 Double_t f02=-dx*(2*rr + cc*(c1/r1 + c2/r2))/(rr*rr);
b9de75e1 277 Double_t f04= dx*(rr*xx + cc*(c1*x1/r1+c2*x2/r2))/(rr*rr);
73042f01 278 Double_t cr=c1*r2+c2*r1;
b9de75e1 279 Double_t f12=-dx*fP3*(2*cr + cc*(c2*c1/r1-r1 + c1*c2/r2-r2))/(cr*cr);
280 Double_t f13= dx*cc/cr;
281 Double_t f14=dx*fP3*(cr*xx-cc*(r1*x2-c2*c1*x1/r1+r2*x1-c1*c2*x2/r2))/(cr*cr);
73042f01 282
283 //b = C*ft
b9de75e1 284 Double_t b00=f02*fC20 + f04*fC40, b01=f12*fC20 + f14*fC40 + f13*fC30;
285 Double_t b10=f02*fC21 + f04*fC41, b11=f12*fC21 + f14*fC41 + f13*fC31;
286 Double_t b20=f02*fC22 + f04*fC42, b21=f12*fC22 + f14*fC42 + f13*fC32;
287 Double_t b30=f02*fC32 + f04*fC43, b31=f12*fC32 + f14*fC43 + f13*fC33;
288 Double_t b40=f02*fC42 + f04*fC44, b41=f12*fC42 + f14*fC44 + f13*fC43;
73042f01 289
290 //a = f*b = f*C*ft
b9de75e1 291 Double_t a00=f02*b20+f04*b40,a01=f02*b21+f04*b41,a11=f12*b21+f14*b41+f13*b31;
73042f01 292
293 //F*C*Ft = C + (a + b + bt)
b19a0509 294 fC00 += a00 + 2*b00;
295 fC10 += a01 + b01 + b10;
296 fC20 += b20;
297 fC30 += b30;
298 fC40 += b40;
299 fC11 += a11 + 2*b11;
300 fC21 += b21;
301 fC31 += b31;
302 fC41 += b41;
73042f01 303
304 fX=x2;
305
306 //Multiple scattering******************
b19a0509 307 Double_t d=sqrt((x1-fX)*(x1-fX)+(y1-fP0)*(y1-fP0)+(z1-fP1)*(z1-fP1));
be9c5115 308 Double_t p2=(1.+ GetTgl()*GetTgl())/(Get1Pt()*Get1Pt());
7f6ddf58 309 Double_t beta2=p2/(p2 + GetMass()*GetMass());
024a7fe9 310 //Double_t theta2=14.1*14.1/(beta2*p2*1e6)*d/x0*rho;
311 Double_t theta2=1.0259e-6*10*10/20/(beta2*p2)*d*rho;
73042f01 312
b9de75e1 313 Double_t ey=fP4*fX - fP2, ez=fP3;
314 Double_t xz=fP4*ez, zz1=ez*ez+1, xy=fP2+ey;
73042f01 315
b19a0509 316 fC22 += (2*ey*ez*ez*fP2+1-ey*ey+ez*ez+fP2*fP2*ez*ez)*theta2;
b9de75e1 317 fC32 += ez*zz1*xy*theta2;
318 fC33 += zz1*zz1*theta2;
319 fC42 += xz*ez*xy*theta2;
320 fC43 += xz*zz1*theta2;
321 fC44 += xz*xz*theta2;
73042f01 322
323 //Energy losses************************
324 Double_t dE=0.153e-3/beta2*(log(5940*beta2/(1-beta2)) - beta2)*d*rho;
325 if (x1 < x2) dE=-dE;
b9de75e1 326 cc=fP4;
7f6ddf58 327 fP4*=(1.- sqrt(p2+GetMass()*GetMass())/p2*dE);
b9de75e1 328 fP2+=fX*(fP4-cc);
73042f01 329
e3f7105e 330 // Integrated Time [SR, GSI, 17.02.2003]
331 if (IsStartedTimeIntegral()) {
332 Double_t l2 = (fX-oldX)*(fX-oldX)+(fP0-oldY)*(fP0-oldY)+(fP1-oldZ)*(fP1-oldZ);
333 AddTimeStep(TMath::Sqrt(l2));
334 }
335 //
336
73042f01 337 return 1;
338}
339
340//_____________________________________________________________________________
7f6ddf58 341Int_t AliTPCtrack::PropagateToVertex(Double_t x0,Double_t rho)
73042f01 342{
343 //-----------------------------------------------------------------
344 // This function propagates tracks to the "vertex".
345 //-----------------------------------------------------------------
b9de75e1 346 Double_t c=fP4*fX - fP2;
347 Double_t tgf=-fP2/(fP4*fP0 + sqrt(1-c*c));
73042f01 348 Double_t snf=tgf/sqrt(1.+ tgf*tgf);
b9de75e1 349 Double_t xv=(fP2+snf)/fP4;
7f6ddf58 350 return PropagateTo(xv,x0,rho);
73042f01 351}
352
353//_____________________________________________________________________________
be9c5115 354Int_t AliTPCtrack::Update(const AliCluster *c, Double_t chisq, UInt_t index) {
73042f01 355 //-----------------------------------------------------------------
356 // This function associates a cluster with this track.
357 //-----------------------------------------------------------------
9c9d2487 358
359 // update the number of wrong SR[20.03.2003]
360 Int_t absLabel = TMath::Abs(GetLabel());
361 if ( (c->GetLabel(0) != absLabel) &&
362 (c->GetLabel(0) != absLabel) &&
363 (c->GetLabel(0) != absLabel)) fNWrong++;
364 //
365
73042f01 366 Double_t r00=c->GetSigmaY2(), r01=0., r11=c->GetSigmaZ2();
b19a0509 367 r00+=fC00; r01+=fC10; r11+=fC11;
73042f01 368 Double_t det=r00*r11 - r01*r01;
369 Double_t tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det;
370
b19a0509 371 Double_t k00=fC00*r00+fC10*r01, k01=fC00*r01+fC10*r11;
372 Double_t k10=fC10*r00+fC11*r01, k11=fC10*r01+fC11*r11;
373 Double_t k20=fC20*r00+fC21*r01, k21=fC20*r01+fC21*r11;
374 Double_t k30=fC30*r00+fC31*r01, k31=fC30*r01+fC31*r11;
375 Double_t k40=fC40*r00+fC41*r01, k41=fC40*r01+fC41*r11;
73042f01 376
b19a0509 377 Double_t dy=c->GetY() - fP0, dz=c->GetZ() - fP1;
b9de75e1 378 Double_t cur=fP4 + k40*dy + k41*dz, eta=fP2 + k20*dy + k21*dz;
1627d1c4 379 if (TMath::Abs(cur*fX-eta) >= 0.9) {
380 // Int_t n=GetNumberOfClusters();
381 //if (n>4) cerr<<n<<" AliTPCtrack warning: Filtering failed !\n";
be9c5115 382 return 0;
73042f01 383 }
384
b19a0509 385 fP0 += k00*dy + k01*dz;
386 fP1 += k10*dy + k11*dz;
387 fP2 = eta;
b9de75e1 388 fP3 += k30*dy + k31*dz;
389 fP4 = cur;
73042f01 390
b19a0509 391 Double_t c01=fC10, c02=fC20, c03=fC30, c04=fC40;
392 Double_t c12=fC21, c13=fC31, c14=fC41;
73042f01 393
b19a0509 394 fC00-=k00*fC00+k01*fC10; fC10-=k00*c01+k01*fC11;
395 fC20-=k00*c02+k01*c12; fC30-=k00*c03+k01*c13;
396 fC40-=k00*c04+k01*c14;
73042f01 397
b19a0509 398 fC11-=k10*c01+k11*fC11;
399 fC21-=k10*c02+k11*c12; fC31-=k10*c03+k11*c13;
400 fC41-=k10*c04+k11*c14;
73042f01 401
b19a0509 402 fC22-=k20*c02+k21*c12; fC32-=k20*c03+k21*c13;
403 fC42-=k20*c04+k21*c14;
73042f01 404
b19a0509 405 fC33-=k30*c03+k31*c13;
b9de75e1 406 fC43-=k40*c03+k41*c13;
73042f01 407
b19a0509 408 fC44-=k40*c04+k41*c14;
73042f01 409
be9c5115 410 Int_t n=GetNumberOfClusters();
411 fIndex[n]=index;
412 SetNumberOfClusters(n+1);
413 SetChi2(GetChi2()+chisq);
414
415 return 1;
73042f01 416}
417
418//_____________________________________________________________________________
419Int_t AliTPCtrack::Rotate(Double_t alpha)
420{
421 //-----------------------------------------------------------------
422 // This function rotates this track.
423 //-----------------------------------------------------------------
9c9d2487 424
425 if (alpha != 0) fNRotation++; // [SR, 01.04.2003]
426
73042f01 427 fAlpha += alpha;
be9c5115 428 if (fAlpha<-TMath::Pi()) fAlpha += 2*TMath::Pi();
429 if (fAlpha>=TMath::Pi()) fAlpha -= 2*TMath::Pi();
73042f01 430
b19a0509 431 Double_t x1=fX, y1=fP0;
73042f01 432 Double_t ca=cos(alpha), sa=sin(alpha);
b9de75e1 433 Double_t r1=fP4*fX - fP2;
73042f01 434
435 fX = x1*ca + y1*sa;
b19a0509 436 fP0=-x1*sa + y1*ca;
b9de75e1 437 fP2=fP2*ca + (fP4*y1 + sqrt(1.- r1*r1))*sa;
73042f01 438
b9de75e1 439 Double_t r2=fP4*fX - fP2;
73042f01 440 if (TMath::Abs(r2) >= 0.99999) {
be9c5115 441 Int_t n=GetNumberOfClusters();
442 if (n>4) cerr<<n<<" AliTPCtrack warning: Rotation failed !\n";
73042f01 443 return 0;
444 }
445
b9de75e1 446 Double_t y0=fP0 + sqrt(1.- r2*r2)/fP4;
447 if ((fP0-y0)*fP4 >= 0.) {
be9c5115 448 Int_t n=GetNumberOfClusters();
449 if (n>4) cerr<<n<<" AliTPCtrack warning: Rotation failed !!!\n";
73042f01 450 return 0;
451 }
452
453 //f = F - 1
b9de75e1 454 Double_t f00=ca-1, f24=(y1 - r1*x1/sqrt(1.- r1*r1))*sa,
455 f20=fP4*sa, f22=(ca + sa*r1/sqrt(1.- r1*r1))-1;
73042f01 456
457 //b = C*ft
b9de75e1 458 Double_t b00=fC00*f00, b02=fC00*f20+fC40*f24+fC20*f22;
459 Double_t b10=fC10*f00, b12=fC10*f20+fC41*f24+fC21*f22;
460 Double_t b20=fC20*f00, b22=fC20*f20+fC42*f24+fC22*f22;
461 Double_t b30=fC30*f00, b32=fC30*f20+fC43*f24+fC32*f22;
462 Double_t b40=fC40*f00, b42=fC40*f20+fC44*f24+fC42*f22;
73042f01 463
464 //a = f*b = f*C*ft
b9de75e1 465 Double_t a00=f00*b00, a02=f00*b02, a22=f20*b02+f24*b42+f22*b22;
73042f01 466
467 // *** Double_t dy2=fCyy;
468
469 //F*C*Ft = C + (a + b + bt)
b19a0509 470 fC00 += a00 + 2*b00;
471 fC10 += b10;
472 fC20 += a02+b20+b02;
473 fC30 += b30;
474 fC40 += b40;
475 fC21 += b12;
476 fC32 += b32;
477 fC22 += a22 + 2*b22;
478 fC42 += b42;
73042f01 479
480 // *** fCyy+=dy2*sa*sa*r1*r1/(1.- r1*r1);
481 // *** fCzz+=d2y*sa*sa*fT*fT/(1.- r1*r1);
482
483 return 1;
484}
485
b9de75e1 486void AliTPCtrack::ResetCovariance() {
487 //------------------------------------------------------------------
488 //This function makes a track forget its history :)
489 //------------------------------------------------------------------
490
491 fC00*=10.;
492 fC10=0.; fC11*=10.;
493 fC20=0.; fC21=0.; fC22*=10.;
494 fC30=0.; fC31=0.; fC32=0.; fC33*=10.;
495 fC40=0.; fC41=0.; fC42=0.; fC43=0.; fC44*=10.;
496
73042f01 497}
77e58468 498
499////////////////////////////////////////////////////////////////////////
500Double_t AliTPCtrack::Phi() const {
7c27857f 501//
502//
503//
77e58468 504 Double_t phi = TMath::ASin(GetSnp()) + fAlpha;
505 if (phi<0) phi+=2*TMath::Pi();
506 if (phi>=2*TMath::Pi()) phi-=2*TMath::Pi();
507 return phi;
508}
509////////////////////////////////////////////////////////////////////////
510