]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliKalmanTrack.h
Corrected detector name (Mario)
[u/mrichter/AliRoot.git] / STEER / AliKalmanTrack.h
index b23c84534bdd92bbe217213a142b25dc031d12dc..e76538f9ff7cbaae0b466512107d6bd1f4d0d69f 100644 (file)
@@ -4,57 +4,97 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
+/* $Id$ */
+
 //-------------------------------------------------------------------------
 //                          Class AliKalmanTrack
-//
-//         Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
+//      fixed the interface for the derived reconstructed track classes 
+//            Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch 
 //-------------------------------------------------------------------------
 
-#include <TObject.h>
+#include "AliExternalTrackParam.h"
+#include "AliLog.h"
+#include "AliPID.h"
 
 class AliCluster;
 
-class AliKalmanTrack : public TObject {
+class AliKalmanTrack : public AliExternalTrackParam {
 public:
-  AliKalmanTrack() { fLab=-3141593; fChi2=0; fN=0; }
-  AliKalmanTrack(const AliKalmanTrack &t) {fLab=t.fLab;fChi2=t.fChi2;fN=t.fN;}
+  AliKalmanTrack();
+  AliKalmanTrack(const AliKalmanTrack &t);
   virtual ~AliKalmanTrack(){};
+  AliKalmanTrack& operator=(const AliKalmanTrack &o);
   void SetLabel(Int_t lab) {fLab=lab;}
 
+  virtual Double_t GetPredictedChi2(const AliCluster *c) const = 0;
+  virtual Bool_t PropagateTo(Double_t xr, Double_t x0, Double_t rho) = 0;
+  virtual Bool_t Update(const AliCluster* c, Double_t chi2, Int_t index) = 0;
+
   Bool_t   IsSortable() const {return kTRUE;}
   Int_t    GetLabel()   const {return fLab;}
   Double_t GetChi2()    const {return fChi2;}
+  Double_t GetMass()    const {return fMass;}
   Int_t    GetNumberOfClusters() const {return fN;}
-  virtual Int_t GetClusterIndex(Int_t i) const { //reserved for AliTracker
-    printf("AliKalmanTrack::GetClusterIndex(Int_t i) must be overloaded !\n");
+  virtual Int_t GetClusterIndex(Int_t) const { //reserved for AliTracker
+    AliWarning("Method must be overloaded !\n");
     return 0;
   } 
+  virtual Int_t GetNumberOfTracklets() const {
+    AliWarning("Method must be overloaded !");
+    return 0;
+  }
+  virtual Int_t GetTrackletIndex(Int_t) const { //reserved for AliTracker
+    AliWarning("Method must be overloaded !");
+    return -1;
+  } 
+  virtual Double_t GetPIDsignal() const {
+    AliWarning("Method must be overloaded !\n");
+    return 0.;
+  }
+
+  virtual Int_t Compare(const TObject *) const {return 0;} 
+
+  void GetExternalParameters(Double_t &xr,Double_t p[5]) const {
+    xr=GetX();
+    for (Int_t i=0; i<5; i++) p[i]=GetParameter()[i];
+  }
+  void GetExternalCovariance(Double_t cov[15]) const {
+    for (Int_t i=0; i<15; i++) cov[i]=GetCovariance()[i];
+  }
+
+  // Time integration (S.Radomski@gsi.de)
+  void StartTimeIntegral();
+  void SetIntegratedLength(Double_t l) {fIntegratedLength=l;}
+  void SetIntegratedTimes(const Double_t *times);
+
+  Bool_t IsStartedTimeIntegral() const {return fStartTimeIntegral;}
+  void AddTimeStep(Double_t length);
+  void GetIntegratedTimes(Double_t *times) const;
+  Double_t GetIntegratedTime(Int_t pdg) const;
+  Double_t GetIntegratedLength() const {return fIntegratedLength;}
 
-  virtual Int_t Compare(const TObject *o) const=0; 
-
-  virtual void GetExternalParameters(Double_t &xr, Double_t x[5]) const=0;
-  virtual void GetExternalCovariance(Double_t cov[15]) const=0;
-
-  virtual Double_t GetPredictedChi2(const AliCluster *cluster) const=0;
-  virtual 
-  Int_t PropagateTo(Double_t xr,Double_t x0,Double_t rho,Double_t pm)=0;
-  virtual Int_t Update(const AliCluster* c, Double_t chi2, UInt_t i)=0;
+  void SetNumberOfClusters(Int_t n) {fN=n;} 
 
-  static void SetConvConst(Double_t cc) {fConvConst=cc;}
-  Double_t GetConvConst() const {return fConvConst;}
+  void SetFakeRatio(Float_t ratio) {fFakeRatio=ratio;}
+  Float_t  GetFakeRatio()   const {return fFakeRatio;}
+  void SetMass(Double_t mass) {fMass=mass;}
 
 protected:
   void SetChi2(Double_t chi2) {fChi2=chi2;} 
-  void SetNumberOfClusters(Int_t n) {fN=n;} 
 
-private: 
+  Double32_t fFakeRatio;  // fake ratio
+  Double32_t fChi2;       // total chi2 value for this track
+  Double32_t fMass;       // mass hypothesis
   Int_t fLab;             // track label
-  Double_t fChi2;         // total chi2 value for this track
   Int_t fN;               // number of associated clusters
 
-  static Double_t fConvConst; //conversion constant cm -> GeV/c
-
-  ClassDef(AliKalmanTrack,1)    // Reconstructed track
+private:
+  Bool_t  fStartTimeIntegral;       // indicator wether integrate time
+  // variables for time integration (S.Radomski@gsi.de)
+  Double32_t fIntegratedTime[AliPID::kSPECIES];       // integrated time
+  Double32_t fIntegratedLength;        // integrated length
+  
+  ClassDef(AliKalmanTrack,7)    // Reconstructed track
 };
 
 #endif