Re: lego plot with weights

Rene Brun (Rene.Brun@cern.ch)
Tue, 09 Sep 1997 11:39:50 +0200


Nick van Eijndhoven wrote:
>
> Dear ROOTers,
> I have a TTree containing a.o. data for calorimeter cells.
> A cell is specified by a row and column number (the usual matrix geometry)
> and contains some signal.
> To view an event I would like to plot row%column in a lego plot with the
> signal as weight (= height of the bin).
> How can I achieve this ?
> The PAW equivalent would be : nt/plot 999.row%col signal
>
> Within ROOT I tried : (h999 is my TTtree)
>
> h999.Draw("ROW:COL:SIGNAL","EVENTNO==5","lego")
>
> but the result is a 3d plot but not in the usual LEGO format, so that I
> can't investigate the various signal heights from it.

The equivalent of the PAW command above is:
h999.Draw("ROW:COL", "SIGNAL");

If you want to make an additional cut and make a lego plot, do:
h999.Draw("ROW:COL", "SIGNAL*(EVENTNO==5)","lego")

More examples are given in the tutorial ntuple1.

Rene Brun