Re: Value of a function per bin?

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Wed, 25 Feb 2009 22:54:11 +0100


Hi Karla,

you can add the values of a function to a histogram using TH1::Add. If you pass the parameter -1 as scale then you get the difference between the two. See the doc for TH1::Add(TF1...), so you'll do something like   hist->Add(func, -1)

Cheers, Axel

Karla Beatriz Cantun Avila wrote:
>
>
> Dear experts,
>
> I have a macro to fit a histogram with two independent functions, but
> now I need to plot besides the histogram plus the total fit fuction, the
> difference betwen value of histogram's point minus value of the fit
> per each bin, and I do not know how to do it. I have not found any
> variable who returns the value of the total fit function per bin. May
> you help me?
>
> Thanks in advance,
>
> karla
>
>
Received on Wed Feb 25 2009 - 22:55:01 CET

This archive was generated by hypermail 2.2.0 : Thu Feb 26 2009 - 17:50:01 CET