[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [ROOT] On the ability of RooFit to use an arbitrary fitter plugin



Hi Kevin,

We are currently discussing extensions to TVirtualFitter such that it
can accomodate the functionality in Minuit, Fumili, Minuit2 and Fumili2
part of ROOT5.08. Once this new TVirtualFitter will be ready,
it is our intention to propose to Wouter to use this interface
in Roofit instead of the direct Minuit calls. We expect to complete
this work before the June release.
I cc this mail to Lorenzo Moneta who is responsible for the ROOT::Math
work package.

Rene Brun

On Wed, 25 Jan 2006, Kevin B. McCarty wrote:

[CC-ing to Chris Roat and debian-science since I originally suggested
there that RooFit could be patched to use any of the fitter plugins.]

Unfortunately it looks like RooMinuit.cxx and RooFitResults.cxx can't
currently be converted to use the TVirtualFitter interface.  There are
two main issues:

1) The function RooMinuit::contour() directly uses TMinuit::Contour(), a
method which isn't accessible through TVirtualFitter (or even in TFitter).

2) The function RooFitResult::fillCorrMatrix() mucks about in the
internals of the TMinuit class in order to obtain an error correlation
matrix.  There is no API for obtaining this matrix even in TMinuit, let
alone in TVirtualFitter.

I could submit a patch to fix RooFitResult::lastMinuitFit() and
RooMinuit::synchronize() to use TVirtualFitter instead of gMinuit, but I
guess there is not much point until (1) and (2) above are dealt with.
Someday maybe these functionalities can be added to TVirtualFitter (and
the classes that inherit from it) and RooFit can switch to use it
completely.

While looking into this, I also found a few other things in the core
parts of ROOT that would be nice to fix eventually:

- The TVirtualFitter class has a pure virtual interface
GetParameter(int, char*, double&, double&, double&, double&) - it would
be nice to also have a version of this function where the second
argument is a TString&, in order not to worry about string lengths when
calling it.

- The TVirtualFitter class has static functions GetErrorDef() and
SetErrorDef().  First, shouldn't these be class members so that each
instance of TVirtualFitter can have a separate value?  Second, the
TFitter class based on Minuit seems to completely ignore those
functions: TMinuit has its own SetErrorDef() function, but TFitter does
nothing with it.


To conclude, currently libRooFit is constrained to depend specifically
upon libMinuit.  I do apologize for wasting people's time because I
thought otherwise at first.  For the ROOT Debian packages, I think
therefore libRooFit cannot be packaged as a library unless libMinuit is
also packaged as a library.  Or, they could both be packaged just as
plugins.

best regards,





Reply to: