Plotting elements of arrays in Trees


I’m confused as to how to appropriately plot a single element of an array in a tree. For instance, I define my tree to have variables:

Float_t a, b[3] , …

Then I fill these into a tree with many instances. When I plot the first one using,
everything looks fine. When I plot b using,
I get sort of what I expect but not enough entries in the plot. Moreover, When I try
I get something that doesn’t look even close. However, when I try,
I get what I expect.

Perhaps there is something that I don’t understand. How do I appropriately use the implicit index When I use Draw() or even TCut?



You must tell us a bit more about your array b[3].
Do you have this array only once per Tree entry?
or do you have this array in a variable length array of objects like
a TClonesArray or std::vector?

Did you read the documentation “Drawing expressions using arrays and array elements” at … DrawSelect

Which version of ROOT are you using?
In case you are still lost, please post a short file and we will investigate.