]>
Commit | Line | Data |
---|---|---|
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 |
61f275d1 | 6 | // for the PbPb analysis using 2010 runs. |
4e4fb2f6 | 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 | ||
15 | class AliRsnCutKaonForPhi2010 : public AliRsnCut { | |
16 | ||
17 | public: | |
18 | ||
739706ae | 19 | enum ECutMode { |
20 | kQuality = 0, | |
21 | kOnlyTPC, | |
22 | kOnlyTOF, | |
23 | kDefaultPID, | |
24 | kModes | |
25 | }; | |
26 | ||
0efb7042 | 27 | AliRsnCutKaonForPhi2010(const char *name = "", Double_t nSigmaTPC = 3.0, Double_t nSigmaTOF = 3.0, Double_t tofLimit = 0.8); |
739706ae | 28 | AliRsnCutKaonForPhi2010(const AliRsnCutKaonForPhi2010 ©); |
61f275d1 | 29 | AliRsnCutKaonForPhi2010 &operator=(const AliRsnCutKaonForPhi2010 ©); |
4e4fb2f6 | 30 | virtual ~AliRsnCutKaonForPhi2010() { } |
61f275d1 | 31 | |
2895972e | 32 | virtual Bool_t IsSelected(TObject *obj); |
61f275d1 | 33 | |
4e4fb2f6 | 34 | AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;} |
35 | Double_t GetTOFthreshold() const {return fTOFthreshold;} | |
739706ae | 36 | AliPIDResponse *MyPID() {return fMyPID;} |
61f275d1 | 37 | |
739706ae | 38 | void SetMode(ECutMode mode) {fMode = mode;} |
3dced4f8 | 39 | void SetCutTPC(Double_t cut) {fCutTPC = cut;} |
40 | void SetCutTOF(Double_t cut) {fCutTOF = cut;} | |
739706ae | 41 | void SetTOFthreshold(Double_t value) {fTOFthreshold = value;} |
61f275d1 | 42 | |
739706ae | 43 | void InitMyPID(Bool_t isMC, Bool_t isESD); |
3dced4f8 | 44 | Bool_t MatchTOF(const AliVTrack *vtrack); |
2895972e | 45 | |
46 | private: | |
47 | ||
739706ae | 48 | ECutMode fMode; // how the cut is applied |
4e4fb2f6 | 49 | Double_t fCutTPC; // nsigma cut for TPC |
50 | Double_t fCutTOF; // nsigma cut fof TOF | |
51 | Double_t fTOFthreshold; // for Pt above this threshold, TOF is mandatory | |
739706ae | 52 | AliPIDResponse *fMyPID; // PID response object to be configured manyally |
4e4fb2f6 | 53 | AliRsnCutTrackQuality fCutQuality; // track quality cut |
2895972e | 54 | |
55 | ClassDef(AliRsnCutKaonForPhi2010,1) | |
56 | ||
57 | }; | |
58 | ||
59 | //__________________________________________________________________________________________________ | |
4e4fb2f6 | 60 | inline Bool_t AliRsnCutKaonForPhi2010::MatchTOF(const AliVTrack *vtrack) |
2895972e | 61 | { |
62 | // | |
63 | // Checks if the track has matched the TOF detector | |
64 | // | |
65 | ||
66 | if (!vtrack) { | |
67 | AliWarning("NULL argument: impossible to check status"); | |
68 | return kFALSE; | |
69 | } | |
70 | ||
3dced4f8 | 71 | if (!(vtrack->GetStatus() & AliESDtrack::kTOFout)) return kFALSE; |
72 | if (!(vtrack->GetStatus() & AliESDtrack::kTIME )) return kFALSE; | |
2895972e | 73 | |
3dced4f8 | 74 | return kTRUE; |
2895972e | 75 | } |
76 | ||
77 | #endif |