Logo ROOT  
Reference Guide
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 36 of file RooMinimizerFcn.h.

Public Member Functions

 RooMinimizerFcn (const RooMinimizerFcn &other)
 
 RooMinimizerFcn (RooAbsReal *funct, RooMinimizer *context, bool verbose=false)
 
virtual ~RooMinimizerFcn ()
 
ROOT::Math::IBaseFunctionMultiDimClone () const override
 Clone a function. More...
 
std::string getFunctionName () const override
 RooMinimizer sometimes needs the name of the minimized function. Implement this in the derived class. More...
 
std::string getFunctionTitle () const override
 RooMinimizer sometimes needs the title of the minimized function. Implement this in the derived class. More...
 
unsigned int NDim () const override
 Retrieve the dimension of the function. More...
 
void setOffsetting (Bool_t flag) override
 Enable or disable offsetting on the function to be minimized, which enhances numerical precision. More...
 
void setOptimizeConstOnFunction (RooAbsArg::ConstOpCode opcode, Bool_t doAlsoTrackingOpt) override
 This function must be overridden in the derived class to pass on constant term optimization configuration to the function to be minimized. More...
 
- Public Member Functions inherited from RooAbsMinimizerFcn
 RooAbsMinimizerFcn (const RooAbsMinimizerFcn &other)
 
 RooAbsMinimizerFcn (RooArgList paramList, RooMinimizer *context, bool verbose=false)
 
virtual ~RooAbsMinimizerFcn ()=default
 
void ApplyCovarianceMatrix (TMatrixDSym &V)
 Set different external covariance matrix. More...
 
void BackProp (const ROOT::Fit::FitResult &results)
 Put Minuit results back into RooFit objects. More...
 
Int_t evalCounter () const
 
RooArgListGetConstParamList ()
 
RooArgListGetFloatParamList ()
 Logistics. More...
 
virtual std::string getFunctionName () const =0
 RooMinimizer sometimes needs the name of the minimized function. Implement this in the derived class. More...
 
virtual std::string getFunctionTitle () const =0
 RooMinimizer sometimes needs the title of the minimized function. Implement this in the derived class. More...
 
RooArgListGetInitConstParamList ()
 
RooArgListGetInitFloatParamList ()
 
std::ofstream * GetLogFile ()
 
Double_tGetMaxFCN ()
 
unsigned int getNDim () const
 
Int_t GetNumInvalidNLL () const
 
double getOffset () const
 Return a possible offset that's applied to the function to separate invalid function values from valid ones. More...
 
bool getOptConst ()
 
std::vector< doublegetParameterValues () const
 
void SetEvalErrorWall (Bool_t flag)
 
Bool_t SetLogFile (const char *inLogfile)
 Change the file name for logging of a RooMinimizer of all MINUIT steppings through the parameter space. More...
 
virtual void setOffsetting (Bool_t flag)=0
 Enable or disable offsetting on the function to be minimized, which enhances numerical precision. More...
 
void setOptimizeConst (Int_t flag)
 
Bool_t SetPdfParamVal (int index, double value) const
 Set value of parameter i. More...
 
void SetPrintEvalErrors (Int_t numEvalErrors)
 
void SetRecoverFromNaNStrength (double strength)
 Try to recover from invalid function values. More...
 
void SetVerbose (Bool_t flag=kTRUE)
 
virtual Bool_t Synchronize (std::vector< ROOT::Fit::ParameterSettings > &parameters, Bool_t optConst, Bool_t verbose)
 Like synchronizeParameterSettings, Synchronize informs Minuit through its parameter_settings vector of RooFit parameter properties, but Synchronize can be overridden to e.g. More...
 
Bool_t synchronizeParameterSettings (std::vector< ROOT::Fit::ParameterSettings > &parameters, Bool_t optConst, Bool_t verbose)
 Informs Minuit through its parameter_settings vector of RooFit parameter properties. More...
 
void zeroEvalCount ()
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
 IBaseFunctionMultiDimTempl ()
 
virtual ~IBaseFunctionMultiDimTempl ()
 virtual destructor More...
 
virtual IBaseFunctionMultiDimTempl< T > * Clone () const =0
 Clone a function. More...
 
virtual unsigned int NDim () const =0
 Retrieve the dimension of the function. More...
 
operator() (const T *x) const
 Evaluate the function at a point x[]. More...
 

Private Member Functions

double DoEval (const double *x) const override
 Evaluate function given the parameters in x. More...
 

Private Attributes

RooAbsReal_funct
 

Additional Inherited Members

- Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
typedef T BackendType
 
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 
- Protected Member Functions inherited from RooAbsMinimizerFcn
void ClearPdfParamAsymErr (Int_t index)
 Modify PDF parameter error by ordinal index (needed by MINUIT) More...
 
void optimizeConstantTerms (bool constStatChange, bool constValChange)
 
void printEvalErrors () const
 Print information about why evaluation failed. More...
 
virtual void setOptimizeConstOnFunction (RooAbsArg::ConstOpCode opcode, Bool_t doAlsoTrackingOpt)=0
 This function must be overridden in the derived class to pass on constant term optimization configuration to the function to be minimized. More...
 
void SetPdfParamErr (Int_t index, Double_t loVal, Double_t hiVal)
 Modify PDF parameter error by ordinal index (needed by MINUIT) More...
 
void SetPdfParamErr (Int_t index, Double_t value)
 Modify PDF parameter error by ordinal index (needed by MINUIT) More...
 
- Protected Attributes inherited from RooAbsMinimizerFcn
std::unique_ptr< RooArgList_constParamList
 
RooMinimizer_context
 
bool _doEvalErrorWall {true}
 
int _evalCounter {0}
 
std::unique_ptr< RooArgList_floatParamList
 
double _funcOffset {0.}
 
std::unique_ptr< RooArgList_initConstParamList
 
std::unique_ptr< RooArgList_initFloatParamList
 
std::ofstream * _logfile = nullptr
 
double _maxFCN = -std::numeric_limits<double>::infinity()
 
unsigned int _nDim = 0
 
int _numBadNLL = 0
 
Bool_t _optConst = kFALSE
 
int _printEvalErrors = 10
 
double _recoverFromNaNStrength {10.}
 
bool _verbose
 

#include <RooMinimizerFcn.h>

Inheritance diagram for RooMinimizerFcn:
[legend]

Constructor & Destructor Documentation

◆ RooMinimizerFcn() [1/2]

RooMinimizerFcn::RooMinimizerFcn ( RooAbsReal funct,
RooMinimizer context,
bool  verbose = false 
)

Definition at line 40 of file RooMinimizerFcn.cxx.

◆ RooMinimizerFcn() [2/2]

RooMinimizerFcn::RooMinimizerFcn ( const RooMinimizerFcn other)

Definition at line 47 of file RooMinimizerFcn.cxx.

◆ ~RooMinimizerFcn()

RooMinimizerFcn::~RooMinimizerFcn ( )
virtual

Definition at line 52 of file RooMinimizerFcn.cxx.

Member Function Documentation

◆ Clone()

ROOT::Math::IBaseFunctionMultiDim * RooMinimizerFcn::Clone ( ) const
overridevirtual

Clone a function.

Each derived class must implement their version of the Clone method

Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.

Definition at line 56 of file RooMinimizerFcn.cxx.

◆ DoEval()

double RooMinimizerFcn::DoEval ( const double x) const
overrideprivate

Evaluate function given the parameters in x.

Definition at line 67 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 114 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 119 of file RooMinimizerFcn.cxx.

◆ NDim()

unsigned int RooMinimizerFcn::NDim ( ) const
inlineoverridevirtual

Retrieve the dimension of the function.

Implements ROOT::Math::IBaseFunctionMultiDimTempl< T >.

Definition at line 44 of file RooMinimizerFcn.h.

◆ setOffsetting()

void RooMinimizerFcn::setOffsetting ( Bool_t  flag)
overridevirtual

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

Implements RooAbsMinimizerFcn.

Definition at line 124 of file RooMinimizerFcn.cxx.

◆ setOptimizeConstOnFunction()

void RooMinimizerFcn::setOptimizeConstOnFunction ( RooAbsArg::ConstOpCode  opcode,
Bool_t  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 61 of file RooMinimizerFcn.cxx.

Member Data Documentation

◆ _funct

RooAbsReal* RooMinimizerFcn::_funct
private

Definition at line 56 of file RooMinimizerFcn.h.

Libraries for RooMinimizerFcn:
[legend]

The documentation for this class was generated from the following files: