histogram statistcs

Robert Loke (loke@ifh.de)
Tue, 29 Apr 1997 20:49:18 +0200 (MET)


Hi !

I tried to copy a part of a histogram h1 to another histogram h2. The
(straight forward) way to do this is:

for(int ii=int(lower_bin);ii<int(upper_bin);ii++)
h2->SetBinContent(ii,h1->GetBinContent(ii));

with h1 and h2 defined as TH1Ds.

Doing it this way leads to the problem that the statistics of h2 is not
calculated. Therefore you've no access to data like mean value and rms.

Is there a better (=working) way to perform this?

Thanks, Robert

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Robert Loke +
+ Humboldt University Berlin +
+ Invalidenstr. 110 +
+ 10115 Berlin +
+ Germany +
+ +
+ e-mail : loke@ifh.de +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++