37using std::cout, std::endl, std::setprecision;
58 _multiGenFcn = std::make_unique<ROOT::Math::GradFunctor>(
this, &RooMinimizerFcn::operator(),
76 (*_logfile) <<
x[
index] <<
" ";
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 = ";
115 for (std::size_t i = 0; i <
getNDim(); ++i) {
116 std::cout << out[i] <<
", ";
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...
virtual void constOptimizeTestStatistic(ConstOpCode opcode, bool doAlsoTrackingOpt=true)
Interface function signaling a request to perform constant term optimization.
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...
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
virtual bool isOffsetting() const
virtual bool hasGradient() const
virtual void gradient(double *) const
static void setHideOffset(bool flag)
virtual void enableOffsetting(bool)
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...
std::unique_ptr< ROOT::Math::IBaseFunctionMultiDim > _multiGenFcn
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
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.