]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIRSNCUTKAONFORPHI2010_H | |
2 | #define ALIRSNCUTKAONFORPHI2010_H | |
3 | ||
4 | // | |
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. | |
9 | // | |
10 | ||
11 | #include "AliVTrack.h" | |
12 | #include "AliRsnCut.h" | |
13 | #include "AliRsnCutTrackQuality.h" | |
14 | ||
15 | class AliRsnCutKaonForPhi2010 : public AliRsnCut { | |
16 | ||
17 | public: | |
18 | ||
19 | enum ECutMode { | |
20 | kQuality = 0, | |
21 | kOnlyTPC, | |
22 | kOnlyTOF, | |
23 | kDefaultPID, | |
24 | kModes | |
25 | }; | |
26 | ||
27 | AliRsnCutKaonForPhi2010(const char *name = "", Double_t nSigmaTPC = 3.0, Double_t nSigmaTOF = 3.0, Double_t tofLimit = 0.8); | |
28 | AliRsnCutKaonForPhi2010(const AliRsnCutKaonForPhi2010 ©); | |
29 | AliRsnCutKaonForPhi2010 &operator=(const AliRsnCutKaonForPhi2010 ©); | |
30 | virtual ~AliRsnCutKaonForPhi2010() { } | |
31 | ||
32 | virtual Bool_t IsSelected(TObject *obj); | |
33 | ||
34 | AliRsnCutTrackQuality *CutQuality() {return &fCutQuality;} | |
35 | Double_t GetTOFthreshold() const {return fTOFthreshold;} | |
36 | AliPIDResponse *MyPID() {return fMyPID;} | |
37 | ||
38 | void SetMode(ECutMode mode) {fMode = mode;} | |
39 | void SetCutTPC(Double_t cut) {fCutTPC = cut;} | |
40 | void SetCutTOF(Double_t cut) {fCutTOF = cut;} | |
41 | void SetTOFthreshold(Double_t value) {fTOFthreshold = value;} | |
42 | ||
43 | void InitMyPID(Bool_t isMC, Bool_t isESD); | |
44 | Bool_t MatchTOF(const AliVTrack *vtrack); | |
45 | ||
46 | private: | |
47 | ||
48 | ECutMode fMode; // how the cut is applied | |
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 | |
52 | AliPIDResponse *fMyPID; // PID response object to be configured manyally | |
53 | AliRsnCutTrackQuality fCutQuality; // track quality cut | |
54 | ||
55 | ClassDef(AliRsnCutKaonForPhi2010,1) | |
56 | ||
57 | }; | |
58 | ||
59 | //__________________________________________________________________________________________________ | |
60 | inline Bool_t AliRsnCutKaonForPhi2010::MatchTOF(const AliVTrack *vtrack) | |
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 | ||
71 | if (!(vtrack->GetStatus() & AliESDtrack::kTOFout)) return kFALSE; | |
72 | if (!(vtrack->GetStatus() & AliESDtrack::kTIME )) return kFALSE; | |
73 | ||
74 | return kTRUE; | |
75 | } | |
76 | ||
77 | #endif |