Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion PWGHF/D2H/Tasks/taskD0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ struct HfTaskD0 {
axes.push_back(thnAxisFDDC);
axes.push_back(thnAxisZNA);
axes.push_back(thnAxisZNC);
axes.push_back(thnAxisNumPvContr);
}

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

// Use the BC with FIT activity if available from SGSelector
auto bcForUPC = bc;
Expand Down Expand Up @@ -652,7 +654,7 @@ struct HfTaskD0 {
// 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]
auto fillTHnData = [&](float mass, int d0Type) {
// Pre-calculate vector size to avoid reallocations
constexpr int NAxesBase = 12; // mass, pt, rapidity, d0Type, gapType, FT0A, FT0C, FV0A, FDDA, FDDC, ZNA, ZNC
constexpr int NAxesBase = 13; // mass, pt, rapidity, d0Type, gapType, FT0A, FT0C, FV0A, FDDA, FDDC, ZNA, ZNC, nPVcontr
constexpr int NAxesMl = FillMl ? 3 : 0; // 3 ML scores if FillMl
int const nAxesCent = storeCentrality ? 1 : 0; // centrality if storeCentrality
int const nAxesOccIR = storeOccupancyAndIR ? 2 : 0; // occupancy and IR if storeOccupancyAndIR
Expand Down Expand Up @@ -686,6 +688,7 @@ struct HfTaskD0 {
valuesToFill.push_back(static_cast<double>(fitInfo.ampFDDC));
valuesToFill.push_back(static_cast<double>(zdcEnergyZNA));
valuesToFill.push_back(static_cast<double>(zdcEnergyZNC));
valuesToFill.push_back(static_cast<double>(numPvContributors));

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