Skip to content

[PWGLF] Propagate uncertainty from efficiency if required#16116

Merged
romainschotter merged 2 commits intoAliceO2Group:masterfrom
scannito:corrections
May 5, 2026
Merged

[PWGLF] Propagate uncertainty from efficiency if required#16116
romainschotter merged 2 commits intoAliceO2Group:masterfrom
scannito:corrections

Conversation

@scannito
Copy link
Copy Markdown
Contributor

@scannito scannito commented May 5, 2026

No description provided.

@github-actions github-actions Bot added the pwglf label May 5, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

O2 linter results: ❌ 1 errors, ⚠️ 0 warnings, 🔕 0 disabled

@scannito scannito marked this pull request as ready for review May 5, 2026 13:00
Copilot AI review requested due to automatic review settings May 5, 2026 13:00
@romainschotter romainschotter enabled auto-merge (squash) May 5, 2026 13:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

@romainschotter romainschotter merged commit ff49b1c into AliceO2Group:master May 5, 2026
15 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants