Skip to content

Commit 804fbbd

Browse files
SuJeong-Jialibuild
andauthored
[PWGLF] Change of PID selections for 'k1analysis.cxx' (#15780)
Co-authored-by: ALICE Action Bot <[email protected]>
1 parent afac324 commit 804fbbd

File tree

1 file changed

+51
-23
lines changed

1 file changed

+51
-23
lines changed

PWGLF/Tasks/Resonances/k1analysis.cxx

Lines changed: 51 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ struct K1analysis {
9797
Preslice<aod::McParticles> perMCCollision = o2::aod::mcparticle::mcCollisionId;
9898

9999
using EventCandidates = soa::Join<aod::Collisions, aod::EvSels, aod::FT0Mults, aod::FV0Mults, aod::TPCMults, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0Cs, aod::CentFT0As, aod::Mults, aod::PVMults>;
100-
using TrackCandidates = soa::Join<aod::FullTracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::TrackSelectionExtension, aod::pidTPCFullPi, aod::pidTOFFullPi>;
100+
using TrackCandidates = soa::Join<aod::FullTracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection, aod::TrackSelectionExtension, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTPCFullPr, aod::pidTOFFullPr>;
101101
using V0Candidates = aod::V0Datas;
102102

103103
// for MC reco
@@ -162,12 +162,18 @@ struct K1analysis {
162162

163163
/// PID Selections, pion
164164
struct : ConfigurableGroup {
165-
Configurable<bool> cfgTPConly{"cfgTPConly", true, "Use only TPC for PID"}; // bool
166-
Configurable<float> cfgMaxTPCnSigmaPion{"cfgMaxTPCnSigmaPion", 5.0, "TPC nSigma cut for Pion"}; // TPC
167-
Configurable<float> cfgMaxTOFnSigmaPion{"cfgMaxTOFnSigmaPion", 5.0, "TOF nSigma cut for Pion"}; // TOF
168-
Configurable<float> cfgNsigmaCutCombinedPion{"cfgNsigmaCutCombinedPion", -999, "Combined nSigma cut for Pion"}; // Combined
165+
Configurable<bool> cfgTPConly{"cfgTPConly", true, "Use only TPC for PID"}; // bool
166+
Configurable<float> cfgMaxTPCnSigmaPion{"cfgMaxTPCnSigmaPion", 3.0, "TPC nSigma cut for Pion"}; // TPC
167+
Configurable<float> cfgRejectTPCnSigmaKaon{"cfgRejectTPCnSigmaKaon", 3.0, "TPC nSigma reject cut for Kaon (reject)"}; // TPC
168+
Configurable<float> cfgRejectTPCnSigmaProton{"cfgRejectTPCnSigmaProton", 3.0, "TPC nSigma reject cut for Proton (reject)"}; // TPC
169+
Configurable<float> cfgMaxTOFnSigmaPion{"cfgMaxTOFnSigmaPion", 3.0, "TOF nSigma cut for Pion"}; // TOF
170+
Configurable<float> cfgRejectTOFnSigmaKaon{"cfgRejectTOFnSigmaKaon", 3.0, "TOF nSigma reject cut for Kaon (reject)"}; // TOF
171+
Configurable<float> cfgRejectTOFnSigmaProton{"cfgRejectTOFnSigmaProton", 3.0, "TOF nSigma reject cut for Proton (reject)"}; // TOF
172+
Configurable<float> cfgNsigmaCutCombinedPion{"cfgNsigmaCutCombinedPion", 3.0, "Combined nSigma cut for Pion"}; // Combined
169173
Configurable<bool> cfgTOFVeto{"cfgTOFVeto", false, "TOF Veto, if false, TOF is nessessary for PID selection"}; // TOF Veto
170-
Configurable<float> cfgTOFMinPt{"cfgTOFMinPt", 0.6, "Minimum TOF pT cut for Pion"}; // TOF pT cut
174+
Configurable<bool> cfgRequireTOFHighPt{"cfgRequireTOFHighPt", true, "Require TOF information for pT > cfgTOFMinPt"}; // TOF Require
175+
Configurable<bool> cfgUseCircularCut{"cfgUseCircularCut", true, "Use combined TPC-TOF circular cut"}; // Use circular cut
176+
Configurable<float> cfgTOFMinPt{"cfgTOFMinPt", 0.5, "Minimum TOF pT cut for Pion"}; // TOF pT cut
171177
} PIDCuts;
172178

173179
// Track selections
@@ -253,10 +259,6 @@ struct K1analysis {
253259
float lCentrality;
254260

255261
// PDG code
256-
int kPDGK0s = kK0Short;
257-
int kPDGK0 = kK0;
258-
int kPDGKstarPlus = o2::constants::physics::Pdg::kKPlusStar892;
259-
int kPDGPiPlus = kPiPlus;
260262
int kPDGK10 = 10313;
261263
double fMaxPosPV = 1e-2;
262264

@@ -534,22 +536,48 @@ struct K1analysis {
534536
template <typename TrackType>
535537
bool selectionPIDPion(TrackType const& candidate)
536538
{
537-
if (std::abs(candidate.tpcNSigmaPi()) >= PIDCuts.cfgMaxTPCnSigmaPion)
539+
const float pt = candidate.pt();
540+
541+
const bool passTPCPi = std::abs(candidate.tpcNSigmaPi()) < PIDCuts.cfgMaxTPCnSigmaPion;
542+
if (!passTPCPi) {
538543
return false;
539-
if (PIDCuts.cfgTPConly)
544+
}
545+
546+
const bool rejectTPCKa = std::abs(candidate.tpcNSigmaKa()) > PIDCuts.cfgRejectTPCnSigmaKaon;
547+
const bool rejectTPCPr = std::abs(candidate.tpcNSigmaPr()) > PIDCuts.cfgRejectTPCnSigmaProton;
548+
if (!(rejectTPCKa && rejectTPCPr)) {
549+
return false;
550+
}
551+
552+
if (pt < PIDCuts.cfgTOFMinPt) {
553+
if (PIDCuts.cfgTOFVeto && candidate.hasTOF()) {
554+
return false;
555+
}
540556
return true;
541-
// if (candidate.pt() <= PIDCuts.cfgTOFMinPt)
542-
// return true;
543-
544-
if (candidate.hasTOF()) {
545-
const bool tofPIDPassed = std::abs(candidate.tofNSigmaPi()) < PIDCuts.cfgMaxTOFnSigmaPion;
546-
const bool combo = (PIDCuts.cfgNsigmaCutCombinedPion > 0) &&
547-
(candidate.tpcNSigmaPi() * candidate.tpcNSigmaPi() +
548-
candidate.tofNSigmaPi() * candidate.tofNSigmaPi() <
549-
PIDCuts.cfgNsigmaCutCombinedPion * PIDCuts.cfgNsigmaCutCombinedPion);
550-
return tofPIDPassed || combo;
557+
}
558+
559+
if (!candidate.hasTOF()) {
560+
return !PIDCuts.cfgRequireTOFHighPt;
561+
}
562+
563+
const bool passTOFPi = std::abs(candidate.tofNSigmaPi()) < PIDCuts.cfgMaxTOFnSigmaPion;
564+
565+
const bool rejectTOFKa = std::abs(candidate.tofNSigmaKa()) > PIDCuts.cfgRejectTOFnSigmaKaon;
566+
const bool rejectTOFPr = std::abs(candidate.tofNSigmaPr()) > PIDCuts.cfgRejectTOFnSigmaProton;
567+
568+
if (!(rejectTOFKa && rejectTOFPr)) {
569+
return false;
570+
}
571+
572+
const bool passCircularPi = (PIDCuts.cfgNsigmaCutCombinedPion > 0.f) &&
573+
(candidate.tpcNSigmaPi() * candidate.tpcNSigmaPi() +
574+
candidate.tofNSigmaPi() * candidate.tofNSigmaPi() <
575+
PIDCuts.cfgNsigmaCutCombinedPion * PIDCuts.cfgNsigmaCutCombinedPion);
576+
577+
if (PIDCuts.cfgUseCircularCut) {
578+
return (passTOFPi && passCircularPi);
551579
} else {
552-
return PIDCuts.cfgTOFVeto;
580+
return passTOFPi;
553581
}
554582
}
555583

0 commit comments

Comments
 (0)