From 0dfe1116af3c62fb3458b3eae4e71dc409642526 Mon Sep 17 00:00:00 2001 From: Francesca Ercolessi Date: Tue, 13 Oct 2026 18:12:35 +0200 Subject: [PATCH 1/2] fix proton rejection --- PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx index 97484eaf831..8dc4df3f905 100644 --- a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx +++ b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx @@ -131,6 +131,7 @@ struct HadronNucleiCorrelation { Configurable nsigmaElDe{"nsigmaElDe", 3.0f, "cut nsigma TPC El for protons"}; Configurable nsigmaTOF{"nsigmaTOF", 3.5f, "cut nsigma TOF"}; Configurable nsigmaTPCPrRej{"nsigmaTPCPrRej", 3.f, "cut nsigma TPC for proton rejection"}; + Configurable nsigmaTOFPrRej{"nsigmaTOFPrRej", 3.f, "cut nsigma TOF for proton rejection"}; Configurable doPrRej{"doPrRej", true, "do TPC proton rejection"}; Configurable nsigmaQuadratic{"nsigmaQuadratic", 3.0f, "cut on sqrt(nsigmaTPC^2 + nsigmaTOF^2), used above the TOF pT threshold when doQuadraticPID is on"}; Configurable nsigmaITSPr{"nsigmaITSPr", -2.0f, "cut nsigma ITS Pr"}; @@ -621,7 +622,7 @@ 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 || !doPrRej.value; + const bool isNotPr = (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; @@ -1030,8 +1031,8 @@ 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 || !doPrRej.value; - + const bool isNotPr = (std::abs(track.tpcNSigmaPr()) >= nsigmaTPCPrRej.value && std::abs(track.tofNSigmaPr()) >= nsigmaTOFPrRej.value) || !doPrRej.value; + if (track.sign() > 0) { if (track.pt() >= pTthrprTOF.value || !doITSPID.value || track.itsNSigmaPr() > nsigmaITSPr.value) { From 90fb7b7a8b71b30113d61b1269af867185f348e7 Mon Sep 17 00:00:00 2001 From: Francesca Ercolessi Date: Tue, 13 Oct 2026 18:29:04 +0200 Subject: [PATCH 2/2] fix clang --- 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 8dc4df3f905..96615e4414e 100644 --- a/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx +++ b/PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx @@ -1032,7 +1032,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; - + if (track.sign() > 0) { if (track.pt() >= pTthrprTOF.value || !doITSPID.value || track.itsNSigmaPr() > nsigmaITSPr.value) {