-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[RF] Correctly sync proxy normalization sets in RooAddPdf::getValV()
#10885
Conversation
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.
Starting build on |
Build failed on ROOT-performance-centos8-multicore/cxx17. Failing tests: |
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.
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; |
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.
Why are you using here _value
instead of a local value
variable ?
Is this intended ?
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.
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.
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.