Hi. I decided to post this problem again because I was no clear in the previous post. I guess “nested loop” is a better description of my problem than “multiple loops”.
I have a branch with an object Spectrometer, which has two object of type Detector. The Detector has 2 arrays *fX and fY with fNhits elements. I need to plot a TH2F histogram where for each X[i] all the Y[j] (j=0;j<fNhit) are plotted. I have looked at the TTree::Draw documentation and the forum but could not find anything that seems quick and easy to use. The closest solution I found seems to be using MakeProxy, but we don’t want (if possible) to have separate files with scripts spread around.
The Draw(“Y:X”) doesn’t do what I need, because it plots the pairs X:Y, X:Y and so on, but I need X:Y, X:Y, X:Y,…,X:Y, X:Y, and so on.