2 // This cut implements all the checks done to accept a track as a Kaon
3 // for the PbPb analysis using 2010 runs.
4 // It is based on standard cuts on track quality and nsigma cuts
5 // with respect to the TPC and TOF signals for the PID.
11 #include "AliPIDResponse.h"
12 #include "AliRsnCutKaonForPhi2010.h"
14 ClassImp(AliRsnCutKaonForPhi2010)
16 //__________________________________________________________________________________________________
17 AliRsnCutKaonForPhi2010::AliRsnCutKaonForPhi2010
18 (const char *name, Double_t nSigmaTPC, Double_t nSigmaTOF, Double_t tofLimit) :
19 AliRsnCut(name, AliRsnTarget::kDaughter),
25 fTOFthreshold(tofLimit),
26 fCutQuality(Form("%s_quality", name))
30 // Initialize the contained cuts and sets defaults
34 //fCutQuality.AddStatusFlag(AliESDtrack::kTPCin , kTRUE);
35 //fCutQuality.AddStatusFlag(AliESDtrack::kTPCrefit, kTRUE);
36 //fCutQuality.AddStatusFlag(AliESDtrack::kITSrefit, kTRUE);
37 fCutQuality.SetPtRange(0.15, 1E+20);
38 fCutQuality.SetEtaRange(-0.8, 0.8);
39 fCutQuality.SetDCARPtFormula("0.0182+0.0350/pt^1.01");
40 fCutQuality.SetDCAZmax(2.0);
41 fCutQuality.SetSPDminNClusters(1);
42 fCutQuality.SetITSminNClusters(0);
43 fCutQuality.SetITSmaxChi2(1E+20);
44 fCutQuality.SetTPCminNClusters(70);
45 fCutQuality.SetTPCmaxChi2(4.0);
46 fCutQuality.SetRejectKinkDaughters();
47 fCutQuality.SetAODTestFilterBit(5);
50 //__________________________________________________________________________________________________
51 Bool_t AliRsnCutKaonForPhi2010::IsSelected(TObject *obj)
58 if (!TargetOK(obj)) return kFALSE;
61 AliVTrack *track = fDaughter->Ref2Vtrack();
63 if (!fDaughter->GetRef()) AliWarning("NULL ref");
68 if ((track->GetStatus() & AliESDtrack::kTPCin ) == 0) return kFALSE;
69 if ((track->GetStatus() & AliESDtrack::kTPCrefit) == 0) return kFALSE;
70 if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) return kFALSE;
73 if (!fCutQuality.IsSelected(obj)) return kFALSE;
75 // if not PID is done, exit here
76 if (fOnlyQuality) return kTRUE;
78 // check initialization of PID object
79 AliPIDResponse *pid = fEvent->GetPIDResponse();
81 AliFatal("NULL PID response");
85 // check if TOF is matched
86 // and computes all values used in the PID cut
87 Bool_t accept = kFALSE;
88 Bool_t isTOF = MatchTOF(track);
89 Double_t nsTPC = TMath::Abs(pid->NumberOfSigmasTPC(track, AliPID::kKaon));
90 Double_t nsTOF = TMath::Abs(pid->NumberOfSigmasTOF(track, AliPID::kKaon));
92 // if only one detector is chosen, do this here
94 AliDebugClass(1, Form("Checking only TPC: nsigma = %f - cut = %f", nsTPC, fCutTPC));
95 accept = (nsTPC <= fCutTPC);
96 } else if (fOnlyTOF) {
98 AliDebugClass(1, "Checking only TOF: rejecting non-TOF track");
101 AliDebugClass(1, Form("Checking only TOF: nsigma = %f - cut = %f", nsTOF, fCutTOF));
102 accept = (nsTOF <= fCutTOF);
106 // below momentum threshold, start with TPC
107 if (track->P() < fTOFthreshold) {
108 AliDebugClass(1, Form("Checking both PID: p = %f below threshold (TOF not required)", track->P()));
110 AliDebugClass(1, Form("TOF present: nsigmaTPC: = %f - cut = %f", nsTPC, fCutTPC));
111 AliDebugClass(1, Form("TOF present: nsigmaTOF: = %f - cut = %f", nsTOF, fCutTOF));
112 accept = ((nsTPC <= fCutTPC) && (nsTOF <= fCutTOF));
114 AliDebugClass(1, Form("TOF absent : nsigmaTPC: = %f - cut = %f", nsTPC, fCutTPC));
115 accept = (nsTPC <= fCutTPC);
118 AliDebugClass(1, Form("Checking both PID: p = %f above threshold (TOF required)", track->P()));
120 AliDebugClass(1, Form("TOF present: nsigmaTPC: = %f - cut = %f", nsTPC, fCutTPC));
121 AliDebugClass(1, Form("TOF present: nsigmaTOF: = %f - cut = %f", nsTOF, fCutTOF));
122 accept = ((nsTPC <= fCutTPC) && (nsTOF <= fCutTOF));
124 AliDebugClass(1, "TOF absent : track rejected");
130 AliDebugClass(1, Form("Track %s", (accept ? "accepted" : "rejected")));