Re: ?: Draw("Z:Y:X>>h2")

Nick van Eijndhoven (>h2")">Nick@fys.ruu.nl)
Tue, 14 Apr 1998 13:35:48 +0200 (MET DST)


*** Dirk Meier wrote :
>
>
> Hi,
>
> supposed I have a splitted Tree with the float values X,Y,Z.
> Is it then possible to put these values into a 2 dimensional histogram
> with weight Z summing up in the bin at X,Y ?
> I can do this in a loop reading events from the tree and filling a
> histogram, but I would prefer it done in a command like
> Draw("Z:Y:X>>h2") . Is here a solution?
>
> Dirk
>
>
>
>
Hi Dirk,
I normally do

Draw("Y:X","1*Z")

which fills a (lego) 2D histo in which Z is used as the weight for the
X-Y cell.

Cheers,

_/_/ _/ _/ _/_/_/_/ _/ _/
_/ _/ _/ _/ _/ _/ _/
_/ _/ _/ _/ _/ _/_/
_/ _/_/ _/ _/ _/ _/
_/ _/ _/ _/_/_/_/ _/ _/

*----------------------------------------------------------------------*
Dr. Nick van Eijndhoven Department of Subatomic Physics
email : >h2")">nick@fys.ruu.nl Utrecht University / NIKHEF
tel. +31-30-2532331 (direct) P.O. Box 80.000
tel. +31-30-2531492 (secr.) NL-3508 TA Utrecht
fax. +31-30-2518689 The Netherlands
WWW : http://www.fys.ruu.nl/~nick Office : Ornstein lab. 172
----------------------------------------------------------------------
tel. +41-22-7679751 (direct) CERN PPE Division / ALICE exp.
tel. +41-22-7675857 (secr.) CH-1211 Geneva 23
fax. +41-22-7679480 Switzerland
CERN beep : 13+7294 Office : B 160 1-012
*----------------------------------------------------------------------*