Re: lego plot with weights

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Sep 09 1997 - 11:39:50 MEST


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



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:20 MET