Re: [ROOT] TF1::RejectPoint and chi^2 in stats box

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Apr 19 2004 - 17:52:23 MEST


Hi Gero,

What you observe is not connected with the use of TF1::RejectPoint, but rather
with the likelihood option. When the "l" option is specified,
TF1::GetChisquare returns an equivalent chisquare value using the parameters
computed from the likelihood fit. This value is different from the value
of the objective function using the likelihood method.

Rene Brun

Gero Flucke wrote:
> 
> Hi,
> fitting histograms with a non-contigous function via TF1::RejectPoint
> works rather well, but for me it seems that the chi^2 that is shown in the
> statistic box ignores the rejection. I tried to get the chi^2 directly
> after the fit via
> 
> TF1* fitFunc = ...   // my TF1 defining the function
> TF1* histToFit = ... // the hist that I fit
> histToFit->Fit(fitFunc, "EMBRI");
> TVirtualFitter::Fitter(histToFit)
>     ->Chisquare(fitFunc->GetNpar(), fitFunc->GetParameters())
> 
> but that gives the same result which is also printed on screen as FCN
> while fitting:
> 
> FCN=761.11  FROM MINOS     STATUS=SUCCESSFUL    804 CALLS <snip>
> 
> How can I get the 'real' chi^2?
> 
> Cheers
> 
>         Gero
> 
> PS: 3.10_02 on linux
> 
> -----------------------------------------------------------------------
> Gero Flucke
> 1a / 603
> DESY
> Notkestr. 85
> 22607 Hamburg
> +49-(0)40-8998-2454
> 
> Privat / private:
> -----------------
> Von-Hutten-Str. 20
> 22761 Hamburg



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET