Skip to content

Commit ba0ad42

Browse files
authored
[PWGHF] Minor fix in the filling of numPvContr (#13087)
1 parent 1c44159 commit ba0ad42

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

PWGHF/D2H/Tasks/taskDplus.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -556,20 +556,18 @@ struct HfTaskDplus {
556556
}
557557
ptBhad = candidate.ptBhadMotherPart();
558558
flagBHad = getBHadMotherFlag(candidate.pdgBhadMotherPart());
559-
559+
auto collision = candidate.template collision_as<McRecoCollisionsCent>();
560560
if (storeCentrality || storeOccupancy) {
561-
auto collision = candidate.template collision_as<McRecoCollisionsCent>();
562561
if (storeCentrality && centEstimator != CentralityEstimator::None) {
563562
cent = getCentralityColl(collision, centEstimator);
564563
}
565564
if (storeOccupancy && occEstimator != OccupancyEstimator::None) {
566565
occ = o2::hf_occupancy::getOccupancyColl(collision, occEstimator);
567566
}
567+
}
568568
if (storePvContributors) {
569569
numPvContr = collision.numContrib();
570570
}
571-
}
572-
573571
fillHisto(candidate);
574572
fillHistoMCRec<true>(candidate);
575573
fillSparseML<true, true>(candidate, ptBhad, flagBHad, cent, occ, numPvContr);

0 commit comments

Comments
 (0)