Skip to content

Commit fd3668f

Browse files
authored
[PWGLF] Nuspex: hadron nuclei correlation: fix proton rejection (#18333)
1 parent 0bcb21b commit fd3668f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -622,13 +622,13 @@ struct HadronNucleiCorrelation {
622622
const bool isTOFPID = std::abs(track.tofNSigmaDe()) < nsigmaTOF.value;
623623
const bool isTPCElRejection = rejectionEl.value && track.beta() < BetahasTOFthr && track.pt() < pTthrdeTPCEl.value && track.tpcNSigmaEl() >= nsigmaElDe.value;
624624
const bool isITSPID = track.itsNSigmaDe() > nsigmaITSDe.value;
625-
const bool isNotPr = (std::abs(track.tpcNSigmaPr()) >= nsigmaTPCPrRej.value && std::abs(track.tofNSigmaPr()) >= nsigmaTOFPrRej.value) || !doPrRej.value;
625+
const bool isPr = (std::abs(track.tpcNSigmaPr()) < nsigmaTPCPrRej.value && std::abs(track.tofNSigmaPr()) < nsigmaTOFPrRej.value) && doPrRej.value;
626626

627627
const bool isQuadraticPID = std::hypot(track.tpcNSigmaDe(), track.tofNSigmaDe()) < nsigmaQuadratic.value;
628628

629629
// Check if the sign of the track matches the expected sign for deuterons or antideuterons
630630
const bool signCheck = (sign > 0 && track.sign() > 0) || (sign < 0 && track.sign() < 0);
631-
if (!isNotPr) {
631+
if (isPr) {
632632
return false;
633633
}
634634
if (!doQuadraticPID.value) {
@@ -1031,15 +1031,15 @@ struct HadronNucleiCorrelation {
10311031

10321032
const bool isTPCElRejection = rejectionEl.value && track.beta() < BetahasTOFthr && track.pt() < pTthrdeTPCEl.value && track.tpcNSigmaEl() >= nsigmaElDe.value;
10331033
const bool isTOFPID = std::abs(track.tofNSigmaDe()) < nsigmaTOF.value;
1034-
const bool isNotPr = (std::abs(track.tpcNSigmaPr()) >= nsigmaTPCPrRej.value && std::abs(track.tofNSigmaPr()) >= nsigmaTOFPrRej.value) || !doPrRej.value;
1034+
const bool isPr = (std::abs(track.tpcNSigmaPr()) < nsigmaTPCPrRej.value && std::abs(track.tofNSigmaPr()) < nsigmaTOFPrRej.value) && doPrRej.value;
10351035

10361036
if (track.sign() > 0) {
10371037

10381038
if (track.pt() >= pTthrprTOF.value || !doITSPID.value || track.itsNSigmaPr() > nsigmaITSPr.value) {
10391039
registryQa.fill(HIST("QA/h3dTPCTOF_Pr"), track.tpcNSigmaPr(), track.tofNSigmaPr(), track.pt());
10401040
}
10411041
if (track.pt() >= pTthrdeTOF.value || !doITSPID.value || track.itsNSigmaDe() > nsigmaITSDe.value) {
1042-
if (isNotPr) {
1042+
if (!isPr) {
10431043
registryQa.fill(HIST("QA/h3dTPCTOF_De"), track.tpcNSigmaDe(), track.tofNSigmaDe(), track.pt());
10441044
if (isTPCElRejection || isTOFPID) {
10451045
registryQa.fill(HIST("QA/h3dTPCTOF_De_Rej"), track.tpcNSigmaDe(), track.tofNSigmaDe(), track.pt());
@@ -1052,7 +1052,7 @@ struct HadronNucleiCorrelation {
10521052
registryQa.fill(HIST("QA/h3dTPCTOF_AntiPr"), track.tpcNSigmaPr(), track.tofNSigmaPr(), track.pt());
10531053
}
10541054
if (track.pt() >= pTthrdeTOF.value || !doITSPID.value || track.itsNSigmaDe() > nsigmaITSDe.value) {
1055-
if (isNotPr) {
1055+
if (!isPr) {
10561056
registryQa.fill(HIST("QA/h3dTPCTOF_AntiDe"), track.tpcNSigmaDe(), track.tofNSigmaDe(), track.pt());
10571057
if (isTPCElRejection || isTOFPID) {
10581058
registryQa.fill(HIST("QA/h3dTPCTOF_AntiDe_Rej"), track.tpcNSigmaDe(), track.tofNSigmaDe(), track.pt());

0 commit comments

Comments
 (0)