Skip to content

Commit 5589eab

Browse files
authored
[PWGHF] Fix the issue of incorrect use of return (#12743)
1 parent 30fcc3b commit 5589eab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

PWGHF/D2H/Tasks/taskCharmPolarisation.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2315,7 +2315,7 @@ struct HfTaskCharmPolarisation {
23152315
float centrality = {-1.f};
23162316
centrality = o2::hf_centrality::getCentralityColl(collision, centEstimator);
23172317
if (centrality < centralityMin || centrality > centralityMax) {
2318-
return; // skip this collision if outside of the centrality range
2318+
continue; // skip this collision if outside of the centrality range
23192319
}
23202320
registry.fill(HIST("hCentrality"), centrality);
23212321

@@ -2345,7 +2345,7 @@ struct HfTaskCharmPolarisation {
23452345
float centrality = {-1.f};
23462346
centrality = o2::hf_centrality::getCentralityColl(collision, centEstimator);
23472347
if (centrality < centralityMin || centrality > centralityMax) {
2348-
return; // skip this collision if outside of the centrality range
2348+
continue; // skip this collision if outside of the centrality range
23492349
}
23502350
registry.fill(HIST("hCentrality"), centrality);
23512351

@@ -2379,7 +2379,7 @@ struct HfTaskCharmPolarisation {
23792379
for (const auto& collision : collisions) { // loop over reco collisions associated to this gen collision
23802380
centrality = o2::hf_centrality::getCentralityColl(collision, centEstimator);
23812381
if (centrality < centralityMin || centrality > centralityMax) {
2382-
return; // skip this collision if outside of the centrality range
2382+
continue; // skip this collision if outside of the centrality range
23832383
}
23842384
registry.fill(HIST("hCentrality"), centrality);
23852385

@@ -2420,7 +2420,7 @@ struct HfTaskCharmPolarisation {
24202420
for (const auto& collision : collisions) { // loop over reco collisions associated to this gen collision
24212421
centrality = o2::hf_centrality::getCentralityColl(collision, centEstimator);
24222422
if (centrality < centralityMin || centrality > centralityMax) {
2423-
return; // skip this collision if outside of the centrality range
2423+
continue; // skip this collision if outside of the centrality range
24242424
}
24252425
registry.fill(HIST("hCentrality"), centrality);
24262426

0 commit comments

Comments
 (0)