TTree::Draw() with weights

From: Christoph Ernst (ernst@th.physik.uni-frankfurt.de)
Date: Thu Nov 12 1998 - 12:22:14 MET


Hello,

Is there a simple way to rescale the y-axis of a TH1 when you plot it from
TTree::Draw()?
For example I want to draw a pt spectrum via tree->Draw("pt"). But as
1/pt * dN/dpt  not just as  dN/dpt.
Also, I would like to plot histos from a Tree where each entry has a
specific weight w (something like dw/dx). In a loop I would simply say
h1->Fill(x_i, w_i);.
But I cannot figure out how to do this in the nice way of TTree::Draw().
If TTree::Draw() can't do it, what do you think is the best alternative?

Greetings
	Christoph

>>
Christoph Ernst
Institut fuer Theoretische Physik 
Johann Wolfgang Goethe-Universitaet  
Robert-Mayer-Str. 10        
60054 Frankfurt/Main    
Germany

e-mail:          ernst@th.physik.uni-frankfurt.de
Office:          Robert-Mayer-Strasse 10, Room 511
Office Phone:    069 - 798 22844
Priv. Phone:	 069 - 47 29 88
http://www.th.physik.uni-frankfurt.de/~ernst



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