Re: renormalisation of a histogram

From: Marc Escalier <escalier_at_lal.in2p3.fr>
Date: Sat, 30 Jan 2010 02:27:36 +0100


fine, very interesting

So, i would deduce that if a histogram has no UF/OF, then the two methods would do the same ?

if one wish to renormalise a MC to the data number of events, with a histogram that has
UF/OF, one should use a Scale() with the Entries() or with the Integral() of the histogram of data ?



On Sat, 30 Jan 2010, Konstantinos A. Petridis wrote:

> Hi Marc
>
> I think there are 2 main differences. By doing
>
> myhisto->Scale(1./myhisto->GetEntries());
>
> i) you are normalising to the total number of events in histo,
> irrespectively of whether you have applied a scale factor to your
> events.
>
> ii) you are normalising by the total number of events in histo
> including overflow or underflow
>
> By doing myhisto->Scale(1./myhisto->Integral()); you are normalising
> to the sum of bin contents within the range the histogram has been binned in
>
> Hope this helps
>
> Regards
> Konstantinos
>
> On 30 January 2010 00:35, Marc Escalier <escalier_at_lal.in2p3.fr> wrote:
>> Dear roottalkers,
>>
>> Let's consider we wish to renormalise a histogram to a given value (for
>> example 1)
>>
>> Up to now, i was using :
>>
>> myhisto->Scale(1./myhisto->GetEntries());
>>
>> but i just saw that a colleague was using something like :
>> myhisto->Scale(1./myhisto->Integral());
>> and i'm suspecting (maybe i'm wrong) that this is not correct ?
>>
>> Would you know what is the difference and what should be used ?
>>
>> (for example, one wish to renormalise histogram of a given observable for
>> the MC to the number of events of the data)
>>
>> thank you
>>
>>
>
Received on Sat Jan 30 2010 - 02:27:41 CET

This archive was generated by hypermail 2.2.0 : Sat Jan 30 2010 - 05:50:02 CET