]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnCutProton2010PP.h
Updated macro for K* pA analysis
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutProton2010PP.h
CommitLineData
4e4fb2f6 1#ifndef ALIRSNCUTPROTON2010PP_H
2#define ALIRSNCUTPROTON2010PP_H
3
4//
5// All cuts for single Protons in phi analysis 2010,
6// based on quality and PID using the TPC and TOF
7// detectors, using default definitions for both
8// kinds of cuts, for ESD and AOD
9// Author: Serguey Kiselev
10//
11
12#include "AliVTrack.h"
13#include "AliRsnCut.h"
14#include "AliRsnCutTrackQuality.h"
15
16class AliRsnCutProton2010PP : public AliRsnCut {
17
18public:
19
20 AliRsnCutProton2010PP(const char *name = "");
24e5e337 21 virtual ~AliRsnCutProton2010PP() { }
61f275d1 22
4e4fb2f6 23 virtual Bool_t IsSelected(TObject *obj);
61f275d1 24
4e4fb2f6 25 AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
26
27private:
28
29 Bool_t MatchTOF(const AliVTrack *vtrack);
30
31 AliRsnCutTrackQuality fCutQuality; // track quality cut
32
33 ClassDef(AliRsnCutProton2010PP,1)
34
35};
36
37//__________________________________________________________________________________________________
38inline Bool_t AliRsnCutProton2010PP::MatchTOF(const AliVTrack *vtrack)
39{
40//
41// Checks if the track has matched the TOF detector
42//
43
44 if (!vtrack) {
45 AliWarning("NULL argument: impossible to check status");
46 return kFALSE;
47 }
48
49 Bool_t isTOFout = ((vtrack->GetStatus() & AliESDtrack::kTOFout) != 0);
50 Bool_t isTIME = ((vtrack->GetStatus() & AliESDtrack::kTIME) != 0);
51
52 return (isTOFout && isTIME);
53}
54
55#endif