TH1::Add or TH1::Scale

Hi,

Apologies if there has been a thread addressing this topic already; if this is the case, please direct me to it.

I’ve noticed a difference between the scaling factors applied by the two methods TH1::Add and TH1::Scale. If I perform something like:

h1->Add( h2, someScaleFactor )

Then both h2’s y-axis and number of entries are scaled by ‘someScaleFactor’. If I perform:

h1->Scale( someScaleFactor )

Then h1’s y-axis is scaled, but the number of entries is not. According to the documentation, TH1::Scale uses TH1::Add. Am I doing something incorrect here?

Thanks for the help,
Peter.

The simplest explanation is to look at the code of TH1::Scale itself (just a few lines)
root.cern.ch/root/html/src/TH1.cxx.html#HLKZ1D

Rene