13#ifndef ROOT_ROOFIT_TESTSTATISTICS_MinuitFcnGrad
14#define ROOT_ROOFIT_TESTSTATISTICS_MinuitFcnGrad
21#include "../RooAbsMinimizerFcn.h"
31namespace TestStatistics {
36 std::vector<ROOT::Fit::ParameterSettings> ¶meters,
LikelihoodMode likelihoodMode,
42 bool Synchronize(std::vector<ROOT::Fit::ParameterSettings> ¶meter_settings)
override;
49 likelihood->constOptimizeTestStatistic(opcode, doAlsoTrackingOpt);
60 double DoEval(
const double *
x)
const override;
64 void Gradient(
const double *
x,
double *grad)
const override;
66 double *previous_gstep)
const override;
69 inline unsigned int NDim()
const override {
return _nDim; }
85 double DoDerivative(
const double *
x,
unsigned int icoord)
const override;
92 std::shared_ptr<LikelihoodGradientWrapper>
gradient;
Fitter class, entry point for performing all type of fits.
bool FitFCN(unsigned int npar, Function &fcn, const double *params=0, unsigned int dataSize=0, bool chi2fit=false)
Fit using the a generic FCN function as a C++ callable object implementing double () (const double *)...
Documentation for the abstract class IBaseFunctionMultiDim.
Interface (abstract class) for multi-dimensional functions providing a gradient calculation.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Minuit-RooMinimizer interface which synchronizes parameter data and coordinates evaluation of likelih...
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...
bool Synchronize(std::vector< ROOT::Fit::ParameterSettings > ¶meter_settings) override
Overridden from RooAbsMinimizerFcn to include gradient strategy synchronization.
std::vector< double > minuit_internal_x_
std::string getFunctionName() const override
RooMinimizer sometimes needs the name of the minimized function. Implement this in the derived class.
double DoDerivative(const double *x, unsigned int icoord) const override
This override should not be used in this class, so it throws.
bool fit(ROOT::Fit::Fitter &fitter) const override
double DoEval(const double *x) const override
IMultiGradFunction override necessary for Minuit.
ROOT::Math::IMultiGenFunction * getMultiGenFcn() override
bool syncParameterValuesFromMinuitCalls(const double *x, bool minuit_internal) const
Minuit calls (via FcnAdapters etc) DoEval or Gradient with a set of parameters x.
std::shared_ptr< WrapperCalculationCleanFlags > calculation_is_clean
bool returnsInMinuit2ParameterSpace() const override
std::string getFunctionTitle() const override
RooMinimizer sometimes needs the title of the minimized function. Implement this in the derived class...
std::shared_ptr< LikelihoodWrapper > likelihood_in_gradient
bool minuit_internal_roofit_x_mismatch_
void GradientWithPrevResult(const double *x, double *grad, double *previous_grad, double *previous_g2, double *previous_gstep) const override
void Gradient(const double *x, double *grad) const override
IMultiGradFunction overrides necessary for Minuit.
ROOT::Math::IMultiGradFunction * Clone() const override
Clone a function.
std::shared_ptr< LikelihoodWrapper > likelihood
std::vector< double > minuit_external_x_
std::shared_ptr< LikelihoodGradientWrapper > gradient
bool calculating_gradient_
unsigned int NDim() const override
Part of IMultiGradFunction interface, used widely both in Minuit and in RooFit.
RooMinimizer is a wrapper class around ROOT::Fit:Fitter that provides a seamless interface between th...
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...