Re: Sumw2() for empty bin?

From: Rene Brun <brun_at_pcroot.cern.ch>
Date: Wed, 13 Jul 2005 22:05:56 +0200 (MEST)


Bill,

Why should we set the errors to 1 for empty bins? If you want to do so, call h.SetBinError(bin,1) for the empty bins.

Rene Brun

On Wed,
13 Jul 2005,
William Love wrote:

> Root help:
>
> I have a large number of (2D) histograms with simple event counts in the bins. When
> I do Sumw2() to set the errors it appears the empty bins have their error set to zero.
> This plays havoc with the Chi squared calculation (crash on divide by zero). Is there a
> way to make Sumw2() set the error on empty bins to 1.0?
> Bill Love
>
> Using root 4.04.02 on RedHat Linux.
Received on Wed Jul 13 2005 - 22:06:04 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:10 MET