/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-/* $Id$ */
-
//-------------------------------------------------------
// TPC Track Class
//
// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
//-------------------------------------------------------
-#include <TObject.h>
+/*****************************************************************************
+ * December 18, 2000 *
+ * Internal view of the TPC track parametrisation as well as the order of *
+ * track parameters are subject for possible changes ! *
+ * Use GetExternalParameters() and GetExternalCovariance() to access TPC *
+ * track information regardless of its internal representation. *
+ * This formation is now fixed in the following way: *
+ * external param0: local Y-coordinate of a track (cm) *
+ * external param1: local Z-coordinate of a track (cm) *
+ * external param2: local sine of the track momentum azimuth angle *
+ * external param3: tangent of the track momentum dip angle *
+ * external param4: 1/pt (1/(GeV/c)) *
+ *****************************************************************************/
+
+#include <AliKalmanTrack.h>
#include <TMath.h>
-#include <iostream.h>
+
+#include "AliTPCreco.h"
class AliTPCClustersArray;
class AliTPCcluster;
//_____________________________________________________________________________
-class AliTPCtrack : public TObject {
+class AliTPCtrack : public AliKalmanTrack {
public:
- AliTPCtrack();
- AliTPCtrack(UInt_t index, const Double_t xx[5],
- const Double_t cc[15], Double_t xr, Double_t alpha);
- AliTPCtrack(const AliTPCtrack& t);
- Int_t Compare(TObject *o);
- Int_t PropagateTo(Double_t xr,
- Double_t x0=28.94,Double_t rho=0.9e-3,Double_t pm=0.139);
- void PropagateToVertex(
- Double_t x0=36.66,Double_t rho=1.2e-3,Double_t pm=0.139);
- void Update(const AliTPCcluster* c, Double_t chi2, UInt_t i);
- Int_t Rotate(Double_t angle);
- void CookLabel(AliTPCClustersArray *carray);
- void SetLabel(Int_t lab=0);
- void SetdEdx(Float_t dedx);
-
- Double_t GetPredictedChi2(const AliTPCcluster *cluster) const;
- Bool_t IsSortable() const;
- Int_t GetLabel() const;
- void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const;
- Float_t GetdEdx() const;
- Double_t GetX() const;
- Double_t GetY() const;
- Double_t GetZ() const;
- Double_t GetC() const;
- Double_t GetEta() const;
- Double_t GetTgl() const;
- Double_t GetPt() const;
- Double_t GetP() const;
- void GetCovariance(Double_t cov[15]) const;
- Double_t GetSigmaY2() const;
- Double_t GetSigmaZ2() const;
- Double_t GetSigmaC2() const;
- Double_t GetSigmaTgl2() const;
- Double_t GetAlpha() const;
- Double_t GetChi2() const;
- Int_t GetNumberOfClusters() const;
- void GetCluster(Int_t i, Int_t &sec, Int_t &row, Int_t &ncl) const;
-
-protected:
- Short_t fN; // number of clusters
-private:
- Int_t fLab; // track label
- Double_t fChi2; // total chi2 value for this track
- Float_t fdEdx; // dE/dx
-
- Double_t fAlpha; // rotation angle
- Double_t fX; // X-coordinate of this track (reference plane)
-
- Double_t fY; // Y-coordinate of the track
- Double_t fZ; // Z-coordinate of the track
- Double_t fC; // track curvature
- Double_t fE; // C*x0
- Double_t fT; // tangent of the track dip angle
-
- Double_t fCyy; // covariance
- Double_t fCzy, fCzz; // matrix
- Double_t fCcy, fCcz, fCcc; // of the
- Double_t fCey, fCez, fCec, fCee; // track
- Double_t fCty, fCtz, fCtc, fCte, fCtt; // parameters
-
- UInt_t fIndex[200]; // (((row<<8)+sec)<<16)+index
-
- ClassDef(AliTPCtrack,1) // Time Projection Chamber reconstructed tracks
+ AliTPCtrack():AliKalmanTrack(){}
+ AliTPCtrack(UInt_t index, const Double_t xx[5],
+ const Double_t cc[15], Double_t xr, Double_t alpha);
+ AliTPCtrack(const AliKalmanTrack& t, Double_t alpha);
+ AliTPCtrack(const AliTPCtrack& t);
+ Int_t PropagateToVertex(Double_t x0=36.66,Double_t rho=1.2e-3);
+ Int_t Rotate(Double_t angle);
+ void SetdEdx(Double_t dedx) {fdEdx=dedx;}
+
+ Double_t GetX() const {return fX;}
+ Double_t GetAlpha() const {return fAlpha;}
+ Double_t GetdEdx() const {return fdEdx;}
+
+ Double_t GetY() const {return fP0;}
+ Double_t GetZ() const {return fP1;}
+ Double_t GetSnp() const {return fX*fP4 - fP2;}
+ Double_t Get1Pt() const {return fP4*GetConvConst();}
+ Double_t GetTgl() const {return fP3;}
+
+ Double_t GetSigmaY2() const {return fC00;}
+ Double_t GetSigmaZ2() const {return fC11;}
+
+ Int_t Compare(const TObject *o) const;
+
+ void GetExternalParameters(Double_t& xr, Double_t x[5]) const ;
+ void GetExternalCovariance(Double_t cov[15]) const ;
+
+ Int_t GetClusterIndex(Int_t i) const {return fIndex[i];}
+
+//******** To be removed next release !!! **************
+ Double_t GetEta() const {return fP2;}
+ Double_t GetC() const {return fP4;}
+ void GetCovariance(Double_t cc[15]) const {
+ cc[0 ]=fC00;
+ cc[1 ]=fC10; cc[2 ]=fC11;
+ cc[3 ]=fC20; cc[4 ]=fC21; cc[5 ]=fC22;
+ cc[6 ]=fC40; cc[7 ]=fC41; cc[8 ]=fC42; cc[9 ]=fC44;
+ cc[10]=fC30; cc[11]=fC31; cc[12]=fC32; cc[13]=fC43; cc[14]=fC33;
+ }
+//******************************************************
+
+ virtual Double_t GetPredictedChi2(const AliCluster *cluster) const;
+ Int_t PropagateTo(Double_t xr,Double_t x0=28.94,Double_t rho=0.9e-3);
+ Int_t Update(const AliCluster* c, Double_t chi2, UInt_t i);
+ void ResetCovariance();
+
+private:
+ Double_t fX; // X-coordinate of this track (reference plane)
+ Double_t fAlpha; // Rotation angle the local (TPC sector)
+ // coordinate system and the global ALICE one.
+
+ Double_t fdEdx; // dE/dx
+
+ Double_t fP0; // Y-coordinate of a track
+ Double_t fP1; // Z-coordinate of a track
+ Double_t fP2; // C*x0
+ Double_t fP3; // tangent of the track momentum dip angle
+ Double_t fP4; // track curvature
+
+ Double_t fC00; // covariance
+ Double_t fC10, fC11; // matrix
+ Double_t fC20, fC21, fC22; // of the
+ Double_t fC30, fC31, fC32, fC33; // track
+ Double_t fC40, fC41, fC42, fC43, fC44; // parameters
+
+ UInt_t fIndex[kMaxRow]; // indices of associated clusters
+
+ ClassDef(AliTPCtrack,1) // Time Projection Chamber reconstructed tracks
};
-inline AliTPCtrack::AliTPCtrack() {
- //default contructor
- fN=0;
-}
-
-inline void AliTPCtrack::SetLabel(Int_t lab) {
- //just to calm down our rule checker
- fLab=lab;
-}
-
-inline void AliTPCtrack::SetdEdx(Float_t dedx) {
- //just to calm down our rule checker
- fdEdx=dedx;
-}
-
-inline Bool_t AliTPCtrack::IsSortable() const {
- //just to calm down our rule checker
- return kTRUE;
-}
-
-inline Int_t AliTPCtrack::GetLabel() const {
- //just to calm down our rule checker
- return fLab;
-}
-
-inline Float_t AliTPCtrack::GetdEdx() const {
- //just to calm down our rule checker
- return fdEdx;
-}
-
-inline Double_t AliTPCtrack::GetX() const {
- //just to calm down our rule checker
- return fX;
-}
-
-inline Double_t AliTPCtrack::GetY() const {
- //just to calm down our rule checker
- return fY;
-}
-
-inline Double_t AliTPCtrack::GetZ() const {
- //just to calm down our rule checker
- return fZ;
-}
-
-inline Double_t AliTPCtrack::GetC() const {
- //just to calm down our rule checker
- return fC;
-}
-
-inline Double_t AliTPCtrack::GetEta() const {
- //just to calm down our rule checker
- return fE;
-}
-
-inline Double_t AliTPCtrack::GetTgl() const {
- //just to calm down our rule checker
- return fT;
-}
-
-inline Double_t AliTPCtrack::GetPt() const {
- //just to calm down our rule checker
- return 0.299792458*0.2/GetC()/100;
-}
-
-inline Double_t AliTPCtrack::GetP() const {
- //just to calm down our rule checker
- return TMath::Abs(GetPt())*sqrt(1.+GetTgl()*GetTgl());
-}
-
-inline Double_t AliTPCtrack::GetSigmaY2() const {
- //just to calm down our rule checker
- return fCyy;
-}
-
-inline Double_t AliTPCtrack::GetSigmaZ2() const {
- //just to calm down our rule checker
- return fCzz;
-}
-
-inline Double_t AliTPCtrack::GetSigmaC2() const {
- //just to calm down our rule checker
- return fCcc;
-}
-
-inline Double_t AliTPCtrack::GetSigmaTgl2() const {
- //just to calm down our rule checker
- return fCtt;
-}
-
-inline Double_t AliTPCtrack::GetAlpha() const {
- //just to calm down our rule checker
- return fAlpha;
-}
-
-inline Double_t AliTPCtrack::GetChi2() const {
- //just to calm down our rule checker
- return fChi2;
-}
-
-inline Int_t AliTPCtrack::GetNumberOfClusters() const {
- //just to calm down our rule checker
- return fN;
-}
-
inline
-void AliTPCtrack::GetCluster(Int_t i,Int_t &sec,Int_t &row,Int_t &ncl) const {
- //just to calm down our rule checker
- Int_t index=fIndex[i];
- sec=(index&0xff000000)>>24;
- row=(index&0x00ff0000)>>16;
- ncl=(index&0x0000ffff)>>00;
+void AliTPCtrack::GetExternalParameters(Double_t& xr, Double_t x[5]) const {
+ //---------------------------------------------------------------------
+ // This function return external TPC track representation
+ //---------------------------------------------------------------------
+ xr=fX;
+ x[0]=GetY(); x[1]=GetZ(); x[2]=GetSnp(); x[3]=GetTgl(); x[4]=Get1Pt();
}
#endif