tree2array does not support selections based on vector sizes?
RohithKarur opened this issue · 3 comments
RohithKarur commented
Hello,
I tried creating an array from a tree with each entry being a vector. I want to filter by setting a condition that the vector's size needs to be 1, like this: tree2array(ttree,branches=["ph"],selection="ph.size >1")
, where ph
is the entry in question. However, everytime I use ph.size
specifically, the program always crashes. Is there a possibility of a bug or am I doing something wrong?
Thank you!
kratsg commented
Did you try @ph.size() > 1
?
RohithKarur commented
Yes this worked. Thank you! Also, do you know by any chance how to denote the absolute value of a quantity within a selection?
kratsg commented
Doesn't $Abs
work? All of these questions are ROOT-specific, rather than root-numpy specific fyi.