Re: TF1::FixParameter

From: Otto Schaile <Otto.Schaile_at_Physik.Uni-Muenchen.DE>
Date: Mon, 17 Dec 2007 12:29:34 +0100


Hi Thomas,
fixing parameters in Minuit is more tricky than just doing par = 0. I am afraid you have to read:

http://root.cern.ch/root/html/TMinuit.html

Cheers
Otto

Thomas Lauf wrote:
> Hello,
>
> I do not quite understand how the function TF1::FixParameter works.
> When I run the following macro,
>
> {
> TH1* Hist = new TH1I( "Hist", "Hist", 21, -10.5, +10.5 );
> Hist->FillRandom( "gaus" );
>
> TF1* Fit = new TF1( "myfit", "gaus" );
> Fit->FixParameter( 1, 0.0 );
>
> Hist->Fit( Fit );
> }
>
> where I fit a random gaussian distribiution with a function whose mean
> I fixed at 0.0, I get e.g. the following result:
>
> FCN=3.83732 FROM MIGRAD STATUS=CONVERGED 41 CALLS 42
> TOTAL
> EDM=1.02145e-10 STRATEGY= 1 ERROR MATRIX
> ACCURATE
> EXT PARAMETER STEP FIRST
> NO. NAME VALUE ERROR SIZE DERIVATIVE
> 1 Constant 2.00922e+03 3.46544e+01 3.05267e-02 -2.58214e-07
> 2 Mean -9.80000e-03 fixed
> 3 Sigma 9.92018e-01 9.78696e-03 2.89142e-06 -5.29594e-03
>
> Ok, the mean is close to 0.0 and declared 'fixed', but why is it not
> exactly 0.0?
>
> Thanks for any clarifications
>
> Thomas
>
>
> --
> Thomas Lauf
> MPE - MPI Halbleiterlabor
> E-Mail: thl_at_hll.mpg.de
>
>

-- 
Dr. Otto Schaile            Department f"ur Physik, LMU M"unchen
Phone: +49 89 289 14070     Am Coulombwall 1, D-85748 Garching, Germany
Mobil: +49 160 1553598
FAX:   +49 89 289 14072     EMail: Otto.Schaile_at_Physik.Uni-Muenchen.DE


Received on Mon Dec 17 2007 - 12:29:52 CET

This archive was generated by hypermail 2.2.0 : Mon Dec 17 2007 - 17:50:02 CET