]>
Commit | Line | Data |
---|---|---|
659ef4f0 | 1 | // |
2 | // *** Class AliRsnCutPIDITS *** | |
3 | // | |
4 | // This class implements all cuts which have to be used for the 2010 runs | |
5 | // for phi and generic resonance analysis. | |
6 | // It contains an AliESDtrackCuts object for track quality selection | |
7 | // and some criteria for particle identification with ITS, ITS and TOF. | |
8 | // | |
9 | // authors: Martin Vala (martin.vala@cern.ch) | |
10 | // Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it) | |
11 | // | |
12 | ||
13 | #ifndef ALIRSNCUTPIDITS_H | |
14 | #define ALIRSNCUTPIDITS_H | |
15 | ||
16 | #include "AliPID.h" | |
17 | #include "AliVTrack.h" | |
18 | #include "AliESDpid.h" | |
19 | #include "AliAODpidUtil.h" | |
20 | #include "AliRsnCut.h" | |
21 | ||
22 | class AliRsnCutPIDITS : public AliRsnCut | |
23 | { | |
24 | public: | |
25 | ||
26 | AliRsnCutPIDITS(const char *name = "cutPIDITS", AliPID::EParticleType type = AliPID::kKaon, Bool_t fIsMC = kFALSE, Double_t momLimit = 0.0, Double_t cut1 = 3.0, Double_t cut2 = 3.0); | |
27 | AliRsnCutPIDITS(const AliRsnCutPIDITS& copy); | |
28 | AliRsnCutPIDITS& operator=(const AliRsnCutPIDITS& copy); | |
29 | virtual ~AliRsnCutPIDITS() { } | |
30 | ||
31 | AliESDpid* GetESDpid() {return &fESDpid;} | |
32 | void SetPIDType(AliPID::EParticleType t) {fPIDtype = t;} | |
33 | ||
34 | void SetMC(Bool_t yn = kTRUE); | |
35 | void SetMomentumLimit(Double_t v) {fMomentumLimit = v;} | |
36 | void SetLargeCut(Double_t v) {fLargeCut = v;} | |
37 | void SetSmallCut(Double_t v) {fSmallCut = v;} | |
38 | ||
39 | virtual Bool_t IsSelected(TObject *object); | |
40 | virtual void Print(const Option_t *option = "") const; | |
41 | ||
42 | protected: | |
43 | ||
44 | Bool_t IsITSTPC (AliVTrack *d); // check that the track is TPC+ITS | |
45 | Bool_t IsITSSA (AliVTrack *d); // check that the track is ITS standalone | |
46 | ||
47 | AliPID::EParticleType fPIDtype; // PID reference type used for checks | |
48 | ||
49 | Bool_t fIsMC; // to know what settings must be used | |
50 | Double_t fMomentumLimit; // below this value, large cut is used; above, small one is used (value in GeV/c) | |
51 | Double_t fLargeCut; // range for ITS de/dx large cut | |
52 | Double_t fSmallCut; // range for ITS de/dx small cut | |
53 | ||
54 | AliESDpid fESDpid; // ESD PID object | |
55 | AliAODpidUtil fAODpid; // AOD PID object | |
56 | ||
57 | ClassDef(AliRsnCutPIDITS, 1) | |
58 | }; | |
59 | ||
60 | inline Bool_t AliRsnCutPIDITS::IsITSTPC(AliVTrack *vtrack) | |
61 | { | |
62 | // | |
63 | // Checks if the track has the status flags required for a global track | |
64 | // | |
65 | ||
66 | if (!vtrack) | |
67 | { | |
68 | AliWarning("NULL argument: impossible to check status"); | |
69 | return kFALSE; | |
70 | } | |
71 | ||
72 | Bool_t isTPCin = ((vtrack->GetStatus() & AliESDtrack::kTPCin) != 0); | |
73 | Bool_t isITSrefit = ((vtrack->GetStatus() & AliESDtrack::kITSrefit) != 0); | |
74 | Bool_t isITSpid = ((vtrack->GetStatus() & AliESDtrack::kITSpid) != 0); | |
75 | ||
76 | return ( isTPCin && isITSrefit && isITSpid ); | |
77 | ||
78 | return kTRUE; | |
79 | } | |
80 | ||
81 | inline Bool_t AliRsnCutPIDITS::IsITSSA(AliVTrack *vtrack) | |
82 | { | |
83 | // | |
84 | // Checks if the track has the status flags required for an ITS standalone track | |
85 | // | |
86 | ||
87 | if (!vtrack) | |
88 | { | |
89 | AliWarning("NULL argument: impossible to check status"); | |
90 | return kFALSE; | |
91 | } | |
92 | ||
93 | Bool_t isTPCin = ((vtrack->GetStatus() & AliESDtrack::kTPCin) != 0); | |
94 | Bool_t isITSrefit = ((vtrack->GetStatus() & AliESDtrack::kITSrefit) != 0); | |
95 | Bool_t isITSpureSA = ((vtrack->GetStatus() & AliESDtrack::kITSpureSA) != 0); | |
96 | Bool_t isITSpid = ((vtrack->GetStatus() & AliESDtrack::kITSpid) != 0); | |
97 | ||
98 | return ( (!isTPCin) && isITSrefit && (!isITSpureSA) && isITSpid ); | |
99 | ||
100 | return kTRUE; | |
101 | } | |
102 | ||
103 | #endif |