Skip to content

Commit b179e4d

Browse files
committed
fix bool and rej protons
1 parent 5f462eb commit b179e4d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎PWGLF/Tasks/Nuspex/hadronnucleicorrelation.cxx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ struct HadronNucleiCorrelation {
132132
Configurable<float> nsigmaElDe{"nsigmaElDe", 3.0f, "cut nsigma TPC El for protons"};
133133
Configurable<float> nsigmaTOF{"nsigmaTOF", 3.5f, "cut nsigma TOF"};
134134
Configurable<float> nsigmaTOFPrRej{"nsigmaTOFPrRej", 3.f, "cut nsigma TOF for proton rejection"};
135-
Configurable<float> doPrRej{"doPrRej", 3.f, "do TOF proton rejection"};
135+
Configurable<bool> doPrRej{"doPrRej", true, "do TOF proton rejection"};
136136
Configurable<float> nsigmaQuadratic{"nsigmaQuadratic", 3.0f, "cut on sqrt(nsigmaTPC^2 + nsigmaTOF^2), used above the TOF pT threshold when doQuadraticPID is on"};
137137
Configurable<float> nsigmaITSPr{"nsigmaITSPr", -2.0f, "cut nsigma ITS Pr"};
138138
Configurable<float> nsigmaITSDe{"nsigmaITSDe", -2.0f, "cut nsigma ITS De"};
@@ -622,11 +622,15 @@ 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.tofNSigmaPr()) >= nsigmaTOFPrRej.value || !doPrRej.value;
625626

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

628629
// Check if the sign of the track matches the expected sign for deuterons or antideuterons
629630
const bool signCheck = (sign > 0 && track.sign() > 0) || (sign < 0 && track.sign() < 0);
631+
if (!isNotPr) {
632+
return false;
633+
}
630634
if (!doQuadraticPID.value) {
631635
if (isTPCPID) {
632636
if (track.pt() < pTthrdeTOF.value) {
@@ -1027,7 +1031,7 @@ struct HadronNucleiCorrelation {
10271031

10281032
const bool isTPCElRejection = rejectionEl.value && track.beta() < BetahasTOFthr && track.pt() < pTthrdeTPCEl.value && track.tpcNSigmaEl() >= nsigmaElDe.value;
10291033
const bool isTOFPID = std::abs(track.tofNSigmaDe()) < nsigmaTOF.value;
1030-
const bool isNotPr = std::abs(track.tofNSigmaPr()) >= nsigmaTOFPrRej.value || !doPrRej;
1034+
const bool isNotPr = std::abs(track.tofNSigmaPr()) >= nsigmaTOFPrRej.value || !doPrRej.value;
10311035

10321036
if (track.sign() > 0) {
10331037

0 commit comments

Comments
 (0)