Re: fitting 1-d histograms

Rene Brun (Rene.Brun@cern.ch)
Mon, 24 Aug 1998 18:00:01 +0200


Chris Jillings wrote:
>
> Hello,
> I am using the TH1::Fit(...) to fit 1-d histograms. Is it possible
> to fix and realease parameters without using TMinuit explicitly?
>
> Thank you,
>
> Chris
>

Chris,
Yes, this is possible. Assume TF1 *func the pointer to the function
you want to fit in TH1::Fit. Before calling TH1::Fit, do
func->SetParLimits(0,parlow,parhigh); //set bounds for all params
func->SetParLimits(1,...

then, specify the option "B" when calling TH1::Fit as specified
in the documentation of TH1::Fit

Rene Brun