[ROOT] sumw2 array

From: Tommaso Chiarusi (Tommaso.Chiarusi@bo.infn.it)
Date: Fri Nov 28 2003 - 16:39:49 MET


dear rooters,

I have a TH2.
I want to re-weight each bin according to the average of a 
variable with 
respect to the number of elements contained in each bin.

For example: if I have a tree with X Y and V leaves,
by 

tree->Draw("Y:X","V","lego");

I get a 3-D plot with for each bin, on the Z axis, the sum of the values 
related variable V over all the elements which occur in such bin.

Instead I would like to have an average of V for each bin.

I noticed  that it is possible to create a  structure (an array) of the 
square  of the bins' content with 

TH1::Sumw2()

Now, do exist an option that authomatically performs 
what I want (by using somehow such weight-structure), or should I write it 
by myself?

Regards,
Tommaso



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:17 MET