]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PWG2/RESONANCES/AliRsnCutKaonForPhi2010.h
further mem leak fix
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutKaonForPhi2010.h
... / ...
CommitLineData
1#ifndef ALIRSNCUTKAONFORPHI2010_H
2#define ALIRSNCUTKAONFORPHI2010_H
3
4//
5// This cut implements all the checks done to accept a track as a Kaon
6// for the PbPb analysis using 2010 runs.
7// It is based on standard cuts on track quality and nsigma cuts
8// with respect to the TPC and TOF signals for the PID.
9//
10
11#include "AliVTrack.h"
12#include "AliRsnCut.h"
13#include "AliRsnCutTrackQuality.h"
14
15class AliRsnCutKaonForPhi2010 : public AliRsnCut {
16
17public:
18
19 AliRsnCutKaonForPhi2010(const char *name = "");
20 virtual ~AliRsnCutKaonForPhi2010() { }
21
22 virtual Bool_t IsSelected(TObject *obj);
23
24 AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
25 Double_t GetTOFthreshold() const {return fTOFthreshold;}
26
27 void SetTOFthreshold(Double_t value) {fTOFthreshold = value;}
28 void SetOnlyQuality(Bool_t yn = kTRUE) {fOnlyQuality = yn;}
29 void SetOnlyTPC(Bool_t yn = kTRUE) {fOnlyTPC = yn;}
30 void SetOnlyTOF(Bool_t yn = kTRUE) {fOnlyTOF = yn;}
31 void SetCutTPC(Double_t cut) {fCutTPC = cut;}
32 void SetCutTOF(Double_t cut) {fCutTOF = cut;}
33 Bool_t MatchTOF(const AliVTrack *vtrack);
34
35private:
36
37 Bool_t fOnlyQuality; // switch off PID
38 Bool_t fOnlyTPC; // use only TPC PID
39 Bool_t fOnlyTOF; // use only TOF PID
40 Double_t fCutTPC; // nsigma cut for TPC
41 Double_t fCutTOF; // nsigma cut fof TOF
42 Double_t fTOFthreshold; // for Pt above this threshold, TOF is mandatory
43 AliRsnCutTrackQuality fCutQuality; // track quality cut
44
45 ClassDef(AliRsnCutKaonForPhi2010,1)
46
47};
48
49//__________________________________________________________________________________________________
50inline Bool_t AliRsnCutKaonForPhi2010::MatchTOF(const AliVTrack *vtrack)
51{
52//
53// Checks if the track has matched the TOF detector
54//
55
56 if (!vtrack) {
57 AliWarning("NULL argument: impossible to check status");
58 return kFALSE;
59 }
60
61 if (!(vtrack->GetStatus() & AliESDtrack::kTOFout)) return kFALSE;
62 if (!(vtrack->GetStatus() & AliESDtrack::kTIME )) return kFALSE;
63
64 return kTRUE;
65}
66
67#endif