]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDseedV1.h
New tracker by Markus and Alexandru
[u/mrichter/AliRoot.git] / TRD / AliTRDseedV1.h
index 8a3b1958cfd48ae9afd93ce24d6ea66327f4fe73..0e428d5633bd53ee8686e74cbaa811e54150f803 100644 (file)
 #include "AliTRDseed.h"
 #endif
 
+#ifndef ALIPID_H
+#include "AliPID.h"
+#endif
+
 #ifndef ALIRIEMAN_H
 #include "AliRieman.h"
 #endif
@@ -26,35 +30,54 @@ class AliRieman;
 class AliTRDstackLayer;
 class AliTRDcluster;
 class AliTRDrecoParam;
+class AliTRDtrack;
 
 class AliTRDseedV1 : public AliTRDseed
 {
 
- public:
+  public:
+
+       enum {
+         knSlices = 10
+       };
 
        AliTRDseedV1(Int_t layer = -1, AliTRDrecoParam *p=0x0);
        ~AliTRDseedV1();
-       AliTRDseedV1(const AliTRDseedV1 &ref, Bool_t owner=kFALSE);
+       AliTRDseedV1(const AliTRDseedV1 &ref);
        AliTRDseedV1& operator=(const AliTRDseedV1 &ref);
 
-       Bool_t  AttachClustersIter(AliTRDstackLayer *layer, Float_t quality, Bool_t kZcorr = kFALSE, AliTRDcluster *c=0x0);
-       Bool_t  AttachClustersProj(AliTRDstackLayer *layer, Float_t quality, Bool_t kZcorr = kFALSE, AliTRDcluster *c=0x0);
+       Bool_t  AttachClustersIter(AliTRDstackLayer *layer, Float_t quality, Bool_t kZcorr = kFALSE
+                                 , AliTRDcluster *c=0x0);
+       Bool_t  AttachClusters(AliTRDstackLayer *layer, Bool_t kZcorr = kFALSE);
+       void    CookdEdx(Int_t nslices);
        static  Float_t FitRiemanTilt(AliTRDseedV1 * cseed, Bool_t terror);
-       Bool_t  FitTracklet();
-       
-//             Bool_t  AttachClusters(Double_t *dx, Float_t quality, Bool_t kZcorr=kFALSE, AliTRDcluster *c=0x0);
-       inline Float_t GetChi2Z(const Float_t z = 0.) const;
-       inline Float_t GetChi2Y(const Float_t y = 0.) const;
-              Float_t GetQuality(Bool_t kZcorr) const;
-              Int_t   GetLayer() const                       { return fLayer;    }
-
-       inline void    Update(const AliRieman *rieman);
-               void    Print(Option_t * /*o*/) const          { }
-              void    Print();
+       Bool_t  Fit();
 
-              void    SetLayer(Int_t l)                      { fLayer     = l;   }
-              void    SetNTimeBins(Int_t nTB)                { fTimeBins  = nTB; }
-              void    SetRecoParam(AliTRDrecoParam *p)       { fRecoParam = p;   }
+              void      Init(AliTRDtrack *track);
+       inline void      Init(const AliRieman *fit);
+       
+       inline Float_t   GetChi2Z(const Float_t z = 0.) const;
+       inline Float_t   GetChi2Y(const Float_t y = 0.) const;
+              void      GetCovAt(Double_t x, Double_t *cov) const;
+              Float_t*  GetdEdx() {return &fdEdx[0];}
+              Double_t* GetdQdl() {return &fdQdl[0];}
+              Double_t  GetMomentum() const {return fMom;}
+              Int_t     GetN() const {return fN2;}
+              Float_t   GetQuality(Bool_t kZcorr) const;
+              Int_t     GetPlane() const                       { return fPlane;    }
+              Double_t* GetProbability();
+              Double_t  GetYat(Double_t x) const {return fYfitR[0] + fYfitR[1] * (x - fX0);}
+              Double_t  GetZat(Double_t x) const {return fZfitR[0] + fZfitR[1] * (x - fX0);}
+                                
+              Bool_t    IsOwner() const {return fOwner;}
+         void      Print(Option_t * /*o*/) const          { }
+              void      Print();
+              
+              void      SetdQdl(Double_t length);
+              void      SetMomentum(Double_t mom) {fMom = mom;}
+              void      SetOwner(Bool_t own = kTRUE);
+              void      SetPlane(Int_t p)                      { fPlane     = p;   }
+              void      SetRecoParam(AliTRDrecoParam *p)       { fRecoParam = p;   }
 
  protected:
 
@@ -62,12 +85,16 @@ class AliTRDseedV1 : public AliTRDseed
 
  private:
 
-       Int_t            fLayer;     //  layer for this seed
-       Int_t            fTimeBins;  //  local copy of the DB info
-       Bool_t           fOwner;     //  owner of the clusters
-       AliTRDrecoParam *fRecoParam; //! local copy of the reco params 
+       Int_t            fPlane;                  //  TRD plane
+       Bool_t           fOwner;                  //  Toggle ownership of clusters
+       Float_t          fMom;                    //  Momentum estimate for tracklet [GeV/c]
+       Float_t          fdEdx[knSlices];         //  dE/dx measurements for tracklet
+       Double_t         fdQdl[knTimebins];       //  dQ/dl for all clusters attached to tracklet 
+       Double_t         fdQ[knTimebins];         //! dQ for all clusters attached to tracklet TODO migrate to AliTRDcluster
+        Double_t         fProb[AliPID::kSPECIES]; //  PID probabilities
+       AliTRDrecoParam *fRecoParam;              //! Local copy of the reco params 
 
-       ClassDef(AliTRDseedV1, 1)    //  New TRD seed 
+       ClassDef(AliTRDseedV1, 1)                 //  New TRD seed 
 
 };
 
@@ -88,7 +115,7 @@ inline Float_t AliTRDseedV1::GetChi2Y(const Float_t y) const
 }
 
 //____________________________________________________________
-inline void AliTRDseedV1::Update(const AliRieman *rieman)
+inline void AliTRDseedV1::Init(const AliRieman *rieman)
 {
        fZref[0] = rieman->GetZat(fX0);
        fZref[1] = rieman->GetDZat(fX0);