Changes for #82873: Module debugging broken (Christian)
[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
22 void SetPID(AliPID::EParticleType type) {fPID = type;}
23 AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
24 Bool_t MatchTOF(const AliVTrack *vtrack);
25 virtual Bool_t IsSelected(TObject *obj);
26
27private:
28
29 AliPID::EParticleType fPID; // PID for track
30 AliRsnCutTrackQuality fCutQuality; // track quality cut
31
32 ClassDef(AliRsnCutDaughterKStar2010PP,1) // cut definitions for K*
33
34};
35
36//__________________________________________________________________________________________________
37inline Bool_t AliRsnCutDaughterKStar2010PP::MatchTOF(const AliVTrack *vtrack)
38{
39//
40// Checks if the track has matched the TOF detector
41//
42
43 if (!vtrack) {
44 AliWarning("NULL argument: impossible to check status");
45 return kFALSE;
46 }
47
48 if (!(vtrack->GetStatus() & AliESDtrack::kTOFout)) return kFALSE;
49 if (!(vtrack->GetStatus() & AliESDtrack::kTIME )) return kFALSE;
50
51 return kTRUE;
52}
53
54#endif