Is there a big difference between TFitter and TMinuit?

Hello all.

@moneta I’m trying to appreciate if there is a big difference between the TFitter and TMinuit classes, and when one should be used over the other (or if one should always be used over the other?). I see from the documentation of TFitter that TFitter is based on TMinuit (see https://root.cern.ch/doc/master/classTFitter.html#a9e55c3e524d90ebca866e86f4ca9e06a), so this suggests to me that TFitter is the newer class and should be used instead. Is this correct? Or is TFitter really the exact same as TMinuit, just acting as a “wrapper” that is more friendly to interact with?

Thank you in advance for any help.

Hi

TFitter is just a wrapper for TMinuit and it is a class that we do not recommend to use it. We have replaced the TFItter class with the ROOT::Fit::Fitter class since several years and we recommend to use that one for a complex fitting problem. With the new Fitter class you can also use different minimisers in addition to TMinuit

Lorenzo

Okay, thank you for this explanation. I wasn’t aware of ROOT::Fit::Fitter. I didn’t see any tutorial code for this class but it’s possible that I missed it, can you please direct me to one if one exists?

You can look at
https://root.cern.ch/doc/master/exampleFit3D_8C.html

Lorenzo

Okay, thank you very much!