-
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] RooDataSetHelper doesn't respect RooRealVar range #11017
Comments
The RDataFrameHelper should be consistent with creating a RooDataSet from a TTree, meaning out-of-range events should be skipped. This is implemented in this commit, borrowing the logic from `RooTreeDataStore::loadValues()`. A unit test is also implemented. The previous logic of just taking just all values to fill the dataset was very dangerous, because these values then clipped to the RooRealVar limits and biased the number of events observed at the boundaries. Closes root-project#11017.
Thank you very much for opening this issue! This is indeed very dangerous behavior. I have opened a PR to implement the skipping of out-of-range events, which is also consistent with what happens when you are reading in a RooDataSet from a TTree. |
The RDataFrameHelper should be consistent with creating a RooDataSet from a TTree, meaning out-of-range events should be skipped. This is implemented in this commit, borrowing the logic from `RooTreeDataStore::loadValues()`. A unit test is also implemented. The previous logic of just taking just all values to fill the dataset was very dangerous, because these values then clipped to the RooRealVar limits and biased the number of events observed at the boundaries. Closes root-project#11017.
The RDataFrameHelper should be consistent with creating a RooDataSet from a TTree, meaning out-of-range events should be skipped. This is implemented in this commit, borrowing the logic from `RooTreeDataStore::loadValues()`. A unit test is also implemented. The previous logic of just taking just all values to fill the dataset was very dangerous, because these values then clipped to the RooRealVar limits and biased the number of events observed at the boundaries. Closes #11017.
@guitargeek Thanks for fixing it so quickly! Will this end up in the next ROOT release? |
Yes, as this is a bugfix it will also make it to 6.26.06, which will come out in a few weeks |
Hi @guitargeek, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
1 similar comment
Hi @guitargeek, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
The RDataFrameHelper should be consistent with creating a RooDataSet from a TTree, meaning out-of-range events should be skipped. This is implemented in this commit, borrowing the logic from `RooTreeDataStore::loadValues()`. A unit test is also implemented. The previous logic of just taking just all values to fill the dataset was very dangerous, because these values then clipped to the RooRealVar limits and biased the number of events observed at the boundaries. Closes root-project#11017.
The RDataFrameHelper should be consistent with creating a RooDataSet from a TTree, meaning out-of-range events should be skipped. This is implemented in this commit, borrowing the logic from `RooTreeDataStore::loadValues()`. A unit test is also implemented. The previous logic of just taking just all values to fill the dataset was very dangerous, because these values then clipped to the RooRealVar limits and biased the number of events observed at the boundaries. Closes root-project#11017.
Hi @guitargeek, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
The RDataFrameHelper should be consistent with creating a RooDataSet from a TTree, meaning out-of-range events should be skipped. This is implemented in this commit, borrowing the logic from `RooTreeDataStore::loadValues()`. A unit test is also implemented. The previous logic of just taking just all values to fill the dataset was very dangerous, because these values then clipped to the RooRealVar limits and biased the number of events observed at the boundaries. Closes #11017.
Describe the bug
I have some data in RDataFrame, and I want to fit them using RooFit. I book a
RooDataSet
using theRooDataSetHelper
like thisThe fit is wrong because the
data_set
doesn't respect the limits onvar1
andvar2
, resulting in an incorrect normalization.The only difference in the following simplified fits is that I used
for the first one, and
for the second one.
Expected behavior
I expected the RooDataSet to account for the RooRealVar range.
To Reproduce
RDataFrame
RooRealVar
with limits narrower than the corresponding data in theRDataFrame
RooDataSetHelper
to book aRooDataSet
from theRDataFrame
using theRooRealVar
RooRealVar
of theRooDataSet
RDataFrame
to match the limits of theRooRealVar
Setup
ROOT 6.26/04
macOS 12.4
Brew install
Additional context
The text was updated successfully, but these errors were encountered: