]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/AliRsnCutDaughterKStar2010PP.h
Modified macros for TOF analysis of K* in pA for possibility to use daughter's pt...
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutDaughterKStar2010PP.h
1 #ifndef ALIRSNCUTDAUGHTERKSTAR2010PP_H
2 #define ALIRSNCUTDAUGHTERKSTAR2010PP_H
3
4 //
5 // Cuts for selecting good pion candidates for K* analysis
6 // with the data samples from pp runs in 2010.
7 // Applies track quality selection plus PID selection,
8 // with different tolerance ranges depending on the momentum.
9 //
10
11 #include "AliVTrack.h"
12 #include "AliRsnCut.h"
13 #include "AliRsnCutTrackQuality.h"
14
15 class AliRsnCutDaughterKStar2010PP : public AliRsnCut {
16
17 public:
18
19    AliRsnCutDaughterKStar2010PP(const char *name = "", AliPID::EParticleType pid = AliPID::kPion);
20    virtual ~AliRsnCutDaughterKStar2010PP() { }
21
22    void                   SetNoPID(Bool_t yn = kTRUE)        {fNoPID = yn;}
23
24    void                   SetPID(AliPID::EParticleType type) {fPID = type;}
25    AliRsnCutTrackQuality *CutQuality()                       {return &fCutQuality;}
26    Bool_t                 MatchTOF(const AliVTrack *vtrack);
27    virtual Bool_t         IsSelected(TObject *obj);
28
29 private:
30
31    Bool_t                fNoPID;            // flag to switch off PID check
32
33    AliPID::EParticleType fPID;              // PID for track
34    AliRsnCutTrackQuality fCutQuality;       // track quality cut
35
36    ClassDef(AliRsnCutDaughterKStar2010PP,1) // cut definitions for K*
37
38 };
39
40 //__________________________________________________________________________________________________
41 inline Bool_t AliRsnCutDaughterKStar2010PP::MatchTOF(const AliVTrack *vtrack)
42 {
43 //
44 // Checks if the track has matched the TOF detector
45 //
46
47    if (!vtrack) {
48       AliWarning("NULL argument: impossible to check status");
49       return kFALSE;
50    }
51
52    if (!(vtrack->GetStatus() & AliESDtrack::kTOFout)) return kFALSE;
53    if (!(vtrack->GetStatus() & AliESDtrack::kTIME  )) return kFALSE;
54
55    return kTRUE;
56 }
57
58 #endif