* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.19 2003/03/03 16:56:53 hristov
-Corrections to obey coding conventions
-
-Revision 1.18 2003/02/19 08:57:04 hristov
-Control^M removed
-
-Revision 1.17 2003/02/19 08:49:46 hristov
-Track time measurement (S.Radomski)
-
-Revision 1.16 2003/02/06 11:11:36 kowal2
-Added a few get methods by Jiri Chudoba
-
-Revision 1.15 2002/11/25 09:33:30 hristov
-Tracking of secondaries (M.Ivanov)
-
-Revision 1.14 2002/10/23 13:45:00 hristov
-Fatal if no magnetic field set for the reconstruction (Y.Belikov)
-
-Revision 1.13 2002/10/23 07:17:34 alibrary
-Introducing Riostream.h
-
-Revision 1.12 2002/10/14 14:57:43 hristov
-Merging the VirtualMC branch to the main development branch (HEAD)
-
-Revision 1.9.6.1 2002/10/11 08:34:48 hristov
-Updating VirtualMC to v3-09-02
-
-Revision 1.11 2002/07/19 07:34:42 kowal2
-Logs added
-
-*/
-
+/* $Id$ */
//-----------------------------------------------------------------
// Implementation of the TPC track class
#include "AliTPCtrack.h"
#include "AliCluster.h"
#include "AliBarrelTrack.h"
+#include "AliESDtrack.h"
ClassImp(AliTPCtrack)
}
+//_____________________________________________________________________________
+AliTPCtrack::AliTPCtrack(const AliESDtrack& t) : AliKalmanTrack() {
+ //-----------------------------------------------------------------
+ // Conversion AliESDtrack -> AliTPCtrack.
+ //-----------------------------------------------------------------
+ SetNumberOfClusters(t.GetTPCclusters(fIndex));
+ SetLabel(t.GetLabel());
+ SetMass(t.GetMass());
+
+ fdEdx = t.GetTPCsignal();
+ fAlpha = t.GetAlpha();
+ if (fAlpha < -TMath::Pi()) fAlpha += 2*TMath::Pi();
+ else if (fAlpha >= TMath::Pi()) fAlpha -= 2*TMath::Pi();
+
+ //Conversion of the track parameters
+ Double_t x,p[5]; t.GetExternalParameters(x,p);
+ fX=x; x=GetConvConst();
+ fP0=p[0];
+ fP1=p[1];
+ fP3=p[3];
+ fP4=p[4]/x;
+ fP2=fP4*fX - p[2];
+
+ //Conversion of the covariance matrix
+ Double_t c[15]; t.GetExternalCovariance(c);
+ c[10]/=x; c[11]/=x; c[12]/=x; c[13]/=x; c[14]/=x*x;
+
+ Double_t c22=fX*fX*c[14] - 2*fX*c[12] + c[5];
+ Double_t c32=fX*c[13] - c[8];
+ Double_t c20=fX*c[10] - c[3], c21=fX*c[11] - c[4], c42=fX*c[14] - c[12];
+
+ fC00=c[0 ];
+ fC10=c[1 ]; fC11=c[2 ];
+ fC20=c20; fC21=c21; fC22=c22;
+ fC30=c[6 ]; fC31=c[7 ]; fC32=c32; fC33=c[9 ];
+ fC40=c[10]; fC41=c[11]; fC42=c42; fC43=c[13]; fC44=c[14];
+
+ if ((t.GetStatus()&AliESDtrack::kTIME) == 0) return;
+ StartTimeIntegral();
+ Double_t times[10]; t.GetIntegratedTimes(times); SetIntegratedTimes(times);
+ SetIntegratedLength(t.GetIntegratedLength());
+}
+
//_____________________________________________________________________________
AliTPCtrack::AliTPCtrack(const AliTPCtrack& t) : AliKalmanTrack(t) {
//-----------------------------------------------------------------
track->SetLabel(GetLabel());
track->SetX(fX, fAlpha);
track->SetNClusters(GetNumberOfClusters(), GetChi2());
- track->SetTime(fIntegratedTime, fIntegratedLength);
+ Double_t times[10];
+ GetIntegratedTimes(times);
+ track->SetTime(times, GetIntegratedLength());
- track->SetMass(fMass);
- track->SetdEdX(fdEdx);
+ track->SetMass(GetMass());
+ track->SetdEdX(GetdEdx());
track->SetNWrongClusters(fNWrong);
track->SetNRotate(fNRotation);
return (dy*r00*dy + 2*r01*dy*dz + dz*r11*dz)/det;
}
+Double_t AliTPCtrack::GetYat(Double_t xk) const {
+//-----------------------------------------------------------------
+// This function calculates the Y-coordinate of a track at the plane x=xk.
+//-----------------------------------------------------------------
+ Double_t c1=fP4*fX - fP2, r1=TMath::Sqrt(1.- c1*c1);
+ Double_t c2=fP4*xk - fP2, r2=TMath::Sqrt(1.- c2*c2);
+ return fP0 + (xk-fX)*(c1+c2)/(r1+r2);
+}
+
//_____________________________________________________________________________
Int_t AliTPCtrack::PropagateTo(Double_t xk,Double_t x0,Double_t rho) {
//-----------------------------------------------------------------