[PWGLF] Propagate uncertainty from efficiency if required#16116
Merged
romainschotter merged 2 commits intoAliceO2Group:masterfrom May 5, 2026
Merged
[PWGLF] Propagate uncertainty from efficiency if required#16116romainschotter merged 2 commits intoAliceO2Group:masterfrom
romainschotter merged 2 commits intoAliceO2Group:masterfrom
Conversation
|
O2 linter results: ❌ 1 errors, |
romainschotter
approved these changes
May 5, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the PhiStrangenessCorrelation task to optionally propagate efficiency-map uncertainties into the filled histogram bin errors, enabling downstream analyses to include this component of uncertainty when requested.
Changes:
- Extend efficiency lookup to return both efficiency and its bin error, and compute a combined weight with propagated uncertainty (
computeWeightAndError). - Add custom histogram filling helpers to accumulate both statistical (sum of weights squared) and optional efficiency-uncertainty contributions into bin errors.
- Rename internal label arrays used for histogram naming and CCDB map loading, and add a new configuration switch (
propagateEffError).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
201
to
+205
| struct : ConfigurableGroup { | ||
| Configurable<bool> applyEfficiency{"applyEfficiency", false, "Use efficiency for filling histograms"}; | ||
| Configurable<bool> useEffInterpolation{"useEffInterpolation", false, "If true, interpolates efficiency map, else uses bin center"}; | ||
| Configurable<bool> applyPhiEfficiency{"applyPhiEfficiency", true, "Apply efficiency for Phi candidates"}; | ||
| Configurable<bool> applyPhiEfficiency{"applyPhiEfficiency", false, "Apply efficiency for Phi candidates"}; | ||
| Configurable<bool> propagateEffError{"propagateEffError", false, "Propagate efficiency error"}; |
Comment on lines
+265
to
+266
| static constexpr std::array<std::string_view, 2> PhiMassRegionLabels{"Signal", "Sideband"}; | ||
| static constexpr std::array<std::string_view, kAssocPartSize> AssocParticleLabels{"K0S", "Xi", "Pi"}; |
Comment on lines
+558
to
+562
| // float weightPhi = computeWeight(BoundEfficiencyMap(effMapPhi, multiplicity, phiCand.pt(), phiCand.y())); | ||
| auto weightPhi = computeWeightAndError(BoundEfficiencyMap(effMapPhi, multiplicity, phiCand.pt(), phiCand.y())); | ||
|
|
||
| histos.fill(HIST("phi/h3PhiData"), multiplicity, phiCand.pt(), phiCand.m(), weightPhi); | ||
| // histos.fill(HIST("phi/h3PhiData"), multiplicity, phiCand.pt(), phiCand.m(), weightPhi); | ||
| customFillHist<TH3>(HIST("phi/h3PhiData"), weightPhi, multiplicity, phiCand.pt(), phiCand.m()); |
Comment on lines
+640
to
646
| /*static_for<0, PhiMassRegionLabels.size() - 1>([&](auto i_idx) { | ||
| constexpr unsigned int Idx = i_idx.value; | ||
|
|
||
| const auto& [minMassPhi, maxMassPhi] = phiMassRegions[i]; | ||
| const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx]; | ||
| if (!phiCand.inMassRegion(minMassPhi, maxMassPhi)) | ||
| return; | ||
|
|
Comment on lines
+749
to
755
| /*static_for<0, PhiMassRegionLabels.size() - 1>([&](auto i_idx) { | ||
| constexpr unsigned int Idx = i_idx.value; | ||
|
|
||
| const auto& [minMassPhi, maxMassPhi] = phiMassRegions[i]; | ||
| const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx]; | ||
| if (!phiCand.inMassRegion(minMassPhi, maxMassPhi)) | ||
| return; | ||
|
|
Comment on lines
+853
to
859
| /*static_for<0, PhiMassRegionLabels.size() - 1>([&](auto i_idx) { | ||
| constexpr unsigned int Idx = i_idx.value; | ||
|
|
||
| const auto& [minMassPhi, maxMassPhi] = phiMassRegions[i]; | ||
| const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx]; | ||
| if (!phiCand.inMassRegion(minMassPhi, maxMassPhi)) | ||
| return; | ||
|
|
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.
No description provided.