Plotting elements of arrays in Trees

Hi,

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,
tree->Draw(“a”);
everything looks fine. When I plot b using,
tree->Draw(“b[0]”);
I get sort of what I expect but not enough entries in the plot. Moreover, When I try
tree->Draw(“b[][0]”);
I get something that doesn’t look even close. However, when I try,
tree->Draw(“b[0][0]”);
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?

Thanks,

Robert

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
root.cern.ch/root/htmldoc//TTree … DrawSelect

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

Rene