Skip to content

Commit 33ad35c

Browse files
authored
[PWGHF] Add nPVcontributors in THnSparse of Upc process in D0 task (#15438)
1 parent e5b37fc commit 33ad35c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PWGHF/D2H/Tasks/taskD0.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ struct HfTaskD0 {
369369
axes.push_back(thnAxisFDDC);
370370
axes.push_back(thnAxisZNA);
371371
axes.push_back(thnAxisZNC);
372+
axes.push_back(thnAxisNumPvContr);
372373
}
373374

374375
if (applyMl) {
@@ -591,6 +592,7 @@ struct HfTaskD0 {
591592
// Determine gap type using SGSelector with BC range checking
592593
const auto gapResult = hf_upc::determineGapType(collision, bcs, upcThresholds);
593594
const int gap = gapResult.value;
595+
const auto numPvContributors = collision.numContrib();
594596

595597
// Use the BC with FIT activity if available from SGSelector
596598
auto bcForUPC = bc;
@@ -652,7 +654,7 @@ struct HfTaskD0 {
652654
// Fill THnSparse with structure matching histogram axes: [mass, pt, (mlScores if FillMl), rapidity, d0Type, (cent if storeCentrality), (occ, ir if storeOccupancyAndIR), gapType, FT0A, FT0C, FV0A, FDDA, FDDC, ZNA, ZNC]
653655
auto fillTHnData = [&](float mass, int d0Type) {
654656
// Pre-calculate vector size to avoid reallocations
655-
constexpr int NAxesBase = 12; // mass, pt, rapidity, d0Type, gapType, FT0A, FT0C, FV0A, FDDA, FDDC, ZNA, ZNC
657+
constexpr int NAxesBase = 13; // mass, pt, rapidity, d0Type, gapType, FT0A, FT0C, FV0A, FDDA, FDDC, ZNA, ZNC, nPVcontr
656658
constexpr int NAxesMl = FillMl ? 3 : 0; // 3 ML scores if FillMl
657659
int const nAxesCent = storeCentrality ? 1 : 0; // centrality if storeCentrality
658660
int const nAxesOccIR = storeOccupancyAndIR ? 2 : 0; // occupancy and IR if storeOccupancyAndIR
@@ -686,6 +688,7 @@ struct HfTaskD0 {
686688
valuesToFill.push_back(static_cast<double>(fitInfo.ampFDDC));
687689
valuesToFill.push_back(static_cast<double>(zdcEnergyZNA));
688690
valuesToFill.push_back(static_cast<double>(zdcEnergyZNC));
691+
valuesToFill.push_back(static_cast<double>(numPvContributors));
689692

690693
if constexpr (FillMl) {
691694
registry.get<THnSparse>(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"))->Fill(valuesToFill.data());

0 commit comments

Comments
 (0)