Hi
I am playing a bit with RDataFrames and having a problem. I have some vector<float*> branches in a TTree, and I wish to extract the Mean of indexed elements. My code so far is very simplistic (and using pyROOT). I expected that I would need to define a new column to flatten the variable, eg
rdf.Define("j0","jet_pt[0]"). This is allowed but when I attempt to calculate the Mean, eg rdf.Mean("j0").GetValue(), I get the error TypeError: can not resolve method template call for 'Mean'. Do I need to somehow cast the variable in python when I create a new column, or do I need to call something to “activate” the new column? I can call rdf.Mean("jet_pt") which returns a value running over all the elements in the vector.
I am not sure how to continue and could not find a tutorial showing this.
Thanks,
Ian
ROOT Version: 6.14.04
Platform: SLC6
Compiler: gcc62