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

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



[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,

-- 
Kevin B. McCarty <kmccarty@princeton.edu>   Physics Department
WWW: http://www.princeton.edu/~kmccarty/    Princeton University
GPG: public key ID 4F83C751                 Princeton, NJ 08544



Reply to: