Re: Rebin

Rene Brun (Rene.Brun@cern.ch)
Tue, 29 Sep 1998 12:36:38 +0200


Gines MARTINEZ wrote:
>
>
> Sorry for my last question. I did not understand myself what I meant... I try again.
> I would like to know if there is a smart way to rebin an histogram.
> An answer to this question is given here:
> http://root.cern.ch/cgi-bin/print_hit_bold.pl/root/roottalk/roottalk98/0066.html?rebin#first_hit
> but I would like to know if a callable function has been defined or it's going to be defined.
> Gines

The coming release of Root 2.00/12 includes a new function
to rebin a 1-D histogram:
- New function TH1::Rebin(Int_t ngroup, const char*newname)
to rebin 1-D histograms.
This function replaces the existing histogram if newname="" (default).
It returns a new histogram otherwise.
ngroup is the number of bins to be merged into one new bin.
If the original histogram has errors stored (via Sumw2), the resulting
histograms has new errors correctly calculated.

Rene Brun