Skip to content

[RF] Implement RooMomentMorphFuncND::compileForNormSet()#22105

Open
guitargeek wants to merge 3 commits intoroot-project:masterfrom
guitargeek:morphing_slowdown
Open

[RF] Implement RooMomentMorphFuncND::compileForNormSet()#22105
guitargeek wants to merge 3 commits intoroot-project:masterfrom
guitargeek:morphing_slowdown

Conversation

@guitargeek
Copy link
Copy Markdown
Contributor

@guitargeek guitargeek commented Apr 29, 2026

Transform the RooMomentMorphFuncND instance to an expended computation graph that can be evaluated by the RooFit::Evaluator without missing some internal RooAbsArgs that could be cached.

Closes #22070.

@guitargeek guitargeek self-assigned this Apr 29, 2026
@guitargeek guitargeek changed the title Morphing slowdown [RF] Implement RooMomentMorphFuncND::compileForNormSet() Apr 29, 2026
Transform the RooMomentMorphFuncND instance to an expended computation
graph that can be evaluated by the `RooFit::Evaluator` without missing
some internal RooAbsArgs that could be cached.
This is a reoccuring pattern that merits its own helper function.
…paths

In the Evaluator backend, the compile-time analytical-integral
construction, doEval, and analyticalIntegralWN each queried `_cacheMgr`
with a different (or null/empty) RooArgSet, so the heavy cache content
was rebuilt on the first fit step instead of reusing the slot populated
during NLL setup.

Pin a stable `_compiledNormSet` on the cloned pdf in compileForNormSet
for doEval to use, and let analyticalIntegralWN fall back to `anaVars`
when the stored `normSet2` is empty so its key mirrors
getAnalyticalIntegralWN's. All three paths now hit the same slot.

Fixes the stressRooFit -b cpu -n 47 slowdown vs the legacy backend
(RooIntegralMorph fit with setCacheAlpha(true)).
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.

Broken RooMomentMorphFuncND

1 participant