]>
Commit | Line | Data |
---|---|---|
659ef4f0 | 1 | // |
2 | // *** Class AliRsnCutPIDTPC *** | |
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, TPC and TOF. | |
8 | // | |
9 | // authors: Martin Vala (martin.vala@cern.ch) | |
10 | // Alberto Pulvirenti (alberto.pulvirenti@ct.infn.it) | |
11 | // | |
12 | ||
13 | #ifndef ALIRSNCUTPIDTPC_H | |
14 | #define ALIRSNCUTPIDTPC_H | |
15 | ||
16 | #include "AliPID.h" | |
80e49c8b | 17 | |
659ef4f0 | 18 | #include "AliESDtrack.h" |
19 | #include "AliESDtrackCuts.h" | |
20 | #include "AliESDpid.h" | |
80e49c8b | 21 | |
659ef4f0 | 22 | #include "AliAODpidUtil.h" |
80e49c8b | 23 | |
24 | #include "AliRsnDaughter.h" | |
659ef4f0 | 25 | #include "AliRsnCut.h" |
26 | ||
2a1c7696 | 27 | class AliRsnCutPIDTPC : public AliRsnCut { |
28 | public: | |
29 | ||
30 | AliRsnCutPIDTPC(const char *name = "cutTPC", | |
31 | EPARTYPE type = AliPID::kKaon, | |
32 | Double_t nSigmaMin = -3., | |
33 | Double_t nSigmaMax = 3., | |
34 | Bool_t rejectOutside = kTRUE); | |
35 | ||
36 | AliRsnCutPIDTPC(const AliRsnCutPIDTPC& copy); | |
37 | AliRsnCutPIDTPC& operator=(const AliRsnCutPIDTPC& copy); | |
38 | virtual ~AliRsnCutPIDTPC() { } | |
39 | ||
40 | AliESDpid* ESDpid() {return &fESDpid;} | |
41 | AliAODpidUtil* AODpid() {return &fAODpid;} | |
42 | ||
43 | void SetRejectOutside(Bool_t yn = kTRUE) {fRejectOutside = yn;} | |
44 | void SetMomentumRange(Double_t min, Double_t max) {fMomMin = min; fMomMax = max;} | |
45 | void SetNSigmaRange(Double_t min, Double_t max) {fMinD = min; fMaxD = max;} | |
46 | void SetRefType(EPARTYPE type) {fRefType = type;} | |
47 | void SetBBParam(Double_t *p) {SetBBParam(p[0], p[1], p[2], p[3], p[4]);} | |
48 | void SetBBParam(Double_t p0, Double_t p1, Double_t p2, Double_t p3, Double_t p4); | |
49 | ||
50 | Bool_t IsTPC(AliVTrack *vtrack); | |
51 | virtual Bool_t IsSelected(TObject *object); | |
52 | virtual void Print(const Option_t *option = "") const; | |
53 | ||
54 | private: | |
55 | ||
56 | void Initialize(); | |
57 | ||
58 | Bool_t fInitialized; // a mono-usage flag which initializes the ESD pid object | |
59 | Bool_t fRejectOutside; // choose if tracks outside momentum range are rejected or not | |
60 | Double_t fMomMin; // min p in range where this cut is checked | |
61 | Double_t fMomMax; // max p in range where this cut is checked | |
62 | EPARTYPE fRefType; // particle type for which PID is checked | |
63 | AliESDpid fESDpid; // ESD PID object | |
64 | AliAODpidUtil fAODpid; // AOD PID object | |
65 | ||
66 | ClassDef(AliRsnCutPIDTPC, 1) | |
659ef4f0 | 67 | }; |
68 | ||
80e49c8b | 69 | inline Bool_t AliRsnCutPIDTPC::IsTPC(AliVTrack *vtrack) |
70 | { | |
71 | // | |
72 | // Checks if the track has the status flags required for a global track | |
73 | // | |
74 | ||
2a1c7696 | 75 | if (!vtrack) { |
76 | AliWarning("NULL argument: impossible to check status"); | |
77 | return kFALSE; | |
78 | } | |
79 | ||
80 | Bool_t isTPCin = ((vtrack->GetStatus() & AliESDtrack::kTPCin) != 0); | |
81 | Bool_t isITSrefit = ((vtrack->GetStatus() & AliESDtrack::kITSrefit) != 0); | |
82 | Bool_t isITSpid = ((vtrack->GetStatus() & AliESDtrack::kITSpid) != 0); | |
83 | ||
84 | return (isTPCin && isITSrefit && isITSpid); | |
85 | ||
86 | return kTRUE; | |
80e49c8b | 87 | } |
88 | ||
659ef4f0 | 89 | #endif |