Skip to content

Commit 479777e

Browse files
authored
fix
1 parent c1cab5b commit 479777e

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎PWGCF/TwoParticleCorrelations/Tasks/lambdaProtonBalanceFunction.cxx‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2109,9 +2109,13 @@ struct LambdaProtonBalanceFunction {
21092109

21102110
// INEL > 0: require at least one charged track in |eta| < 0.8
21112111
static constexpr float kMaxInelEta = 0.8f;
2112-
const int nTracksINEL = static_cast<int>(std::count_if(tracks.begin(), tracks.end(), [](auto const& trk) {
2113-
return std::abs(trk.eta()) < kMaxInelEta;
2114-
}));
2112+
int nTracksINEL = 0;
2113+
for (auto const& trk : tracks) {
2114+
if (std::abs(trk.eta()) < kMaxInelEta) {
2115+
++nTracksINEL;
2116+
continue;
2117+
}
2118+
}
21152119
if (nTracksINEL < 1) {
21162120
return;
21172121
}

0 commit comments

Comments
 (0)