]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnCutKaonForPhi2010.h
Fixes
[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
0efb7042 19 AliRsnCutKaonForPhi2010(const char *name = "", Double_t nSigmaTPC = 3.0, Double_t nSigmaTOF = 3.0, Double_t tofLimit = 0.8);
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
3dced4f8 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);
2895972e 34
35private:
36
4e4fb2f6 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
2895972e 44
45 ClassDef(AliRsnCutKaonForPhi2010,1)
46
47};
48
49//__________________________________________________________________________________________________
4e4fb2f6 50inline Bool_t AliRsnCutKaonForPhi2010::MatchTOF(const AliVTrack *vtrack)
2895972e 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
3dced4f8 61 if (!(vtrack->GetStatus() & AliESDtrack::kTOFout)) return kFALSE;
62 if (!(vtrack->GetStatus() & AliESDtrack::kTIME )) return kFALSE;
2895972e 63
3dced4f8 64 return kTRUE;
2895972e 65}
66
67#endif