> I am doing an analysis job where I create the same 1D histogram for
> several bins of a reference variable. I was wandering if it is
> possible to do this with a TH2D, instead, but I should have the
> possibility to take a single "row" of such TH2D to retrieve the
> corresponding TH1D with only the entries in that row, because I
> think that this is less memory demanding, and it could allow to have
> a very large number of bins in both dimensions of the histogram,
> which would be of great advantage to me.
>
> Is this possible in an automatic way?
http://root.cern.ch/root/html522/TH2.html
Look at the functions ProjectionX and ProjectionY. You can select just one single bin as the start and stop and the resulting histogram should be a 1D histogram of the other axis of that particular bin. I have used this for exactly the purpose you plan to use it (to store N TH1D histograms inside one TH2D histogram).
Mario Received on Mon Feb 23 2009 - 13:29:21 CET
This archive was generated by hypermail 2.2.0 : Mon Feb 23 2009 - 17:50:01 CET