Skip to content

Commit e6a1d6e

Browse files
authored
[PWGLF] fix absolute value bug for dca and pt cut (#13038)
1 parent ef81b8c commit e6a1d6e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

PWGLF/TableProducer/Nuspex/he3HadronFemto.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ struct he3HadronFemto {
440440
candidate.tpcNClsCrossedRows() < crossedRowsToFindableRatio * candidate.tpcNClsFindable() ||
441441
candidate.tpcChi2NCl() > maxChi2NCl ||
442442
candidate.tpcChi2NCl() < settingCutChi2tpcLow ||
443-
candidate.itsChi2NCl() > settingCutChi2NClITS || candidate.dcaXY() > settingCutDCAxy ||
444-
candidate.dcaZ() > settingCutDCAz) {
443+
candidate.itsChi2NCl() > settingCutChi2NClITS || std::abs(candidate.dcaXY()) > settingCutDCAxy ||
444+
std::abs(candidate.dcaZ()) > settingCutDCAz) {
445445
return false;
446446
}
447447

@@ -622,7 +622,7 @@ struct he3HadronFemto {
622622
return false;
623623
}
624624

625-
if (he3Hadcand.recoPtHad() < settingCutPtMinHad || he3Hadcand.recoPtHad() > settingCutPtMaxHad)
625+
if (std::abs(he3Hadcand.recoPtHad()) < settingCutPtMinHad || std::abs(he3Hadcand.recoPtHad()) > settingCutPtMaxHad)
626626
return false;
627627

628628
he3Hadcand.signHe3 = trackHe3.sign();
@@ -907,9 +907,9 @@ struct he3HadronFemto {
907907
{
908908
double PrTPCnsigma = computePrTPCnsig(he3Hadcand.momHadTPC, he3Hadcand.tpcSignalHad);
909909
double PrTOFnsigma = tofNSigmaCalculation(he3Hadcand.massTOFHad, he3Hadcand.recoPtHad());
910-
if (abs(PrTPCnsigma) < 3)
910+
if (std::abs(PrTPCnsigma) < 3)
911911
return;
912-
if (abs(PrTOFnsigma) < 3)
912+
if (std::abs(PrTOFnsigma) < 3)
913913
return;
914914

915915
float kstar = computeKstar(he3Hadcand);

0 commit comments

Comments
 (0)