]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/AliRsnCutV0.h
Implemented method to select std 2011 ESD quality cuts + added cut for TRD/noTRD...
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutV0.h
1 #ifndef ALIRSNCUTV0_H
2 #define ALIRSNCUTV0_H
3
4 #include <TMath.h>
5 #include <TString.h>
6
7 #include "AliRsnCut.h"
8 #include "AliPIDResponse.h"
9
10 #include "AliRsnCutTrackQuality.h"
11
12 class AliESDtrack;
13 class AliAODTrack;
14
15
16 class AliRsnCutV0 : public AliRsnCut {
17
18 public:
19
20
21    AliRsnCutV0(const char *name = "AliRsnCutV0", Int_t hypothesis = kLambda0, AliPID::EParticleType pid = AliPID::kProton, AliPID::EParticleType pid2 = AliPID::kPion);
22    AliRsnCutV0(const AliRsnCutV0 &copy);
23    AliRsnCutV0 &operator=(const AliRsnCutV0 &copy);
24    virtual ~AliRsnCutV0() { }
25
26    void           SetESDtrackCuts(AliESDtrackCuts *cuts)   {fESDtrackCuts = cuts;}
27    void           SetHypothesis(Int_t code);
28    void           SetTolerance(Double_t value)             {fTolerance = value;}
29    void           SetMaxDCAVertex(Double_t value)          {fMaxDCAVertex = value;}
30    void           SetMinCosPointingAngle(Double_t value)   {fMinCosPointAngle = value;}
31    void           SetMaxDaughtersDCA(Double_t value)       {fMaxDaughtersDCA = value;}
32    void           SetMinTPCcluster(Int_t value)            {fMinTPCcluster = value;}
33    void           SetMaxRapidity(Double_t value)           {fMaxRapidity = value;}
34    void           SetDCARPtFormula(const char *formula)    {fDCARptFormula = formula;}
35    
36    void           SetPIDCutProton(Double_t value)          {fPIDCutProton = value;}
37    void           SetPIDCutPion(Double_t value)            {fPIDCutPion = value;}
38   
39
40    AliRsnCutTrackQuality *CutQuality()                     {return &fCutQuality;}
41    void           SetAODTestFilterBit(Int_t value)         {fAODTestFilterBit = value;}
42    Int_t          GetAODTestFilterBit()                    {return fAODTestFilterBit;}
43
44    virtual Bool_t IsSelected(TObject *obj);
45    virtual void   Print(const Option_t *option = "") const;
46
47 protected:
48
49    Bool_t      CheckESD(AliESDv0 *track);
50    Bool_t      CheckAOD(AliAODv0 *track);
51
52    
53    Int_t            fHypothesis;       // PDG code corresponding to expected V0 hypothesis
54    Double_t         fMass;             // mass corresponding to hypothesis
55    Double_t         fTolerance;        // tolerance in the difference between computed and expected mass
56    Double_t         fMaxDCAVertex;     // max allowed DCA from primary vertex
57    Double_t         fMinCosPointAngle; // min allowed cosine of pointing angle
58    Double_t         fMaxDaughtersDCA;  // max allowed DCA between the two daughers
59    Int_t            fMinTPCcluster;    // min allowed TOC cluster
60    Double_t         fMaxRapidity;      // max allowed V0 rapidity
61    TString          fDCARptFormula;    // min DCAR pt dependent formula
62    
63    AliPID::EParticleType fPID;         // PID for track
64    AliPID::EParticleType fPID2;        // PID for track
65
66    Double_t         fPIDCutProton;          // nsigmas for protons
67    Double_t         fPIDCutPion;          // nsigmas for pions
68    
69    AliESDtrackCuts *fESDtrackCuts;     // quality cuts for v0 daughters
70    
71    AliRsnCutTrackQuality fCutQuality;  // track quality cut
72    
73    Int_t            fAODTestFilterBit; // test filter bit for AODs
74    
75    ClassDef(AliRsnCutV0, 1)
76 };
77
78 //__________________________________________________________________________________________________
79 inline void AliRsnCutV0::SetHypothesis(Int_t code)
80 {
81 //
82 // Assign a V0 species hypothesis, which also assign the expected mass
83 //
84
85    fHypothesis = code;
86
87    switch (fHypothesis) {
88       case kLambda0:
89          fMass = 1.11568;
90          break;
91       case kLambda0Bar:
92          fMass = 1.11568;
93          break;
94       case kK0Short:
95          fMass = 0.497614;
96          break;
97       default:
98          AliError(Form("You are setting an unexpected hypothesis: %d", fHypothesis));
99          fMass = 1E20;
100    }
101 }
102
103 #endif