-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[RF] RooDataSetHelper doesn't respect RooRealVar range #11017
Copy link
Copy link
Closed
Description
- Checked for duplicates
Describe the bug
I have some data in RDataFrame, and I want to fit them using RooFit. I book a RooDataSet using the RooDataSetHelper like this
auto data_set = df.Book<double, double>(
RooDataSetHelper("data_set", "title", RooArgSet(var1, var2)), {"var1", "var2"});The fit is wrong because the data_set doesn't respect the limits on var1 and var2, resulting in an incorrect normalization.
The only difference in the following simplified fits is that I used
auto data_set = df.Book<double, double>(for the first one, and
auto data_set = df.Filter("var2>2005 && var2<2020").Book<double, double>(for the second one.
Expected behavior
I expected the RooDataSet to account for the RooRealVar range.
To Reproduce
- Get any
RDataFrame - Create a
RooRealVarwith limits narrower than the corresponding data in theRDataFrame - Use
RooDataSetHelperto book aRooDataSetfrom theRDataFrameusing theRooRealVar - Fit the
RooRealVarof theRooDataSet - The fit will be wrong unless you cut on the
RDataFrameto match the limits of theRooRealVar
Setup
ROOT 6.26/04
macOS 12.4
Brew install
Additional context
Reactions are currently unavailable

