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.