Added correction factor for RooMultiPdf#19408
Merged
guitargeek merged 5 commits intoroot-project:masterfrom Jul 23, 2025
Merged
Added correction factor for RooMultiPdf#19408guitargeek merged 5 commits intoroot-project:masterfrom
guitargeek merged 5 commits intoroot-project:masterfrom
Conversation
dpiparo
reviewed
Jul 18, 2025
Member
dpiparo
left a comment
There was a problem hiding this comment.
just a few preliminary comments.
guitargeek
reviewed
Jul 21, 2025
Also have a `dynamic_cast` check if the pdfClone inside createNLLImpl is actually a RooAbsPdf to prevent similar problems in the future.
Upstream from CMS Combine functions relevant for parameter freezing when using RooMultiPdfs.
Test Results 21 files 21 suites 3d 19h 10m 42s ⏱️ For more details on these failures, see this check. Results for commit db17aeb. |
guitargeek
approved these changes
Jul 23, 2025
Contributor
guitargeek
left a comment
There was a problem hiding this comment.
Thanks a lot for the PR and addressing the review comments! I have also added the commit with the upstreamed helper functions from combine, that can now be included because you have moved the RooMultiPdf to RooFit core.
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.
In this PR I implement the correction factor for RooMultiPdf.This is done via virtual function override in the RooMultiPdf header file on line 23:
inline double getCorrection() const override {
return cFactor * static_cast<RooAbsReal *>(corr.at(x))->getVal(); }
This overrides a newly added virtual function in RooAbsPdf.h on line 180 called getCorrection. Than the correction factor is added to the NLL via a piece of code in the file FitHelpers.cxx.A gtest was created in order to asses the performence of the implementation.The test yields a result:
Also the header and the source file for the RooMultiPdf are moved to roofitcore in order to support an upcoming feature from CMS combine freezeParameters().