]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/RESONANCES/AliRsnCutKaonForPhi2010PP.h
updated macros for Sigma* analysis (M- Venaruzzo)
[u/mrichter/AliRoot.git] / PWGLF / RESONANCES / AliRsnCutKaonForPhi2010PP.h
1 #ifndef ALIRSNCUTKAONFORPHI2010PP_H
2 #define ALIRSNCUTKAONFORPHI2010PP_H
3
4 //
5 // This cut implements all the checks done to accept a track as a Kaon
6 // for the pp 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
15 class AliRsnCutKaonForPhi2010PP : public AliRsnCut {
16
17 public:
18
19    AliRsnCutKaonForPhi2010PP(const char *name = "");
20    AliRsnCutKaonForPhi2010PP(const AliRsnCutKaonForPhi2010PP &copy);
21    AliRsnCutKaonForPhi2010PP &operator=(const AliRsnCutKaonForPhi2010PP &copy);
22    virtual ~AliRsnCutKaonForPhi2010PP() { }
23
24    void           SetTPCNSigmaLow (Double_t v) {fNSigmaTPCLow  = v;}
25    void           SetTPCNSigmaHigh(Double_t v) {fNSigmaTPCHigh = v;}
26    void           SetTPCLimit(Double_t v)      {fLimitTPC      = v;}
27    void           SetTOFNSigma(Double_t v)     {fNSigmaTOF     = v;}
28
29    virtual Bool_t IsSelected(TObject *obj);
30    void           InitMyPID(Bool_t isMC, Bool_t isESD);
31
32    AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
33    AliPIDResponse        *MyPID()      {return fMyPID;}
34
35 private:
36
37    Bool_t MatchTOF(const AliVTrack *vtrack);
38
39    Double_t              fNSigmaTPCLow;   // TPC: nsigma cut below limit
40    Double_t              fNSigmaTPCHigh;  // TPC: nsigma cut above limit
41    Double_t              fLimitTPC;       // TPC: momentum limit
42    Double_t              fNSigmaTOF;      // TOF: nsigma cut (unique)
43
44    AliPIDResponse       *fMyPID;          // PID response object to be configured manyally
45    AliRsnCutTrackQuality fCutQuality;     // track quality cut
46
47    ClassDef(AliRsnCutKaonForPhi2010PP,1)
48
49 };
50
51 //__________________________________________________________________________________________________
52 inline Bool_t AliRsnCutKaonForPhi2010PP::MatchTOF(const AliVTrack *vtrack)
53 {
54 //
55 // Checks if the track has matched the TOF detector
56 //
57
58    if (!vtrack) {
59       AliWarning("NULL argument: impossible to check status");
60       return kFALSE;
61    }
62
63    Bool_t isTOFout = ((vtrack->GetStatus() & AliESDtrack::kTOFout) != 0);
64    Bool_t isTIME   = ((vtrack->GetStatus() & AliESDtrack::kTIME) != 0);
65
66    return (isTOFout && isTIME);
67 }
68
69 #endif