Skip to content

[RF] Fix RooMomentMorphFuncND evaluation and rf617 tutorial grid setup - #22998

Merged
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:fix-rf617-momentmorph
Aug 4, 2026
Merged

guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:fix-rf617-momentmorph

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

RooMomentMorphFuncND::findShape() silently kept a stale hypercube-corner index left over from a previous, unrelated call whenever the current point's corner had no matching entry in the reference grid, instead of failing. This made the morph's cached fractions depend on evaluation history instead of purely on the current parameters, reproducing identically under EvalBackend::Cpu() and EvalBackend::Legacy(). Now throws a clear error naming the missing grid corner.

The rf617 tutorial's own grid construction triggered this: it built RooBinning(n_bins, 0, n_bins-1), giving non-integer bin boundaries, while templates were generated at integer mu values and registered at those boundary values. So the last grid corner had no template at all, and the tutorial's default mu0=2.5 always landed on it. Fixed the binning to match the sibling rf616 tutorial's convention, which also removes the need for the EvalBackend="legacy" workaround that was masking the resulting non-convergence.

`RooMomentMorphFuncND::findShape()` silently kept a stale
hypercube-corner index left over from a previous, unrelated call
whenever the current point's corner had no matching entry in the
reference grid, instead of failing. This made the morph's cached
fractions depend on evaluation history instead of purely on the current
parameters, reproducing identically under `EvalBackend::Cpu()` and
`EvalBackend::Legacy()`. Now throws a clear error naming the missing
grid corner.

The rf617 tutorial's own grid construction triggered this: it built
`RooBinning(n_bins, 0, n_bins-1)`, giving non-integer bin boundaries,
while templates were generated at integer mu values and registered at
those boundary values. So the last grid corner had no template at all,
and the tutorial's default `mu0=2.5` always landed on it. Fixed the
binning to match the sibling rf616 tutorial's convention, which also
removes the need for the `EvalBackend="legacy"` workaround that was
masking the resulting non-convergence.
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 15h 17m 37s ⏱️
 3 853 tests  3 851 ✅ 0 💤 2 ❌
78 505 runs  78 493 ✅ 9 💤 3 ❌

For more details on these failures, see this check.

Results for commit 4b12c55.

@guitargeek
guitargeek merged commit abff3e5 into root-project:master Aug 4, 2026
30 of 38 checks passed
@guitargeek
guitargeek deleted the fix-rf617-momentmorph branch August 4, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants