Skip to content

[6.42] [RF] Don't wrap jointly normalized RooProdPdf factors for normalization - #24064

Merged
guitargeek merged 1 commit into
root-project:v6-42-00-patchesfrom
root-project-bot:BP_6.42_pull_24039
Nov 9, 2026
Merged

guitargeek merged 1 commit into
root-project:v6-42-00-patchesfrom
root-project-bot:BP_6.42_pull_24039

Conversation

@root-project-bot

Copy link
Copy Markdown

Backport of #24039, requested by @guitargeek.

Factors of a RooProdPdf with overlapping normalization observables are
normalized together by a RooGenProdProj. RooProdPdf::compileForNormSet()
now creates the computation graph of the RooFixedProdPdf from a shallow
clone of the product where these factors are unwrapped from their
RooNormalizedPdf, so the RooGenProdProj integrates the unnormalized pdfs
like the scalar evaluation. The RooFixedProdPdf still forwards
analytical integrals to the product with the wrapped pdfs: with the
unwrapped ones, these integrals would not match its normalized value,
which breaks nested products.

This fixes two problems with the wrapped pdfs:

  * The RooGenProdProj clones its pdfs, and the clone of a
    RooNormalizedPdf owns a copy of its normalization integral, which
    the RooFit::Evaluator doesn't keep up to date. If the normalization
    depends on an observable, for example for a pdf conditional on it,
    the likelihood in the new test was wrong by 36 %.

  * Integrals of normalized pdfs are smaller, so the absolute tolerance
    of the numerical integration costs more precision. For the
    rf305_condcorrprod model of the HS3 test suite, the relative error
    of 1e-6 exceeded the tolerance of the suite.

The new test requires agreement with the scalar evaluation to 1e-10.

🤖 Done with the help of AI

(cherry picked from commit f441b56)
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Test Results

    24 files      24 suites   4d 3h 46m 49s ⏱️
 3 880 tests  3 879 ✅ 0 💤 1 ❌
83 620 runs  83 619 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 4cff101.

@guitargeek
guitargeek merged commit 72d3929 into root-project:v6-42-00-patches Nov 9, 2026
38 of 40 checks passed
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.

3 participants