Revision f954f663b26b8ea4c67ef1893405e31bbd64435f authored by Rene Brun on 16 December 2002, 20:29:07 UTC, committed by Rene Brun on 16 December 2002, 20:29:07 UTC
TH1 *TH1::GetAsymmetry(TH1* h2, Double_t c2, Double_t dc2)
//  return an histogram containing the asymmetry of this histogram with h2,
//  where the asymmetry is defined as:
//
//  Asymmetry = (h1 - h2)/(h1 + h2)  where h1 = this
//
//  works for 1D, 2D, etc. histograms
//  c2 is an optional argument that gives a relative weight between the two
//  histograms, and dc2 is the error on this weight.  This is useful, for example,
//  when forming an asymmetry between two histograms from 2 different data sets that
//  need to be normalized to each other in some way.  The function calculates
//  the errors asumming Poisson statistics on h1 and h2 (that is, dh = sqrt(h)).
//
//  example:  assuming 'h1' and 'h2' are already filled
//
//     h3 = h1->GetAsymmetry(h2)
//
//  then 'h3' is created and filled with the asymmetry between 'h1' and 'h2';
//  h1 and h2 are left intact.
//
//  Note that it is the user's responsibility to manage the created histogram.


git-svn-id: http://root.cern.ch/svn/root/trunk@5818 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent d8e0d65
History
File Mode Size
inc
src
Module.mk -rw-r--r-- 1.5 KB

back to top