General Fitting Question (fixing and floating parameters)

I’m trying to fit a 11 parameter function to a histogram. I’m hoping that I can do the fitting in a similar (or better) way than I would if I were using mn_fit:

  1. setup my fit function
  2. fix parameters 0-7 to reaonable values
  3. set ranges for parameters 8-10
  4. fit once
  5. fix parameters 8-10 to their fitted values
  6. float parameters 0-7 with their startingg values at their fixed value
  7. fit again
    8) float parameters 8-10 with their starting values at their fixed value
  8. final fit

Good news:
I know how to do steps 1 - 4 easily.

Bad news:

  • I’m not sure how to “float parameters” like in steps 6 and 8.
    Is there an easier way than
    a) getting the current value ‘GetParameter’
    b) using ‘SetParamLimits’
    c) using ‘SetParameter’

  • I’m not sure the best way of fixing a parameter to its fitted values (step 5) Is there anything better than:
    a) getting the current value
    b) using ‘FixParameter’
    i.e. Is there an equivalent to 'FixParameter(index) where if I don’t give it a value, it fixes it to its current value. If not, would you consider this for the future?

Finally, I’m trying to do this both “by hand” and automatically. Is there a way to use the Fit Panel to do any of these things?

Thanks for your time,

After your step 4, you can play with

Currently the FitPanel does not support these operations.
A new FitPanel is scheduled for this year.


I’ll try that.

As I’m sure you know, Minuit fits much better if you give it starting values that are very close to the “right” answer. One thing I’ve seen before that helps for multivariable fits is to offer “slides” for each variable and show what happens to the fit function when you change each variable. You can (slowly) accomplish the same thing with SetParameter, but as long as your updating the FitPanel…