[PWGHF] Add centrality dependent d0 efficiency and track efficiency - #17991
Merged
singhra1994 merged 5 commits intoSep 21, 2026
Conversation
…fficiency-and-track-efficiency
…fficiency-and-track-efficiency
…fficiency-and-track-efficiency
ayankrmanna
requested review from
NicoleBastid,
alibuild,
apalasciano,
deepathoms,
fcatalan92,
fcolamar,
fgrosa,
gluparel,
hahassan7,
jpxrk,
mfaggin,
mmazzilli,
singhra1994,
stefanopolitano,
vkucera,
xinyepeng and
zhangbiao-phy
as code owners
September 20, 2026 21:54
|
O2 linter results: ❌ 0 errors, |
Collaborator
|
Error while checking build/O2Physics/code-check for d014d14 at 2026-09-21 00:21: Full log here. |
Contributor
Author
|
Dear experts, All checks have passed. If there are no further suggestions or requested changes, could you please proceed with the merge? Thank you. |
singhra1994
approved these changes
Sep 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR extends
PWGHF/HFC/Tasks/taskCorrelationD0Hadrons.cxxto supportcentrality-dependent D0 reconstruction efficiency and associated-track
efficiency for the D0-hadron correlation analysis.
The implementation keeps the existing minimum-bias mode available through
useCentrality = false, while adding a centrality-dependent mode throughuseCentrality = true.The centrality estimator is configurable, with FT0M used by default.
Main changes
1. Centrality-dependent D0 candidate efficiency
The MC candidate-efficiency processing has been reorganised to loop over MC
collisions and the reconstructed collisions associated with them.
New collision aliases and preslices are introduced to connect:
For the generated denominator, the event activity is defined as:
useCentrality = true:reconstructed-collision centrality assigned to the corresponding MC collision
using
getCentralityGenColl()useCentrality = false:multMCFT0A + multMCFT0CFor reconstructed candidates:
useCentrality = true:centrality obtained with
getCentralityColl()useCentrality = false:reconstructed FT0M multiplicity
The centrality calculation and the
centralityMin/centralityMaxselectionare applied only when
useCentralityis enabled.2. Centrality-dependent efficiency histograms
When
useCentrality = true, the D0 efficiency histograms are stored as2-dimensional histograms versus D0 transverse momentum and centrality:
hPtCandMcGenPrompthPtCandMcGenNonPrompthPtCandMcRecPrompthPtCandMcRecNonPromptThe
hCandidatesstep histogram also uses centrality as its event-activity axis.When
useCentrality = false, the original minimum-bias behaviour is retained,with 1D candidate-efficiency histograms and FT0M multiplicity in
hCandidates.3. Reconstructed D0 / D0bar hypothesis handling
The reconstructed candidate selection was updated to treat the D0 and D0bar
hypotheses independently.
The task now:
rejectD0D0barHypothesisconfigurable.This avoids counting a truth-matched D0 candidate only because the opposite
mass hypothesis passed the ML selection.
4. Associated-track efficiency
A new
processMcTrackEfficiencyprocess is added for evaluating the efficiencyof associated charged particles.
The generated denominator contains physical-primary:
The reconstructed numerator applies the configured track filtering together
with the global-track and TPC crossed-row requirements.
For
useCentrality = true, the generated and reconstructed track-efficiencyhistograms are stored as THnSparse objects with axes:
For
useCentrality = false, the corresponding minimum-bias histograms remain1D versus pT.
Separate generated and reconstructed histograms are provided for:
Fake-collision and fake-track counters are also added.
5. Additional efficiency selections
The following configurables are introduced:
useSel8ForEffremoveCollWSplitVtxcentEstimatorcutCollPosZMccentralityMincentralityMaxThese allow the efficiency calculation to apply the same event-level selections
needed by the analysis and to optionally reject MC collisions associated with
multiple reconstructed collisions.
6. Centrality estimator support
The following reconstructed centrality estimators are supported through
centEstimator:FT0M is the default estimator.
The centrality utilities from
PWGHF/Core/CentralityEstimation.hare used forthe MC/reconstructed collision association and centrality extraction.
7. PDG-code handling
TPDGCode.his explicitly included because the associated-track efficiencyuses the ROOT PDG constants:
kElectronkMuonMinuskPiPluskKPluskProton