Re: getting a fitted function

From: James Jackson <James.Jackson_at_cern.ch>
Date: Tue, 15 May 2007 19:01:36 +0100


I believe that following your code example, running the following should work:

TH1 *fitResult = h1->GetFunction("m1");
Double_t derivateAtx = fitResult->Derivative(x);

This is from memory, sorry if it's incorrect!

Regards,
James Jackson.

On 15 May 2007, at 18:35, nasim wrote:

> Hi,
> I wrote a macro which does a polynom fit
> g1=new TF1("m1","pol2", 5.71,5.75);
>
> TH1F *h1 =new TH1F("g1","",250,5.6,6);
> .....
> h1->Draw();
> h1->Fit(g1,"R");
> which works alright. my question is how can I get the result of the
> fit.
> I need to find the derivate of the result.
>
> Many Thanks,
> Nasim
> --
>
Received on Tue May 15 2007 - 20:01:50 CEST

This archive was generated by hypermail 2.2.0 : Tue May 15 2007 - 23:50:01 CEST