Hi, Rene has suggested to post this question here.
I am trying to revive the RooRarFit package, and it relies on what is apparently obsolete interface:
RooAbsPdf::fitTo(RooAbsData&, RooArgSet&, TString&)
I see that this interface was taken away after ROOT 5.22. In favor of
RooAbsPdf::fitTo(RooAbsData&, const RooLinkedList&)
Does anyone know how to convert to the new interface in some generic way? Something like
const RooLinkedList myHelperClass::getRooLinkedList(RooArgSet&, TString&);
?
Thanks!
P.S. What is especially not clear is that the new interface does build RooArgSet inside anyway. Why not to allow user supply it directly?
Hi,
I didn’t find the exact method you referred to in ROOT 5.22. I assume you meant this one
virtual RooFitResult* fitTo(RooAbsData& data, const RooArgSet& projDeps, Option_t* fitOpt = “”, Option_t* optOpt = “c”, const char* fitRange = 0)
The functionality of this obsolete method specific for fits with conditional observables has been absorbed in the new generic fitTo() function that was already present in ROOT 5.22 which works with named arguments, and was deprecated in 5.24.
To make a fit with conditional observables (in 5.22 or later) you can do the following
pdf.fitTo(data,ConditionalObservables(cobs),FitOption(optstr)) ;
where cobs is the RooArgSet that you would pass in your original
version and optstr is the TString. To use the method above you will
need to add the following to your source code
#include "RooGlobalFunc.h"
using namespace RooFit ;
as this is needed to define the symbols ConditionalObservables() and
FitOption(). For a full documentation of the functionality of the fitTo()
and the various modifier arguments it takes, look e.g. here
root.cern.ch/root/html526/RooAbs … sPdf:fitTo
Wouter