ROOT logo
#ifndef ALIRSNCUTV0_H
#define ALIRSNCUTV0_H

#include <TMath.h>
#include <TString.h>

#include "AliRsnCut.h"
#include "AliPIDResponse.h"

#include "AliRsnCutTrackQuality.h"

class AliESDtrack;
class AliAODTrack;


class AliRsnCutV0 : public AliRsnCut {

public:


   AliRsnCutV0(const char *name = "AliRsnCutV0", Int_t hypothesis = kLambda0, AliPID::EParticleType pid = AliPID::kProton, AliPID::EParticleType pid2 = AliPID::kPion);
   AliRsnCutV0(const AliRsnCutV0 &copy);
   AliRsnCutV0 &operator=(const AliRsnCutV0 &copy);
   virtual ~AliRsnCutV0() { }

   void           SetESDtrackCuts(AliESDtrackCuts *cuts)   {fESDtrackCuts = cuts;}
   void           SetHypothesis(Int_t code);
   void           SetTolerance(Double_t value)             {fTolerance = value;}
   void           SetMaxDCAVertex(Double_t value)          {fMaxDCAVertex = value;}
   void           SetMinCosPointingAngle(Double_t value)   {fMinCosPointAngle = value;}
   void           SetMaxDaughtersDCA(Double_t value)       {fMaxDaughtersDCA = value;}
   void           SetMinTPCcluster(Int_t value)            {fMinTPCcluster = value;}
   void           SetMaxRapidity(Double_t value)           {fMaxRapidity = value;}
   
   void           SetPIDCutProton(Double_t value)          {fPIDCutProton = value;}
   void           SetPIDCutPion(Double_t value)            {fPIDCutPion = value;}
  

   AliRsnCutTrackQuality *CutQuality()                     {return &fCutQuality;}
   void           SetAODTestFilterBit(Int_t value)         {fAODTestFilterBit = value;}
   Int_t          GetAODTestFilterBit()                    {return fAODTestFilterBit;}

   virtual Bool_t IsSelected(TObject *obj);
   virtual void   Print(const Option_t *option = "") const;

protected:

   Bool_t      CheckESD(AliESDv0 *track);
   Bool_t      CheckAOD(AliAODv0 *track);

   
   Int_t            fHypothesis;       // PDG code corresponding to expected V0 hypothesis
   Double_t         fMass;             // mass corresponding to hypothesis
   Double_t         fTolerance;        // tolerance in the difference between computed and expected mass
   Double_t         fMaxDCAVertex;     // max allowed DCA from primary vertex
   Double_t         fMinCosPointAngle; // min allowed cosine of pointing angle
   Double_t         fMaxDaughtersDCA;  // max allowed DCA between the two daughers
   Int_t            fMinTPCcluster;    // min allowed TOC cluster
   Double_t         fMaxRapidity;      // max allowed V0 rapidity
   
   AliPID::EParticleType fPID;         // PID for track
   AliPID::EParticleType fPID2;        // PID for track

   Double_t         fPIDCutProton;        // nsigmas for protons
   Double_t         fPIDCutPion;          // nsigmas for pions
   
   AliESDtrackCuts *fESDtrackCuts;     // quality cuts for v0 daughters
   
   AliRsnCutTrackQuality fCutQuality;  // track quality cut
   
   Int_t            fAODTestFilterBit; // test filter bit for AODs
   
   ClassDef(AliRsnCutV0, 1)
};

//__________________________________________________________________________________________________
inline void AliRsnCutV0::SetHypothesis(Int_t code)
{
//
// Assign a V0 species hypothesis, which also assign the expected mass
//

   fHypothesis = code;

   switch (fHypothesis) {
      case kLambda0:
         fMass = 1.11568;
         break;
      case kLambda0Bar:
         fMass = 1.11568;
         break;
      case kK0Short:
         fMass = 0.497614;
         break;
      default:
         AliError(Form("You are setting an unexpected hypothesis: %d", fHypothesis));
         fMass = 1E20;
   }
}

#endif
 AliRsnCutV0.h:1
 AliRsnCutV0.h:2
 AliRsnCutV0.h:3
 AliRsnCutV0.h:4
 AliRsnCutV0.h:5
 AliRsnCutV0.h:6
 AliRsnCutV0.h:7
 AliRsnCutV0.h:8
 AliRsnCutV0.h:9
 AliRsnCutV0.h:10
 AliRsnCutV0.h:11
 AliRsnCutV0.h:12
 AliRsnCutV0.h:13
 AliRsnCutV0.h:14
 AliRsnCutV0.h:15
 AliRsnCutV0.h:16
 AliRsnCutV0.h:17
 AliRsnCutV0.h:18
 AliRsnCutV0.h:19
 AliRsnCutV0.h:20
 AliRsnCutV0.h:21
 AliRsnCutV0.h:22
 AliRsnCutV0.h:23
 AliRsnCutV0.h:24
 AliRsnCutV0.h:25
 AliRsnCutV0.h:26
 AliRsnCutV0.h:27
 AliRsnCutV0.h:28
 AliRsnCutV0.h:29
 AliRsnCutV0.h:30
 AliRsnCutV0.h:31
 AliRsnCutV0.h:32
 AliRsnCutV0.h:33
 AliRsnCutV0.h:34
 AliRsnCutV0.h:35
 AliRsnCutV0.h:36
 AliRsnCutV0.h:37
 AliRsnCutV0.h:38
 AliRsnCutV0.h:39
 AliRsnCutV0.h:40
 AliRsnCutV0.h:41
 AliRsnCutV0.h:42
 AliRsnCutV0.h:43
 AliRsnCutV0.h:44
 AliRsnCutV0.h:45
 AliRsnCutV0.h:46
 AliRsnCutV0.h:47
 AliRsnCutV0.h:48
 AliRsnCutV0.h:49
 AliRsnCutV0.h:50
 AliRsnCutV0.h:51
 AliRsnCutV0.h:52
 AliRsnCutV0.h:53
 AliRsnCutV0.h:54
 AliRsnCutV0.h:55
 AliRsnCutV0.h:56
 AliRsnCutV0.h:57
 AliRsnCutV0.h:58
 AliRsnCutV0.h:59
 AliRsnCutV0.h:60
 AliRsnCutV0.h:61
 AliRsnCutV0.h:62
 AliRsnCutV0.h:63
 AliRsnCutV0.h:64
 AliRsnCutV0.h:65
 AliRsnCutV0.h:66
 AliRsnCutV0.h:67
 AliRsnCutV0.h:68
 AliRsnCutV0.h:69
 AliRsnCutV0.h:70
 AliRsnCutV0.h:71
 AliRsnCutV0.h:72
 AliRsnCutV0.h:73
 AliRsnCutV0.h:74
 AliRsnCutV0.h:75
 AliRsnCutV0.h:76
 AliRsnCutV0.h:77
 AliRsnCutV0.h:78
 AliRsnCutV0.h:79
 AliRsnCutV0.h:80
 AliRsnCutV0.h:81
 AliRsnCutV0.h:82
 AliRsnCutV0.h:83
 AliRsnCutV0.h:84
 AliRsnCutV0.h:85
 AliRsnCutV0.h:86
 AliRsnCutV0.h:87
 AliRsnCutV0.h:88
 AliRsnCutV0.h:89
 AliRsnCutV0.h:90
 AliRsnCutV0.h:91
 AliRsnCutV0.h:92
 AliRsnCutV0.h:93
 AliRsnCutV0.h:94
 AliRsnCutV0.h:95
 AliRsnCutV0.h:96
 AliRsnCutV0.h:97
 AliRsnCutV0.h:98
 AliRsnCutV0.h:99
 AliRsnCutV0.h:100
 AliRsnCutV0.h:101