Import data from array in TTree to a RooDataSet

Hi,

I’m trying to import data into a RooDataSet from a TTree.
The variable I’m trying to access is an array of floats of which I want to keep only the first.

So I do:
RooRealVar sIeta(“varname[0]”,“varname[0]”,0,0.03) ;
TChain* chain=new TChain(“tree”);
chain->Add(“myfile.root/TreeName”);
RooDataSet* data3 = new RooDataSet(“data3”,“data3”,sIeta,Import(*chain)) ;

This somehow fills the RooDataSet with only one value.
Is there a way arond it or do I have to use a tree with only non-array branches?

Cheers,
Laurent

Hi Laurent,

RooDataSets can at present only import non-array branches.

Supporting constructions like you use below is on the to-do
list for the next release.

Wouter

Hi Experts,

I am new to Roostats. Regarding this issue, Do you have any update or workaround ?

Thank you,

Cheers,
SC

Bump. I’ve just hit this. Do I really have to recreate my tree with flat branches? #-o

Bump.

[quote=“pwaller”]Bump. I’ve just hit this. Do I really have to recreate my tree with flat branches? #-o[/quote] Me too.
For all new comers: vote for this feature on Jira: sft.its.cern.ch/jira/browse/ROOT-2753

any update on this?