37using std::cout, std::endl, std::setprecision;
61 _multiGenFcn = std::make_unique<ROOT::Math::GradFunctor>(
this, &RooMinimizerFcn::operator(),
79 (*_logfile) <<
x[
index] <<
" ";
92 (*_logfile) << setprecision(15) << fvalue << setprecision(4) << endl;
94 cout <<
"\nprevFCN" << (
_funct->
isOffsetting() ?
"-offset" :
"") <<
" = " << setprecision(10) << fvalue
95 << setprecision(4) <<
" ";
109 (*_logfile) <<
x[
index] <<
" ";
115 std::size_t iAll = 0;
116 std::size_t iFloating = 0;
127 std::cout <<
"\n gradient = ";
128 for (std::size_t i = 0; i <
getNDim(); ++i) {
129 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
Common abstract base class for objects that represent a value and a "shape" in RooFit.
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.
Storage_t::size_type size() const
static bool treatAsConstant(RooAbsArg const &arg)
double applyEvalErrorHandling(double fvalue) const
Apply corrections on the fvalue if errors were signaled.
RooMinimizer::Config const & cfg() const
RooArgList _allParamsInit
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
std::vector< double > _gradientOutput
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::Math::Minimizer that provides a seamless interface between the minimizer f...
RooMinimizer::Config _cfg
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.