MINT2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MINT::MintFcnGrad Class Reference

#include <MintFcnGrad.h>

Inheritance diagram for MINT::MintFcnGrad:

Public Member Functions

 MintFcnGrad (IMinimisable *theFunction)
 
virtual double operator() (const std::vector< double > &par) const
 
virtual std::vector< double > Gradient (const std::vector< double > &par) const
 
void SetBestMin (const double &best_min)
 

Private Member Functions

virtual double Up () const
 

Private Attributes

IMinimisable_theFunction
 
const double _error_def = 1.0
 
double _best_min = 0.0
 

Detailed Description

Definition at line 10 of file MintFcnGrad.h.

Constructor & Destructor Documentation

◆ MintFcnGrad()

MINT::MintFcnGrad::MintFcnGrad ( IMinimisable theFunction)
inline

Constructor

Definition at line 16 of file MintFcnGrad.h.

17  :_theFunction(theFunction)
18  {}
IMinimisable * _theFunction
Definition: MintFcnGrad.h:58

Member Function Documentation

◆ Gradient()

virtual std::vector<double> MINT::MintFcnGrad::Gradient ( const std::vector< double > &  par) const
inlinevirtual

User-supplied gradient

Definition at line 40 of file MintFcnGrad.h.

42  { return _theFunction->Gradient(par); }
virtual void Gradient(std::vector< double > &grad)
Definition: IMinimisable.h:24
IMinimisable * _theFunction
Definition: MintFcnGrad.h:58

◆ operator()()

virtual double MINT::MintFcnGrad::operator() ( const std::vector< double > &  par) const
inlinevirtual

Calculate test-statistic from Minuit2 fit parameter guesses

Definition at line 23 of file MintFcnGrad.h.

24  {
25  for( unsigned int i=0; i<par.size(); ++i )
28 
29  const double negll = _theFunction->getVal()-_best_min;
30 
31  std::cout << std::setprecision(std::numeric_limits<double>::digits10);
32  std::cout << "-2logL = " << negll << std::endl;
33 
34  return negll;
35  }
IMinuitParameter * getParPtr(unsigned int i)
virtual double getVal()=0
virtual MinuitParameterSet * getParSet()=0
virtual void parametersChanged()=0
IMinimisable * _theFunction
Definition: MintFcnGrad.h:58
virtual void setCurrentFitVal(double pval)=0

◆ SetBestMin()

void MINT::MintFcnGrad::SetBestMin ( const double &  best_min)
inline

If minimisation fails due to edm being above tolerance, set the best known -2logL and reminimise

Definition at line 48 of file MintFcnGrad.h.

49  { _best_min += best_min; }

◆ Up()

virtual double MINT::MintFcnGrad::Up ( ) const
inlineprivatevirtual

Change in test-statistic that defines the uncertainty of fit parameters

Definition at line 55 of file MintFcnGrad.h.

56  { return _error_def; }
const double _error_def
Definition: MintFcnGrad.h:60

Member Data Documentation

◆ _best_min

double MINT::MintFcnGrad::_best_min = 0.0
private

Definition at line 62 of file MintFcnGrad.h.

◆ _error_def

const double MINT::MintFcnGrad::_error_def = 1.0
private

Definition at line 60 of file MintFcnGrad.h.

◆ _theFunction

IMinimisable* MINT::MintFcnGrad::_theFunction
private

Definition at line 58 of file MintFcnGrad.h.


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