]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TPC/AliTPCtrack.h
AliTPCSensorTemp: sensor positions updated according to ALICE-EN-2005-001
[u/mrichter/AliRoot.git] / TPC / AliTPCtrack.h
index e05077a6bc92377ad3d0905cec51dc64da073a63..be5d47faf4a4489ec7236403432591b232a555f3 100644 (file)
 //
 //   Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
 //
-//                        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))                                  
+// 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>
 
 #include "AliTPCreco.h"
 #include "AliExternalTrackParam.h"
-class AliBarrelTrack;
 class AliESDtrack;
+class AliESDVertex;
 
 //_____________________________________________________________________________
 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(Double_t x, Double_t alpha, const Double_t p[5], 
+              const Double_t cov[15], Int_t index); 
   AliTPCtrack(const AliESDtrack& t);
   AliTPCtrack(const AliTPCtrack& t);
   virtual ~AliTPCtrack() {}
-  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 GetYat(Double_t x) const ;
-  Double_t GetX()     const {return fX;}
-  Double_t GetAlpha() const {return fAlpha;}
-  Double_t GetdEdx()  const {return fdEdx;}
-  Double_t GetPIDsignal()  const {return GetdEdx();}
-
-  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 GetTgl() const {return fP3;}
-
-  Double_t GetSigmaY2() const {return fC00;}
-  Double_t GetSigmaZ2() const {return fC11;}
-
-// Some methods useful for users. Implementation is not
-// optimized for speed but for minimal maintanance effort
-  Double_t Phi() const;
-  Double_t Theta() const {return TMath::Pi()/2.-TMath::ATan(GetTgl());}
-  Double_t Px() const {return TMath::Cos(Phi())/TMath::Abs(Get1Pt());}
-  Double_t Py() const {return TMath::Sin(Phi())/TMath::Abs(Get1Pt());}
-  Double_t Pz() const {return GetTgl()/TMath::Abs(Get1Pt());}
-  Double_t Pt() const {return 1./TMath::Abs(Get1Pt());}
-  Double_t P() const {return TMath::Sqrt(Pt()*Pt()+Pz()*Pz());}
 
   Int_t Compare(const TObject *o) const;
 
-  void GetExternalParameters(Double_t& xr, Double_t x[5]) const ;
-  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;} 
-  //
+  void SetdEdx(Double_t dedx) {fdEdx=dedx;}
+  Double_t GetdEdx()  const {return fdEdx;}
+  Double_t GetPIDsignal()  const {return GetdEdx();}
 
   Int_t GetClusterIndex(Int_t i) const {return fIndex[i];}
+  void  SetClusterIndex(Int_t i, Int_t idx) {fIndex[i]=idx;}
 
-//******** 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;
-  }
-//****************************************************** 
+  Double_t GetC() const {return AliExternalTrackParam::GetC(GetBz());}
 
-  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();
+  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;}
-  //
-  //  TClonesArray * fHelixIn;    //array of helixes  
-  //TClonesArray * fHelixOut;   //array of helixes 
-  //
+
   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 GetZat0() const;
-  Double_t GetD(Double_t x=0, Double_t y=0) const;
+  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   GetKinkIndex(Int_t i) const{ return fKinkIndexes[i];}
   Int_t*  GetKinkIndexes() { return fKinkIndexes;}
-protected: 
-  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.
+  Int_t   GetV0Index(Int_t i) const{ return fV0Indexes[i];}
+  Int_t*  GetV0Indexes() { return fV0Indexes;}
+
+  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 GetBz() const;
   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
-
   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 +109,10 @@ 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
 
-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();
-}
+  ClassDef(AliTPCtrack,3)   // Time Projection Chamber reconstructed tracks
+};
 
 #endif