1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Revision 1.23 2003/07/22 15:56:14 hristov
19 Implementing ESD functionality in the NewIO (Yu.Belikov)
21 Revision 1.20.2.1 2003/07/14 09:19:33 hristov
22 TOF included in the combined PID (Yu.Belikov)
24 Revision 1.20 2003/05/27 17:46:13 hristov
25 TRD PID included in the ESD schema (T.Kuhr)
27 Revision 1.19 2003/05/22 10:46:46 hristov
28 Using access methods instead of data members
30 Revision 1.18 2003/04/10 10:36:54 hristov
31 Code for unified TPC/TRD tracking (S.Radomski)
33 Revision 1.17 2003/02/19 09:02:28 hristov
34 Track time measurement (S.Radomski)
36 Revision 1.16 2003/02/10 14:06:10 cblume
37 Add tracking without tilted pads as option
39 Revision 1.15 2003/01/27 16:34:49 cblume
40 Update of tracking by Sergei and Chuncheng
42 Revision 1.14 2002/11/07 15:52:09 cblume
43 Update of tracking code for tilted pads
45 Revision 1.13 2002/10/22 15:53:08 alibrary
46 Introducing Riostream.h
48 Revision 1.12 2002/10/14 14:57:44 hristov
49 Merging the VirtualMC branch to the main development branch (HEAD)
51 Revision 1.8.10.2 2002/07/24 10:09:31 alibrary
54 RRevision 1.11 2002/06/13 12:09:58 hristov
57 Revision 1.10 2002/06/12 09:54:35 cblume
58 Update of tracking code provided by Sergei
60 Revision 1.8 2001/05/30 12:17:47 hristov
61 Loop variables declared once
63 Revision 1.7 2001/05/28 17:07:58 hristov
64 Last minute changes; ExB correction in AliTRDclusterizerV1; taking into account of material in G10 TEC frames and material between TEC planes (C.Blume,S.Sedykh)
66 Revision 1.4 2000/12/08 16:07:02 cblume
67 Update of the tracking by Sergei
69 Revision 1.3 2000/10/15 23:40:01 cblume
72 Revision 1.2 2000/10/06 16:49:46 cblume
75 Revision 1.1.2.1 2000/09/22 14:47:52 cblume
80 #include <Riostream.h>
83 #include "AliTRDgeometry.h"
84 #include "AliTRDcluster.h"
85 #include "AliTRDtrack.h"
86 #include "../TPC/AliTPCtrack.h"
87 #include "AliESDtrack.h"
93 //_____________________________________________________________________________
95 AliTRDtrack::AliTRDtrack(const AliTRDcluster *c, UInt_t index,
96 const Double_t xx[5], const Double_t cc[15],
97 Double_t xref, Double_t alpha) : AliKalmanTrack() {
98 //-----------------------------------------------------------------
99 // This is the main track constructor.
100 //-----------------------------------------------------------------
105 if (fAlpha<-TMath::Pi()) fAlpha += 2*TMath::Pi();
106 if (fAlpha>=TMath::Pi()) fAlpha -= 2*TMath::Pi();
110 fY=xx[0]; fZ=xx[1]; fE=xx[2]; fT=xx[3]; fC=xx[4];
113 fCzy=cc[1]; fCzz=cc[2];
114 fCey=cc[3]; fCez=cc[4]; fCee=cc[5];
115 fCty=cc[6]; fCtz=cc[7]; fCte=cc[8]; fCtt=cc[9];
116 fCcy=cc[10]; fCcz=cc[11]; fCce=cc[12]; fCct=cc[13]; fCcc=cc[14];
119 SetNumberOfClusters(1);
127 Double_t q = TMath::Abs(c->GetQ());
128 Double_t s = fX*fC - fE, t=fT;
129 if(s*s < 1) q *= TMath::Sqrt((1-s*s)/(1+t*t));
133 // initialisation [SR, GSI 18.02.2003] (i startd for 1)
134 for(UInt_t i=1; i<kMAX_CLUSTERS_PER_TRACK; i++) {
140 //_____________________________________________________________________________
141 AliTRDtrack::AliTRDtrack(const AliTRDtrack& t) : AliKalmanTrack(t) {
146 SetLabel(t.GetLabel());
147 fSeedLab=t.GetSeedLabel();
149 SetChi2(t.GetChi2());
154 fNRotate = t.fNRotate;
159 fY=t.fY; fZ=t.fZ; fE=t.fE; fT=t.fT; fC=t.fC;
162 fCzy=t.fCzy; fCzz=t.fCzz;
163 fCey=t.fCey; fCez=t.fCez; fCee=t.fCee;
164 fCty=t.fCty; fCtz=t.fCtz; fCte=t.fCte; fCtt=t.fCtt;
165 fCcy=t.fCcy; fCcz=t.fCcz; fCce=t.fCce; fCct=t.fCct; fCcc=t.fCcc;
167 Int_t n=t.GetNumberOfClusters();
168 SetNumberOfClusters(n);
169 for (Int_t i=0; i<n; i++) {
170 fIndex[i]=t.fIndex[i];
174 // initialisation (i starts from n) [SR, GSI, 18.02.2003]
175 for(UInt_t i=n; i<kMAX_CLUSTERS_PER_TRACK; i++) {
181 //_____________________________________________________________________________
182 AliTRDtrack::AliTRDtrack(const AliKalmanTrack& t, Double_t alpha)
185 // Constructor from AliTPCtrack or AliITStrack .
188 SetLabel(t.GetLabel());
190 SetMass(t.GetMass());
191 SetNumberOfClusters(0);
200 if (fAlpha < -TMath::Pi()) fAlpha += 2*TMath::Pi();
201 else if (fAlpha >= TMath::Pi()) fAlpha -= 2*TMath::Pi();
203 Double_t x, p[5]; t.GetExternalParameters(x,p);
215 //Conversion of the covariance matrix
216 Double_t c[15]; t.GetExternalCovariance(c);
218 c[10]/=x; c[11]/=x; c[12]/=x; c[13]/=x; c[14]/=x*x;
220 Double_t c22=fX*fX*c[14] - 2*fX*c[12] + c[5];
221 Double_t c32=fX*c[13] - c[8];
222 Double_t c20=fX*c[10] - c[3], c21=fX*c[11] - c[4], c42=fX*c[14] - c[12];
225 fCzy=c[1 ]; fCzz=c[2 ];
226 fCey=c20; fCez=c21; fCee=c22;
227 fCty=c[6 ]; fCtz=c[7 ]; fCte=c32; fCtt=c[9 ];
228 fCcy=c[10]; fCcz=c[11]; fCce=c42; fCct=c[13]; fCcc=c[14];
230 // Initialization [SR, GSI, 18.02.2003]
231 for(UInt_t i=0; i<kMAX_CLUSTERS_PER_TRACK; i++) {
236 //_____________________________________________________________________________
237 AliTRDtrack::AliTRDtrack(const AliESDtrack& t)
240 // Constructor from AliESDtrack
243 SetLabel(t.GetLabel());
245 SetMass(t.GetMass());
246 SetNumberOfClusters(0);
247 // WARNING: cluster indices are NOT copied !!!
255 fAlpha = t.GetAlpha();
256 if (fAlpha < -TMath::Pi()) fAlpha += 2*TMath::Pi();
257 else if (fAlpha >= TMath::Pi()) fAlpha -= 2*TMath::Pi();
259 Double_t x, p[5]; t.GetExternalParameters(x,p);
271 //Conversion of the covariance matrix
272 Double_t c[15]; t.GetExternalCovariance(c);
274 c[10]/=x; c[11]/=x; c[12]/=x; c[13]/=x; c[14]/=x*x;
276 Double_t c22=fX*fX*c[14] - 2*fX*c[12] + c[5];
277 Double_t c32=fX*c[13] - c[8];
278 Double_t c20=fX*c[10] - c[3], c21=fX*c[11] - c[4], c42=fX*c[14] - c[12];
281 fCzy=c[1 ]; fCzz=c[2 ];
282 fCey=c20; fCez=c21; fCee=c22;
283 fCty=c[6 ]; fCtz=c[7 ]; fCte=c32; fCtt=c[9 ];
284 fCcy=c[10]; fCcz=c[11]; fCce=c42; fCct=c[13]; fCcc=c[14];
286 // Initialization [SR, GSI, 18.02.2003]
287 for(UInt_t i=0; i<kMAX_CLUSTERS_PER_TRACK; i++) {
292 if ((t.GetStatus()&AliESDtrack::kTIME) == 0) return;
294 Double_t times[10]; t.GetIntegratedTimes(times); SetIntegratedTimes(times);
295 SetIntegratedLength(t.GetIntegratedLength());
298 //_____________________________________________________________________________
300 void AliTRDtrack::GetBarrelTrack(AliBarrelTrack *track) {
306 Double_t xr, vec[5], cov[15];
308 track->SetLabel(GetLabel());
309 track->SetX(fX, fAlpha);
310 track->SetNClusters(GetNumberOfClusters(), GetChi2());
311 track->SetNWrongClusters(fNWrong);
312 track->SetNRotate(fNRotate);
314 GetIntegratedTimes(times);
315 track->SetTime(times, GetIntegratedLength());
317 track->SetMass(GetMass());
318 track->SetdEdX(GetdEdx());
320 GetExternalParameters(xr, vec);
321 track->SetStateVector(vec);
323 GetExternalCovariance(cov);
324 track->SetCovarianceMatrix(cov);
326 //____________________________________________________________________________
327 void AliTRDtrack::GetExternalParameters(Double_t& xr, Double_t x[5]) const {
329 // This function returns external TRD track representation
339 //_____________________________________________________________________________
340 void AliTRDtrack::GetExternalCovariance(Double_t cc[15]) const {
342 // This function returns external representation of the covriance matrix.
344 Double_t a=GetConvConst();
346 Double_t c22=fX*fX*fCcc-2*fX*fCce+fCee;
347 Double_t c32=fX*fCct-fCte;
348 Double_t c20=fX*fCcy-fCey, c21=fX*fCcz-fCez, c42=fX*fCcc-fCce;
351 cc[1 ]=fCzy; cc[2 ]=fCzz;
352 cc[3 ]=c20; cc[4 ]=c21; cc[5 ]=c22;
353 cc[6 ]=fCty; cc[7 ]=fCtz; cc[8 ]=c32; cc[9 ]=fCtt;
354 cc[10]=fCcy*a; cc[11]=fCcz*a; cc[12]=c42*a; cc[13]=fCct*a; cc[14]=fCcc*a*a;
359 //_____________________________________________________________________________
360 void AliTRDtrack::GetCovariance(Double_t cc[15]) const {
363 cc[1]=fCzy; cc[2]=fCzz;
364 cc[3]=fCey; cc[4]=fCez; cc[5]=fCee;
365 cc[6]=fCcy; cc[7]=fCcz; cc[8]=fCce; cc[9]=fCcc;
366 cc[10]=fCty; cc[11]=fCtz; cc[12]=fCte; cc[13]=fCct; cc[14]=fCtt;
370 //_____________________________________________________________________________
371 Int_t AliTRDtrack::Compare(const TObject *o) const {
373 // Compares tracks according to their Y2 or curvature
375 AliTRDtrack *t=(AliTRDtrack*)o;
376 // Double_t co=t->GetSigmaY2();
377 // Double_t c =GetSigmaY2();
379 Double_t co=TMath::Abs(t->GetC());
380 Double_t c =TMath::Abs(GetC());
383 else if (c<co) return -1;
387 //_____________________________________________________________________________
388 void AliTRDtrack::CookdEdx(Double_t low, Double_t up) {
389 //-----------------------------------------------------------------
390 // Calculates dE/dX within the "low" and "up" cuts.
391 //-----------------------------------------------------------------
394 Int_t nc=GetNumberOfClusters();
396 Float_t sorted[kMAX_CLUSTERS_PER_TRACK];
397 for (i=0; i < nc; i++) {
405 for (i=0; i<nc-1; i++) {
406 if (sorted[i]<=sorted[i+1]) continue;
407 Float_t tmp=sorted[i];
408 sorted[i]=sorted[i+1]; sorted[i+1]=tmp;
413 Int_t nl=Int_t(low*nc), nu=Int_t(up*nc);
415 for (i=nl; i<=nu; i++) dedx += sorted[i];
422 //_____________________________________________________________________________
423 Int_t AliTRDtrack::PropagateTo(Double_t xk,Double_t x0,Double_t rho)
425 // Propagates a track of particle with mass=pm to a reference plane
426 // defined by x=xk through media of density=rho and radiationLength=x0
428 if (xk == fX) return 1;
430 if (TMath::Abs(fC*xk - fE) >= 0.99999) {
431 Int_t n=GetNumberOfClusters();
432 if (n>4) cerr << n << " AliTRDtrack: Propagation failed, \tPt = "
433 << GetPt() << "\t" << GetLabel() << "\t" << GetMass() << endl;
437 // track Length measurement [SR, GSI, 17.02.2003]
438 Double_t oldX = fX, oldY = fY, oldZ = fZ;
440 Double_t x1=fX, x2=x1+(xk-x1), dx=x2-x1, y1=fY, z1=fZ;
441 Double_t c1=fC*x1 - fE;
442 if((c1*c1) > 1) return 0;
443 Double_t r1=sqrt(1.- c1*c1);
444 Double_t c2=fC*x2 - fE;
445 if((c2*c2) > 1) return 0;
446 Double_t r2=sqrt(1.- c2*c2);
448 fY += dx*(c1+c2)/(r1+r2);
449 fZ += dx*(c1+c2)/(c1*r2 + c2*r1)*fT;
452 Double_t rr=r1+r2, cc=c1+c2, xx=x1+x2;
453 Double_t f02=-dx*(2*rr + cc*(c1/r1 + c2/r2))/(rr*rr);
454 Double_t f04= dx*(rr*xx + cc*(c1*x1/r1+c2*x2/r2))/(rr*rr);
455 Double_t cr=c1*r2+c2*r1;
456 Double_t f12=-dx*fT*(2*cr + cc*(c2*c1/r1-r1 + c1*c2/r2-r2))/(cr*cr);
457 Double_t f13= dx*cc/cr;
458 Double_t f14=dx*fT*(cr*xx-cc*(r1*x2-c2*c1*x1/r1+r2*x1-c1*c2*x2/r2))/(cr*cr);
461 Double_t b00=f02*fCey + f04*fCcy, b01=f12*fCey + f14*fCcy + f13*fCty;
462 Double_t b10=f02*fCez + f04*fCcz, b11=f12*fCez + f14*fCcz + f13*fCtz;
463 Double_t b20=f02*fCee + f04*fCce, b21=f12*fCee + f14*fCce + f13*fCte;
464 Double_t b30=f02*fCte + f04*fCct, b31=f12*fCte + f14*fCct + f13*fCtt;
465 Double_t b40=f02*fCce + f04*fCcc, b41=f12*fCce + f14*fCcc + f13*fCct;
468 Double_t a00=f02*b20+f04*b40,a01=f02*b21+f04*b41,a11=f12*b21+f14*b41+f13*b31;
470 //F*C*Ft = C + (a + b + bt)
472 fCzy += a01 + b01 + b10;
483 //Multiple scattering ******************
484 Double_t d=sqrt((x1-fX)*(x1-fX)+(y1-fY)*(y1-fY)+(z1-fZ)*(z1-fZ));
485 Double_t p2=(1.+ GetTgl()*GetTgl())/(Get1Pt()*Get1Pt());
486 Double_t beta2=p2/(p2 + GetMass()*GetMass());
487 Double_t theta2=14.1*14.1/(beta2*p2*1e6)*d/x0*rho;
489 Double_t ey=fC*fX - fE, ez=fT;
490 Double_t xz=fC*ez, zz1=ez*ez+1, xy=fE+ey;
492 fCee += (2*ey*ez*ez*fE+1-ey*ey+ez*ez+fE*fE*ez*ez)*theta2;
493 fCte += ez*zz1*xy*theta2;
494 fCtt += zz1*zz1*theta2;
495 fCce += xz*ez*xy*theta2;
496 fCct += xz*zz1*theta2;
497 fCcc += xz*xz*theta2;
499 //Energy losses************************
500 if((5940*beta2/(1-beta2+1e-10) - beta2) < 0) return 0;
502 Double_t dE=0.153e-3/beta2*(log(5940*beta2/(1-beta2+1e-10)) - beta2)*d*rho;
505 fC*=(1.- sqrt(p2+GetMass()*GetMass())/p2*dE);
508 // track time measurement [SR, GSI 17.02.2002]
509 if (IsStartedTimeIntegral()) {
510 Double_t l2 = (fX-oldX)*(fX-oldX) + (fY-oldY)*(fY-oldY) + (fZ-oldZ)*(fZ-oldZ);
511 AddTimeStep(TMath::Sqrt(l2));
518 //_____________________________________________________________________________
519 Int_t AliTRDtrack::Update(const AliTRDcluster *c, Double_t chisq, UInt_t index, Double_t h01)
521 // Assignes found cluster to the track and updates track information
523 Bool_t fNoTilt = kTRUE;
524 if(TMath::Abs(h01) > 0.003) fNoTilt = kFALSE;
526 Double_t r00=c->GetSigmaY2(), r01=0., r11=c->GetSigmaZ2();
527 r00+=fCyy; r01+=fCzy; r11+=fCzz;
528 Double_t det=r00*r11 - r01*r01;
529 Double_t tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det;
531 Double_t k00=fCyy*r00+fCzy*r01, k01=fCyy*r01+fCzy*r11;
532 Double_t k10=fCzy*r00+fCzz*r01, k11=fCzy*r01+fCzz*r11;
533 Double_t k20=fCey*r00+fCez*r01, k21=fCey*r01+fCez*r11;
534 Double_t k30=fCty*r00+fCtz*r01, k31=fCty*r01+fCtz*r11;
535 Double_t k40=fCcy*r00+fCcz*r01, k41=fCcy*r01+fCcz*r11;
537 Double_t dy=c->GetY() - fY, dz=c->GetZ() - fZ;
538 Double_t cur=fC + k40*dy + k41*dz, eta=fE + k20*dy + k21*dz;
540 Double_t c01=fCzy, c02=fCey, c03=fCty, c04=fCcy;
541 Double_t c12=fCez, c13=fCtz, c14=fCcz;
544 if (TMath::Abs(cur*fX-eta) >= 0.99999) {
545 Int_t n=GetNumberOfClusters();
546 if (n>4) cerr<<n<<" AliTRDtrack warning: Filtering failed !\n";
549 fY += k00*dy + k01*dz;
550 fZ += k10*dy + k11*dz;
552 //fT += k30*dy + k31*dz;
556 Double_t xu_factor = 100.; // empirical factor set by C.Xu
557 // in the first tilt version
558 r00=c->GetSigmaY2(), r01=0., r11=c->GetSigmaZ2()*xu_factor;
559 r00+=(fCyy+2.0*h01*fCzy+h01*h01*fCzz);
560 r01+=(fCzy+h01*fCzz);
561 det=r00*r11 - r01*r01;
562 tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det;
564 k00=fCyy*r00+fCzy*(r01+h01*r00),k01=fCyy*r01+fCzy*(r11+h01*r01);
565 k10=fCzy*r00+fCzz*(r01+h01*r00),k11=fCzy*r01+fCzz*(r11+h01*r01);
566 k20=fCey*r00+fCez*(r01+h01*r00),k21=fCey*r01+fCez*(r11+h01*r01);
567 k30=fCty*r00+fCtz*(r01+h01*r00),k31=fCty*r01+fCtz*(r11+h01*r01);
568 k40=fCcy*r00+fCcz*(r01+h01*r00),k41=fCcy*r01+fCcz*(r11+h01*r01);
570 dy=c->GetY() - fY; dz=c->GetZ() - fZ;
573 cur=fC + k40*dy + k41*dz; eta=fE + k20*dy + k21*dz;
574 if (TMath::Abs(cur*fX-eta) >= 0.99999) {
575 Int_t n=GetNumberOfClusters();
576 if (n>4) cerr<<n<<" AliTRDtrack warning: Filtering failed !\n";
579 fY += k00*dy + k01*dz;
580 fZ += k10*dy + k11*dz;
582 //fT += k30*dy + k31*dz;
592 fCyy-=k00*fCyy+k01*fCzy; fCzy-=k00*c01+k01*fCzz;
593 fCey-=k00*c02+k01*c12; fCty-=k00*c03+k01*c13;
594 fCcy-=k00*c04+k01*c14;
596 fCzz-=k10*c01+k11*fCzz;
597 fCez-=k10*c02+k11*c12; fCtz-=k10*c03+k11*c13;
598 fCcz-=k10*c04+k11*c14;
600 fCee-=k20*c02+k21*c12; fCte-=k20*c03+k21*c13;
601 fCce-=k20*c04+k21*c14;
603 fCtt-=k30*c03+k31*c13;
604 fCct-=k40*c03+k41*c13;
606 fCcc-=k40*c04+k41*c14;
608 Int_t n=GetNumberOfClusters();
610 SetNumberOfClusters(n+1);
612 SetChi2(GetChi2()+chisq);
613 // cerr<<"in update: fIndex["<<fN<<"] = "<<index<<endl;
619 //_____________________________________________________________________________
620 Int_t AliTRDtrack::Rotate(Double_t alpha)
622 // Rotates track parameters in R*phi plane
627 if (fAlpha<-TMath::Pi()) fAlpha += 2*TMath::Pi();
628 if (fAlpha>=TMath::Pi()) fAlpha -= 2*TMath::Pi();
630 Double_t x1=fX, y1=fY;
631 Double_t ca=cos(alpha), sa=sin(alpha);
632 Double_t r1=fC*fX - fE;
636 if((r1*r1) > 1) return 0;
637 fE=fE*ca + (fC*y1 + sqrt(1.- r1*r1))*sa;
639 Double_t r2=fC*fX - fE;
640 if (TMath::Abs(r2) >= 0.99999) {
641 Int_t n=GetNumberOfClusters();
642 if (n>4) cerr<<n<<" AliTRDtrack warning: Rotation failed !\n";
646 if((r2*r2) > 1) return 0;
647 Double_t y0=fY + sqrt(1.- r2*r2)/fC;
648 if ((fY-y0)*fC >= 0.) {
649 Int_t n=GetNumberOfClusters();
650 if (n>4) cerr<<n<<" AliTRDtrack warning: Rotation failed !!!\n";
655 Double_t f00=ca-1, f24=(y1 - r1*x1/sqrt(1.- r1*r1))*sa,
656 f20=fC*sa, f22=(ca + sa*r1/sqrt(1.- r1*r1))-1;
659 Double_t b00=fCyy*f00, b02=fCyy*f20+fCcy*f24+fCey*f22;
660 Double_t b10=fCzy*f00, b12=fCzy*f20+fCcz*f24+fCez*f22;
661 Double_t b20=fCey*f00, b22=fCey*f20+fCce*f24+fCee*f22;
662 Double_t b30=fCty*f00, b32=fCty*f20+fCct*f24+fCte*f22;
663 Double_t b40=fCcy*f00, b42=fCcy*f20+fCcc*f24+fCce*f22;
666 Double_t a00=f00*b00, a02=f00*b02, a22=f20*b02+f24*b42+f22*b22;
668 //F*C*Ft = C + (a + b + bt)
683 //_____________________________________________________________________________
684 Double_t AliTRDtrack::GetPredictedChi2(const AliTRDcluster *c, Double_t h01) const
687 Bool_t fNoTilt = kTRUE;
688 if(TMath::Abs(h01) > 0.003) fNoTilt = kFALSE;
689 Double_t chi2, dy, r00, r01, r11;
697 r00=c->GetSigmaY2(); r01=0.; r11=c->GetSigmaZ2();
698 r00+=fCyy; r01+=fCzy; r11+=fCzz;
700 Double_t det=r00*r11 - r01*r01;
701 if (TMath::Abs(det) < 1.e-10) {
702 Int_t n=GetNumberOfClusters();
703 if (n>4) cerr<<n<<" AliTRDtrack warning: Singular matrix !\n";
706 Double_t tmp=r00; r00=r11; r11=tmp; r01=-r01;
707 Double_t dy=c->GetY() - fY, dz=c->GetZ() - fZ;
710 chi2 = (dy*r00*dy + 2*r01*dy*dz + dz*r11*dz)/det;
716 //_________________________________________________________________________
717 void AliTRDtrack::GetPxPyPz(Double_t& px, Double_t& py, Double_t& pz) const
719 // Returns reconstructed track momentum in the global system.
721 Double_t pt=TMath::Abs(GetPt()); // GeV/c
725 if(r > 1) { py = pt; px = 0; }
726 else if(r < -1) { py = -pt; px = 0; }
728 y0=fY + sqrt(1.- r*r)/fC;
729 px=-pt*(fY-y0)*fC; //cos(phi);
730 py=-pt*(fE-fX*fC); //sin(phi);
733 Double_t tmp=px*TMath::Cos(fAlpha) - py*TMath::Sin(fAlpha);
734 py=px*TMath::Sin(fAlpha) + py*TMath::Cos(fAlpha);
739 //_________________________________________________________________________
740 void AliTRDtrack::GetGlobalXYZ(Double_t& x, Double_t& y, Double_t& z) const
742 // Returns reconstructed track coordinates in the global system.
744 x = fX; y = fY; z = fZ;
745 Double_t tmp=x*TMath::Cos(fAlpha) - y*TMath::Sin(fAlpha);
746 y=x*TMath::Sin(fAlpha) + y*TMath::Cos(fAlpha);
751 //_________________________________________________________________________
752 void AliTRDtrack::ResetCovariance() {
754 // Resets covariance matrix
759 fCey=0.; fCez=0.; fCee*=10.;
760 fCty=0.; fCtz=0.; fCte=0.; fCtt*=10.;
761 fCcy=0.; fCcz=0.; fCce=0.; fCct=0.; fCcc*=10.;