]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDseedV1.h
1. Adding time dependent sigma - (important for v drift)
[u/mrichter/AliRoot.git] / TRD / AliTRDseedV1.h
index 9f7824188eff4ac0657fc9fa6fb982ca12d7a6a0..b7d3d127ef5c27ab610bfc37583500d3c146a055 100644 (file)
@@ -56,9 +56,10 @@ public:
   enum ETRDtrackletStatus {
     kOwner      = BIT(14) // owner of its clusters
    ,kRowCross   = BIT(15) // pad row cross tracklet
-   ,kCalib      = BIT(16) // calibrated tracklet
-   ,kKink       = BIT(17) // kink prolongation tracklet
-   ,kStandAlone = BIT(18)
+   ,kPID        = BIT(16) // PID contributor
+   ,kCalib      = BIT(17) // calibrated tracklet
+   ,kKink       = BIT(18) // kink prolongation tracklet
+   ,kStandAlone = BIT(19) // stand alone build tracklet
   };
 
   AliTRDseedV1(Int_t det = -1);
@@ -83,6 +84,7 @@ public:
   Bool_t    IsCalibrated() const     { return TestBit(kCalib);}
   Bool_t    IsOwner() const          { return TestBit(kOwner);}
   Bool_t    IsKink() const           { return TestBit(kKink);}
+  Bool_t    HasPID() const           { return TestBit(kPID);}
   Bool_t    IsOK() const             { return GetN() > 4 && GetNUsed() < 4;}
   Bool_t    IsRowCross() const       { return TestBit(kRowCross);}
   Bool_t    IsUsable(Int_t i) const  { return fClusters[i] && !fClusters[i]->IsUsed();}
@@ -100,7 +102,7 @@ public:
   static Double_t GetCovInv(Double_t *c, Double_t *d);
   Float_t   GetdX() const            { return fdX;}
   Float_t*  GetdEdx()                { return &fdEdx[0];}
-  Float_t   GetdQdl(Int_t ic) const;
+  Float_t   GetdQdl(Int_t ic, Float_t *dx=0x0) const;
   Float_t   GetdYdX() const          { return fYfit[1]; } 
   Float_t   GetdZdX() const          { return fZref[1]; }
   Int_t     GetdY() const            { return Int_t(GetY()/0.014);}
@@ -110,7 +112,7 @@ public:
   AliTRDcluster*  GetClusters(Int_t i) const               { return i<0 || i>=kNclusters ? 0x0 : fClusters[i];}
   Int_t     GetIndexes(Int_t i) const{ return i<0 || i>=kNclusters ? -1 : fIndexes[i];}
   Int_t     GetLabels(Int_t i) const { return fLabels[i];}  
-  inline Float_t GetMomentum(Float_t *err = 0x0) const;
+  Float_t   GetMomentum(Float_t *err = 0x0) const;
   Int_t     GetN() const             { return (Int_t)fN&0x1f;}
   Int_t     GetN2() const            { return GetN();}
   Int_t     GetNUsed() const         { return Int_t((fN>>5)&0x1f);}
@@ -155,7 +157,8 @@ public:
   inline void SetCovRef(const Double_t *cov);
   void      SetIndexes(Int_t i, Int_t idx) { fIndexes[i]  = idx; }
   void      SetLabels(Int_t *lbls)   { memcpy(fLabels, lbls, 3*sizeof(Int_t)); }
-  void      SetKink(Bool_t k)        { SetBit(kKink, k);}
+  void      SetKink(Bool_t k = kTRUE){ SetBit(kKink, k);}
+  void      SetPID(Bool_t k = kTRUE) { SetBit(kPID, k);}
   void      SetStandAlone(Bool_t st) { SetBit(kStandAlone, st); }
   void      SetPt(Double_t pt)       { fPt = pt;}
   void      SetOwner();
@@ -246,16 +249,6 @@ inline Float_t AliTRDseedV1::GetChi2Phi() const
   return s2 > 0. ? dphi/s2 : 0.; 
 }
 
-//____________________________________________________________
-inline Float_t AliTRDseedV1::GetMomentum(Float_t *err) const      
-{ 
-  Double_t tgl2 = fZref[1]*fZref[1];
-  if(err){
-    Double_t s2 = tgl2*fRefCov[4]/fPt/(1.+tgl2)+2.*fZref[1]*fRefCov[5]/fPt+(1.+tgl2)*fRefCov[6];
-    (*err) = TMath::Sqrt(s2);
-  }
-  return fPt*TMath::Sqrt(1.+fZref[1]*fZref[1]);
-}
 
 
 //____________________________________________________________