Weighted RooDataSet using RDataFrame

Dear expert,
I was navigating a bit ROOT Doxygen and i found that the interface of RooDataSet making to RDataFrame is there ( ROOT: roofit/RDataFrameHelpers/inc/RooAbsDataHelper.h File Reference ) , which is great to have in the latest ROOT versions.
However i am struggling to understand if the Helper class already support weighed DataSet making,
As far as I can see, the examples explicitely mention

    RooRealVar x("x", "x", -5.,   5.);
    RooRealVar y("y", "y", -50., 50.);
    auto myDataSet = rdataframe.Book<double, double>(
                      "Title of dataset",  
                      RooArgSet(x, y) },  
      {"x", "y"}                          

However i am not able to figure out if the RooDataSetHelper constructor would be able to accept “WeightVar(“y”)” argument , i.e If the weighted dataset-creation is possible already, maybe it can be added to the doxygen ?
The example macro seems to not accomodate the weighted dataset creation setup.

1 Like


that’s cool that you are interested in the RooDataSet creation from the RDataFrame!

Unfortunately it doesn’t work with weights at the moment, that’s why there is nothing about it in the documentation. But we’re trying to get this to work for the next ROOT release around September/October. The work on this is tracked in the following GitHub issue:

I hope this answers your question!


1 Like

I see thanks for pointing out the link. So at some point this will land into a release but it’s still in dev phase for some extra features.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.