Hi,
I’ve been trying to import a variable from a TTree into a RooDataSet. As far as I understand, it is simple enough to import a TBranch from a TTree, where the branch contains the relevant variable. For a TBranch with the name “Mass” from the TTree “tree” I would do:
RooRealVar mass(“Mass”, “Mass”, 0, 5);
RooDataSet data(“data”, “data”, RooArgSet(mass), Import(*tree));
However, how do I import a leaf from a branch? What if I have a branch “Child1” with the leaf “Mass”? The following does not work (as I would expect it to):
RooRealVar mass(“Child1.Mass”, “Child1.Mass”, 0, 5);
RooDataSet data(“data”, “data”, RooArgSet(mass), Import(*tree));
Is this even possible to do, or can only branches be imported as variables? Thanks for any pointers on this.