Is there a way to create a RooDataSet from a tree with a cut, but without adding the variables used in the cut formula to the dataset? I don’t want to copy all these extra cut variables which are not used for fitting to RooDataSet, increasing the construction time and space usage.
I know I can create a RooDataSet from a tree with a RooFormula string or a RooFormulaVar argument in the RooDataSet constructor. But it seems to require the variables used for cut to be in the RooArgSet argument as well, forcing the copying of all these variables to the constructed dataset. Is there a way to avoid this?
A somewhat related note:
When creating a RooDataSet from a tree, the tree is first cloned ( see root.cern.ch/root/html/src/RooTr … html#drUW0 ) . The clone tree will lose the eventlist, so I cannot use SetEventList for cut selection for RooDataSet. And when the tree is a TTree instead of TChain, it will call CloneTree() instead of Clone(), which need a long time for copying the whole tree.
Thanks.