]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCtrack.h
Return the most probable momentum if the magnetic field is too weak and the momentum...
[u/mrichter/AliRoot.git] / TPC / AliTPCtrack.h
index 199078ceea8a5c1b087023c067466a085788f864..472830825c4dda65440765ba1660b2e42c1bc047 100644 (file)
@@ -26,7 +26,6 @@
 
 #include "AliTPCreco.h"
 #include "AliExternalTrackParam.h"
-class AliBarrelTrack;
 class AliESDtrack;
 
 //_____________________________________________________________________________
@@ -35,7 +34,6 @@ public:
   AliTPCtrack();
   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 AliESDtrack& t);
   AliTPCtrack(const AliTPCtrack& t);
   virtual ~AliTPCtrack() {}
@@ -52,8 +50,7 @@ public:
   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 (1e-9*TMath::Abs(fP4)/fP4 + fP4)*GetConvConst(); }
+  Double_t Get1Pt() const;
   Double_t GetTgl() const {return fP3;}
 
   Double_t GetSigmaY2() const {return fC00;}
@@ -75,15 +72,6 @@ public:
   void GetExternalCovariance(Double_t cov[15]) const ;
 
   // [SR, 01.04.2003]
-
-  void GetBarrelTrack(AliBarrelTrack *track)const;
-
-  void ResetNWrong() {fNWrong = 0;}
-  void ResetNRotation() {fNRotation = 0;}
-  
-  Int_t GetNWrong() const {return fNWrong;}
-  Int_t GetNRotation() const {return fNRotation;}
-
   Int_t GetNumber() const {return fNumber;}
   void  SetNumber(Int_t n) {fNumber = n;} 
   //
@@ -106,6 +94,7 @@ public:
   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();
+  void ResetClusters() {SetNumberOfClusters(0); SetChi2(0.);}
   void UpdatePoints();//update points 
   Float_t* GetPoints() {return fPoints;}
   //
@@ -118,9 +107,13 @@ public:
   Double_t GetD(Double_t x=0, Double_t y=0) const;
   AliExternalTrackParam & GetReference(){ return fReference;}
   void UpdateReference(){ new (&fReference) AliExternalTrackParam(*this);}
-  Int_t  GetKinkIndex(Int_t i) const{ return fKinkIndexes[i];}
+  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;}
 protected: 
+  void GetXYZ(Float_t r[3]) const;
+
   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.
@@ -142,8 +135,6 @@ protected:
   Int_t fIndex[kMaxRow];       // indices of associated clusters 
   Float_t fPoints[4];            //first, max dens row  end points of the track and max density
   //[SR, 01.04.2003]
-  Int_t fNWrong;         // number of wrong clusters
-  Int_t fNRotation;      // number of rotations
   Int_t fNumber;         // magic number used for number of clusters
   // MI addition
   Float_t fSdEdx;           // sigma of dedx 
@@ -159,15 +150,27 @@ protected:
   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
-  ClassDef(AliTPCtrack,1)   // Time Projection Chamber reconstructed tracks
+  Int_t    fV0Indexes[3];     // kink indexes - minus = mother + daughter
+
+  ClassDef(AliTPCtrack,2)   // Time Projection Chamber reconstructed tracks
 };
 
 inline 
 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();
+     x[0]=GetY(); x[1]=GetZ(); x[2]=GetSnp(); x[3]=GetTgl();
+     x[4]=(TMath::Sign(1e-9,fP4) + fP4)*GetLocalConvConst();
+}
+
+inline void AliTPCtrack::GetXYZ(Float_t r[3]) const {
+  //---------------------------------------------------------------------
+  // Returns the position of the track in the global coord. system 
+  //---------------------------------------------------------------------
+  Double_t cs=TMath::Cos(fAlpha), sn=TMath::Sin(fAlpha);
+  r[0]=fX*cs - fP0*sn; r[1]=fX*sn + fP0*cs; r[2]=fP1;
 }
 
+
 #endif