Re: Rebinning of histogram

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Tue, 23 May 2006 21:18:54 +0200


This could be implemented when starting from an histogram with many bins or when projecting from a Tree. If there is a volunteer to implement this, let us know.

Rene Brun

Hayk Hakobyan wrote:
> 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 Tue May 23 2006 - 21:19:04 MEST

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