]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PWGLF/RESONANCES/AliRsnCutPion2010PP.h
Completed changes needed because of previous commit
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutPion2010PP.h
... / ...
CommitLineData
1#ifndef ALIRSNCUTPION2010PP_H
2#define ALIRSNCUTPION2010PP_H
3
4//
5// All cuts for single pions in phi analysis 2010,
6// based on track quality and particle identification
7// with TPC and TOF.
8//
9
10#include "AliVTrack.h"
11#include "AliRsnCut.h"
12#include "AliRsnCutTrackQuality.h"
13
14class AliRsnCutPion2010PP : public AliRsnCut {
15
16public:
17
18 AliRsnCutPion2010PP(const char *name = "");
19 virtual ~AliRsnCutPion2010PP() { }
20
21 virtual Bool_t IsSelected(TObject *obj);
22
23 AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
24
25private:
26
27 Bool_t MatchTOF(const AliVTrack *vtrack);
28
29 AliRsnCutTrackQuality fCutQuality; // track quality cut
30
31 ClassDef(AliRsnCutPion2010PP,1)
32
33};
34
35//__________________________________________________________________________________________________
36inline Bool_t AliRsnCutPion2010PP::MatchTOF(const AliVTrack *vtrack)
37{
38//
39// Checks if the track has matched the TOF detector
40//
41
42 if (!vtrack) {
43 AliWarning("NULL argument: impossible to check status");
44 return kFALSE;
45 }
46
47 Bool_t isTOFout = ((vtrack->GetStatus() & AliESDtrack::kTOFout) != 0);
48 Bool_t isTIME = ((vtrack->GetStatus() & AliESDtrack::kTIME) != 0);
49
50 return (isTOFout && isTIME);
51}
52
53#endif