Minuit2 assertion while drawing contours


I have a have a program that does some fits and plots and saves each result, including contours at various UP’s for parameter pairs. Every once in a while, while computing the contours, I get the following assertion:

MnMinos.cxx:92: ROOT::Minuit2::MinosError ROOT::Minuit2::MnMinos::Minos(unsigned int, unsigned int, double) const: Assertion `!fMinimum.UserState().Parameter(par).IsConst()' failed.

I haven’t been able to isolate what conditions cause it. I run Minos on the minimum to get error estimates prior to computing the contours and that does not raise this assertion (and the parameters I compute the contours of are fixed but not constant).

Any ideas?

Unfortunately, the assertion will interrupt the program completely, which is not ideal…

I think I figured out what happened… one of my lower limits somehow ended up being higher than my upper limit (although, I’m not sure how that logically could happen in my program, but that’s a different story).

Apparently, this results in the minimizer setting the parameter as constant? Perhaps it would be better for it to swap the two?