Tminuit + constraints + limits

Hi folks,

I am searching for ways to add constraints / limits to tminuit and I can’t find any. I could swear I had read this is possible within root somehow, particularly tminuit.

In my googling I find roofit. Is this the way to go if I want to use constraints? All I need are simple constraints, I am fitting several Gaussian curves to spectra and I roughly know the center and width of these lines so I would like to impose limits to the range of these values.

thanks for your attention,

Antonio

Hi,

In TMinuit you can add simple bounds (limits) of the type [pMin, pMax] on your fitting parameters by using the function TMinuit::mnparm (root.cern.ch/root/html/TMinuit.h … uit:mnparm ).
Constraints based on functions of other parameters are not supported. You can however in some case add extra terms in your minimization function or transform your variables in an uncontraint minimization problem.
RooFit uses TMinuit, so what you can do there you can do also using directly TMinuit.

Best Regards

Lorenzo