2 // All cuts for single track in D0 analysis,
3 // based on track quality and particle identification
5 // Author: Massimo Venaruzzo
12 #include "AliPIDResponse.h"
13 #include "AliRsnCutDaughterD0.h"
15 ClassImp(AliRsnCutDaughterD0)
17 //__________________________________________________________________________________________________
18 AliRsnCutDaughterD0::AliRsnCutDaughterD0(const char *name, AliPID::EParticleType pid) :
19 AliRsnCut(name, AliRsnTarget::kDaughter),
22 fCutQuality(Form("%sQuality", name)),
31 // Initialize track quality cuts to 2010 defaults
33 fCutQuality.SetPtRange(0.15, 1E+20);
34 fCutQuality.SetEtaRange(-0.8, 0.8);
35 fCutQuality.SetDCARPtFormula("0.0105+0.0350/pt^1.1");
36 fCutQuality.SetDCARmin(0.0);
37 fCutQuality.SetDCAZmax(2.0);
38 fCutQuality.SetSPDminNClusters(1);
39 fCutQuality.SetITSminNClusters(0);
40 fCutQuality.SetITSmaxChi2(1E+20);
41 fCutQuality.SetTPCminNClusters(70);
42 fCutQuality.SetTPCmaxChi2(4.0);
43 fCutQuality.SetRejectKinkDaughters();
44 fCutQuality.SetAODTestFilterBit(5);
47 //__________________________________________________________________________________________________
48 Bool_t AliRsnCutDaughterD0::IsSelected(TObject *obj)
55 if (!TargetOK(obj)) return kFALSE;
58 AliVTrack *track = dynamic_cast<AliVTrack *>(fDaughter->GetRef());
59 if (!track) return kFALSE;
61 AliDebugClass(2, "Checking status...");
63 if ((track->GetStatus() & AliESDtrack::kTPCin ) == 0) return kFALSE;
64 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
65 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
66 AliDebugClass(2, "...passed");
69 AliDebugClass(2, "Checking quality cuts...");
70 if (!fCutQuality.IsSelected(obj)) return kFALSE;
71 AliDebugClass(2, "...passed");
73 // if no PID is required, accept
74 if (fNoPID) return kTRUE;
76 // check initialization of PID object
77 AliPIDResponse *pid = fEvent->GetPIDResponse();
79 AliFatal("NULL PID response");
83 AliDebugClass(2, "Checking TOF Matching...");
84 // check if TOF is matched
85 // and computes all values used in the PID cut
86 Bool_t isTOF = MatchTOF(track);
87 AliDebugClass(2, "...passed");
89 Double_t pTPC = track->GetTPCmomentum();
90 Double_t p = track->P();
91 Double_t nsTPC = TMath::Abs(pid->NumberOfSigmasTPC(track, fPID));
92 Double_t nsTOF = isTOF ? TMath::Abs(pid->NumberOfSigmasTOF(track, fPID)) : 1E20;
93 Double_t maxTPC = 1E20;
94 Double_t maxTOF = 1E20;
95 AliDebugClass(2, "Checking PID...");
98 // applies the cut differently depending on the PID and the momentum
100 if (fPID == AliPID::kPion) {maxTPC = fPionTPCPIDCut; maxTOF = fPionTOFPIDCut;}
101 if (fPID == AliPID::kKaon) {maxTPC = fKaonTPCPIDCut; maxTOF = fKaonTOFPIDCut;}
102 return (nsTPC <= maxTPC && nsTOF <= maxTOF);
104 if (fPID == AliPID::kPion) maxTPC = fPionTPCPIDCut;
105 if (fPID == AliPID::kKaon) maxTPC = fKaonTPCPIDCut;
106 return (nsTPC <= maxTPC);
109 // applies the cut differently depending on the PID and the momentum
111 // TPC: 5sigma cut for all
112 if (nsTPC > 5.0) return kFALSE;
113 // TOF: 3sigma below 1.5 GeV, 2sigma above
114 if (p < 1.5) maxTOF = 3.0; else maxTOF = 2.0;
115 return (nsTOF <= maxTOF);
118 // all below 350 MeV: 5sigma
119 // all between 350 and 500 MeV: 3sigma
120 // pions above 500 MeV: 2sigma
121 // kaons between 500 and 700 MeV: 2sigma
122 // kaons above 700 MeV: rejected
125 else if (pTPC > 0.35 && pTPC <= 0.5)
128 if (fPID == AliPID::kPion)
130 else if (fPID == AliPID::kKaon) {
137 return (nsTPC <= maxTPC);
141 AliDebugClass(2, "...passed");
142 // if we reach this point, all checks were successful
143 AliDebugClass(2, "Good Pion/Kaon Candidate Found!!");