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>
23 #include "AliTracker.h"
24 #include "AliESDtrack.h"
26 #include "AliTRDgeometry.h"
27 #include "AliTRDcluster.h"
28 #include "AliTRDtrack.h"
29 #include "AliTRDtracklet.h"
33 ///////////////////////////////////////////////////////////////////////////////
35 // Represents a reconstructed TRD track //
36 // Local TRD Kalman track //
38 ///////////////////////////////////////////////////////////////////////////////
40 //_____________________________________________________________________________
41 AliTRDtrack::AliTRDtrack()
59 // AliTRDtrack default constructor
62 for (Int_t i = 0; i < kNplane; i++) {
63 for (Int_t j = 0; j < kNslice; j++) {
64 fdEdxPlane[i][j] = 0.0;
69 for (UInt_t i = 0; i < kMAXCLUSTERSPERTRACK; i++) {
75 for (Int_t i = 0; i < 3; i++) {
81 //_____________________________________________________________________________
82 AliTRDtrack::AliTRDtrack(const AliTRDcluster *c, Int_t index
83 , const Double_t p[5], const Double_t cov[15]
84 , Double_t x, Double_t alpha)
102 // The main AliTRDtrack constructor.
105 Double_t cnv = 1.0/(GetBz() * kB2C);
107 Double_t pp[5] = { p[0]
113 Double_t c22 = x*x*cov[14] - 2*x*cov[12] + cov[5];
114 Double_t c32 = x*cov[13] - cov[8];
115 Double_t c20 = x*cov[10] - cov[3];
116 Double_t c21 = x*cov[11] - cov[4];
117 Double_t c42 = x*cov[14] - cov[12];
119 Double_t cc[15] = { cov[0 ]
122 , cov[6 ], cov[7 ], c32, cov[9 ]
123 , cov[10]*cnv, cov[11]*cnv, c42*cnv, cov[13]*cnv, cov[14]*cnv*cnv };
126 SetNumberOfClusters(1);
129 for (Int_t i = 0; i < kNplane; i++) {
130 for (Int_t j = 0; j < kNslice; j++) {
131 fdEdxPlane[i][j] = 0.0;
133 fTimBinPlane[i] = -1;
136 Double_t q = TMath::Abs(c->GetQ());
137 Double_t s = GetSnp();
138 Double_t t = GetTgl();
140 q *= TMath::Sqrt((1-s*s)/(1+t*t));
145 for (UInt_t i = 1; i < kMAXCLUSTERSPERTRACK; i++) {
151 for (Int_t i = 0; i < 3;i++) {
157 //_____________________________________________________________________________
158 AliTRDtrack::AliTRDtrack(const AliTRDtrack &t)
160 ,fSeedLab(t.GetSeedLabel())
163 ,fStopped(t.fStopped)
166 ,fNRotate(t.fNRotate)
168 ,fNExpected(t.fNExpected)
170 ,fNExpectedLast(t.fNExpectedLast)
172 ,fChi2Last(t.fChi2Last)
179 for (Int_t i = 0; i < kNplane; i++) {
180 for (Int_t j = 0; j < kNslice; j++) {
181 fdEdxPlane[i][j] = t.fdEdxPlane[i][j];
183 fTimBinPlane[i] = t.fTimBinPlane[i];
184 fTracklets[i] = t.fTracklets[i];
187 Int_t n = t.GetNumberOfClusters();
188 SetNumberOfClusters(n);
190 for (Int_t i = 0; i < n; i++) {
191 fIndex[i] = t.fIndex[i];
192 fIndexBackup[i] = t.fIndex[i];
193 fdQdl[i] = t.fdQdl[i];
196 for (UInt_t i = n; i < kMAXCLUSTERSPERTRACK; i++) {
202 for (Int_t i = 0; i < 3;i++) {
203 fBudget[i] = t.fBudget[i];
208 //_____________________________________________________________________________
209 AliTRDtrack::AliTRDtrack(const AliKalmanTrack &t, Double_t /*alpha*/)
212 ,fdEdx(t.GetPIDsignal())
227 // Constructor from AliTPCtrack or AliITStrack
230 SetLabel(t.GetLabel());
232 SetMass(t.GetMass());
233 SetNumberOfClusters(0);
235 for (Int_t i = 0; i < kNplane; i++) {
236 for (Int_t j = 0; j < kNslice; j++) {
237 fdEdxPlane[i][j] = 0.0;
239 fTimBinPlane[i] = -1;
242 for (UInt_t i = 0; i < kMAXCLUSTERSPERTRACK; i++) {
248 for (Int_t i = 0; i < 3; i++) {
254 //_____________________________________________________________________________
255 AliTRDtrack::AliTRDtrack(const AliESDtrack &t)
258 ,fdEdx(t.GetTRDsignal())
273 // Constructor from AliESDtrack
276 SetLabel(t.GetLabel());
278 SetMass(t.GetMass());
279 SetNumberOfClusters(t.GetTRDclusters(fIndex));
281 Int_t ncl = t.GetTRDclusters(fIndexBackup);
282 for (UInt_t i = ncl; i < kMAXCLUSTERSPERTRACK; i++) {
287 for (Int_t i = 0; i < kNplane; i++) {
288 for (Int_t j = 0; j < kNslice; j++) {
289 fdEdxPlane[i][j] = t.GetTRDsignals(i,j);
291 fTimBinPlane[i] = t.GetTRDTimBin(i);
294 const AliExternalTrackParam *par = &t;
295 if (t.GetStatus() & AliESDtrack::kTRDbackup) {
296 par = t.GetOuterParam();
298 AliError("No backup info!");
302 Set(par->GetX(),par->GetAlpha(),par->GetParameter(),par->GetCovariance());
305 for (UInt_t i = 0; i < kMAXCLUSTERSPERTRACK; i++) {
309 for (Int_t i = 0; i < 3; i++) {
313 if ((t.GetStatus() & AliESDtrack::kTIME) == 0) {
319 t.GetIntegratedTimes(times);
320 SetIntegratedTimes(times);
321 SetIntegratedLength(t.GetIntegratedLength());
325 //____________________________________________________________________________
326 AliTRDtrack::~AliTRDtrack()
339 //____________________________________________________________________________
340 Float_t AliTRDtrack::StatusForTOF()
343 // Defines the status of the TOF extrapolation
346 // Definition of res ????
347 Float_t res = (0.2 + 0.8 * (fN / (fNExpected + 5.0)))
348 * (0.4 + 0.6 * fTracklets[5].GetN() / 20.0);
349 res *= (0.25 + 0.8 * 40.0 / (40.0 + fBudget[2]));
352 // This part of the function is never reached ????
353 // What defines these parameters ????
355 if (GetNumberOfClusters() < 20) return 0;
357 (fChi2/(Float_t(fN)) < 3)) return 3; // Gold
359 (fChi2Last/(Float_t(fNLast)) < 3)) return 3; // Gold
361 (fChi2Last/(Float_t(fNLast)) < 2)) return 3; // Gold
362 if ((fNLast/(fNExpectedLast+3.0) > 0.8) &&
363 (fChi2Last/Float_t(fNLast) < 5) &&
364 (fNLast > 20)) return 2; // Silber
366 (((fNLast+1.0)/(fNExpectedLast+1.0)) > 0.8) &&
367 (fChi2Last/(fNLast-5.0) < 6)) return 1;
373 //_____________________________________________________________________________
374 Int_t AliTRDtrack::Compare(const TObject *o) const
377 // Compares tracks according to their Y2 or curvature
380 AliTRDtrack *t = (AliTRDtrack *) o;
382 Double_t co = TMath::Abs(t->GetC());
383 Double_t c = TMath::Abs(GetC());
395 //_____________________________________________________________________________
396 void AliTRDtrack::CookdEdx(Double_t low, Double_t up)
399 // Calculates the truncated dE/dx within the "low" and "up" cuts.
402 // Array to sort the dEdx values according to amplitude
403 Float_t sorted[kMAXCLUSTERSPERTRACK];
406 // Require at least 10 clusters for a dedx measurement
407 if (fNdedx < 10) return;
409 // Can fdQdl be negative ????
410 for (Int_t i = 0; i < fNdedx; i++) {
411 sorted[i] = TMath::Abs(fdQdl[i]);
413 // Sort the dedx values by amplitude
414 Int_t *index = new Int_t[fNdedx];
415 TMath::Sort(fNdedx, sorted, index, kFALSE);
417 // Sum up the truncated charge between lower and upper bounds
418 Int_t nl = Int_t(low * fNdedx);
419 Int_t nu = Int_t( up * fNdedx);
420 for (Int_t i = nl; i <= nu; i++) {
421 fdEdx += sorted[index[i]];
423 fdEdx /= (nu - nl + 1.0);
429 //_____________________________________________________________________________
430 Bool_t AliTRDtrack::PropagateTo(Double_t xk, Double_t x0, Double_t rho)
433 // Propagates a track of particle with mass=pm to a reference plane
434 // defined by x=xk through media of density=rho and radiationLength=x0
441 Double_t oldX = GetX();
442 Double_t oldY = GetY();
443 Double_t oldZ = GetZ();
445 Double_t bz = GetBz();
447 if (!AliExternalTrackParam::PropagateTo(xk,bz)) {
454 Double_t d = TMath::Sqrt((x-oldX)*(x-oldX)
456 + (z-oldZ)*(z-oldZ));
458 if (IsStartedTimeIntegral()) {
460 Double_t crv = GetC();
461 if (TMath::Abs(l2*crv) > 0.0001) {
462 // Make correction for curvature if neccesary
463 l2 = 0.5 * TMath::Sqrt((x-oldX)*(x-oldX) + (y-oldY)*(y-oldY));
464 l2 = 2.0 * TMath::ASin(l2 * crv) / crv;
465 l2 = TMath::Sqrt(l2*l2 + (z-oldZ)*(z-oldZ));
471 Double_t ll = (oldX < xk) ? -d : d;
472 if (!AliExternalTrackParam::CorrectForMaterial(ll*rho/x0,x0,GetMass())) {
478 // Energy losses************************
479 Double_t p2 = (1.0 + GetTgl()*GetTgl()) / (Get1Pt()*Get1Pt());
480 Double_t beta2 = p2 / (p2 + GetMass()*GetMass());
481 if (beta2<1.0e-10 || (5940.0 * beta2/(1.0 - beta2 + 1.0e-10) - beta2) < 0.0) {
485 Double_t dE = 0.153e-3 / beta2
486 * (log(5940.0 * beta2/(1.0 - beta2 + 1.0e-10)) - beta2)
488 Float_t budget = d * rho;
489 fBudget[0] += budget;
492 // Suspicious part - think about it ?
493 Double_t kinE = TMath::Sqrt(p2);
494 if (dE > 0.8*kinE) dE = 0.8 * kinE; //
495 if (dE < 0) dE = 0.0; // Not valid region for Bethe bloch
502 Double_t sigmade = 0.07 * TMath::Sqrt(TMath::Abs(dE)); // Energy loss fluctuation
503 Double_t sigmac2 = sigmade*sigmade*fC*fC*(p2+GetMass()*GetMass())/(p2*p2);
505 fCee += fX*fX * sigmac2;
514 //_____________________________________________________________________________
515 Bool_t AliTRDtrack::Update(const AliTRDcluster *c, Double_t chisq, Int_t index
519 // Assignes found cluster to the track and updates track information
522 Bool_t fNoTilt = kTRUE;
523 if (TMath::Abs(h01) > 0.003) {
527 // Add angular effect to the error contribution - MI
528 Float_t tangent2 = GetSnp()*GetSnp();
529 if (tangent2 < 0.90000) {
530 tangent2 = tangent2 / (1.0 - tangent2);
532 //Float_t errang = tangent2 * 0.04;
534 Double_t p[2] = {c->GetY(), c->GetZ() };
535 //Double_t cov[3] = {c->GetSigmaY2()+errang, 0.0, c->GetSigmaZ2()*100.0 };
536 Double_t sy2 = c->GetSigmaY2() * 4.0;
537 Double_t sz2 = c->GetSigmaZ2() * 4.0;
538 Double_t cov[3] = {sy2 + h01*h01*sz2, h01*(sy2-sz2), sz2 + h01*h01*sy2 };
540 if (!AliExternalTrackParam::Update(p,cov)) {
544 Int_t n = GetNumberOfClusters();
546 SetNumberOfClusters(n+1);
548 SetChi2(GetChi2()+chisq);
554 //_____________________________________________________________________________
555 Int_t AliTRDtrack::UpdateMI(const AliTRDcluster *c, Double_t chisq, Int_t index
556 , Double_t h01, Int_t /*plane*/)
559 // Assignes found cluster to the track and updates track information
562 Bool_t fNoTilt = kTRUE;
563 if (TMath::Abs(h01) > 0.003) {
567 // Add angular effect to the error contribution and make correction - MI
568 Double_t tangent2 = GetSnp()*GetSnp();
569 if (tangent2 < 0.90000){
570 tangent2 = tangent2 / (1.0-tangent2);
572 Double_t tangent = TMath::Sqrt(tangent2);
578 // Is the following still needed ????
581 // Double_t correction = 0*plane;
583 Double_t errang = tangent2*0.04; //
584 Double_t errsys =0.025*0.025*20; //systematic error part
587 if (c->GetNPads()==4) extend=2;
589 //if (c->GetNPads()==5) extend=3;
590 //if (c->GetNPads()==6) extend=3;
591 //if (c->GetQ()<15) return 1;
596 correction = corrector->GetCorrection(plane,c->GetLocalTimeBin(),tangent);
597 if (TMath::Abs(correction)>0){
599 errang = corrector->GetSigma(plane,c->GetLocalTimeBin(),tangent);
601 errang += tangent2*0.04;
606 //Double_t padlength = TMath::Sqrt(c->GetSigmaZ2()*12.);
609 Double_t dy=c->GetY() - GetY(), dz=c->GetZ() - GetZ();
610 printf("%e %e %e %e\n",dy,dz,padlength/2,h01);
614 Double_t p[2] = { c->GetY(), c->GetZ() };
615 //Double_t cov[3]={ (c->GetSigmaY2()+errang+errsys)*extend, 0.0, c->GetSigmaZ2()*10000.0 };
616 Double_t sy2 = c->GetSigmaY2() * 4.0;
617 Double_t sz2 = c->GetSigmaZ2() * 4.0;
618 Double_t cov[3] = { sy2 + h01*h01*sz2, h01*(sy2-sz2), sz2 + h01*h01*sy2 };
620 if (!AliExternalTrackParam::Update(p,cov)) {
624 Int_t n = GetNumberOfClusters();
626 SetNumberOfClusters(n+1);
627 SetChi2(GetChi2() + chisq);
633 // //_____________________________________________________________________________
634 // Int_t AliTRDtrack::UpdateMI(const AliTRDtracklet &tracklet)
637 // // Assignes found tracklet to the track and updates track information
639 // // Can this be removed ????
642 // Double_t r00=(tracklet.GetTrackletSigma2()), r01=0., r11= 10000.;
643 // r00+=fCyy; r01+=fCzy; r11+=fCzz;
645 // Double_t det=r00*r11 - r01*r01;
646 // Double_t tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det;
649 // Double_t dy=tracklet.GetY() - fY, dz=tracklet.GetZ() - fZ;
652 // Double_t s00 = tracklet.GetTrackletSigma2(); // error pad
653 // Double_t s11 = 100000; // error pad-row
654 // Float_t h01 = tracklet.GetTilt();
656 // // r00 = fCyy + 2*fCzy*h01 + fCzz*h01*h01+s00;
657 // r00 = fCyy + fCzz*h01*h01+s00;
658 // // r01 = fCzy + fCzz*h01;
661 // det = r00*r11 - r01*r01;
663 // tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det;
665 // Double_t k00=fCyy*r00+fCzy*r01, k01=fCyy*r01+fCzy*r11;
666 // Double_t k10=fCzy*r00+fCzz*r01, k11=fCzy*r01+fCzz*r11;
667 // Double_t k20=fCey*r00+fCez*r01, k21=fCey*r01+fCez*r11;
668 // Double_t k30=fCty*r00+fCtz*r01, k31=fCty*r01+fCtz*r11;
669 // Double_t k40=fCcy*r00+fCcz*r01, k41=fCcy*r01+fCcz*r11;
672 // // k00=fCyy*r00+fCzy*(r01+h01*r00),k01=fCyy*r01+fCzy*(r11+h01*r01);
673 // // k10=fCzy*r00+fCzz*(r01+h01*r00),k11=fCzy*r01+fCzz*(r11+h01*r01);
674 // // k20=fCey*r00+fCez*(r01+h01*r00),k21=fCey*r01+fCez*(r11+h01*r01);
675 // // k30=fCty*r00+fCtz*(r01+h01*r00),k31=fCty*r01+fCtz*(r11+h01*r01);
676 // // k40=fCcy*r00+fCcz*(r01+h01*r00),k41=fCcy*r01+fCcz*(r11+h01*r01);
678 // //Update measurement
679 // Double_t cur=fC + k40*dy + k41*dz, eta=fE + k20*dy + k21*dz;
680 // // cur=fC + k40*dy + k41*dz; eta=fE + k20*dy + k21*dz;
681 // if (TMath::Abs(cur*fX-eta) >= 0.90000) {
682 // //Int_t n=GetNumberOfClusters();
683 // // if (n>4) cerr<<n<<" AliTRDtrack warning: Filtering failed !\n";
693 // fY += k00*dy + k01*dz;
694 // fZ += k10*dy + k11*dz;
696 // fT += k30*dy + k31*dz;
700 // //Update covariance
703 // Double_t oldyy = fCyy, oldzz = fCzz; //, oldee=fCee, oldcc =fCcc;
704 // Double_t oldzy = fCzy, oldey = fCey, oldty=fCty, oldcy =fCcy;
705 // Double_t oldez = fCez, oldtz = fCtz, oldcz=fCcz;
706 // //Double_t oldte = fCte, oldce = fCce;
707 // //Double_t oldct = fCct;
709 // fCyy-=k00*oldyy+k01*oldzy;
710 // fCzy-=k10*oldyy+k11*oldzy;
711 // fCey-=k20*oldyy+k21*oldzy;
712 // fCty-=k30*oldyy+k31*oldzy;
713 // fCcy-=k40*oldyy+k41*oldzy;
715 // fCzz-=k10*oldzy+k11*oldzz;
716 // fCez-=k20*oldzy+k21*oldzz;
717 // fCtz-=k30*oldzy+k31*oldzz;
718 // fCcz-=k40*oldzy+k41*oldzz;
720 // fCee-=k20*oldey+k21*oldez;
721 // fCte-=k30*oldey+k31*oldez;
722 // fCce-=k40*oldey+k41*oldez;
724 // fCtt-=k30*oldty+k31*oldtz;
725 // fCct-=k40*oldty+k41*oldtz;
727 // fCcc-=k40*oldcy+k41*oldcz;
730 // //Int_t n=GetNumberOfClusters();
731 // //fIndex[n]=index;
732 // //SetNumberOfClusters(n+1);
734 // //SetChi2(GetChi2()+chisq);
735 // // cerr<<"in update: fIndex["<<fN<<"] = "<<index<<endl;
741 //_____________________________________________________________________________
742 Bool_t AliTRDtrack::Rotate(Double_t alpha, Bool_t absolute)
745 // Rotates track parameters in R*phi plane
746 // if absolute rotation alpha is in global system
747 // otherwise alpha rotation is relative to the current rotation angle
757 return AliExternalTrackParam::Rotate(GetAlpha()+alpha);
761 //_____________________________________________________________________________
762 Double_t AliTRDtrack::GetPredictedChi2(const AliTRDcluster *c, Double_t h01) const
765 // Returns the track chi2
768 Double_t p[2] = { c->GetY(), c->GetZ() };
769 Double_t sy2 = c->GetSigmaY2() * 4.0;
770 Double_t sz2 = c->GetSigmaZ2() * 4.0;
771 Double_t cov[3] = { sy2 + h01*h01*sz2, h01*(sy2-sz2), sz2 + h01*h01*sy2 };
773 return AliExternalTrackParam::GetPredictedChi2(p,cov);
776 // Can the following be removed ????
779 Bool_t fNoTilt = kTRUE;
780 if(TMath::Abs(h01) > 0.003) fNoTilt = kFALSE;
782 return (c->GetY() - GetY())*(c->GetY() - GetY())/c->GetSigmaY2();
786 Double_t chi2, dy, r00, r01, r11;
794 Double_t padlength = TMath::Sqrt(c->GetSigmaZ2()*12);
796 r00=c->GetSigmaY2(); r01=0.; r11=c->GetSigmaZ2();
797 r00+=fCyy; r01+=fCzy; r11+=fCzz;
799 Double_t det=r00*r11 - r01*r01;
800 if (TMath::Abs(det) < 1.e-10) {
801 Int_t n=GetNumberOfClusters();
802 if (n>4) cerr<<n<<" AliTRDtrack warning: Singular matrix !\n";
805 Double_t tmp=r00; r00=r11; r11=tmp; r01=-r01;
806 Double_t dy=c->GetY() - fY, dz=c->GetZ() - fZ;
807 Double_t tiltdz = dz;
808 if (TMath::Abs(tiltdz)>padlength/2.) {
809 tiltdz = TMath::Sign(padlength/2,dz);
814 chi2 = (dy*r00*dy + 2*r01*dy*dz + dz*r11*dz)/det;
822 //_____________________________________________________________________________
823 void AliTRDtrack::MakeBackupTrack()
826 // Creates a backup track
832 fBackupTrack = new AliTRDtrack(*this);
836 //_____________________________________________________________________________
837 Int_t AliTRDtrack::GetProlongation(Double_t xk, Double_t &y, Double_t &z)
840 // Find a prolongation at given x
841 // Return 0 if it does not exist
844 Double_t bz = GetBz();
846 if (!AliExternalTrackParam::GetYAt(xk,bz,y)) {
849 if (!AliExternalTrackParam::GetZAt(xk,bz,z)) {
857 //_____________________________________________________________________________
858 Int_t AliTRDtrack::PropagateToX(Double_t xr, Double_t step)
861 // Propagate track to given x position
862 // Works inside of the 20 degree segmentation (local cooordinate frame for TRD , TPC, TOF)
864 // Material budget from geo manager
872 const Double_t kAlphac = TMath::Pi()/9.0;
873 const Double_t kTalphac = TMath::Tan(kAlphac*0.5);
875 // Critical alpha - cross sector indication
876 Double_t dir = (GetX()>xr) ? -1.0 : 1.0;
879 for (Double_t x = GetX()+dir*step; dir*x < dir*xr; x += dir*step) {
882 GetProlongation(x,y,z);
883 xyz1[0] = x * TMath::Cos(GetAlpha()) + y * TMath::Sin(GetAlpha());
884 xyz1[1] = x * TMath::Sin(GetAlpha()) - y * TMath::Cos(GetAlpha());
887 AliKalmanTrack::MeanMaterialBudget(xyz0,xyz1,param);
889 if ((param[0] > 0) &&
891 PropagateTo(x,param[1],param[0]);
894 if (GetY() > GetX()*kTalphac) {
897 if (GetY() < -GetX()*kTalphac) {
909 //_____________________________________________________________________________
910 Int_t AliTRDtrack::PropagateToR(Double_t r,Double_t step)
913 // Propagate track to the radial position
914 // Rotation always connected to the last track position
922 Double_t radius = TMath::Sqrt(GetX()*GetX() + GetY()*GetY());
924 Double_t dir = (radius>r) ? -1.0 : 1.0;
926 for (Double_t x = radius+dir*step; dir*x < dir*r; x += dir*step) {
929 Double_t alpha = TMath::ATan2(xyz0[1],xyz0[0]);
932 GetProlongation(x,y,z);
933 xyz1[0] = x * TMath::Cos(alpha) + y * TMath::Sin(alpha);
934 xyz1[1] = x * TMath::Sin(alpha) - y * TMath::Cos(alpha);
937 AliKalmanTrack::MeanMaterialBudget(xyz0,xyz1,param);
939 param[1] = 100000000;
941 PropagateTo(x,param[1],param[0]);
946 Double_t alpha = TMath::ATan2(xyz0[1],xyz0[0]);
949 GetProlongation(r,y,z);
950 xyz1[0] = r * TMath::Cos(alpha) + y * TMath::Sin(alpha);
951 xyz1[1] = r * TMath::Sin(alpha) - y * TMath::Cos(alpha);
954 AliKalmanTrack::MeanMaterialBudget(xyz0,xyz1,param);
957 param[1] = 100000000;
959 PropagateTo(r,param[1],param[0]);
965 //_____________________________________________________________________________
966 Int_t AliTRDtrack::GetSector() const
969 // Return the current sector
972 return Int_t(TVector2::Phi_0_2pi(GetAlpha()) / AliTRDgeometry::GetAlpha())
973 % AliTRDgeometry::kNsect;
977 //_____________________________________________________________________________
978 void AliTRDtrack::SetSampledEdx(Float_t q, Int_t i)
981 // The sampled energy loss
984 Double_t s = GetSnp();
985 Double_t t = GetTgl();
986 q *= TMath::Sqrt((1.0 - s*s) / (1.0 + t*t));
991 //_____________________________________________________________________________
992 void AliTRDtrack::SetSampledEdx(Float_t q)
995 // The sampled energy loss
998 Double_t s = GetSnp();
999 Double_t t = GetTgl();
1000 q *= TMath::Sqrt((1.0 - s*s) / (1.0 + t*t));
1006 //_____________________________________________________________________________
1007 Double_t AliTRDtrack::GetBz() const
1010 // Returns Bz component of the magnetic field (kG)
1013 if (AliTracker::UniformField()) {
1014 return AliTracker::GetBz();
1019 return AliTracker::GetBz(r);