Logo ROOT  
Reference Guide
RooAbsMinimizerFcn Class Referenceabstract

Definition at line 38 of file RooAbsMinimizerFcn.h.

Public Member Functions

 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
 
virtual bool fit (ROOT::Fit::Fitter &) const =0
 
RooArgListGetConstParamList ()
 
RooArgListGetFloatParamList ()
 
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 ()
 
doubleGetMaxFCN ()
 
virtual ROOT::Math::IMultiGenFunctiongetMultiGenFcn ()=0
 
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
 
unsigned int NDim () const
 
void SetEvalErrorWall (bool flag)
 
bool 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 flag)=0
 Enable or disable offsetting on the function to be minimized, which enhances numerical precision. More...
 
void setOptimizeConst (Int_t flag)
 
bool 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 flag=true)
 
virtual bool Synchronize (std::vector< ROOT::Fit::ParameterSettings > &parameters, bool optConst, bool 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 synchronizeParameterSettings (std::vector< ROOT::Fit::ParameterSettings > &parameters, bool optConst, bool verbose)
 Informs Minuit through its parameter_settings vector of RooFit parameter properties. More...
 
void zeroEvalCount ()
 

Protected Member Functions

void ClearPdfParamAsymErr (Int_t index)
 Modify PDF parameter error by ordinal index (needed by MINUIT) More...
 
void finishDoEval () const
 
void optimizeConstantTerms (bool constStatChange, bool constValChange)
 
void printEvalErrors () const
 Print information about why evaluation failed. More...
 
virtual void setOptimizeConstOnFunction (RooAbsArg::ConstOpCode opcode, bool 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 loVal, double hiVal)
 Modify PDF parameter error by ordinal index (needed by MINUIT) More...
 
void SetPdfParamErr (Int_t index, double value)
 Modify PDF parameter error by ordinal index (needed by MINUIT) More...
 

Protected Attributes

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 _optConst = false
 
int _printEvalErrors = 10
 
double _recoverFromNaNStrength {10.}
 
bool _verbose
 

#include </home/sftnight/build/workspace/root-makedoc-master/rootspi/rdoc/src/master/roofit/roofitcore/src/RooAbsMinimizerFcn.h>

Inheritance diagram for RooAbsMinimizerFcn:
[legend]

Constructor & Destructor Documentation

◆ RooAbsMinimizerFcn() [1/2]

RooAbsMinimizerFcn::RooAbsMinimizerFcn ( RooArgList  paramList,
RooMinimizer context,
bool  verbose = false 
)

Definition at line 43 of file RooAbsMinimizerFcn.cxx.

◆ RooAbsMinimizerFcn() [2/2]

RooAbsMinimizerFcn::RooAbsMinimizerFcn ( const RooAbsMinimizerFcn other)

Definition at line 78 of file RooAbsMinimizerFcn.cxx.

◆ ~RooAbsMinimizerFcn()

virtual RooAbsMinimizerFcn::~RooAbsMinimizerFcn ( )
virtualdefault

Member Function Documentation

◆ ApplyCovarianceMatrix()

void RooAbsMinimizerFcn::ApplyCovarianceMatrix ( TMatrixDSym V)

Set different external covariance matrix.

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 392 of file RooAbsMinimizerFcn.cxx.

◆ BackProp()

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

Put Minuit results back into RooFit objects.

Transfer MINUIT fit results back into RooFit objects.

Definition at line 344 of file RooAbsMinimizerFcn.cxx.

◆ ClearPdfParamAsymErr()

void RooAbsMinimizerFcn::ClearPdfParamAsymErr ( Int_t  index)
protected

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

Definition at line 332 of file RooAbsMinimizerFcn.cxx.

◆ evalCounter()

Int_t RooAbsMinimizerFcn::evalCounter ( ) const
inline

Definition at line 67 of file RooAbsMinimizerFcn.h.

◆ finishDoEval()

void RooAbsMinimizerFcn::finishDoEval ( ) const
protected

Definition at line 447 of file RooAbsMinimizerFcn.cxx.

◆ fit()

virtual bool RooAbsMinimizerFcn::fit ( ROOT::Fit::Fitter ) const
pure virtual

◆ GetConstParamList()

RooArgList * RooAbsMinimizerFcn::GetConstParamList ( )
inline

Definition at line 52 of file RooAbsMinimizerFcn.h.

◆ GetFloatParamList()

RooArgList * RooAbsMinimizerFcn::GetFloatParamList ( )
inline

Definition at line 51 of file RooAbsMinimizerFcn.h.

◆ getFunctionName()

virtual std::string RooAbsMinimizerFcn::getFunctionName ( ) const
pure virtual

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

Implemented in RooGradMinimizerFcn, RooMinimizerFcn, and RooFit::TestStatistics::MinuitFcnGrad.

◆ getFunctionTitle()

virtual std::string RooAbsMinimizerFcn::getFunctionTitle ( ) const
pure virtual

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

Implemented in RooGradMinimizerFcn, RooMinimizerFcn, and RooFit::TestStatistics::MinuitFcnGrad.

◆ GetInitConstParamList()

RooArgList * RooAbsMinimizerFcn::GetInitConstParamList ( )
inline

Definition at line 54 of file RooAbsMinimizerFcn.h.

◆ GetInitFloatParamList()

RooArgList * RooAbsMinimizerFcn::GetInitFloatParamList ( )
inline

Definition at line 53 of file RooAbsMinimizerFcn.h.

◆ GetLogFile()

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

Definition at line 85 of file RooAbsMinimizerFcn.h.

◆ GetMaxFCN()

double & RooAbsMinimizerFcn::GetMaxFCN ( )
inline

Definition at line 66 of file RooAbsMinimizerFcn.h.

◆ getMultiGenFcn()

virtual ROOT::Math::IMultiGenFunction * RooAbsMinimizerFcn::getMultiGenFcn ( )
pure virtual

◆ getNDim()

unsigned int RooAbsMinimizerFcn::getNDim ( ) const
inline

Definition at line 87 of file RooAbsMinimizerFcn.h.

◆ GetNumInvalidNLL()

Int_t RooAbsMinimizerFcn::GetNumInvalidNLL ( ) const
inline

Definition at line 55 of file RooAbsMinimizerFcn.h.

◆ getOffset()

double RooAbsMinimizerFcn::getOffset ( ) const
inline

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

Definition at line 70 of file RooAbsMinimizerFcn.h.

◆ getOptConst()

bool RooAbsMinimizerFcn::getOptConst ( )
inline

Definition at line 97 of file RooAbsMinimizerFcn.h.

◆ getParameterValues()

std::vector< double > RooAbsMinimizerFcn::getParameterValues ( ) const

Definition at line 503 of file RooAbsMinimizerFcn.cxx.

◆ NDim()

unsigned int RooAbsMinimizerFcn::NDim ( ) const
inline

Definition at line 93 of file RooAbsMinimizerFcn.h.

◆ optimizeConstantTerms()

void RooAbsMinimizerFcn::optimizeConstantTerms ( bool  constStatChange,
bool  constValChange 
)
protected

Definition at line 488 of file RooAbsMinimizerFcn.cxx.

◆ printEvalErrors()

void RooAbsMinimizerFcn::printEvalErrors ( ) const
protected

Print information about why evaluation failed.

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

Definition at line 422 of file RooAbsMinimizerFcn.cxx.

◆ SetEvalErrorWall()

void RooAbsMinimizerFcn::SetEvalErrorWall ( bool  flag)
inline

Definition at line 58 of file RooAbsMinimizerFcn.h.

◆ SetLogFile()

bool RooAbsMinimizerFcn::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 370 of file RooAbsMinimizerFcn.cxx.

◆ setOffsetting()

virtual void RooAbsMinimizerFcn::setOffsetting ( bool  flag)
pure virtual

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

Implemented in RooGradMinimizerFcn, RooMinimizerFcn, and RooFit::TestStatistics::MinuitFcnGrad.

◆ setOptimizeConst()

void RooAbsMinimizerFcn::setOptimizeConst ( Int_t  flag)

Definition at line 463 of file RooAbsMinimizerFcn.cxx.

◆ setOptimizeConstOnFunction()

virtual void RooAbsMinimizerFcn::setOptimizeConstOnFunction ( RooAbsArg::ConstOpCode  opcode,
bool  doAlsoTrackingOpt 
)
protectedpure virtual

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.

Implemented in RooGradMinimizerFcn, RooMinimizerFcn, and RooFit::TestStatistics::MinuitFcnGrad.

◆ SetPdfParamErr() [1/2]

void RooAbsMinimizerFcn::SetPdfParamErr ( Int_t  index,
double  loVal,
double  hiVal 
)
protected

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

Definition at line 338 of file RooAbsMinimizerFcn.cxx.

◆ SetPdfParamErr() [2/2]

void RooAbsMinimizerFcn::SetPdfParamErr ( Int_t  index,
double  value 
)
protected

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

Definition at line 326 of file RooAbsMinimizerFcn.cxx.

◆ SetPdfParamVal()

bool RooAbsMinimizerFcn::SetPdfParamVal ( int  index,
double  value 
) const

Set value of parameter i.

Definition at line 404 of file RooAbsMinimizerFcn.cxx.

◆ SetPrintEvalErrors()

void RooAbsMinimizerFcn::SetPrintEvalErrors ( Int_t  numEvalErrors)
inline

Definition at line 65 of file RooAbsMinimizerFcn.h.

◆ SetRecoverFromNaNStrength()

void RooAbsMinimizerFcn::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 64 of file RooAbsMinimizerFcn.h.

◆ SetVerbose()

void RooAbsMinimizerFcn::SetVerbose ( bool  flag = true)
inline

Definition at line 71 of file RooAbsMinimizerFcn.h.

◆ Synchronize()

bool RooAbsMinimizerFcn::Synchronize ( std::vector< ROOT::Fit::ParameterSettings > &  parameters,
bool  optConst,
bool  verbose 
)
virtual

Like synchronizeParameterSettings, Synchronize informs Minuit through its parameter_settings vector of RooFit parameter properties, but Synchronize can be overridden to e.g.

also include gradient strategy synchronization in subclasses.

Reimplemented in RooGradMinimizerFcn, and RooFit::TestStatistics::MinuitFcnGrad.

Definition at line 321 of file RooAbsMinimizerFcn.cxx.

◆ synchronizeParameterSettings()

bool RooAbsMinimizerFcn::synchronizeParameterSettings ( std::vector< ROOT::Fit::ParameterSettings > &  parameters,
bool  optConst,
bool  verbose 
)

Informs Minuit through its parameter_settings vector of RooFit parameter properties.

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

Definition at line 94 of file RooAbsMinimizerFcn.cxx.

◆ zeroEvalCount()

void RooAbsMinimizerFcn::zeroEvalCount ( )
inline

Definition at line 68 of file RooAbsMinimizerFcn.h.

Member Data Documentation

◆ _constParamList

std::unique_ptr<RooArgList> RooAbsMinimizerFcn::_constParamList
protected

Definition at line 139 of file RooAbsMinimizerFcn.h.

◆ _context

RooMinimizer* RooAbsMinimizerFcn::_context
protected

Definition at line 123 of file RooAbsMinimizerFcn.h.

◆ _doEvalErrorWall

bool RooAbsMinimizerFcn::_doEvalErrorWall {true}
protected

Definition at line 144 of file RooAbsMinimizerFcn.h.

◆ _evalCounter

int RooAbsMinimizerFcn::_evalCounter {0}
mutableprotected

Definition at line 132 of file RooAbsMinimizerFcn.h.

◆ _floatParamList

std::unique_ptr<RooArgList> RooAbsMinimizerFcn::_floatParamList
protected

Definition at line 138 of file RooAbsMinimizerFcn.h.

◆ _funcOffset

double RooAbsMinimizerFcn::_funcOffset {0.}
mutableprotected

Definition at line 128 of file RooAbsMinimizerFcn.h.

◆ _initConstParamList

std::unique_ptr<RooArgList> RooAbsMinimizerFcn::_initConstParamList
protected

Definition at line 141 of file RooAbsMinimizerFcn.h.

◆ _initFloatParamList

std::unique_ptr<RooArgList> RooAbsMinimizerFcn::_initFloatParamList
protected

Definition at line 140 of file RooAbsMinimizerFcn.h.

◆ _logfile

std::ofstream* RooAbsMinimizerFcn::_logfile = nullptr
protected

Definition at line 143 of file RooAbsMinimizerFcn.h.

◆ _maxFCN

double RooAbsMinimizerFcn::_maxFCN = -std::numeric_limits<double>::infinity()
mutableprotected

Definition at line 127 of file RooAbsMinimizerFcn.h.

◆ _nDim

unsigned int RooAbsMinimizerFcn::_nDim = 0
protected

Definition at line 134 of file RooAbsMinimizerFcn.h.

◆ _numBadNLL

int RooAbsMinimizerFcn::_numBadNLL = 0
mutableprotected

Definition at line 130 of file RooAbsMinimizerFcn.h.

◆ _optConst

bool RooAbsMinimizerFcn::_optConst = false
protected

Definition at line 136 of file RooAbsMinimizerFcn.h.

◆ _printEvalErrors

int RooAbsMinimizerFcn::_printEvalErrors = 10
mutableprotected

Definition at line 131 of file RooAbsMinimizerFcn.h.

◆ _recoverFromNaNStrength

double RooAbsMinimizerFcn::_recoverFromNaNStrength {10.}
protected

Definition at line 129 of file RooAbsMinimizerFcn.h.

◆ _verbose

bool RooAbsMinimizerFcn::_verbose
protected

Definition at line 145 of file RooAbsMinimizerFcn.h.


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