RooFit: Import TTree data while respecting the TEntryList

What is the correct way of importing data into a RooDataSet from a TTree which has a TEntryList set on it?

Currently, I’ve found the only way to do this, is to set the TEntryList on the TTree, then call CopyTree on this tree to get a copy and then use the copy to initialize the RooDataSet. This however gets unmanagable when the TTrees you wish to copy are many GBs in size. It would be best if I could just set the TEntryList on the TTree and then when RooDataSet Imports the data, it just automatically only reads those events which are in the TEntryList.

Hi,

The RooDataSet is anyway of copy of the Tree. So I think there are no problem to create a reduced tree or just analyze the TTree directly and fill the RooDataSet using RooDataSet::add in a standalone program

Cheers

Lorenzo