Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooMinimizerFcn Class Reference

RooMinimizerFcn is an interface to the ROOT::Math::IBaseFunctionMultiDim, a function that ROOT's minimisers use to carry out minimisations.

Definition at line 31 of file RooMinimizerFcn.h.

Public Member Functions

 RooMinimizerFcn (RooAbsReal *funct, RooMinimizer *context)
 
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.
 
std::string getFunctionTitle () const override
 RooMinimizer sometimes needs the title of the minimized function. Implement this in the derived class.
 
ROOT::Math::IMultiGenFunctiongetMultiGenFcn () override
 
double operator() (const double *x) const
 Evaluate function given the parameters in x.
 
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 configuration to the function to be minimized.
 
- Public Member Functions inherited from RooAbsMinimizerFcn
 RooAbsMinimizerFcn (RooArgList paramList, RooMinimizer *context)
 
virtual ~RooAbsMinimizerFcn ()=default
 
RooArgList const & allParams () const
 
void ApplyCovarianceMatrix (TMatrixDSym &V)
 Set different external covariance matrix.
 
void BackProp ()
 Put Minuit results back into RooFit objects.
 
RooMinimizer::Config const & cfg () const
 
RooArgList constParams () const
 
Int_t evalCounter () const
 
RooRealVarfloatableParam (std::size_t i) const
 
RooArgList floatParams () const
 
std::ofstream * GetLogFile ()
 
doubleGetMaxFCN ()
 
unsigned int getNDim () const
 
Int_t GetNumInvalidNLL () const
 
doublegetOffset () const
 Return a possible offset that's applied to the function to separate invalid function values from valid ones.
 
RooArgList initFloatParams () const
 
bool SetLogFile (const char *inLogfile)
 Change the file name for logging of a RooMinimizer of all MINUIT steppings through the parameter space.
 
void setOptimizeConst (Int_t flag)
 
bool SetPdfParamVal (int index, double value) const
 Set value of parameter i.
 
virtual bool Synchronize (std::vector< ROOT::Fit::ParameterSettings > &parameters)
 Like synchronizeParameterSettings, Synchronize informs Minuit through its parameter_settings vector of RooFit parameter properties, but Synchronize can be overridden to e.g.
 
bool synchronizeParameterSettings (std::vector< ROOT::Fit::ParameterSettings > &parameters, bool optConst)
 Informs Minuit through its parameter_settings vector of RooFit parameter properties.
 
void zeroEvalCount ()
 

Private Attributes

RooAbsReal_funct = nullptr
 
std::vector< double_gradientOutput
 
std::unique_ptr< ROOT::Math::IBaseFunctionMultiDim_multiGenFcn
 

Additional Inherited Members

- Protected Member Functions inherited from RooAbsMinimizerFcn
double applyEvalErrorHandling (double fvalue) const
 Apply corrections on the fvalue if errors were signaled.
 
void finishDoEval () const
 
void optimizeConstantTerms (bool constStatChange, bool constValChange)
 
void printEvalErrors () const
 Print information about why evaluation failed.
 
- Static Protected Member Functions inherited from RooAbsMinimizerFcn
static bool canBeFloating (RooAbsArg const &arg)
 
static bool treatAsConstant (RooAbsArg const &arg)
 
- Protected Attributes inherited from RooAbsMinimizerFcn
RooArgList _allParams
 
RooArgList _allParamsInit
 
RooMinimizer_context = nullptr
 
int _evalCounter {0}
 
std::vector< std::size_t > _floatableParamIndices
 
double _funcOffset {0.}
 
std::ofstream * _logfile = nullptr
 
double _maxFCN = -std::numeric_limits<double>::infinity()
 
int _numBadNLL = 0
 
bool _optConst = false
 

#include </home/sftnight/build/workspace/root-makedoc-v634/rootspi/rdoc/src/v6-34-00-patches/roofit/roofitcore/src/RooMinimizerFcn.h>

Inheritance diagram for RooMinimizerFcn:
[legend]

Constructor & Destructor Documentation

◆ RooMinimizerFcn()

RooMinimizerFcn::RooMinimizerFcn ( RooAbsReal funct,
RooMinimizer context 
)

Definition at line 54 of file RooMinimizerFcn.cxx.

Member Function Documentation

◆ evaluateGradient()

void RooMinimizerFcn::evaluateGradient ( const double x,
double out 
) const

Definition at line 104 of file RooMinimizerFcn.cxx.

◆ getFunctionName()

std::string RooMinimizerFcn::getFunctionName ( ) const
overridevirtual

RooMinimizer sometimes needs the name of the minimized function. Implement this in the derived class.

Implements RooAbsMinimizerFcn.

Definition at line 134 of file RooMinimizerFcn.cxx.

◆ getFunctionTitle()

std::string RooMinimizerFcn::getFunctionTitle ( ) const
overridevirtual

RooMinimizer sometimes needs the title of the minimized function. Implement this in the derived class.

Implements RooAbsMinimizerFcn.

Definition at line 139 of file RooMinimizerFcn.cxx.

◆ getMultiGenFcn()

ROOT::Math::IMultiGenFunction * RooMinimizerFcn::getMultiGenFcn ( )
inlineoverridevirtual

Implements RooAbsMinimizerFcn.

Definition at line 42 of file RooMinimizerFcn.h.

◆ operator()()

double RooMinimizerFcn::operator() ( const double x) const

Evaluate function given the parameters in x.

Definition at line 74 of file RooMinimizerFcn.cxx.

◆ setOffsetting()

void RooMinimizerFcn::setOffsetting ( bool  flag)
overridevirtual

Enable or disable offsetting on the function to be minimized, which enhances numerical precision.

Implements RooAbsMinimizerFcn.

Definition at line 144 of file RooMinimizerFcn.cxx.

◆ setOptimizeConstOnFunction()

void RooMinimizerFcn::setOptimizeConstOnFunction ( RooAbsArg::ConstOpCode  opcode,
bool  doAlsoTrackingOpt 
)
overridevirtual

This function must be overridden in the derived class to pass on constant term optimization configuration to the function to be minimized.

For a RooAbsArg, this would be RooAbsArg::constOptimizeTestStatistic.

Implements RooAbsMinimizerFcn.

Definition at line 68 of file RooMinimizerFcn.cxx.

Member Data Documentation

◆ _funct

RooAbsReal* RooMinimizerFcn::_funct = nullptr
private

Definition at line 48 of file RooMinimizerFcn.h.

◆ _gradientOutput

std::vector<double> RooMinimizerFcn::_gradientOutput
mutableprivate

Definition at line 50 of file RooMinimizerFcn.h.

◆ _multiGenFcn

std::unique_ptr<ROOT::Math::IBaseFunctionMultiDim> RooMinimizerFcn::_multiGenFcn
private

Definition at line 49 of file RooMinimizerFcn.h.

  • roofit/roofitcore/src/RooMinimizerFcn.h
  • roofit/roofitcore/src/RooMinimizerFcn.cxx