#include <MinuitMigrad.h>
Inheritance diagram for MinuitMigrad:
A Fitter class that uses the Simple version of Minuit for fitting.
Definition at line 33 of file MinuitMigrad.h.
Public Member Functions | |
virtual bool | calcBestFit () |
Calculates the best fit. | |
virtual int | calcCovariance (std::vector< std::vector< double > > &cov) |
Calculates the covariance matrix. | |
virtual int | calcDegreesOfFreedom () const |
Returns the number of degrees of freedom in the fit. | |
virtual Fitter * | clone () const |
Makes a copy of the receiving object. | |
void | fillFreeParameters (std::vector< double > &) const |
Fills the vector with the free parameters values. | |
StatedFCN * | getFCN () |
Returns the objective function object. | |
virtual const std::vector< int > & | getFixedFlags () const |
Returns a vector containing flags for which parameters are to be held fixed during objective function minimization. | |
MinuitMigrad (const char *name) | |
The constructor. | |
const std::string & | name () const |
Returns the name of the fitter. | |
virtual bool | needsDerivatives () const |
Returns false as this fitter does not need the function to calculate its partial derivatives. | |
virtual double | objectiveValue () const |
Calculates the value of the objective function at the current set of parameters. | |
void | setFCN (StatedFCN *fcn) |
Sets the objective function object. | |
virtual void | setFitCut (TupleCut *cut) |
Sets the cut to limit range of fitting. | |
virtual void | setFitRange (bool yes=true) |
Sets use of a fitting range on or off. | |
virtual void | setFixedFlags (const std::vector< int > &flags) |
Sets the parameters that are to be held fixed during objective function minimization. | |
void | setLimits (const std::string &name, double lower, double upper) |
Sets the limits for the parameter of the model function with name name. | |
virtual void | setLimits (unsigned int i, double lower, double upper) |
Sets the upper and lower limits of the parameter. | |
void | setStepSize (const std::string &name, double size) |
Sets the minimization step size for model function parameter name. | |
virtual void | setStepSize (unsigned int i, double size) |
Sets the step size used by MnMigrad. | |
Protected Attributes | |
StatedFCN * | m_fcn |
The objective function. | |
int | m_max_iterations |
The maximum number of iterations allowed in attempting the fit. | |
std::string | m_name |
The name of the fitter. | |
Private Member Functions | |
void | checkIndex (unsigned int index) |
Checks the index and throws exception if out of range. | |
void | initialize () |
Initializes the Minuit Migrad minimizer. | |
MinuitMigrad (const MinuitMigrad &) | |
Private copy constructor to prevent user copying. | |
Private Attributes | |
MnMigrad * | m_minimizer |
The Minuit Migrad minimizer. |
|
Private copy constructor to prevent user copying.
Definition at line 34 of file MinuitMigrad.cxx. References m_minimizer. Referenced by clone(). |
|
The constructor.
Definition at line 27 of file MinuitMigrad.cxx. |
|
Calculates the best fit.
Returns Implements Fitter. Definition at line 116 of file MinuitMigrad.cxx. References Fitter::getFixedFlags(), initialize(), MinuitParameter::isFixed(), FunctionMinimum::isValid(), Fitter::m_fcn, m_minimizer, and num_util::size(). |
|
Calculates the covariance matrix.
Reimplemented from Fitter. Definition at line 150 of file MinuitMigrad.cxx. References MnMigrad::covariance(), initialize(), m_minimizer, MnUserCovariance::nrow(), and num_util::size(). |
|
Returns the number of degrees of freedom in the fit.
Definition at line 165 of file Fitter.cxx. References Fitter::m_fcn. Referenced by FunctionProjector::degreesOfFreedom(), and hippodraw::Python::export_Fitter(). |
|
Checks the index and throws exception if out of range.
Definition at line 80 of file MinuitMigrad.cxx. References initialize(), Fitter::m_fcn, m_minimizer, Fitter::m_name, and num_util::size(). Referenced by setLimits(), and setStepSize(). |
|
Makes a copy of the receiving object. Makes copy of receiving object by creating a new one with the only constructor.
Implements Fitter. Definition at line 45 of file MinuitMigrad.cxx. References MinuitMigrad(). |
|
Fills the vector with the free parameters values.
Definition at line 68 of file Fitter.cxx. References Fitter::m_fcn. Referenced by LMFitter::calcBestFit(), and BFGSFitter::calcBestFit(). |
|
Returns the objective function object.
Definition at line 54 of file Fitter.cxx. References Fitter::m_fcn. Referenced by hippodraw::Python::export_Fitter(). |
|
Returns a vector containing flags for which parameters are to be held fixed during objective function minimization.
Definition at line 82 of file Fitter.cxx. References Fitter::m_fcn. Referenced by calcBestFit(). |
|
Initializes the Minuit Migrad minimizer.
Definition at line 59 of file MinuitMigrad.cxx. References MnUserParameters::add(), Fitter::m_fcn, m_minimizer, Fitter::name(), and num_util::size(). Referenced by calcBestFit(), calcCovariance(), and checkIndex(). |
|
Returns the name of the fitter.
Definition at line 61 of file Fitter.cxx. References Fitter::m_name. Referenced by hippodraw::Python::export_Fitter(), and initialize(). |
|
Returns
Implements Fitter. Definition at line 52 of file MinuitMigrad.cxx. |
|
Calculates the value of the objective function at the current set of parameters.
Definition at line 158 of file Fitter.cxx. References Fitter::m_fcn. Referenced by LMFitter::calcBestFit(), hippodraw::Python::export_Fitter(), BFGSFitter::function(), BFGSFitter::gradient(), BFGSFitter::gradp(), and FunctionProjector::objectiveValue(). |
|
Sets the objective function object. Sets the objective function object to be used and takes possession of it. That is, will delete the current object, if there is one, and will delete the object in this object's destructor. Definition at line 45 of file Fitter.cxx. References Fitter::m_fcn. |
|
Sets the cut to limit range of fitting.
Definition at line 179 of file Fitter.cxx. References Fitter::m_fcn. |
|
Sets use of a fitting range on or off.
Definition at line 186 of file Fitter.cxx. References Fitter::m_fcn. |
|
Sets the parameters that are to be held fixed during objective function minimization.
Definition at line 75 of file Fitter.cxx. References Fitter::m_fcn. Referenced by hippodraw::Python::export_Fitter(). |
|
Sets the limits for the parameter of the model function with name name.
Definition at line 123 of file Fitter.cxx. References Fitter::getParameterIndex(), and Fitter::setLimits(). |
|
Sets the upper and lower limits of the parameter.
Reimplemented from Fitter. Definition at line 100 of file MinuitMigrad.cxx. References checkIndex(), and m_minimizer. |
|
Sets the minimization step size for model function parameter name.
Definition at line 151 of file Fitter.cxx. References Fitter::getParameterIndex(), and Fitter::setStepSize(). |
|
Sets the step size used by MnMigrad.
Reimplemented from Fitter. Definition at line 108 of file MinuitMigrad.cxx. References checkIndex(), and m_minimizer. |
|
The objective function.
Definition at line 55 of file Fitter.h. Referenced by LMFitter::calcAlpha(), calcBestFit(), LMFitter::calcBestFit(), BFGSFitter::calcBestFit(), Fitter::calcDegreesOfFreedom(), checkIndex(), Fitter::fillFreeParameters(), Fitter::Fitter(), BFGSFitter::function(), Fitter::getFCN(), Fitter::getFixedFlags(), Fitter::getParameterIndex(), BFGSFitter::gradient(), BFGSFitter::gradp(), initialize(), Fitter::objectiveValue(), Fitter::setFCN(), Fitter::setFitCut(), Fitter::setFitRange(), Fitter::setFixedFlags(), and Fitter::~Fitter(). |
|
The maximum number of iterations allowed in attempting the fit.
Definition at line 58 of file Fitter.h. Referenced by LMFitter::calcBestFit(), BFGSFitter::calcBestFit(), LMFitter::iterParam(), BFGSFitter::iterParam(), LMFitter::setIterParam(), and BFGSFitter::setIterParam(). |
|
The Minuit Migrad minimizer.
Definition at line 47 of file MinuitMigrad.h. Referenced by calcBestFit(), calcCovariance(), checkIndex(), initialize(), MinuitMigrad(), setLimits(), and setStepSize(). |
|
The name of the fitter.
Definition at line 47 of file Fitter.h. Referenced by checkIndex(), Fitter::name(), Fitter::setLimits(), and Fitter::setStepSize(). |