Hello Christian,
you should check the range of your function, it looks to me that there
are no histogram bins with non-zero bin content
are available in the function range. This is a possible reason of the
warning message.
The same I think happened in 5.21, just in 5.23 the error detection
has improved and no minimization is performed when the
data to fit is empty.
Best Regards
Lorenzo
On Mar 27, 2009, at 9:26 PM, Cristian Andrei wrote:
> Hello everyone,
>
> I'm trying to fit a TH1D using a rather complicated function. The TH1D
> was generated by me, before, using the same function with some fixed
> parameters values. So I hope to find by fitting the parameters values
> that I previously set.
>
> I basically do:
>
> //-----------------------------------------------------------------------------------------
> // generate the TH1D in another script
>
> TH1D* hist = (TH1D*)file.Get("hist");
>
> TVirtualFitter::SetDefaultFitter("Minuit2"); //same thing happens
> with Fumili, Fumili2 and Minuit
>
> TF1 *Fit = new TF1("Fit",fit_func,x1,x2,3); //3 parameters
>
> hist->Fit("Fit","V R ME I");
> //-----------------------------------------------------------------------------------------
>
> * When I run this script on ROOT 5.21/01 on linuxx8664gcc I get:
>
> Info in <Minuit2>: MnHesse: 2nd derivative zero for Parameter : i = 0
> Info in <Minuit2>: MnHesse fails and will return diagonal matrix
> Warning in <TH1D::Fit>: Abnormal termination of minimization.
> Info in <Minuit2>: MnHesse: 2nd derivative zero for Parameter : i = 0
> Info in <Minuit2>: MnHesse fails and will return diagonal matrix
> Info in <Minuit2>: MnHesse: 2nd derivative zero for Parameter : i = 0
> Info in <Minuit2>: MnHesse fails and will return diagonal matrix
> TFitterMinuit::MINOS failed due to invalid function minimum
>
> I have find /trunk/math/minuit2/src/MnHesse.cxx Revision 27589, so
> last night I have installed the latest trunk version.
> * Now when I run the same exact script on ROOT 5.23/02 on linux I get:
>
> Warning in <Fit>: Fit data is empty
>
>
> Thank you very much for any help.
>
> --
> Cristian ANDREI
>
Received on Sat Mar 28 2009 - 14:03:32 CET
This archive was generated by hypermail 2.2.0 : Tue Mar 31 2009 - 17:50:01 CEST