]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/RESONANCES/AliRsnCutPion2010PP.h
Fix for coverity 24399, 24400, 24401
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutPion2010PP.h
CommitLineData
4e4fb2f6 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() { }
61f275d1 20
4e4fb2f6 21 virtual Bool_t IsSelected(TObject *obj);
61f275d1 22
4e4fb2f6 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