]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/AliRsnCutKaonForPhi2010PP.h
Add Reaction Plane
[u/mrichter/AliRoot.git] / PWG2 / 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    virtual ~AliRsnCutKaonForPhi2010PP() { }
21    
22    void           SetTPCNSigmaLow (Double_t v) {fNSigmaTPCLow  = v;}
23    void           SetTPCNSigmaHigh(Double_t v) {fNSigmaTPCHigh = v;}
24    void           SetTPCLimit(Double_t v)      {fLimitTPC      = v;}
25    void           SetTOFNSigma(Double_t v)     {fNSigmaTOF     = v;}
26    
27    virtual Bool_t IsSelected(TObject *obj);
28    
29    AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;}
30
31 private:
32
33    Bool_t MatchTOF(const AliVTrack *vtrack);
34    
35    Double_t              fNSigmaTPCLow;   // TPC: nsigma cut below limit
36    Double_t              fNSigmaTPCHigh;  // TPC: nsigma cut above limit
37    Double_t              fLimitTPC;       // TPC: momentum limit 
38    Double_t              fNSigmaTOF;      // TOF: nsigma cut (unique)
39
40    AliRsnCutTrackQuality fCutQuality;     // track quality cut
41
42    ClassDef(AliRsnCutKaonForPhi2010PP,1)
43
44 };
45
46 //__________________________________________________________________________________________________
47 inline Bool_t AliRsnCutKaonForPhi2010PP::MatchTOF(const AliVTrack *vtrack)
48 {
49 //
50 // Checks if the track has matched the TOF detector
51 //
52
53    if (!vtrack) {
54       AliWarning("NULL argument: impossible to check status");
55       return kFALSE;
56    }
57
58    Bool_t isTOFout = ((vtrack->GetStatus() & AliESDtrack::kTOFout) != 0);
59    Bool_t isTIME   = ((vtrack->GetStatus() & AliESDtrack::kTIME) != 0);
60
61    return (isTOFout && isTIME);
62 }
63
64 #endif