Repository navigation
[RF] Rewrite rf709 with HistFactory classes and deprecate RooParamHistFunc and RooHistConstraint - #13199
Merged
Conversation
Test Results 21 files 21 suites 3d 7h 51m 47s ⏱️ For more details on these failures, see this check. Results for commit 1a7e64f. ♻️ This comment has been updated with latest results. |
Gammas of empty template bins were floating and unconstrained, i.e. flat directions of the likelihood, so HESSE failed for the Barlow-Beeston case. Fix them like HistFactory does. Also move the tutorial to tutorials/roofit/roofit with the matching \ingroup and index entry, add the includes needed for ACLiC, and update stale comments. Assisted-by: claude-code:claude-opus-5-5
Assisted-by: claude-code:claude-opus-5-5
Model the template uncertainties with ParamHistFunc and per-bin RooPoisson constraints, like HistFactory, instead of RooParamHistFunc and RooHistConstraint, and remove the rf709b copies. The docs of these two classes no longer point to rf709, since it doesn't use them anymore. Assisted-by: claude-code:claude-opus-5-5
Their functionality is too close to the HistFactory classes, which has repeatedly caused confusion. Users should switch to ParamHistFunc with per-bin RooPoisson constraints, as shown in rf709_BarlowBeeston. Both classes will be removed in ROOT 6.46. The deprecation is not guarded by ROOFIT_BUILDS_ITSELF, because that definition also reaches CMake and interpreter users. Instead, the warnings are silenced locally where RooFit still uses the classes. Assisted-by: claude-code:claude-opus-5-5
guitargeek
marked this pull request as ready for review
November 6, 2026 12:50
guitargeek
requested review from
dpiparo,
hageboeck and
silverweed
as code owners
November 6, 2026 12:50
Closed
1 task done
Contributor
|
Deprecating this class would resolve a few of the complications we have with HS3. I'm all for it 👍 |
dpiparo
approved these changes
Nov 6, 2026
1 of 2 tasks
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.
This Pull request:
Rewrites the rf709 Barlow-Beeston tutorial with the same building blocks that HistFactory uses, and deprecates
RooParamHistFuncandRooHistConstraintfor removal in ROOT 6.46.Changes or fixes:
RooParamHistFuncandRooHistConstraintduplicate what the HistFactory classes already provide for the Barlow-Beeston method. Over the last years, this has repeatedly caused confusion about which classes to use and how they differ. After this PR there is one recommended approach:ParamHistFuncscaling aRooHistFunc, with oneRooPoissonconstraint per bin, like in the models that HistFactory builds.Asig = 0.8503 ± 0.2358before and0.8506 ± 0.2358after. The new version also stops printing "Minimized function has error status". That message came fromRooHistConstraint, which returns the product of all per-bin Poisson terms. The product underflows to zero away from the minimum, because the default CPU backend takes the log of that value instead of callinggetLogVal().R__DEPRECATED(6, 46, ...)messages that point to the HistFactory alternative and to the tutorial. Their docs get\deprecatednotes, and there is a release note. The attribute is deliberately not guarded byROOFIT_BUILDS_ITSELF. That definition is exported withROOT::RooFitCoreand is also used when building the RooFit module, so a guarded deprecation would never warn CMake or interpreter users. Instead, the warnings are silenced locally where RooFit itself still uses the classes:RooHistConstraint,RooLagrangianMorphFunc, codegen, and the unit test.Checklist:
Tested locally:
testRooFitandtestCodegen;Assisted-by: claude-code:claude-opus-5-5. Claude Code compared the old and new tutorials and drafted the follow-up commits: the empty-bin fix, the Python version, the replacement of rf709, and the deprecation.
Closes #24003