-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[RF] Explicitly set empty normalization set in RooGenProdProj
#12010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Since the change to Asimov datasets in `testTestStatistics`, there are warnings that tell you to explicitly set `SumW2Error()` because you are fitting to weighted data. That's what is done in this commit. This means the message level threshold can we changed also to not silence warnings anymore.
In `RooAbsArg::redirectServers()`, we don't need to do anything if there are no new servers or if the only new server is this RooAbsArg itself. And by returning early, we avoid potentially annoying side effects of the redirectServersHook.
The idea of the RooGenProdProj is that we divide two integral objects each created with this makeIntgral() function to get the normalized integral of a product. Therefore, we don't need to normalize the numerater and denominator integrals themselves. Doing the normalization would be expensive and it would cancel out anyway. However, if we don't specify an explicit normalization integral in createIntegral(), the last-used normalization set might be used to normalize the pdf, resulting in redundant computations. For this reason, the normalization set of the integrated pdfs is fixed to an empty set in this case. Note that in RooFit, a nullptr normalization set and an empty normalization set is not equivalent. The former implies taking the last-used normalization set, and the latter means explicitly no normalization. This fixes the performance regression reported in root-project#11814, and a new unit test is implemented to make sure no new numeric integrals pop up in the reproducer code to that issue. Unfortunately, this change means that there will be again warnings about missing `RooAddPdf` normalization sets, but this is not a regression because these warnings only got fixed in the 6.28 development cycle in 290b478.
|
Starting build on |
|
@phsft-bot build with flags -DCTEST_TEST_EXCLUDE_NONE=On |
|
Starting build on |
|
Build failed on ROOT-debian10-i386/soversion. |
lmoneta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Jonas for the fix
The idea of the RooGenProdProj is that we divide two integral objects
each created with this makeIntgral() function to get the normalized
integral of a product. Therefore, we don't need to normalize the
numerater and denominator integrals themselves. Doing the normalization
would be expensive and it would cancel out anyway. However, if we don't
specify an explicit normalization integral in createIntegral(), the
last-used normalization set might be used to normalize the pdf,
resulting in redundant computations.
For this reason, the normalization set of the integrated pdfs is fixed
to an empty set in this case. Note that in RooFit, a nullptr
normalization set and an empty normalization set is not equivalent. The
former implies taking the last-used normalization set, and the latter
means explicitly no normalization.
This fixes the performance regression reported in #11814, and a new unit
test is implemented to make sure no new numeric integrals pop up in the
reproducer code to that issue.
Unfortunately, this change means that there will be again warnings about
missing
RooAddPdfnormalization sets, but this is not a regressionbecause these warnings only got fixed in the 6.28 development cycle in
290b478.
This PR also includes some other minor improvements explained in the commit descriptions.