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 33 of file RooMinimizerFcn.h.

Public Member Functions

 RooMinimizerFcn (const RooMinimizerFcn &other)
 
 RooMinimizerFcn (RooAbsReal *funct, RooMinimizer *context, bool verbose=false)
 
virtual ~RooMinimizerFcn ()
 
void ApplyCovarianceMatrix (TMatrixDSym &V)
 Apply results of given external covariance matrix. More...
 
void BackProp (const ROOT::Fit::FitResult &results)
 Transfer MINUIT fit results back into RooFit objects. More...
 
virtual ROOT::Math::IBaseFunctionMultiDimClone () const
 Clone a function. More...
 
Int_t evalCounter () const
 
RooArgListGetConstParamList ()
 
RooArgListGetFloatParamList ()
 
RooArgListGetInitConstParamList ()
 
RooArgListGetInitFloatParamList ()
 
std::ofstream * GetLogFile ()
 
Double_tGetMaxFCN ()
 
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...
 
virtual unsigned int NDim () const
 Retrieve the dimension of the function. More...
 
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...
 
void SetPrintEvalErrors (Int_t numEvalErrors)
 
void SetRecoverFromNaNStrength (double strength)
 Try to recover from invalid function values. More...
 
void SetVerbose (Bool_t flag=kTRUE)
 
Bool_t Synchronize (std::vector< ROOT::Fit::ParameterSettings > &parameters, Bool_t optConst, Bool_t verbose)
 Internal function to synchronize TMinimizer with current information in RooAbsReal function parameters. More...
 
void zeroEvalCount ()
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
 IBaseFunctionMultiDimTempl ()
 
virtual ~IBaseFunctionMultiDimTempl ()
 virtual destructor More...
 
operator() (const T *x) const
 Evaluate the function at a point x[]. More...
 

Private Member Functions

void ClearPdfParamAsymErr (Int_t index)
 Modify PDF parameter error by ordinal index (needed by MINUIT) More...
 
virtual double DoEval (const double *x) const
 Evaluate function given the parameters in x. More...
 
void printEvalErrors () const
 Print information about why evaluation failed. 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...
 
Bool_t SetPdfParamVal (int index, double value) const
 Set value of parameter i. More...
 

Private Attributes

RooArgList_constParamList
 
const RooMinimizer_context
 
bool _doEvalErrorWall {true}
 
int _evalCounter {0}
 
RooArgList_floatParamList
 
double _funcOffset {0.}
 
RooAbsReal_funct
 
RooArgList_initConstParamList
 
RooArgList_initFloatParamList
 
std::ofstream * _logfile
 
double _maxFCN
 
int _nDim
 
int _numBadNLL
 
int _printEvalErrors
 
double _recoverFromNaNStrength {10.}
 
bool _verbose
 

Additional Inherited Members

- Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< T >
typedef T BackendType
 
typedef IBaseFunctionMultiDimTempl< T > BaseFunc
 

#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 41 of file RooMinimizerFcn.cxx.

◆ RooMinimizerFcn() [2/2]

RooMinimizerFcn::RooMinimizerFcn ( const RooMinimizerFcn other)

Definition at line 90 of file RooMinimizerFcn.cxx.

◆ ~RooMinimizerFcn()

RooMinimizerFcn::~RooMinimizerFcn ( )
virtual

Definition at line 111 of file RooMinimizerFcn.cxx.

Member Function Documentation

◆ ApplyCovarianceMatrix()

void RooMinimizerFcn::ApplyCovarianceMatrix ( TMatrixDSym V)

Apply results of given external covariance matrix.

i.e. propagate its errors to all RRV parameter representations and give this matrix instead of the HESSE matrix at the next save() call

Definition at line 436 of file RooMinimizerFcn.cxx.

◆ BackProp()

void RooMinimizerFcn::BackProp ( const ROOT::Fit::FitResult results)

Transfer MINUIT fit results back into RooFit objects.

Definition at line 388 of file RooMinimizerFcn.cxx.

◆ ClearPdfParamAsymErr()

void RooMinimizerFcn::ClearPdfParamAsymErr ( Int_t  index)
private

Modify PDF parameter error by ordinal index (needed by MINUIT)

Definition at line 376 of file RooMinimizerFcn.cxx.

◆ Clone()

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

Clone a function.

Each derived class must implement their version of the Clone method

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

Definition at line 120 of file RooMinimizerFcn.cxx.

◆ DoEval()

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

Evaluate function given the parameters in x.

Definition at line 493 of file RooMinimizerFcn.cxx.

◆ evalCounter()

Int_t RooMinimizerFcn::evalCounter ( ) const
inline

Definition at line 70 of file RooMinimizerFcn.h.

◆ GetConstParamList()

RooArgList* RooMinimizerFcn::GetConstParamList ( )
inline

Definition at line 46 of file RooMinimizerFcn.h.

◆ GetFloatParamList()

RooArgList* RooMinimizerFcn::GetFloatParamList ( )
inline

Definition at line 45 of file RooMinimizerFcn.h.

◆ GetInitConstParamList()

RooArgList* RooMinimizerFcn::GetInitConstParamList ( )
inline

Definition at line 48 of file RooMinimizerFcn.h.

◆ GetInitFloatParamList()

RooArgList* RooMinimizerFcn::GetInitFloatParamList ( )
inline

Definition at line 47 of file RooMinimizerFcn.h.

◆ GetLogFile()

std::ofstream* RooMinimizerFcn::GetLogFile ( )
inline

Definition at line 59 of file RooMinimizerFcn.h.

◆ GetMaxFCN()

Double_t& RooMinimizerFcn::GetMaxFCN ( )
inline

Definition at line 62 of file RooMinimizerFcn.h.

◆ GetNumInvalidNLL()

Int_t RooMinimizerFcn::GetNumInvalidNLL ( ) const
inline

Definition at line 63 of file RooMinimizerFcn.h.

◆ getOffset()

double RooMinimizerFcn::getOffset ( ) const
inline

Return a possible offset that's applied to the function to separate invalid function values from valid ones.

Definition at line 73 of file RooMinimizerFcn.h.

◆ NDim()

virtual unsigned int RooMinimizerFcn::NDim ( ) const
inlinevirtual

Retrieve the dimension of the function.

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

Definition at line 43 of file RooMinimizerFcn.h.

◆ printEvalErrors()

void RooMinimizerFcn::printEvalErrors ( ) const
private

Print information about why evaluation failed.

Using _printEvalErrors, the number of errors printed can be steered. Negative values disable printing.

Definition at line 467 of file RooMinimizerFcn.cxx.

◆ SetEvalErrorWall()

void RooMinimizerFcn::SetEvalErrorWall ( Bool_t  flag)
inline

Definition at line 50 of file RooMinimizerFcn.h.

◆ SetLogFile()

Bool_t RooMinimizerFcn::SetLogFile ( const char *  inLogfile)

Change the file name for logging of a RooMinimizer of all MINUIT steppings through the parameter space.

If inLogfile is null, the current log file is closed and logging is stopped.

Definition at line 414 of file RooMinimizerFcn.cxx.

◆ SetPdfParamErr() [1/2]

void RooMinimizerFcn::SetPdfParamErr ( Int_t  index,
Double_t  loVal,
Double_t  hiVal 
)
private

Modify PDF parameter error by ordinal index (needed by MINUIT)

Definition at line 382 of file RooMinimizerFcn.cxx.

◆ SetPdfParamErr() [2/2]

void RooMinimizerFcn::SetPdfParamErr ( Int_t  index,
Double_t  value 
)
private

Modify PDF parameter error by ordinal index (needed by MINUIT)

Definition at line 370 of file RooMinimizerFcn.cxx.

◆ SetPdfParamVal()

Bool_t RooMinimizerFcn::SetPdfParamVal ( int  index,
double  value 
) const
private

Set value of parameter i.

Definition at line 449 of file RooMinimizerFcn.cxx.

◆ SetPrintEvalErrors()

void RooMinimizerFcn::SetPrintEvalErrors ( Int_t  numEvalErrors)
inline

Definition at line 57 of file RooMinimizerFcn.h.

◆ SetRecoverFromNaNStrength()

void RooMinimizerFcn::SetRecoverFromNaNStrength ( double  strength)
inline

Try to recover from invalid function values.

When invalid function values are encountered, a penalty term is returned to the minimiser to make it back off. This sets the strength of this penalty.

Note
A strength of zero is equivalent to a constant penalty (= the gradient vanishes, ROOT < 6.24). Positive values lead to a gradient pointing away from the undefined regions. Use ~10 to force the minimiser away from invalid function values.

Definition at line 56 of file RooMinimizerFcn.h.

◆ SetVerbose()

void RooMinimizerFcn::SetVerbose ( Bool_t  flag = kTRUE)
inline

Definition at line 60 of file RooMinimizerFcn.h.

◆ Synchronize()

Bool_t RooMinimizerFcn::Synchronize ( std::vector< ROOT::Fit::ParameterSettings > &  parameters,
Bool_t  optConst,
Bool_t  verbose 
)

Internal function to synchronize TMinimizer with current information in RooAbsReal function parameters.

Definition at line 128 of file RooMinimizerFcn.cxx.

◆ zeroEvalCount()

void RooMinimizerFcn::zeroEvalCount ( )
inline

Definition at line 71 of file RooMinimizerFcn.h.

Member Data Documentation

◆ _constParamList

RooArgList* RooMinimizerFcn::_constParamList
private

Definition at line 98 of file RooMinimizerFcn.h.

◆ _context

const RooMinimizer* RooMinimizerFcn::_context
private

Definition at line 87 of file RooMinimizerFcn.h.

◆ _doEvalErrorWall

bool RooMinimizerFcn::_doEvalErrorWall {true}
private

Definition at line 103 of file RooMinimizerFcn.h.

◆ _evalCounter

int RooMinimizerFcn::_evalCounter {0}
mutableprivate

Definition at line 94 of file RooMinimizerFcn.h.

◆ _floatParamList

RooArgList* RooMinimizerFcn::_floatParamList
private

Definition at line 97 of file RooMinimizerFcn.h.

◆ _funcOffset

double RooMinimizerFcn::_funcOffset {0.}
mutableprivate

Definition at line 90 of file RooMinimizerFcn.h.

◆ _funct

RooAbsReal* RooMinimizerFcn::_funct
private

Definition at line 86 of file RooMinimizerFcn.h.

◆ _initConstParamList

RooArgList* RooMinimizerFcn::_initConstParamList
private

Definition at line 100 of file RooMinimizerFcn.h.

◆ _initFloatParamList

RooArgList* RooMinimizerFcn::_initFloatParamList
private

Definition at line 99 of file RooMinimizerFcn.h.

◆ _logfile

std::ofstream* RooMinimizerFcn::_logfile
private

Definition at line 102 of file RooMinimizerFcn.h.

◆ _maxFCN

double RooMinimizerFcn::_maxFCN
mutableprivate

Definition at line 89 of file RooMinimizerFcn.h.

◆ _nDim

int RooMinimizerFcn::_nDim
private

Definition at line 95 of file RooMinimizerFcn.h.

◆ _numBadNLL

int RooMinimizerFcn::_numBadNLL
mutableprivate

Definition at line 92 of file RooMinimizerFcn.h.

◆ _printEvalErrors

int RooMinimizerFcn::_printEvalErrors
mutableprivate

Definition at line 93 of file RooMinimizerFcn.h.

◆ _recoverFromNaNStrength

double RooMinimizerFcn::_recoverFromNaNStrength {10.}
private

Definition at line 91 of file RooMinimizerFcn.h.

◆ _verbose

bool RooMinimizerFcn::_verbose
private

Definition at line 104 of file RooMinimizerFcn.h.

Libraries for RooMinimizerFcn:
[legend]

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