[v640] Backport recent RooFit fixes to the release branch#22091
Merged
Conversation
Both classes are public now, so it's quite useful to access the
underlying `RooFit::Evaluator` from the `RooEvaluatorWrapper`, which is
the class that represents likelihoods returned by
`RooAbsPdf::createNLL()`. This is helpful for debugging.
This also means we don't have to hack into the verbose printing
(`Print("v")`) to make the Evaluator debugging printouts available.
(cherry picked from commit 311ec24)
RooProjectedPdf::compileForNormSet built the projection as a single RooRealIntegral with a function-normalization set. That integral's integrand evaluates the *normalized* inner pdf, hiding the normalization integral inside `RooAbsPdf::_normMgr`. With the recent move to ADirty for non-fundamental compute-graph nodes during minimization, the hidden integral is forced into ADirty too (it shares fundamental variable with the graph) and recomputes from scratch on every call by the outer integrator. For models with deep projections like the RooStats Feldman-Cousins tutorial, this caused a large performance regression. This commit suggests to rewrite the projection as an explicit ratio of two unnormalized integrals, so both integrals become sibling nodes in the compute graph and the `RooFit::Evaluator` caches their values. The factorization is not always safe: when the inner pdf forces analytical integration for any of the integration observables, the pdf is usually exploiting analytical-integration hooks for special integral semantics (e.g. a RooProdPdf with Conditional terms) and the simple numerator/denominator identity does not hold. Fall back to the original code path in that case. (cherry picked from commit 54af3a2)
These tutorials are very sensitive to problems with caching in the computation graph because of the double integrals they contain, and it has already happened twice that their runtime regressed to several hours without us noticing only later in the documentation build. Even if these tests take a minute, it's worth to keep them to make sure these kind of regressions can't happen in the future. Also, enable silent variable clipping, as clipping happens in these tutorials and we don't want them to finish with an exception. (cherry picked from commit 5770a3d)
As promised in the documentation and release notes. (cherry picked from commit 3c112cb)
This is to be more consistent with the existing RooFit names, like RooParamHistFunc, RooHistFunc, RooPolyFunc, RooRealSumFunc, et cetera. (cherry picked from commit 22a7139)
Test Results 22 files 22 suites 3d 11h 28m 16s ⏱️ For more details on these failures, see this check. Results for commit 2e20467. |
cd805a4
into
root-project:v6-40-00-patches
28 of 33 checks passed
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.