Skip to content

Commit 542024a

Browse files
authored
[PWGCF] Fix bug in collision masker (AliceO2Group#9851)
1 parent e2fa5d0 commit 542024a

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

PWGCF/FemtoDream/Tasks/femtoDreamCollisionMasker.cxx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include <cstdint>
1818
#include <vector>
19+
#include <string>
1920
#include <bitset>
2021
#include <algorithm>
2122
#include <random>
@@ -332,16 +333,18 @@ struct femoDreamCollisionMasker {
332333
// if they are not passed, skip the particle
333334
if (track.pt() < FilterPtMin.at(P).at(index) || track.pt() > FilterPtMax.at(P).at(index) ||
334335
track.eta() < FilterEtaMin.at(P).at(index) || track.eta() > FilterEtaMax.at(P).at(index)) {
335-
// check if we apply pt dependend dca cut
336-
if (TrackDCACutPtDep.at(index)) {
337-
if (std::fabs(track.tempFitVar()) > 0.0105f * (0.035f / std::pow(track.pt(), 1.1f))) {
338-
continue;
339-
}
340-
} else {
341-
// or cut on the DCA directly
342-
if (track.tempFitVar() < FilterTempFitVarMin.at(P).at(index) || track.tempFitVar() > FilterTempFitVarMax.at(P).at(index)) {
343-
continue;
344-
}
336+
continue;
337+
}
338+
// check if we apply pt dependend dca cut
339+
// if they do not pass this cut, skip particle as well
340+
if (TrackDCACutPtDep.at(index)) {
341+
if (std::fabs(track.tempFitVar()) > 0.0105f + (0.035f / std::pow(track.pt(), 1.1f))) {
342+
continue;
343+
}
344+
} else {
345+
// or cut on the DCA directly
346+
if (track.tempFitVar() < FilterTempFitVarMin.at(P).at(index) || track.tempFitVar() > FilterTempFitVarMax.at(P).at(index)) {
347+
continue;
345348
}
346349
}
347350
// set the bit at the index of the selection equal to one if the track passes all selections

0 commit comments

Comments
 (0)