]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/RESONANCES/AliRsnCutKaonForPhi2010PP.h
Classes for 'mini' subpackage for RSN analysis framework
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / AliRsnCutKaonForPhi2010PP.h
CommitLineData
110620ce 1#ifndef AliRsnCutKaonForPhi2010PP_H
2#define AliRsnCutKaonForPhi2010PP_H
3
4//
5// All cuts for single kaons in phi analysis 2010
6//
7
8#include "AliVTrack.h"
9#include "AliRsnCut.h"
10#include "AliRsnCutTrackQuality.h"
11
12class AliRsnCutKaonForPhi2010PP : public AliRsnCut {
13
14public:
15
16 AliRsnCutKaonForPhi2010PP(const char *name = "");
17
18 void SetTPCNSigmaLow (Double_t v) {fNSigmaTPCLow = v;}
19 void SetTPCNSigmaHigh(Double_t v) {fNSigmaTPCHigh = v;}
20 void SetTPCLimit(Double_t v) {fLimitTPC = v;}
21 void SetTOFNSigma(Double_t v) {fNSigmaTOF = v;}
22
23 virtual Bool_t IsSelected(TObject *obj);
24
25 AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
26
27private:
28
29 Bool_t MatchTOF(AliVTrack *vtrack);
30
31 Double_t fNSigmaTPCLow; // TPC: nsigma cut below limit
32 Double_t fNSigmaTPCHigh; // TPC: nsigma cut above limit
33 Double_t fLimitTPC; // TPC: momentum limit
34 Double_t fNSigmaTOF; // TOF: nsigma cut (unique)
35
36 AliRsnCutTrackQuality fCutQuality; // track quality cut
37
38 ClassDef(AliRsnCutKaonForPhi2010PP,1)
39
40};
41
42//__________________________________________________________________________________________________
43inline Bool_t AliRsnCutKaonForPhi2010PP::MatchTOF(AliVTrack *vtrack)
44{
45//
46// Checks if the track has matched the TOF detector
47//
48
49 if (!vtrack) {
50 AliWarning("NULL argument: impossible to check status");
51 return kFALSE;
52 }
53
54 Bool_t isTOFout = ((vtrack->GetStatus() & AliESDtrack::kTOFout) != 0);
55 Bool_t isTIME = ((vtrack->GetStatus() & AliESDtrack::kTIME) != 0);
56
57 return (isTOFout && isTIME);
58}
59
60#endif