]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnCutKaonForPhi2010.h
Transparently create collections for runs with more than 15K files
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutKaonForPhi2010.h
CommitLineData
4e4fb2f6 1#ifndef ALIRSNCUTKAONFORPHI2010_H
2#define ALIRSNCUTKAONFORPHI2010_H
2895972e 3
4//
4e4fb2f6 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.
2895972e 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 = "");
4e4fb2f6 20 virtual ~AliRsnCutKaonForPhi2010() { }
2895972e 21
22 virtual Bool_t IsSelected(TObject *obj);
23
4e4fb2f6 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;}
2895972e 33
34private:
35
4e4fb2f6 36 Bool_t MatchTOF(const AliVTrack *vtrack);
2895972e 37
4e4fb2f6 38 Bool_t fOnlyQuality; // switch off PID
39 Bool_t fOnlyTPC; // use only TPC PID
40 Bool_t fOnlyTOF; // use only TOF PID
41 Double_t fCutTPC; // nsigma cut for TPC
42 Double_t fCutTOF; // nsigma cut fof TOF
43 Double_t fTOFthreshold; // for Pt above this threshold, TOF is mandatory
44 AliRsnCutTrackQuality fCutQuality; // track quality cut
2895972e 45
46 ClassDef(AliRsnCutKaonForPhi2010,1)
47
48};
49
50//__________________________________________________________________________________________________
4e4fb2f6 51inline Bool_t AliRsnCutKaonForPhi2010::MatchTOF(const AliVTrack *vtrack)
2895972e 52{
53//
54// Checks if the track has matched the TOF detector
55//
56
57 if (!vtrack) {
58 AliWarning("NULL argument: impossible to check status");
59 return kFALSE;
60 }
61
4e4fb2f6 62 Bool_t isTOFpid = ((vtrack->GetStatus() & AliESDtrack::kTOFpid) != 0);
2895972e 63 Bool_t isTOFout = ((vtrack->GetStatus() & AliESDtrack::kTOFout) != 0);
4e4fb2f6 64 Bool_t isTIME = ((vtrack->GetStatus() & AliESDtrack::kTIME) != 0);
2895972e 65
4e4fb2f6 66 return (isTOFout && isTIME && isTOFpid);
2895972e 67}
68
69#endif