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

Public Member Functions

 RooMinimizerFcn (const RooMinimizerFcn &other)
 
 RooMinimizerFcn (RooAbsReal *funct, RooMinimizer *context)
 
 ~RooMinimizerFcn () override
 
ROOT::Math::IBaseFunctionMultiDimClone () const override
 Clone a function.
 
bool fit (ROOT::Fit::Fitter &fitter) const override
 
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
 
unsigned int NDim () const override
 Retrieve the dimension of the function.
 
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 (const RooAbsMinimizerFcn &other)
 
 RooAbsMinimizerFcn (RooArgList paramList, RooMinimizer *context)
 
virtual ~RooAbsMinimizerFcn ()=default
 
void ApplyCovarianceMatrix (TMatrixDSym &V)
 Set different external covariance matrix.
 
void BackProp (const ROOT::Fit::FitResult &results)
 Put Minuit results back into RooFit objects.
 
RooMinimizer::Config const & cfg () const
 
Int_t evalCounter () const
 
RooArgListGetConstParamList ()
 
RooArgListGetFloatParamList ()
 
RooArgListGetInitConstParamList ()
 
RooArgListGetInitFloatParamList ()
 
std::ofstream * GetLogFile ()
 
doubleGetMaxFCN ()
 
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.
 
std::vector< doublegetParameterValues () const
 
unsigned int NDim () 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 ()
 
- Public Member Functions inherited from ROOT::Math::IBaseFunctionMultiDimTempl< double >
 IBaseFunctionMultiDimTempl ()
 
virtual ~IBaseFunctionMultiDimTempl ()
 virtual destructor
 
double operator() (const double *x) const
 Evaluate the function at a point x[].
 

Private Member Functions

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

Private Attributes

RooAbsReal_funct
 

Additional Inherited Members

- Public Types inherited from ROOT::Math::IBaseFunctionMultiDimTempl< double >
typedef double BackendType
 
typedef IBaseFunctionMultiDimTempl< doubleBaseFunc
 
- Protected Member Functions inherited from RooAbsMinimizerFcn
void ClearPdfParamAsymErr (Int_t index)
 Modify PDF parameter error by ordinal index (needed by MINUIT)
 
void finishDoEval () const
 
void optimizeConstantTerms (bool constStatChange, bool constValChange)
 
void printEvalErrors () const
 Print information about why evaluation failed.
 
void SetPdfParamErr (Int_t index, double loVal, double hiVal)
 Modify PDF parameter error by ordinal index (needed by MINUIT)
 
void SetPdfParamErr (Int_t index, double value)
 Modify PDF parameter error by ordinal index (needed by MINUIT)
 
- Protected Attributes inherited from RooAbsMinimizerFcn
std::unique_ptr< RooArgList_constParamList
 
RooMinimizer_context
 
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
 

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

Inheritance diagram for RooMinimizerFcn:
[legend]

Constructor & Destructor Documentation

◆ RooMinimizerFcn() [1/2]

RooMinimizerFcn::RooMinimizerFcn ( RooAbsReal funct,
RooMinimizer context 
)

Definition at line 52 of file RooMinimizerFcn.cxx.

◆ RooMinimizerFcn() [2/2]

RooMinimizerFcn::RooMinimizerFcn ( const RooMinimizerFcn other)

Definition at line 57 of file RooMinimizerFcn.cxx.

◆ ~RooMinimizerFcn()

RooMinimizerFcn::~RooMinimizerFcn ( )
override

Definition at line 62 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< double >.

Definition at line 64 of file RooMinimizerFcn.cxx.

◆ DoEval()

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

Evaluate function given the parameters in x.

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

Definition at line 75 of file RooMinimizerFcn.cxx.

◆ fit()

bool RooMinimizerFcn::fit ( ROOT::Fit::Fitter fitter) const
inlineoverridevirtual

Implements RooAbsMinimizerFcn.

Definition at line 53 of file RooMinimizerFcn.h.

◆ 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 124 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 129 of file RooMinimizerFcn.cxx.

◆ getMultiGenFcn()

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

Implements RooAbsMinimizerFcn.

Definition at line 54 of file RooMinimizerFcn.h.

◆ NDim()

unsigned int RooMinimizerFcn::NDim ( ) const
inlineoverridevirtual

Retrieve the dimension of the function.

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

Definition at line 45 of file RooMinimizerFcn.h.

◆ 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 134 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 69 of file RooMinimizerFcn.cxx.

Member Data Documentation

◆ _funct

RooAbsReal* RooMinimizerFcn::_funct
private

Definition at line 59 of file RooMinimizerFcn.h.

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