Skip to content

[RF] Correctly sync proxy normalization sets in RooAddPdf::getValV()#10885

Merged
guitargeek merged 1 commit intoroot-project:masterfrom
guitargeek:issue-10869
Jul 4, 2022
Merged

[RF] Correctly sync proxy normalization sets in RooAddPdf::getValV()#10885
guitargeek merged 1 commit intoroot-project:masterfrom
guitargeek:issue-10869

Conversation

@guitargeek
Copy link
Copy Markdown
Contributor

When getValV() was directly implemented in RooAddPdf, it was missed to
copy-paste the part from RooAbsPdf::getValV() where the normalization
sets for the proxies was synced.

A unit test with the reproducer for an issue caused by missing the
syncing is also introduced with this commit, involving the SPlot from
RooStats.

Closes #10869.

When getValV() was directly implemented in RooAddPdf, it was missed to
copy-paste the part from RooAbsPdf::getValV() where the normalization
sets for the proxies was synced.

A unit test with the reproducer for an issue caused by missing the
syncing is also introduced with this commit, involving the SPlot from
RooStats.

Fixes root-project#10869.
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Copy Markdown

Build failed on ROOT-performance-centos8-multicore/cxx17.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Failing tests:

Copy link
Copy Markdown
Member

@lmoneta lmoneta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Just one comment that I am not sure how relevant it is.
Thank you for the fix and nice you add also a test

}
// Do running sum of coef/pdf pairs, calculate lastCoef.
if (isValueDirty() || nsetChanged) {
_value = 0.0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you using here _value instead of a local value variable ?
Is this intended ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this it intended (it's the same code as in RooAbsPdf). We want to calculate in-place the _value variable such that the value can be retrieved directly from there then the AddPdf is not dirty when evaluated the next time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RF] sPlot does not work with RooAddPdf in 6.26/04

3 participants