#ifndef ROOT_TMinuitMinimizer
#define ROOT_TMinuitMinimizer
#ifndef ROOT_Math_Minimizer
#include "Math/Minimizer.h"
#endif
#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif
class TMinuit;
namespace ROOT {
namespace Minuit {
enum EMinimizerType {
kMigrad,
kSimplex,
kCombined,
kMigradImproved,
kScan
};
}
}
class TMinuitMinimizer : public ROOT::Math::Minimizer {
public:
TMinuitMinimizer ( ROOT::Minuit::EMinimizerType type = ROOT::Minuit::kMigrad);
TMinuitMinimizer ( const char * type );
~TMinuitMinimizer ();
private:
TMinuitMinimizer(const TMinuitMinimizer &);
TMinuitMinimizer & operator = (const TMinuitMinimizer & rhs);
public:
virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func);
virtual void SetFunction(const ROOT::Math::IMultiGradFunction & func);
virtual bool SetVariable(unsigned int ivar, const std::string & name, double val, double step);
virtual bool SetLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double , double );
#ifdef LATER
virtual bool SetLowerLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double lower );
virtual bool SetUpperLimitedVariable(unsigned int ivar , const std::string & name , double val , double step , double upper );
#endif
virtual bool SetFixedVariable(unsigned int , const std::string & , double );
virtual bool SetVariableValue(unsigned int , double );
virtual bool Minimize();
virtual double MinValue() const { return fMinVal; }
virtual double Edm() const { return fEdm; }
virtual const double * X() const { return &fParams.front(); }
virtual const double * MinGradient() const { return 0; }
virtual unsigned int NCalls() const { return 0; }
virtual unsigned int NDim() const { return fDim; }
virtual unsigned int NFree() const { return fNFree; }
virtual bool ProvidesError() const { return true; }
virtual const double * Errors() const { return &fErrors.front(); }
virtual double CovMatrix(unsigned int i, unsigned int j) const {
return fCovar[i + fDim* j];
}
virtual bool GetMinosError(unsigned int i, double & errLow, double & errUp);
virtual bool Scan(unsigned int i, unsigned int &nstep, double * x, double * y, double xmin = 0, double xmax = 0);
virtual bool Contour(unsigned int i, unsigned int j, unsigned int & npoints, double *xi, double *xj);
virtual void PrintResults();
protected:
static void Fcn( int &, double * , double & f, double * , int);
static void FcnGrad( int &, double * g, double & f, double * , int);
void DoClear();
private:
bool fUsed;
bool fMinosRun;
unsigned int fDim;
unsigned int fNFree;
unsigned int fStrategy;
double fMinVal;
double fEdm;
std::vector<double> fParams;
std::vector<double> fErrors;
std::vector<double> fCovar;
ROOT::Minuit::EMinimizerType fType;
TMinuit * fMinuit;
static ROOT::Math::IMultiGenFunction * fgFunc;
static TMinuit * fgMinuit;
static bool fgUsed;
ClassDef(TMinuitMinimizer,1)
};
#endif /* ROOT_TMinuitMinimizer */
Last change: Tue Dec 16 09:15:03 2008
Last generated: 2008-12-16 09:15
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.