From 362e4a3bffd7d6ad73a0aa720e72dba109089a50 Mon Sep 17 00:00:00 2001 From: BiaoZhang Date: Sun, 29 Nov 2026 21:09:21 +0100 Subject: [PATCH] [PWGHF] Fix MC D0bar reflection THnSparse filling Commit 1151e2598218a (O2Physics #17233) removed the unconditional number-of-PV-contributors axis from the reconstructed MC sparse. The axis is now added only when centrality is stored. Three ML D0bar reflection paths without centrality still supplied numPvContributors. HistogramRegistry treats one argument beyond the axis count as a fill weight. In the default nine-axis layout this weighted each D0bar reflection by the number of PV contributors. In the occupancy/IR and track-quality layouts the extra argument also shifted the optional coordinates and turned the last coordinate into the weight. The MC sample showed 34,383,977 summed weights for 696,196 unweighted D0bar reflection entries in the same pT and mass window. Drop the extra argument in those three paths. Validate both reflection categories with and without ML across the five axis layouts using ROOT, including a reproduction of the original implicit weighting. --- PWGHF/D2H/Tasks/taskD0.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGHF/D2H/Tasks/taskD0.cxx b/PWGHF/D2H/Tasks/taskD0.cxx index 260f6b07fc2..608f7fbb8bf 100644 --- a/PWGHF/D2H/Tasks/taskD0.cxx +++ b/PWGHF/D2H/Tasks/taskD0.cxx @@ -1256,11 +1256,11 @@ struct HfTaskD0 { } else if (storeCentrality && !storeOccupancyAndIR) { registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0bar()[0], candidate.mlProbD0bar()[1], candidate.mlProbD0bar()[2], massD0bar, ptCandidate, rapidityCandidate, ReflectedD0bar, candidate.ptBhadMotherPart(), candidate.originMcRec(), cent, numPvContributors); } else if (!storeCentrality && storeOccupancyAndIR) { - registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0bar()[0], candidate.mlProbD0bar()[1], candidate.mlProbD0bar()[2], massD0bar, ptCandidate, rapidityCandidate, ReflectedD0bar, candidate.ptBhadMotherPart(), candidate.originMcRec(), numPvContributors, occ, ir); + registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0bar()[0], candidate.mlProbD0bar()[1], candidate.mlProbD0bar()[2], massD0bar, ptCandidate, rapidityCandidate, ReflectedD0bar, candidate.ptBhadMotherPart(), candidate.originMcRec(), occ, ir); } else if (storeTrackQuality) { - registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0bar()[0], candidate.mlProbD0bar()[1], candidate.mlProbD0bar()[2], massD0bar, ptCandidate, rapidityCandidate, ReflectedD0bar, candidate.ptBhadMotherPart(), candidate.originMcRec(), numPvContributors, minItsClustersOfProngs, minTpcCrossedRowsOfProngs); + registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0bar()[0], candidate.mlProbD0bar()[1], candidate.mlProbD0bar()[2], massD0bar, ptCandidate, rapidityCandidate, ReflectedD0bar, candidate.ptBhadMotherPart(), candidate.originMcRec(), minItsClustersOfProngs, minTpcCrossedRowsOfProngs); } else { - registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0bar()[0], candidate.mlProbD0bar()[1], candidate.mlProbD0bar()[2], massD0bar, ptCandidate, rapidityCandidate, ReflectedD0bar, candidate.ptBhadMotherPart(), candidate.originMcRec(), numPvContributors); + registry.fill(HIST("hBdtScoreVsMassVsPtVsPtBVsYVsOriginVsD0Type"), candidate.mlProbD0bar()[0], candidate.mlProbD0bar()[1], candidate.mlProbD0bar()[2], massD0bar, ptCandidate, rapidityCandidate, ReflectedD0bar, candidate.ptBhadMotherPart(), candidate.originMcRec()); } } else { if (storeCentrality && storeOccupancyAndIR) {