Skip to content

[RF] Fix RooProdPdf-wrapped RooAddPdf yield in ranged fits - #23017

Open
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:issue-16673
Open

[RF] Fix RooProdPdf-wrapped RooAddPdf yield in ranged fits#23017
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:issue-16673

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

A RooProdPdf that wraps a RooAddPdf (the common way to attach constraint terms to a model, e.g. PROD::model(add, constraints)) gave a different fitted yield than the bare RooAddPdf in a ranged fit. The bare RooAddPdf reinterprets its coefficients with respect to the full range, but the one nested in the RooProdPdf did not, so its yield collapsed to the number of events inside the fit range instead.

The reason is that the normalization range set on the RooProdPdf during a ranged fit was not propagated to its component pdfs, so the nested RooAddPdf never saw the fit range and skipped the coefficient reinterpretation. Propagate the normalization range to the components during compilation, mirroring what RooAddPdf already does for its own components.

The range is only propagated to components for which it is actually defined. Constraint pdfs of nuisance parameters are normalized over observables that don't know about the fit range, and forcing it on them would be wrong (and for a multi-range even throws because the undefined sub-ranges collapse to the full range and overlap).

Closes #16673.

🤖 Done with the help of AI.

A RooProdPdf that wraps a RooAddPdf (the common way to attach constraint
terms to a model, e.g. PROD::model(add, constraints)) gave a different
fitted yield than the bare RooAddPdf in a ranged fit. The bare RooAddPdf
reinterprets its coefficients with respect to the full range, but the
one nested in the RooProdPdf did not, so its yield collapsed to the
number of events inside the fit range instead.

The reason is that the normalization range set on the RooProdPdf during
a ranged fit was not propagated to its component pdfs, so the nested
RooAddPdf never saw the fit range and skipped the coefficient
reinterpretation. Propagate the normalization range to the components
during compilation, mirroring what RooAddPdf already does for its own
components.

The range is only propagated to components for which it is actually
defined. Constraint pdfs of nuisance parameters are normalized over
observables that don't know about the fit range, and forcing it on them
would be wrong (and for a multi-range even throws because the undefined
sub-ranges collapse to the full range and overlap).

Closes root-project#16673.

🤖 Done with the help of AI.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 21h 9m 54s ⏱️
 3 856 tests  3 851 ✅ 0 💤  5 ❌
78 541 runs  78 524 ✅ 0 💤 17 ❌

For more details on these failures, see this check.

Results for commit 87588ef.

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.

[RF] Different behaviour of multi-range fit in RooAddPdf and RooProdPdf

1 participant