From 4053ba6a9fa29fdfeefa8d1c97ae4847c8614b6f Mon Sep 17 00:00:00 2001 From: Francesca Ercolessi Date: Fri, 16 Oct 2026 17:20:32 +0200 Subject: [PATCH 1/2] fix proton rejection --- PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx index 96615e4414e..3625c5371de 100644 --- a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx +++ b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx @@ -622,13 +622,13 @@ struct HadronNucleiCorrelation { const bool isTOFPID = std::abs(track.tofNSigmaDe()) < nsigmaTOF.value; const bool isTPCElRejection = rejectionEl.value && track.beta() < BetahasTOFthr && track.pt() < pTthrdeTPCEl.value && track.tpcNSigmaEl() >= nsigmaElDe.value; const bool isITSPID = track.itsNSigmaDe() > nsigmaITSDe.value; - const bool isNotPr = (std::abs(track.tpcNSigmaPr()) >= nsigmaTPCPrRej.value && std::abs(track.tofNSigmaPr()) >= nsigmaTOFPrRej.value) || !doPrRej.value; + const bool isPr = (std::abs(track.tpcNSigmaPr()) < nsigmaTPCPrRej.value && std::abs(track.tofNSigmaPr()) < nsigmaTOFPrRej.value) && doPrRej.value; const bool isQuadraticPID = std::hypot(track.tpcNSigmaDe(), track.tofNSigmaDe()) < nsigmaQuadratic.value; // Check if the sign of the track matches the expected sign for deuterons or antideuterons const bool signCheck = (sign > 0 && track.sign() > 0) || (sign < 0 && track.sign() < 0); - if (!isNotPr) { + if (isPr) { return false; } if (!doQuadraticPID.value) { @@ -1031,7 +1031,7 @@ struct HadronNucleiCorrelation { const bool isTPCElRejection = rejectionEl.value && track.beta() < BetahasTOFthr && track.pt() < pTthrdeTPCEl.value && track.tpcNSigmaEl() >= nsigmaElDe.value; const bool isTOFPID = std::abs(track.tofNSigmaDe()) < nsigmaTOF.value; - const bool isNotPr = (std::abs(track.tpcNSigmaPr()) >= nsigmaTPCPrRej.value && std::abs(track.tofNSigmaPr()) >= nsigmaTOFPrRej.value) || !doPrRej.value; + const bool isPr = (std::abs(track.tpcNSigmaPr()) < nsigmaTPCPrRej.value && std::abs(track.tofNSigmaPr()) < nsigmaTOFPrRej.value) && doPrRej.value; if (track.sign() > 0) { @@ -1039,7 +1039,7 @@ struct HadronNucleiCorrelation { registryQa.fill(HIST("QA/h3dTPCTOF_Pr"), track.tpcNSigmaPr(), track.tofNSigmaPr(), track.pt()); } if (track.pt() >= pTthrdeTOF.value || !doITSPID.value || track.itsNSigmaDe() > nsigmaITSDe.value) { - if (isNotPr) { + if (!isPr) { registryQa.fill(HIST("QA/h3dTPCTOF_De"), track.tpcNSigmaDe(), track.tofNSigmaDe(), track.pt()); if (isTPCElRejection || isTOFPID) { registryQa.fill(HIST("QA/h3dTPCTOF_De_Rej"), track.tpcNSigmaDe(), track.tofNSigmaDe(), track.pt()); @@ -1052,7 +1052,7 @@ struct HadronNucleiCorrelation { registryQa.fill(HIST("QA/h3dTPCTOF_AntiPr"), track.tpcNSigmaPr(), track.tofNSigmaPr(), track.pt()); } if (track.pt() >= pTthrdeTOF.value || !doITSPID.value || track.itsNSigmaDe() > nsigmaITSDe.value) { - if (isNotPr) { + if (isPr) { registryQa.fill(HIST("QA/h3dTPCTOF_AntiDe"), track.tpcNSigmaDe(), track.tofNSigmaDe(), track.pt()); if (isTPCElRejection || isTOFPID) { registryQa.fill(HIST("QA/h3dTPCTOF_AntiDe_Rej"), track.tpcNSigmaDe(), track.tofNSigmaDe(), track.pt()); From 43d863aba06b40341cf27482912c2ee5a825e72d Mon Sep 17 00:00:00 2001 From: Francesca Ercolessi Date: Fri, 16 Oct 2026 17:21:14 +0200 Subject: [PATCH 2/2] fix proton rejection --- PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx index 3625c5371de..90717213795 100644 --- a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx +++ b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx @@ -1052,7 +1052,7 @@ struct HadronNucleiCorrelation { registryQa.fill(HIST("QA/h3dTPCTOF_AntiPr"), track.tpcNSigmaPr(), track.tofNSigmaPr(), track.pt()); } if (track.pt() >= pTthrdeTOF.value || !doITSPID.value || track.itsNSigmaDe() > nsigmaITSDe.value) { - if (isPr) { + if (!isPr) { registryQa.fill(HIST("QA/h3dTPCTOF_AntiDe"), track.tpcNSigmaDe(), track.tofNSigmaDe(), track.pt()); if (isTPCElRejection || isTOFPID) { registryQa.fill(HIST("QA/h3dTPCTOF_AntiDe_Rej"), track.tpcNSigmaDe(), track.tofNSigmaDe(), track.pt());