37using std::cout, std::endl, std::setprecision;
58 _multiGenFcn = std::make_unique<ROOT::Math::GradFunctor>(this, &RooMinimizerFcn::operator(),
59 &RooMinimizerFcn::evaluateGradient, getNDim());
61 _multiGenFcn = std::make_unique<ROOT::Math::Functor>(std::cref(*this), getNDim());
67 _funct->constOptimizeTestStatistic(opcode, doAlsoTrackingOpt);
76 (*_logfile) <<
x[
index] <<
" ";
82 double fvalue =
_funct->getVal();
89 (*_logfile) << setprecision(15) << fvalue << setprecision(4) << endl;
91 cout <<
"\nprevFCN" << (
_funct->isOffsetting() ?
"-offset" :
"") <<
" = " << setprecision(10) << fvalue
92 << setprecision(4) <<
" ";
106 (*_logfile) <<
x[
index] <<
" ";
114 std::cout <<
"\n gradient = ";
116 std::cout << out[
i] <<
", ";
128 return _funct->GetTitle();
133 _funct->enableOffsetting(flag);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
RooFit::OwningPtr< RooArgSet > getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
RooAbsMinimizerFcn(RooArgList paramList, RooMinimizer *context)
double applyEvalErrorHandling(double fvalue) const
Apply corrections on the fvalue if errors were signaled.
RooMinimizer::Config const & cfg() const
void finishDoEval() const
bool SetPdfParamVal(int index, double value) const
Set value of parameter i.
unsigned int getNDim() const
Abstract base class for objects that represent a real value and implements functionality common to al...
virtual bool hasGradient() const
static void setHideOffset(bool flag)
RooArgSet is a container object that can hold multiple RooAbsArg objects.
void evaluateGradient(const double *x, double *out) const
std::string getFunctionName() const override
RooMinimizer sometimes needs the name of the minimized function. Implement this in the derived class.
void setOffsetting(bool flag) override
Enable or disable offsetting on the function to be minimized, which enhances numerical precision.
void setOptimizeConstOnFunction(RooAbsArg::ConstOpCode opcode, bool doAlsoTrackingOpt) override
This function must be overridden in the derived class to pass on constant term optimization configura...
double operator()(const double *x) const
Evaluate function given the parameters in x.
RooMinimizerFcn(RooAbsReal *funct, RooMinimizer *context)
std::string getFunctionTitle() const override
RooMinimizer sometimes needs the title of the minimized function. Implement this in the derived class...
Wrapper class around ROOT::Fit:Fitter that provides a seamless interface between the minimizer functi...
RooMinimizer::Config _cfg