Skip to content

Conversation

guitargeek
Copy link
Contributor

As a normalization set within evaluate(), the RooGenericPdf used the
RooAbsPdf::_normSet member, and the RooFormulaVar used the
RooAbsReal::_lastNSet member. Both of them are not supposed to be used
outside the implementation of RooAbsPdf::getValV() and
RooAbsReal::getValV() and they are unreliable in any other context.

Actually, in evaluate(), one should always use the normalization set
from the proxy, which is in this case a RooArgList (see for example how
the RooAddition does it). This commit suggests to do that for the
RooGenericPdf and RooFormulaVar.

This change fixes the following Jira issue:
ROOT-5101

A new unit test is implemented in testGenericPdf to cover the problem
reported in that issue.

As a normalization set within `evaluate()`, the RooGenericPdf used the
`RooAbsPdf::_normSet` member, and the RooFormulaVar used the
`RooAbsReal::_lastNSet` member. Both of them are not supposed to be used
outside the implementation of `RooAbsPdf::getValV()` and
`RooAbsReal::getValV()` and they are unreliable in any other context.

Actually, in `evaluate()`, one should always use the normalization set
from the proxy, which is in this case a RooArgList (see for example how
the RooAddition does it). This commit suggests to do that for the
RooGenericPdf and RooFormulaVar.

This change fixes the following Jira issue:
[ROOT-5101](https://sft.its.cern.ch/jira/browse/ROOT-5101)

A new unit test is implemented in `testGenericPdf` to cover the problem
reported in that issue.
@phsft-bot
Copy link

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

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:

@guitargeek
Copy link
Contributor Author

Failures on centos8 are all unrelated to this PR, but related to the known issue with llvm::identify_magic.

Copy link
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

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

Successfully merging this pull request may close these issues.

3 participants