Skip to content

Commit 1663c69

Browse files
authored
[PWGHF] Add missing protection for filling bkg histo in Ds task (#9581)
1 parent ebed33f commit 1663c69

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

PWGHF/D2H/Tasks/taskDs.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,9 @@ struct HfTaskDs {
759759
float centrality = evaluateCentralityColl(collision);
760760
std::get<TH2Ptr>(histosPtr[DataType::Data]["hNPvContribAll"])->Fill(numPvContributors, centrality);
761761
for (int i = 0; i < DataType::kDataTypes; i++) {
762+
if (i == DataType::McBkg && !fillMcBkgHistos) {
763+
continue;
764+
}
762765
if (nCandsPerType[i]) {
763766
std::get<TH2Ptr>(histosPtr[i]["hNPvContribCands"])->Fill(numPvContributors, centrality);
764767
}

0 commit comments

Comments
 (0)