#include "AliCluster.h"
#include "AliTracker.h"
#include "AliESDtrack.h"
+#include "AliESDVertex.h"
ClassImp(AliTPCtrack)
//-----------------------------------------------------------------
// This is the main track constructor.
//-----------------------------------------------------------------
-
- Double_t cnv=1./(GetBz()*kB2C);
+ Double_t cnv=1./(AliTracker::GetBz()*kB2C);
Double_t pp[5]={
p[0],
cov[10]*cnv, cov[11]*cnv, c42*cnv, cov[13]*cnv, cov[14]*cnv*cnv
};
+ Double_t mostProbablePt=AliExternalTrackParam::GetMostProbablePt();
+ Double_t p0=TMath::Sign(1/mostProbablePt,pp[4]);
+ Double_t w0=cc[14]/(cc[14] + p0*p0), w1=p0*p0/(cc[14] + p0*p0);
+ pp[4] = w0*p0 + w1*pp[4];
+ cc[10]*=w1; cc[11]*=w1; cc[12]*=w1; cc[13]*=w1; cc[14]*=w1;
+
Set(x,alpha,pp,cc);
SetNumberOfClusters(1);
for (Int_t i=0; i<3;i++) fV0Indexes[i]=t.fV0Indexes[i];
}
+AliTPCtrack& AliTPCtrack::operator=(const AliTPCtrack& o){
+ if(this!=&o){
+ AliKalmanTrack::operator=(o);
+ fdEdx = o.fdEdx;
+ for(Int_t i = 0;i<kMaxRow;++i)fIndex[i] = o.fIndex[i];
+ for(Int_t i = 0;i<4;++i)fPoints[i] = o.fPoints[i];
+ fSdEdx = o.fSdEdx;
+ fNFoundable = o.fNFoundable;
+ fBConstrain = o.fBConstrain;
+ fLastPoint = o.fLastPoint;
+ fFirstPoint = o.fFirstPoint;
+ fTrackType = o.fTrackType;
+ fLab2 = o.fLab2;
+ fNShared = o.fNShared;
+ fReference = o.fReference;
+ for(Int_t i = 0;i<12;++i) fKinkPoint[i] = o.fKinkPoint[i];
+
+ for(Int_t i = 0;i<3;++i){
+ fKinkIndexes[i] = o.fKinkIndexes[i];
+ fV0Indexes[i] = o.fV0Indexes[i];
+ }
+ }
+ return *this;
+
+}
+
+
//_____________________________________________________________________________
Int_t AliTPCtrack::Compare(const TObject *o) const {
//-----------------------------------------------------------------
// This function compares tracks according to the their curvature
//-----------------------------------------------------------------
AliTPCtrack *t=(AliTPCtrack*)o;
- //Double_t co=TMath::Abs(t->Get1Pt());
- //Double_t c =TMath::Abs(Get1Pt());
+ //Double_t co=t->OneOverPt();
+ //Double_t c = OneOverPt();
Double_t co=t->GetSigmaY2()*t->GetSigmaZ2();
Double_t c =GetSigmaY2()*GetSigmaZ2();
if (c>co) return 1;
// rho - density of the crossed matrial (g/cm^3)
// x0 - radiation length of the crossed material (g/cm^2)
//-----------------------------------------------------------------
- Double_t oldX=GetX(), oldY=GetY(), oldZ=GetZ();
-
+ //
Double_t bz=GetBz();
- if (!AliExternalTrackParam::PropagateTo(xk,bz)) return kFALSE;
+ Double_t zat=0;
+ if (!GetZAt(xk, bz,zat)) return kFALSE;
+ if (TMath::Abs(zat)>250.){
+ // Don't propagate track outside of the fiducial volume - material budget not proper one
+ //
+ //AliWarning("Propagate outside of fiducial volume");
+ return kFALSE;
+ }
+
+ Double_t oldX=GetX(), oldY=GetY(), oldZ=GetZ();
+ //if (!AliExternalTrackParam::PropagateTo(xk,bz)) return kFALSE;
+ Double_t b[3]; GetBxByBz(b);
+ if (!AliExternalTrackParam::PropagateToBxByBz(xk,b)) return kFALSE;
Double_t d = TMath::Sqrt((GetX()-oldX)*(GetX()-oldX) +
(GetY()-oldY)*(GetY()-oldY) +
if (IsStartedTimeIntegral() && GetX()>oldX) AddTimeStep(d);
if (oldX < xk) d = -d;
- if (!AliExternalTrackParam::CorrectForMaterial(d*rho/x0,x0,GetMass()))
- return kFALSE;
+ if (!AliExternalTrackParam::CorrectForMeanMaterial(d*rho/x0,d*rho,GetMass(),
+ kFALSE,AliExternalTrackParam::BetheBlochGas)) return kFALSE;
return kTRUE;
}
//_____________________________________________________________________________
Bool_t
-AliTPCtrack::PropagateToVertex(const AliESDVertex *v,Double_t d,Double_t x0)
+AliTPCtrack::PropagateToVertex(const AliESDVertex *v,Double_t rho,Double_t x0)
{
//-----------------------------------------------------------------
- // This function propagates tracks to the vertex.
+ // This function propagates tracks to the vertex
+ // rho - density of the crossed matrial (g/cm3)
+ // x0 - radiation length of the crossed material (g/cm2)
//-----------------------------------------------------------------
- Double_t bz=GetBz();
- if (PropagateToDCA(v,bz,kVeryBig))
- if (AliExternalTrackParam::CorrectForMaterial(d,x0,GetMass())) return kTRUE;
- return kFALSE;
+ Double_t oldX=GetX(), oldY=GetY(), oldZ=GetZ();
+
+ //Double_t bz=GetBz();
+ //if (!PropagateToDCA(v,bz,kVeryBig)) return kFALSE;
+ Double_t b[3]; GetBxByBz(b);
+ if (!PropagateToDCABxByBz(v,b,kVeryBig)) return kFALSE;
+
+ Double_t d = TMath::Sqrt((GetX()-oldX)*(GetX()-oldX) +
+ (GetY()-oldY)*(GetY()-oldY) +
+ (GetZ()-oldZ)*(GetZ()-oldZ));
+
+ if (oldX < GetX()) d = -d;
+ if (!AliExternalTrackParam::CorrectForMeanMaterial(d*rho/x0,d*rho,GetMass(),
+ kFALSE,AliExternalTrackParam::BetheBlochGas)) return kFALSE;
+
+ return kTRUE;
}
//_____________________________________________________________________________
if (!AliExternalTrackParam::Update(p,cov)) return kFALSE;
+ AliTracker::FillResiduals(this,p,cov,c->GetVolumeId());
+
Int_t n=GetNumberOfClusters();
fIndex[n]=index;
SetNumberOfClusters(n+1);
//
}
-Double_t AliTPCtrack::GetBz() const {
- //
- // returns Bz component of the magnetic field (kG)
- //
- if (AliTracker::UniformField()) return AliTracker::GetBz();
- Double_t r[3]; GetXYZ(r);
- return AliTracker::GetBz(r);
-}
-