TTree Draw, selection on array branches

Hi,
how works the selection of the TTree::Draw when I do a cut on branch variable which is an array without specifying the index?

The selection is true if at least one of the element of the array respect the my cut?

Cheers,
Stefano

@pcanal can you let us know?

No. Each element is process ‘separately’. See ROOT: TTree Class Reference for more details. (Using the special functions Sum$ is a way to achieve the "true if at least one of the element " type of selection)

So if I have n elements branch array and the selection is true just for k elements of the array, I draw the same point/fill the histogram with the same value k times. Am I correct?

That depends on the nature of what is plotted. If it also an array then what is plotted is the ‘corresponding’ element, if it is a single value then you are right (and if it is not what you need, you may want to use the special function Sum$).

Ok, I got it
Thanks a lot

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.