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 #include <Riostream.h>
22 #include "AliTracker.h"
23 #include "AliESDtrack.h"
24 #include "AliTRDgeometry.h"
25 #include "AliTRDcluster.h"
26 #include "AliTRDtrack.h"
27 #include "AliTRDtracklet.h"
31 ///////////////////////////////////////////////////////////////////////////////
33 // Represents a reconstructed TRD track //
34 // Local TRD Kalman track //
36 ///////////////////////////////////////////////////////////////////////////////
38 AliTRDtrack::AliTRDtrack():
56 for (Int_t i=0; i<kNplane; i++) {
57 for (Int_t j=0; j<kNslice; j++) {
62 for (UInt_t i=0; i<kMAXCLUSTERSPERTRACK; i++) {
67 for (Int_t i=0; i<3; i++) fBudget[i] = 0;
70 //_____________________________________________________________________________
71 AliTRDtrack::AliTRDtrack(const AliTRDcluster *c, Int_t index,
72 const Double_t p[5], const Double_t cov[15],
73 Double_t x, Double_t alpha) :
91 //-----------------------------------------------------------------
92 // This is the main track constructor.
93 //-----------------------------------------------------------------
94 Double_t cnv=1./(GetBz()*kB2C);
104 Double_t c22 = x*x*cov[14] - 2*x*cov[12] + cov[5];
105 Double_t c32 = x*cov[13] - cov[8];
106 Double_t c20 = x*cov[10] - cov[3],
107 c21 = x*cov[11] - cov[4], c42 = x*cov[14] - cov[12];
113 cov[6 ], cov[7 ], c32, cov[9 ],
114 cov[10]*cnv, cov[11]*cnv, c42*cnv, cov[13]*cnv, cov[14]*cnv*cnv
119 SetNumberOfClusters(1);
122 for (Int_t i=0;i<kNplane;i++){
123 for (Int_t j=0; j<kNslice; j++) {
124 fdEdxPlane[i][j] = 0;
126 fTimBinPlane[i] = -1;
129 Double_t q = TMath::Abs(c->GetQ());
130 Double_t s = GetSnp(), t=GetTgl();
131 if(s*s < 1) q *= TMath::Sqrt((1-s*s)/(1+t*t));
134 // initialisation [SR, GSI 18.02.2003] (i startd for 1)
135 for(UInt_t i=1; i<kMAXCLUSTERSPERTRACK; i++) {
138 fIndexBackup[i] = 0; //backup indexes MI
140 for (Int_t i=0;i<3;i++) fBudget[i]=0;
143 //_____________________________________________________________________________
144 AliTRDtrack::AliTRDtrack(const AliTRDtrack& t) :
146 fSeedLab(t.GetSeedLabel()),
150 fStopped(t.fStopped),
153 fNRotate(t.fNRotate),
155 fNExpected(t.fNExpected),
157 fNExpectedLast(t.fNExpectedLast),
159 fChi2Last(t.fChi2Last),
165 for (Int_t i=0;i<kNplane;i++){
166 for (Int_t j=0; j<kNslice; j++) {
167 fdEdxPlane[i][j] = t.fdEdxPlane[i][j];
169 fTimBinPlane[i] = t.fTimBinPlane[i];
170 fTracklets[i] = t.fTracklets[i];
173 Int_t n=t.GetNumberOfClusters();
174 SetNumberOfClusters(n);
175 for (Int_t i=0; i<n; i++) {
176 fIndex[i]=t.fIndex[i];
177 fIndexBackup[i]=t.fIndex[i]; // MI - backup indexes
181 // initialisation (i starts from n) [SR, GSI, 18.02.2003]
182 for(UInt_t i=n; i<kMAXCLUSTERSPERTRACK; i++) {
185 fIndexBackup[i] = 0; //MI backup indexes
187 for (Int_t i=0;i<3;i++) fBudget[i]=t.fBudget[i];
190 //_____________________________________________________________________________
191 AliTRDtrack::AliTRDtrack(const AliKalmanTrack& t, Double_t /*alpha*/):
194 fdEdx(t.GetPIDsignal()),
210 // Constructor from AliTPCtrack or AliITStrack .
213 SetLabel(t.GetLabel());
215 SetMass(t.GetMass());
216 SetNumberOfClusters(0);
218 for (Int_t i=0;i<kNplane;i++){
219 for (Int_t j=0;j<kNslice;j++){
220 fdEdxPlane[i][j] = 0.0;
222 fTimBinPlane[i] = -1;
225 // Initialization [SR, GSI, 18.02.2003]
226 for(UInt_t i=0; i<kMAXCLUSTERSPERTRACK; i++) {
229 fIndexBackup[i] = 0; // MI backup indexes
232 for (Int_t i=0;i<3;i++) { fBudget[i]=0;};
235 //_____________________________________________________________________________
236 AliTRDtrack::AliTRDtrack(const AliESDtrack &t):
239 fdEdx(t.GetTRDsignal()),
255 // Constructor from AliESDtrack
257 SetLabel(t.GetLabel());
259 SetMass(t.GetMass());
260 SetNumberOfClusters(t.GetTRDclusters(fIndex));
262 Int_t ncl = t.GetTRDclusters(fIndexBackup);
263 for (UInt_t i=ncl;i<kMAXCLUSTERSPERTRACK;i++) {
265 fIndex[i] = 0; //MI store indexes
267 for (Int_t i=0;i<kNplane;i++){
268 for (Int_t j=0;j<kNslice;j++){
269 fdEdxPlane[i][j] = t.GetTRDsignals(i,j);
271 fTimBinPlane[i] = t.GetTRDTimBin(i);
275 const AliExternalTrackParam *par=&t;
276 if (t.GetStatus()&AliESDtrack::kTRDbackup) {
277 par=t.GetOuterParam();
278 if (!par) {AliError("***** No backup info !!! ****"); par=&t;}
280 Set(par->GetX(),par->GetAlpha(),par->GetParameter(),par->GetCovariance());
283 for (UInt_t i=0; i<kMAXCLUSTERSPERTRACK; i++) fdQdl[i] = 0;
285 for (Int_t i=0;i<3;i++) fBudget[i]=0;
287 if ((t.GetStatus()&AliESDtrack::kTIME) == 0) return;
289 Double_t times[10]; t.GetIntegratedTimes(times); SetIntegratedTimes(times);
290 SetIntegratedLength(t.GetIntegratedLength());
294 //____________________________________________________________________________
295 AliTRDtrack::~AliTRDtrack()
301 if (fBackupTrack) delete fBackupTrack;
306 //____________________________________________________________________________
307 Float_t AliTRDtrack::StatusForTOF()
310 // Defines the status of the TOF extrapolation
313 Float_t res = (0.2 + 0.8*(fN/(fNExpected+5.)))*(0.4+0.6*fTracklets[5].GetN()/20.);
314 res *= (0.25+0.8*40./(40.+fBudget[2]));
318 if (GetNumberOfClusters()<20) return 0; //
319 if (fN>110&&fChi2/(Float_t(fN))<3) return 3; //gold
320 if (fNLast>30&&fChi2Last/(Float_t(fNLast))<3) return 3; //gold
321 if (fNLast>20&&fChi2Last/(Float_t(fNLast))<2) return 3; //gold
322 if (fNLast/(fNExpectedLast+3.)>0.8 && fChi2Last/Float_t(fNLast)<5&&fNLast>20) return 2; //silber
323 if (fNLast>5 &&((fNLast+1.)/(fNExpectedLast+1.))>0.8&&fChi2Last/(fNLast-5.)<6) return 1;
329 //_____________________________________________________________________________
330 Int_t AliTRDtrack::Compare(const TObject *o) const
333 // Compares tracks according to their Y2 or curvature
336 AliTRDtrack *t = (AliTRDtrack *) o;
337 // Double_t co=t->GetSigmaY2();
338 // Double_t c =GetSigmaY2();
340 Double_t co = TMath::Abs(t->GetC());
341 Double_t c = TMath::Abs(GetC());
353 //_____________________________________________________________________________
354 void AliTRDtrack::CookdEdx(Double_t low, Double_t up)
357 // Calculates the truncated dE/dx within the "low" and "up" cuts.
362 // Array to sort the dEdx values according to amplitude
363 Float_t sorted[kMAXCLUSTERSPERTRACK];
365 // Number of clusters used for dedx
368 // Require at least 10 clusters for a dedx measurement
374 // Lower and upper bound
375 Int_t nl = Int_t(low * nc);
376 Int_t nu = Int_t( up * nc);
378 // Can fdQdl be negative ????
379 for (i = 0; i < nc; i++) {
380 sorted[i] = TMath::Abs(fdQdl[i]);
383 // Sort the dedx values by amplitude
384 Int_t *index = new Int_t[nc];
385 TMath::Sort(nc,sorted,index,kFALSE);
387 // Sum up the truncated charge between nl and nu
389 for (i = nl; i <= nu; i++) {
390 dedx += sorted[index[i]];
392 dedx /= (nu - nl + 1.0);
397 //_____________________________________________________________________________
398 Bool_t AliTRDtrack::PropagateTo(Double_t xk,Double_t x0,Double_t rho)
400 // Propagates a track of particle with mass=pm to a reference plane
401 // defined by x=xk through media of density=rho and radiationLength=x0
403 if (xk == GetX()) return kTRUE;
405 Double_t oldX=GetX(), oldY=GetY(), oldZ=GetZ();
408 if (!AliExternalTrackParam::PropagateTo(xk,bz)) return kFALSE;
410 Double_t x=GetX(), y=GetY(), z=GetZ();
411 Double_t d=TMath::Sqrt((x-oldX)*(x-oldX)+(y-oldY)*(y-oldY)+(z-oldZ)*(z-oldZ));
413 if (IsStartedTimeIntegral()) {
416 if (TMath::Abs(l2*crv)>0.0001){
417 // make correction for curvature if neccesary
418 l2 = 0.5*TMath::Sqrt((x-oldX)*(x-oldX) + (y-oldY)*(y-oldY));
419 l2 = 2*TMath::ASin(l2*crv)/crv;
420 l2 = TMath::Sqrt(l2*l2+(z-oldZ)*(z-oldZ));
425 Double_t ll = (oldX < xk) ? -d : d;
426 if (!AliExternalTrackParam::CorrectForMaterial(ll*rho/x0,x0,GetMass()))
429 {//Energy losses************************
430 Double_t p2=(1.+ GetTgl()*GetTgl())/(Get1Pt()*Get1Pt());
431 Double_t beta2=p2/(p2 + GetMass()*GetMass());
432 if ((5940*beta2/(1-beta2+1e-10) - beta2) < 0) return kFALSE;
434 Double_t dE=0.153e-3/beta2*(log(5940*beta2/(1-beta2+1e-10)) - beta2)*d*rho;
435 Float_t budget = d*rho;
436 fBudget[0] += budget;
438 // suspicious part - think about it ?
439 Double_t kinE = TMath::Sqrt(p2);
440 if (dE>0.8*kinE) dE = 0.8*kinE; //
441 if (dE<0) dE = 0.0; // not valid region for Bethe bloch
447 Double_t sigmade = 0.07*TMath::Sqrt(TMath::Abs(dE)); // energy loss fluctuation
448 Double_t sigmac2 = sigmade*sigmade*fC*fC*(p2+GetMass()*GetMass())/(p2*p2);
450 fCee += fX*fX*sigmac2;
458 //_____________________________________________________________________________
459 Bool_t AliTRDtrack::Update(const AliTRDcluster *c, Double_t chisq, Int_t index,
462 // Assignes found cluster to the track and updates track information
464 Bool_t fNoTilt = kTRUE;
465 if(TMath::Abs(h01) > 0.003) fNoTilt = kFALSE;
466 // add angular effect to the error contribution - MI
467 Float_t tangent2 = GetSnp()*GetSnp();
468 if (tangent2 < 0.90000){
469 tangent2 = tangent2/(1.-tangent2);
471 //Float_t errang = tangent2*0.04; //
473 Double_t p[2]={c->GetY(), c->GetZ()};
474 //Double_t cov[3]={c->GetSigmaY2()+errang, 0., c->GetSigmaZ2()*100.};
475 Double_t sy2=c->GetSigmaY2()*4;
476 Double_t sz2=c->GetSigmaZ2()*4;
477 Double_t cov[3]={sy2 + h01*h01*sz2, h01*(sy2-sz2), sz2 + h01*h01*sy2};
479 if (!AliExternalTrackParam::Update(p,cov)) return kFALSE;
481 Int_t n=GetNumberOfClusters();
483 SetNumberOfClusters(n+1);
485 SetChi2(GetChi2()+chisq);
490 //_____________________________________________________________________________
491 Int_t AliTRDtrack::UpdateMI(const AliTRDcluster *c, Double_t chisq, Int_t index, Double_t h01, Int_t /*plane*/) {
492 // Assignes found cluster to the track and updates track information
493 Bool_t fNoTilt = kTRUE;
494 if(TMath::Abs(h01) > 0.003) fNoTilt = kFALSE;
495 // add angular effect to the error contribution and make correction - MI
497 Double_t tangent2 = GetSnp()*GetSnp();
498 if (tangent2 < 0.90000){
499 tangent2 = tangent2/(1.-tangent2);
501 Double_t tangent = TMath::Sqrt(tangent2);
502 if (GetSnp()<0) tangent*=-1;
503 // Double_t correction = 0*plane;
505 Double_t errang = tangent2*0.04; //
506 Double_t errsys =0.025*0.025*20; //systematic error part
509 if (c->GetNPads()==4) extend=2;
511 //if (c->GetNPads()==5) extend=3;
512 //if (c->GetNPads()==6) extend=3;
513 //if (c->GetQ()<15) return 1;
518 correction = corrector->GetCorrection(plane,c->GetLocalTimeBin(),tangent);
519 if (TMath::Abs(correction)>0){
521 errang = corrector->GetSigma(plane,c->GetLocalTimeBin(),tangent);
523 errang += tangent2*0.04;
528 //Double_t padlength = TMath::Sqrt(c->GetSigmaZ2()*12.);
531 Double_t dy=c->GetY() - GetY(), dz=c->GetZ() - GetZ();
532 printf("%e %e %e %e\n",dy,dz,padlength/2,h01);
535 Double_t p[2]={c->GetY(), c->GetZ()};
537 Double_t cov[3]={(c->GetSigmaY2()+errang+errsys)*extend, 0.,
538 c->GetSigmaZ2()*10000.};
540 Double_t sy2=c->GetSigmaY2()*4;
541 Double_t sz2=c->GetSigmaZ2()*4;
542 Double_t cov[3]={sy2 + h01*h01*sz2, h01*(sy2-sz2), sz2 + h01*h01*sy2};
544 if (!AliExternalTrackParam::Update(p,cov)) return kFALSE;
546 Int_t n=GetNumberOfClusters();
548 SetNumberOfClusters(n+1);
549 SetChi2(GetChi2()+chisq);
554 //_____________________________________________________________________________
555 Int_t AliTRDtrack::UpdateMI(const AliTRDtracklet &tracklet)
558 // Assignes found tracklet to the track and updates track information
561 Double_t r00=(tracklet.GetTrackletSigma2()), r01=0., r11= 10000.;
562 r00+=fCyy; r01+=fCzy; r11+=fCzz;
564 Double_t det=r00*r11 - r01*r01;
565 Double_t tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det;
568 Double_t dy=tracklet.GetY() - fY, dz=tracklet.GetZ() - fZ;
571 Double_t s00 = tracklet.GetTrackletSigma2(); // error pad
572 Double_t s11 = 100000; // error pad-row
573 Float_t h01 = tracklet.GetTilt();
575 // r00 = fCyy + 2*fCzy*h01 + fCzz*h01*h01+s00;
576 r00 = fCyy + fCzz*h01*h01+s00;
577 // r01 = fCzy + fCzz*h01;
580 det = r00*r11 - r01*r01;
582 tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det;
584 Double_t k00=fCyy*r00+fCzy*r01, k01=fCyy*r01+fCzy*r11;
585 Double_t k10=fCzy*r00+fCzz*r01, k11=fCzy*r01+fCzz*r11;
586 Double_t k20=fCey*r00+fCez*r01, k21=fCey*r01+fCez*r11;
587 Double_t k30=fCty*r00+fCtz*r01, k31=fCty*r01+fCtz*r11;
588 Double_t k40=fCcy*r00+fCcz*r01, k41=fCcy*r01+fCcz*r11;
591 // k00=fCyy*r00+fCzy*(r01+h01*r00),k01=fCyy*r01+fCzy*(r11+h01*r01);
592 // k10=fCzy*r00+fCzz*(r01+h01*r00),k11=fCzy*r01+fCzz*(r11+h01*r01);
593 // k20=fCey*r00+fCez*(r01+h01*r00),k21=fCey*r01+fCez*(r11+h01*r01);
594 // k30=fCty*r00+fCtz*(r01+h01*r00),k31=fCty*r01+fCtz*(r11+h01*r01);
595 // k40=fCcy*r00+fCcz*(r01+h01*r00),k41=fCcy*r01+fCcz*(r11+h01*r01);
598 Double_t cur=fC + k40*dy + k41*dz, eta=fE + k20*dy + k21*dz;
599 // cur=fC + k40*dy + k41*dz; eta=fE + k20*dy + k21*dz;
600 if (TMath::Abs(cur*fX-eta) >= 0.90000) {
601 //Int_t n=GetNumberOfClusters();
602 // if (n>4) cerr<<n<<" AliTRDtrack warning: Filtering failed !\n";
612 fY += k00*dy + k01*dz;
613 fZ += k10*dy + k11*dz;
615 fT += k30*dy + k31*dz;
622 Double_t oldyy = fCyy, oldzz = fCzz; //, oldee=fCee, oldcc =fCcc;
623 Double_t oldzy = fCzy, oldey = fCey, oldty=fCty, oldcy =fCcy;
624 Double_t oldez = fCez, oldtz = fCtz, oldcz=fCcz;
625 //Double_t oldte = fCte, oldce = fCce;
626 //Double_t oldct = fCct;
628 fCyy-=k00*oldyy+k01*oldzy;
629 fCzy-=k10*oldyy+k11*oldzy;
630 fCey-=k20*oldyy+k21*oldzy;
631 fCty-=k30*oldyy+k31*oldzy;
632 fCcy-=k40*oldyy+k41*oldzy;
634 fCzz-=k10*oldzy+k11*oldzz;
635 fCez-=k20*oldzy+k21*oldzz;
636 fCtz-=k30*oldzy+k31*oldzz;
637 fCcz-=k40*oldzy+k41*oldzz;
639 fCee-=k20*oldey+k21*oldez;
640 fCte-=k30*oldey+k31*oldez;
641 fCce-=k40*oldey+k41*oldez;
643 fCtt-=k30*oldty+k31*oldtz;
644 fCct-=k40*oldty+k41*oldtz;
646 fCcc-=k40*oldcy+k41*oldcz;
649 //Int_t n=GetNumberOfClusters();
651 //SetNumberOfClusters(n+1);
653 //SetChi2(GetChi2()+chisq);
654 // cerr<<"in update: fIndex["<<fN<<"] = "<<index<<endl;
661 //_____________________________________________________________________________
662 Bool_t AliTRDtrack::Rotate(Double_t alpha, Bool_t absolute)
664 // Rotates track parameters in R*phi plane
665 // if absolute rotation alpha is in global system
666 // otherwise alpha rotation is relative to the current rotation angle
676 printf("Rotate %e %e %e %e\n",GetAlpha(),GetX(),GetY(),GetZ());
678 return AliExternalTrackParam::Rotate(GetAlpha()+alpha);
681 //_____________________________________________________________________________
682 Double_t AliTRDtrack::GetPredictedChi2(const AliTRDcluster *c, Double_t h01) const
685 // Returns the track chi2
688 Double_t p[2]={c->GetY(), c->GetZ()};
689 Double_t sy2=c->GetSigmaY2()*4;
690 Double_t sz2=c->GetSigmaZ2()*4;
691 Double_t cov[3]={sy2 + h01*h01*sz2, h01*(sy2-sz2), sz2 + h01*h01*sy2};
693 return AliExternalTrackParam::GetPredictedChi2(p,cov);
696 Bool_t fNoTilt = kTRUE;
697 if(TMath::Abs(h01) > 0.003) fNoTilt = kFALSE;
699 return (c->GetY() - GetY())*(c->GetY() - GetY())/c->GetSigmaY2();
703 Double_t chi2, dy, r00, r01, r11;
711 Double_t padlength = TMath::Sqrt(c->GetSigmaZ2()*12);
713 r00=c->GetSigmaY2(); r01=0.; r11=c->GetSigmaZ2();
714 r00+=fCyy; r01+=fCzy; r11+=fCzz;
716 Double_t det=r00*r11 - r01*r01;
717 if (TMath::Abs(det) < 1.e-10) {
718 Int_t n=GetNumberOfClusters();
719 if (n>4) cerr<<n<<" AliTRDtrack warning: Singular matrix !\n";
722 Double_t tmp=r00; r00=r11; r11=tmp; r01=-r01;
723 Double_t dy=c->GetY() - fY, dz=c->GetZ() - fZ;
724 Double_t tiltdz = dz;
725 if (TMath::Abs(tiltdz)>padlength/2.) {
726 tiltdz = TMath::Sign(padlength/2,dz);
731 chi2 = (dy*r00*dy + 2*r01*dy*dz + dz*r11*dz)/det;
738 //_____________________________________________________________________________
739 void AliTRDtrack::MakeBackupTrack()
742 // Creates a backup track
745 if (fBackupTrack) delete fBackupTrack;
746 fBackupTrack = new AliTRDtrack(*this);
750 //_____________________________________________________________________________
751 Int_t AliTRDtrack::GetProlongation(Double_t xk, Double_t &y, Double_t &z)
754 // Find prolongation at given x
755 // return 0 if not exist
759 if (!AliExternalTrackParam::GetYAt(xk,bz,y)) return 0;
760 if (!AliExternalTrackParam::GetZAt(xk,bz,z)) return 0;
765 //_____________________________________________________________________________
766 Int_t AliTRDtrack::PropagateToX(Double_t xr, Double_t step)
769 // Propagate track to given x position
770 // works inside of the 20 degree segmentation (local cooordinate frame for TRD , TPC, TOF)
772 // material budget from geo manager
774 Double_t xyz0[3], xyz1[3],y,z;
775 const Double_t kAlphac = TMath::Pi()/9.;
776 const Double_t kTalphac = TMath::Tan(kAlphac*0.5);
777 // critical alpha - cross sector indication
779 Double_t dir = (GetX()>xr) ? -1.:1.;
781 for (Double_t x=GetX()+dir*step;dir*x<dir*xr;x+=dir*step){
784 GetProlongation(x,y,z);
785 xyz1[0] = x*TMath::Cos(GetAlpha())+y*TMath::Sin(GetAlpha());
786 xyz1[1] = x*TMath::Sin(GetAlpha())-y*TMath::Cos(GetAlpha());
789 AliKalmanTrack::MeanMaterialBudget(xyz0,xyz1,param);
791 if (param[0]>0&¶m[1]>0) PropagateTo(x,param[1],param[0]);
792 if (GetY()>GetX()*kTalphac){
795 if (GetY()<-GetX()*kTalphac){
806 //_____________________________________________________________________________
807 Int_t AliTRDtrack::PropagateToR(Double_t r,Double_t step)
810 // propagate track to the radial position
811 // rotation always connected to the last track position
813 Double_t xyz0[3], xyz1[3],y,z;
814 Double_t radius = TMath::Sqrt(GetX()*GetX() + GetY()*GetY());
815 Double_t dir = (radius>r) ? -1.:1.; // direction +-
817 for (Double_t x=radius+dir*step;dir*x<dir*r;x+=dir*step){
819 Double_t alpha = TMath::ATan2(xyz0[1],xyz0[0]);
822 GetProlongation(x,y,z);
823 xyz1[0] = x*TMath::Cos(alpha)+y*TMath::Sin(alpha);
824 xyz1[1] = x*TMath::Sin(alpha)-y*TMath::Cos(alpha);
827 AliKalmanTrack::MeanMaterialBudget(xyz0,xyz1,param);
828 if (param[1]<=0) param[1] =100000000;
829 PropagateTo(x,param[1],param[0]);
832 Double_t alpha = TMath::ATan2(xyz0[1],xyz0[0]);
835 GetProlongation(r,y,z);
836 xyz1[0] = r*TMath::Cos(alpha)+y*TMath::Sin(alpha);
837 xyz1[1] = r*TMath::Sin(alpha)-y*TMath::Cos(alpha);
840 AliKalmanTrack::MeanMaterialBudget(xyz0,xyz1,param);
842 if (param[1]<=0) param[1] =100000000;
843 PropagateTo(r,param[1],param[0]);
849 //_____________________________________________________________________________
850 Int_t AliTRDtrack::GetSector() const
853 // Return the current sector
856 return Int_t(TVector2::Phi_0_2pi(GetAlpha())
857 / AliTRDgeometry::GetAlpha())
858 % AliTRDgeometry::kNsect;
862 //_____________________________________________________________________________
863 void AliTRDtrack::SetSampledEdx(Float_t q, Int_t i)
866 // The sampled energy loss
869 Double_t s = GetSnp();
870 Double_t t = GetTgl();
871 q *= TMath::Sqrt((1-s*s)/(1+t*t));
876 //_____________________________________________________________________________
877 void AliTRDtrack::SetSampledEdx(Float_t q)
880 // The sampled energy loss
883 Double_t s = GetSnp();
884 Double_t t = GetTgl();
885 q*= TMath::Sqrt((1-s*s)/(1+t*t));
891 Double_t AliTRDtrack::GetBz() const {
893 // returns Bz component of the magnetic field (kG)
895 if (AliTracker::UniformField()) return AliTracker::GetBz();
896 Double_t r[3]; GetXYZ(r);
897 return AliTracker::GetBz(r);