Marc:
As best I understand it GetEntries will give you total number of events for which histogram was filled -- including those outside the bounds of the plot. Integral will give you the number inside the bounds of the plot.
If there are none outside these should be the same. If there are some outside (overflows) which procedure is correct depends on how you want to normalize. Integral will also let you integrate (a.k.a. sum) only over selected range of bins -- so for example you could normilaze to 1 in a certain range which could be useful in some cases ...
-Art S.
A.E. Snyder, Group EC \!c*p?/ SLAC Mail Stop #95 ((. .)) Box 4349 | Stanford, Ca, USA, 94309 '\|/` e-mail:snyder_at_slac.stanford.edu o phone:650-926-2701 _ http://www.slac.stanford.edu/~snyder BaBar FAX:650-926-2657 Collaboration
On Sat, 30 Jan 2010, Marc Escalier 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:30:48 CET
This archive was generated by hypermail 2.2.0 : Sat Jan 30 2010 - 05:50:02 CET