[BLAST_ANAWARE] error propogation in ROOT

From: Aaron Joseph Maschinot (ajmasch@MIT.EDU)
Date: Sat Jul 12 2003 - 21:58:10 EDT


Since there were questions concerning ROOT's error
calculation/propogation abilities on Friday, I have been looking into
exactly what ROOT does on this matter. Here is what I have found. If
anyone wants to check this, please do.

ROOT will correctly take care of error calculation/propogation provided
that you call the TH1F::Sumw2() member function BEFORE you fill your
histogram. Ideally, you should call the TH1F::Sumw2() function
immediately after instantiation.

As long as you have previously called TH1F::Sumw2(), then ROOT will assume
Poisson statistics (i.e. sigma^2 = number of counts) if you fill the
histogram using the ">>histName" option in the TH1F:Draw() function.

For the TH1F::Add() and TH1F::Divide() functions, ROOT correctly
propogates the error from the two histograms to be added/divided into the
new histogram.

I have checked these results two ways. First, I specifically calculated
the error propogations by hand and compared the resulting errors to what
ROOT said. When I found that these results agreed, I then went directly
to the source code and checked there. The lines doing error propogation
in ROOT are readily visible.

For example, the following lines appear in the TH1::Divide function code
(as listed in the TH1.cxx file):

  if (binomial) {
    fSumw2.fArray[bin] = TMath::Abs(w*(1-w)/b2);
  }
  else {
    fSumw2.fArray[bin] = d1*d2*(e1*e1*b2*b2 + e2*e2*b1*b1)/(b22*b22);
  }

Aaron



This archive was generated by hypermail 2.1.2 : Mon Feb 24 2014 - 14:07:29 EST