Dear @bellenot
Thank you. I’ve searched for the topic before. These items are discussing a bit different problem for different needs, and none of them allows to get list of used branched/leaves.
Hi Philippe @pcanal
Thanl you very much. I’ll make a try tomorrow.
(btw - from descriptio of methods this action is not very obviou. Probably it is worth to extend
a bit documentation strings here
My task is rather simple. In my project I often has a tree with very large number of branches
and I often want to prefilter it filter out unnesessary entries and and use only reduced num,ber of variables, but using only “a bit loose” selection criteria, postpoinng the final filtering to the last step. Since initial number of variables is eally huge, and finally I need only O(10) varibales + several varaibles used for “loose versions” of selection criteria, such operation allows me to reduce data very efficiently, and to prepare very compact tree with only interesintng variables and manageable number of entries.
hi Philippe @pcanal
It is exactly way I am using, but for this I need to know the list of branches I want to keep :-).
And thats why I am asking how to get branches from TTreeFormula
Thank you!
So the following will retrieve a list of top level branch used in the TTreeFormula (with potentially repeats if the same branch is used multiple time directly (or indirectly as a parent):