Changeset View
Changeset View
Standalone View
Standalone View
inc/LauAbsFitter.hh
Show All 30 Lines | /*! \class LauAbsFitter | ||||
The abstract interface to the fitter. | The abstract interface to the fitter. | ||||
Concrete implementations provide the singleton interface with a particular fitter, e.g. Minuit. | Concrete implementations provide the singleton interface with a particular fitter, e.g. Minuit. | ||||
*/ | */ | ||||
#ifndef LAU_ABS_FITTER | #ifndef LAU_ABS_FITTER | ||||
#define LAU_ABS_FITTER | #define LAU_ABS_FITTER | ||||
#include <vector> | |||||
#include "Rtypes.h" | #include "Rtypes.h" | ||||
#include "TMatrixDfwd.h" | #include "TMatrixDfwd.h" | ||||
#include <vector> | |||||
class LauFitObject; | class LauFitObject; | ||||
class LauParameter; | class LauParameter; | ||||
class LauAbsFitter { | class LauAbsFitter { | ||||
public: | public: | ||||
/*! | /*! | ||||
\struct FitStatus | \struct FitStatus | ||||
\brief Struct to store fit status information | \brief Struct to store fit status information | ||||
*/ | */ | ||||
struct FitStatus { | struct FitStatus { | ||||
//! The status code of the fit | //! The status code of the fit | ||||
Int_t status; | Int_t status; | ||||
//! The negative log-likelihood | //! The negative log-likelihood | ||||
Double_t NLL; | Double_t NLL; | ||||
//! The estimated distance to the minimum | //! The estimated distance to the minimum | ||||
Double_t EDM; | Double_t EDM; | ||||
}; | }; | ||||
//! Destructor | //! Destructor | ||||
virtual ~LauAbsFitter() {} | virtual ~LauAbsFitter() = default; | ||||
//! Initialise the fitter, setting the information on the parameters | //! Initialise the fitter, setting the information on the parameters | ||||
/*! | /*! | ||||
\param [in] fitObj the object that controls the likelihood calculation | \param [in] fitObj the object that controls the likelihood calculation | ||||
\param [in] parameters the list of parameters of the fit | \param [in] parameters the list of parameters of the fit | ||||
*/ | */ | ||||
virtual void initialise( LauFitObject* fitObj, const std::vector<LauParameter*>& parameters ) = 0; | virtual void initialise( LauFitObject* fitObj, const std::vector<LauParameter*>& parameters ) = 0; | ||||
//! Get the object that controls the calculation of the likelihood | //! Get the object that controls the calculation of the likelihood | ||||
virtual LauFitObject* getFitObject() =0; | virtual LauFitObject* getFitObject() = 0; | ||||
//! Get the total number of fit parameters | //! Get the total number of fit parameters | ||||
virtual UInt_t nParameters() const = 0; | virtual UInt_t nParameters() const = 0; | ||||
//! Get the number of floating fit parameters | //! Get the number of floating fit parameters | ||||
virtual UInt_t nFreeParameters() const = 0; | virtual UInt_t nFreeParameters() const = 0; | ||||
//! Determine whether the two-stage fit is enabled | //! Determine whether the two-stage fit is enabled | ||||
Show All 36 Lines | public: | ||||
//! Update the values and errors of the parameters based on the fit minimum | //! Update the values and errors of the parameters based on the fit minimum | ||||
virtual void updateParameters() = 0; | virtual void updateParameters() = 0; | ||||
//! Retrieve the fit covariance matrix | //! Retrieve the fit covariance matrix | ||||
virtual const TMatrixD& covarianceMatrix() const = 0; | virtual const TMatrixD& covarianceMatrix() const = 0; | ||||
protected: | protected: | ||||
//! Constructor | //! Constructor | ||||
LauAbsFitter() {} | LauAbsFitter() = default; | ||||
private: | private: | ||||
//! Copy constructor - private and not implemented | //! Copy constructor - private and not implemented | ||||
LauAbsFitter( const LauAbsFitter& ); | LauAbsFitter( const LauAbsFitter& ) = delete; | ||||
//! Move constructor - private and not implemented | |||||
LauAbsFitter( LauAbsFitter&& ) = delete; | |||||
//! Copy assignment operator - private and not implemented | //! Copy assignment operator - private and not implemented | ||||
LauAbsFitter& operator=( const LauAbsFitter& rhs ); | LauAbsFitter& operator=( const LauAbsFitter& rhs ) = delete; | ||||
//! Move assignment operator - private and not implemented | |||||
LauAbsFitter& operator=( LauAbsFitter&& rhs ) = delete; | |||||
ClassDef(LauAbsFitter,0); | ClassDef(LauAbsFitter,0); | ||||
}; | }; | ||||
#endif | #endif | ||||