]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/RESONANCES/AliRsnCutPIDTPC.h
Implementation of all needed changes in the package in order to speed-up the executio...
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutPIDTPC.h
index 1adf97064aecd8b9f0efe86398f5cf1d88ba9fe2..395cd8f70160cbd8549aa5195b890783921ec988 100644 (file)
 
 #include "AliPID.h"
 
-#include "AliESDtrack.h"
-#include "AliESDtrackCuts.h"
-#include "AliESDpid.h"
-
-#include "AliAODpidUtil.h"
-
-#include "AliRsnDaughter.h"
 #include "AliRsnCut.h"
 
+class AliESDpid;
+class AliAODpidUtil;
+
 class AliRsnCutPIDTPC : public AliRsnCut {
 public:
 
@@ -37,8 +33,8 @@ public:
    AliRsnCutPIDTPC& operator=(const AliRsnCutPIDTPC& copy);
    virtual ~AliRsnCutPIDTPC() { }
 
-   AliESDpid*       ESDpid()  {return &fESDpid;}
-   AliAODpidUtil*   AODpid()  {return &fAODpid;}
+   AliESDpid*       ESDpid()  {return fESDpid;}
+   AliAODpidUtil*   AODpid()  {return fAODpid;}
 
    void             SetRejectOutside(Bool_t yn = kTRUE)           {fRejectOutside = yn;}
    void             SetMomentumRange(Double_t min, Double_t max)  {fMomMin = min; fMomMax = max;}
@@ -47,43 +43,21 @@ public:
    void             SetBBParam(Double_t *p)                       {SetBBParam(p[0], p[1], p[2], p[3], p[4]);}
    void             SetBBParam(Double_t p0, Double_t p1, Double_t p2, Double_t p3, Double_t p4);
 
-   Bool_t           IsTPC(AliVTrack *vtrack);
    virtual Bool_t   IsSelected(TObject *object);
    virtual void     Print(const Option_t *option = "") const;
 
 private:
 
-   void Initialize();
-
-   Bool_t          fInitialized;    // a mono-usage flag which initializes the ESD pid object
-   Bool_t          fRejectOutside;  // choose if tracks outside momentum range are rejected or not
-   Double_t        fMomMin;         // min p in range where this cut is checked
-   Double_t        fMomMax;         // max p in range where this cut is checked
-   EPARTYPE        fRefType;        // particle type for which PID is checked
-   AliESDpid       fESDpid;         // ESD PID object
-   AliAODpidUtil   fAODpid;         // AOD PID object
+   Bool_t          fRejectOutside;  //  choose if tracks outside momentum range are rejected or not
+   Double_t        fMomMin;         //  min p in range where this cut is checked
+   Double_t        fMomMax;         //  max p in range where this cut is checked
+   EPARTYPE        fRefType;        //  particle type for which PID is checked
+   AliESDpid      *fESDpid;         //! ESD PID object
+   AliAODpidUtil  *fAODpid;         //! AOD PID object
+   Double_t        fBB[5];          //  Bethe-Bloch parameters
+   
 
    ClassDef(AliRsnCutPIDTPC, 1)
 };
 
-inline Bool_t AliRsnCutPIDTPC::IsTPC(AliVTrack *vtrack)
-{
-//
-// Checks if the track has the status flags required for a global track
-//
-
-   if (!vtrack) {
-      AliWarning("NULL argument: impossible to check status");
-      return kFALSE;
-   }
-
-   Bool_t isTPCin     = ((vtrack->GetStatus() & AliESDtrack::kTPCin) != 0);
-   Bool_t isITSrefit  = ((vtrack->GetStatus() & AliESDtrack::kITSrefit) != 0);
-   Bool_t isITSpid    = ((vtrack->GetStatus() & AliESDtrack::kITSpid) != 0);
-
-   return (isTPCin && isITSrefit && isITSpid);
-
-   return kTRUE;
-}
-
 #endif