13#ifndef ROOT_ROOFIT_TESTSTATISTICS_MinuitFcnGrad
14#define ROOT_ROOFIT_TESTSTATISTICS_MinuitFcnGrad
21#include "../RooAbsMinimizerFcn.h"
29namespace TestStatistics {
34 std::vector<ROOT::Fit::ParameterSettings> ¶meters,
LikelihoodMode likelihoodMode,
38 bool Synchronize(std::vector<ROOT::Fit::ParameterSettings> ¶meter_settings)
override;
45 applyToLikelihood([&](
auto &
l) {
l.constOptimizeTestStatistic(opcode, doAlsoTrackingOpt); });
53 void Gradient(
const double *
x,
double *grad)
const;
55 double *previous_gstep)
const;
85 std::unique_ptr<LikelihoodGradientWrapper>
_gradient;
Documentation for the abstract class IBaseFunctionMultiDim.
Minuit-RooMinimizer interface which synchronizes parameter data and coordinates evaluation of likelih...
void GradientWithPrevResult(const double *x, double *grad, double *previous_grad, double *previous_g2, double *previous_gstep) const
double operator()(const double *x) const
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::string getFunctionName() const override
RooMinimizer sometimes needs the name of the minimized function. Implement this in the derived class.
void Gradient(const double *x, double *grad) const
IMultiGradFunction overrides necessary for Minuit.
std::vector< double > _minuitInternalX
std::shared_ptr< LikelihoodWrapper > _likelihood
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.
bool _minuitInternalRooFitXMismatch
std::unique_ptr< LikelihoodGradientWrapper > _gradient
void syncOffsets() const
Make sure the offsets are up to date.
std::string getFunctionTitle() const override
RooMinimizer sometimes needs the title of the minimized function. Implement this in the derived class...
std::shared_ptr< WrapperCalculationCleanFlags > _calculationIsClean
bool _calculatingGradient
std::vector< double > _minuitExternalX
std::shared_ptr< LikelihoodWrapper > _likelihoodInGradient
void applyToLikelihood(Func &&func) const
std::unique_ptr< ROOT::Math::IMultiGradFunction > _multiGenFcn
bool returnsInMinuit2ParameterSpace() const
Wrapper class around ROOT::Math::Minimizer that provides a seamless interface between the minimizer f...
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...