Constraining relationship between fit parameters

Greetings all,

I am trying to perform MINUIT fits to determine values for two fit parameters, G2 and G4. Due to physical considerations G2 is always greater than G4.

For some situations, MINUIT is able to find a set of values that match the data but for which G4 is greater than G2. As results of this type are non-physical I would like to introduce a constraint to prevent MINUIT from pursuing results with G4>G2.

The way in which I have done this so far is to test the fit result and loop through the fit again with the value of G4 as a lower limit to the fit for G2.

Is there a more elegant to apply the constraint G2 always > G4 in a MINUIT fit?

Any advice gratefully received.



Minuit does not support constraints between parameters. It is just an unconstrained minimizer. The Support for simple inequality constraints like ( a < par < b) where a and b are numbers and not parameters is provided via a simple variable transformation.

You could try to use a trick like adding a penalty function to penalize the unwanted region. However, this is not guaranteed to work in all problems and it can introduce discontinuities in the derivatives in the border regions.

Best Regards


Dear Lorenzo,

Thank you for your response - sorry for the delay in responding as I was out of range of internet connections.

The quick and dirty solution that I am currently using is just to test whether the result produced is non-physical and then, if necessary re-do the fit with tighter constraints to avoid the problem.

I was hoping a more elegant solution might be possible, but as there is no innate problem with the quick and dirty solution I will just have to be satisfied with what works and disregard elegance.