Re: Rebinning of histogram

From: Hayk Hakobyan <hayk_at_jlab.org>
Date: Mon, 22 May 2006 10:32:26 -0400 (EDT)

Dear Chris and Margar,

Thanks for your help.

But I think I didn't formulate
my question in right way.

Is it possible to rebin the one dimensional (already existing) histogram or just fill it in such way that the errors in each bin (for bins with not equal sizes to each other) would be the same or equal to the same value?

Thanks,
Hayk.

PS. I think I hastened with question because the problem might don't have such solution to be implemented for general use.

On Mon, 22 May 2006 margar_at_atlas.yerphi.am wrote:

> Hello Hayk
>
> in order to rebin histogram use TH1::Rebin() method.
> To set errors values of all bins you can use the following simple loop
> after filling the histogram
>
> const Int_t n = h->GetNbinsX();
> Double_t error = 123456;
> for(Int_t bin = 1; bin <= n; bin++)
> h->SetBinError(bin, error);
>
> Best regards,
> Margar
>
>
> On Sun, 21 May 2006, Hayk Hakobyan wrote:
>
> >
> >
> > Dear ROOTers,
> >
> > Is there any way in ROOT to rebin one dimentional
> > histogram or just Fill one dimentional histogram so
> > that the error values in all bins would be the same.
> >
> > Thanks for any help,
> > Hayk.
> >
> >
> >
>
>
Received on Mon May 22 2006 - 16:33:27 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:31:58 MET