13#ifndef ROOT_ROOFIT_TESTSTATISTICS_MinuitFcnGrad
14#define ROOT_ROOFIT_TESTSTATISTICS_MinuitFcnGrad
32namespace TestStatistics {
37 std::vector<ROOT::Fit::ParameterSettings> ¶meters,
LikelihoodMode likelihoodMode,
51 likelihood->constOptimizeTestStatistic(opcode, doAlsoTrackingOpt);
56 double DoEval(
const double *
x)
const override;
60 void Gradient(
const double *
x,
double *grad)
const override;
62 double *previous_gstep)
const override;
65 inline unsigned int NDim()
const override {
return _nDim; }
75 double DoDerivative(
const double *
x,
unsigned int icoord)
const override;
81 std::shared_ptr<LikelihoodGradientWrapper>
gradient;
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_t flag) override
Enable or disable offsetting on the function to be minimized, which enhances numerical precision.
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_t Synchronize(std::vector< ROOT::Fit::ParameterSettings > ¶meter_settings, Bool_t optConst, Bool_t verbose=kFALSE) override
Overridden from RooAbsMinimizerFcn to include gradient strategy synchronization.
double DoEval(const double *x) const override
IMultiGradFunction override necessary for Minuit.
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...
void setOptimizeConstOnFunction(RooAbsArg::ConstOpCode opcode, Bool_t doAlsoTrackingOpt) override
This function must be overridden in the derived class to pass on constant term optimization configura...
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
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...