Re: [ROOT] Add or Substract histogram problem.

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Jan 16 2002 - 09:00:21 MET


Move to the PRO version 3.02/07

Rene Brun

Kai Yi wrote:
> 
> Hi, All experts,
>     I used yhe follwoing code to subtract 2 histograms (a sideband
> subtraction):
> 
>     TH1F *htemp = (TH1F*)z0hist->Clone();
>     htemp->Add((TH1 *)z0histsideband,-1/2.4);
> 
>     I think I got the right result except that Nent was reported to be the
> sum not the difference of the 2 histograms. The integral from
> 
> htemp->Integral(0,htemp->GetNbinsX()+1
> 
> was the right number of entries I expected. Why is Nent incorrect?
> 
> Thanks,
> 
> Kai Yi



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:38 MET