Fix for PAR library
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutDaughterKStar2010PP.h
CommitLineData
de957967 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
15class AliRsnCutDaughterKStar2010PP : public AliRsnCut {
16
17public:
18
19 AliRsnCutDaughterKStar2010PP(const char *name = "", AliPID::EParticleType pid = AliPID::kPion);
20 virtual ~AliRsnCutDaughterKStar2010PP() { }
21
c31027eb 22 void SetNoPID(Bool_t yn = kTRUE) {fNoPID = yn;}
23
de957967 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
29private:
30
c31027eb 31 Bool_t fNoPID; // flag to switch off PID check
32
de957967 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//__________________________________________________________________________________________________
41inline 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