#define ALITPCTRACK_H
/* 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
+//
+// The track parameterization is fixed in the following way:
+// param0: local Y-coordinate of a track (cm)
+// param1: local Z-coordinate of a track (cm)
+// param2: local sine of the track momentum azimuth angle
+// param3: tangent of the track momentum dip angle
+// param4: 1/pt (1/(GeV/c))
+//
//-------------------------------------------------------
#include <AliKalmanTrack.h>
#include <TMath.h>
-class AliTPCClustersArray;
-class AliTPCcluster;
-
+#include "AliTPCreco.h"
+#include "AliExternalTrackParam.h"
+class AliESDtrack;
+class AliESDVertex;
+class TTreeSRedirector;
//_____________________________________________________________________________
class AliTPCtrack : public AliKalmanTrack {
public:
- AliTPCtrack():AliKalmanTrack(){}
- AliTPCtrack(UInt_t index, const Double_t xx[5],
- const Double_t cc[15], Double_t xr, Double_t alpha);
+ AliTPCtrack();
+ AliTPCtrack(Double_t x, Double_t alpha, const Double_t p[5],
+ const Double_t cov[15], Int_t index);
+ AliTPCtrack(const AliESDtrack& t, TTreeSRedirector *pcstream=0);
AliTPCtrack(const AliTPCtrack& t);
- Int_t PropagateToVertex(
- Double_t x0=36.66,Double_t rho=1.2e-3,Double_t pm=0.139);
- Int_t Rotate(Double_t angle);
- void CookLabel(AliTPCClustersArray *carray);
- void SetdEdx(Float_t dedx) {fdEdx=dedx;}
-
- Float_t GetdEdx() const {return fdEdx;}
- Double_t GetX() const {return fX;}
- Double_t GetY() const {return fP0;}
- Double_t GetZ() const {return fP1;}
- Double_t GetEta() const {return fP2;}
- Double_t GetC() const {return fP3;}
- Double_t GetTgl() const {return fP4;}
- Double_t GetSigmaY2() const {return fC00;}
- Double_t GetSigmaZ2() const {return fC11;}
- Double_t GetSigmaC2() const {return fC33;}
- Double_t GetAlpha() const {return fAlpha;}
- void GetCluster(Int_t i, Int_t &sec, Int_t &row, Int_t &ncl) const;
-
- Double_t GetPt() const {return 0.299792458*0.2/GetC()/100;}
- Double_t GetP() const {return TMath::Abs(GetPt())*
- TMath::Sqrt(1.+GetTgl()*GetTgl());}
- void GetPxPyPz(Double_t &px, Double_t &py, Double_t &pz) const;
- Int_t PropagateTo(Double_t xr,
- Double_t x0=28.94,Double_t rho=0.9e-3,Double_t pm=0.139);
- void Update(const AliCluster* c, Double_t chi2, UInt_t i);
+ AliTPCtrack& operator=(const AliTPCtrack& o);
+ virtual ~AliTPCtrack() {}
-protected:
- UInt_t fIndex[200]; // indices of associated clusters
+ Int_t Compare(const TObject *o) const;
- Float_t fdEdx; // dE/dx
+ void SetdEdx(Double_t dedx) {fdEdx=dedx;}
+ Double_t GetdEdx() const {return fdEdx;}
+ Double_t GetPIDsignal() const {return GetdEdx();}
- Double_t fAlpha; // rotation angle
- Double_t fX; // X-coordinate of this track (reference plane)
+ Int_t GetClusterIndex(Int_t i) const {return fIndex[i];}
+ void SetClusterIndex(Int_t i, Int_t idx) {fIndex[i]=idx;}
- ClassDef(AliTPCtrack,1) // Time Projection Chamber reconstructed tracks
-};
+ Double_t GetC() const {return AliExternalTrackParam::GetC(GetBz());}
+ Double_t GetC(Double_t b) const {return AliExternalTrackParam::GetC(b);}
+ Double_t GetPredictedChi2(const AliCluster *cluster) const;
+ Bool_t PropagateTo(Double_t xr, Double_t rho=0.9e-3, Double_t x0=28.94);
+ Bool_t Update(const AliCluster *c, Double_t chi2, Int_t i);
+ Bool_t Rotate(Double_t alpha) {
+ return AliExternalTrackParam::Rotate(GetAlpha()+alpha);
+ }
+
+ Bool_t PropagateToVertex(const AliESDVertex *v,
+ Double_t rho=1.2e-3, Double_t x0=36.66);
+ void ResetClusters() {SetNumberOfClusters(0); SetChi2(0.);}
+ void UpdatePoints();//update points
+ Float_t* GetPoints() {return fPoints;}
-inline
-void AliTPCtrack::GetCluster(Int_t i,Int_t &sec,Int_t &row,Int_t &ncl) const {
- //return sector, pad row and the index of the i-th cluster of this track
- Int_t index=fIndex[i];
- sec=(index&0xff000000)>>24;
- row=(index&0x00ff0000)>>16;
- ncl=(index&0x0000ffff)>>00;
-}
+ Float_t Density(Int_t row0, Int_t row1); //calculate cluster density
+ Float_t Density2(Int_t row0, Int_t row1); //calculate cluster density
+ Double_t GetD(Double_t x=0, Double_t y=0) const {
+ return AliExternalTrackParam::GetD(x,y,GetBz());
+ }
+ AliExternalTrackParam & GetReference(){ return fReference;}
+ void UpdateReference(){ new (&fReference) AliExternalTrackParam(*this);}
+ Int_t GetKinkIndex(Int_t i) const{ return fKinkIndexes[i];}
+ Int_t* GetKinkIndexes() { return fKinkIndexes;}
+ Int_t GetV0Index(Int_t i) const{ return fV0Indexes[i];}
+ Int_t* GetV0Indexes() { return fV0Indexes;}
-#endif
+ void SetFirstPoint(Int_t f) {fFirstPoint=f;}
+ void SetLastPoint(Int_t f) {fLastPoint=f;}
+ void SetRemoval(Int_t f) {fRemoval=f;}
+ void SetLab2(Int_t f) {fLab2=f;}
+ void SetKinkIndex(Int_t i, Int_t idx) {fKinkIndexes[i]=idx;}
+ void SetBConstrain(Bool_t b) {fBConstrain=b;}
+ void SetNFoundable(Int_t n) {fNFoundable=n;}
+ void SetNShared(Int_t s) {fNShared=s;}
+
+ Int_t GetFirstPoint() const {return fFirstPoint;}
+ Int_t GetLastPoint() const {return fLastPoint;}
+ Int_t GetRemoval() const {return fRemoval;}
+ Int_t GetLab2() const {return fLab2;}
+ Bool_t GetBConstrain() const {return fBConstrain;}
+ Int_t GetNShared() const {return fNShared;}
+ Int_t GetNFoundable() const {return fNFoundable;}
+protected:
+ Double_t fdEdx; // dE/dx
+
+ Int_t fIndex[kMaxRow]; // indices of associated clusters
+ Float_t fPoints[4]; //first, max dens row end points of the track and max density
+ // MI addition
+ Float_t fSdEdx; // sigma of dedx
+ //
+ Int_t fNFoundable; //number of foundable clusters - dead zone taken to the account
+ Bool_t fBConstrain; // indicate seeding with vertex constrain
+ Int_t fLastPoint; // last cluster position
+ Int_t fFirstPoint; // first cluster position
+ Int_t fRemoval; // removal factor
+ Int_t fTrackType; // track type - 0 - normal - 1 - kink - 2 -V0 3- double found
+ Int_t fLab2; // index of corresponding track (kink, V0, double)
+ Int_t fNShared; // number of shared points
+ AliExternalTrackParam fReference; // track parameters at the middle of the chamber
+ Float_t fKinkPoint[12]; //radius, of kink, dfi and dtheta
+ Int_t fKinkIndexes[3]; // kink indexes - minus = mother + daughter
+ Int_t fV0Indexes[3]; // kink indexes - minus = mother + daughter
+
+ ClassDef(AliTPCtrack,4) // Time Projection Chamber reconstructed tracks
+};
+
+#endif