Repository navigation
[RF] Fix RooMomentMorphFuncND evaluation and rf617 tutorial grid setup - #22998
Merged
Merged
Conversation
`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.
Test Results 23 files 23 suites 3d 15h 17m 37s ⏱️ For more details on these failures, see this check. Results for commit 4b12c55. |
dpiparo
approved these changes
Aug 4, 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.
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 underEvalBackend::Cpu()andEvalBackend::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 defaultmu0=2.5always landed on it. Fixed the binning to match the sibling rf616 tutorial's convention, which also removes the need for theEvalBackend="legacy"workaround that was masking the resulting non-convergence.