19 #include "msdevstudio/MSconfig.h"
28 #if HAVE_MINUIT || HAVE_MINUIT2
42 using namespace hippodraw;
64 fitter -> setFCN ( chifcn );
67 fitter =
new LMFitter (
"Pearson: BFGS" );
69 fitter -> setFCN ( pearsonfcn );
74 fitter -> setFCN ( likfcn );
77 #if HAVE_MINUIT || HAVE_MINUIT2
80 fitter -> setFCN ( chifcn );
85 fitter -> setFCN ( likfcn );
98 string what (
"FitterFactory: Fitter with name `" );
100 what +=
"' does not exist.";
101 throw std::runtime_error ( what );
112 const vector < string > & fitters =
names ();
113 return fitters.front ();
FitterFactory()
A default constructor for prevent creation except by the itself or the derived classes.
FitterFactory class interface.
const std::vector< std::string > & names() const
Returns the list of available prototype names.
A Factory singleton class for creating objects whose class derives from Fitter.
std::string m_default
The application's default fitter, if non empty.
void initialize()
Initializes the factory with a set of default functions.
A Likelihood functor class.
void add(Fitter *)
Adds a prototype object to the list of prototypes.
The base class for fitters.
A Chi-squared functor class.
hippodraw::NTuplePearsonFCN class interface
BFGSFitter class interface.
The minimization algorithm used is a complementary quasi newton algorithm, with BFGS (Broyden-Fletche...
bool exists(const std::string &name) const
Returns true if prototype with name name exists in the factory, otherwise returns false...
hippodraw::NTupleLikeliHoodFCN class interface
hippodraw::MinuitMigrad class interface
const std::string & getDefault() const
Returns the default Fitter.
LMFitter class interface.
static FitterFactory * s_instance
A pointer to the singleton object.
void setDefault(const std::string &name)
Sets the application's default Fitter.
hippodraw::NTupleChiSqFCN class interface
static FitterFactory * instance()
Returns a pointer to the singleton instance.
A derived class for FCNBase class.
A Pearson's Chi-squared functor class.