#ifndef ROOT_TFitterMinuit_H_
#define ROOT_TFitterMinuit_H_
#ifndef ROOT_TVirtualFitter
#include "TVirtualFitter.h"
#endif
#include "Minuit2/MnUserParameterState.h"
#include "Minuit2/MinosError.h"
#include "Minuit2/ModularFunctionMinimizer.h"
#include "Minuit2/FumiliMinimizer.h"
#include "TFcnAdapter.h"
namespace ROOT {
namespace Minuit2 {
class FunctionMinimum;
}
}
class TFitterMinuit : public TVirtualFitter {
public:
enum EMinimizerType {
kMigrad,
kSimplex,
kCombined,
kScan,
kFumili
};
TFitterMinuit();
TFitterMinuit(Int_t maxpar);
virtual ~TFitterMinuit();
public:
virtual Double_t Chisquare(Int_t npar, Double_t *params) const;
virtual void Clear(Option_t *option="");
virtual Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs);
virtual void FixParameter(Int_t ipar);
virtual Double_t *GetCovarianceMatrix() const;
virtual Double_t GetCovarianceMatrixElement(Int_t i, Int_t j) const;
virtual Int_t GetErrors(Int_t ipar,Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc) const;
virtual Int_t GetNumberTotalParameters() const;
virtual Int_t GetNumberFreeParameters() const;
virtual Double_t GetParError(Int_t ipar) const;
virtual Double_t GetParameter(Int_t ipar) const;
virtual Int_t GetParameter(Int_t ipar,char *name,Double_t &value,Double_t &verr,Double_t &vlow, Double_t &vhigh) const;
virtual const char *GetParName(Int_t ipar) const;
virtual Int_t GetStats(Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx) const;
virtual Double_t GetSumLog(Int_t i);
virtual Bool_t IsFixed(Int_t ipar) const ;
virtual void PrintResults(Int_t level, Double_t amin) const;
virtual void ReleaseParameter(Int_t ipar);
virtual void SetFitMethod(const char *name);
virtual Int_t SetParameter(Int_t ipar,const char *parname,Double_t value,Double_t verr,Double_t vlow, Double_t vhigh);
virtual void SetFCN(void (*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t) );
virtual void SetFCN(void * );
virtual void SetMinuitFCN( ROOT::Minuit2::FCNBase * f);
virtual const ROOT::Minuit2::MnUserParameterState & State() const { return fState; }
virtual const ROOT::Minuit2::FCNBase * GetMinuitFCN() const { return fMinuitFCN; }
virtual const ROOT::Minuit2::ModularFunctionMinimizer * GetMinimizer() const { return fMinimizer; }
virtual int Minimize( int nfcn = 0, double edmval = 0.1);
int GetStrategy() { return fStrategy; }
int PrintLevel() { return fDebug; }
void SetStrategy( int stra) { fStrategy = stra; }
void SetPrintLevel(int level ) { fDebug = level; }
void SetMinimumTolerance(double mintol) { fMinTolerance = mintol; }
double MinimumTolerance() const { return fMinTolerance; }
virtual void CreateMinimizer(EMinimizerType = kMigrad );
protected:
virtual ROOT::Minuit2::MnUserParameterState & State() { return fState; }
virtual void SetMinimizer( ROOT::Minuit2::ModularFunctionMinimizer * m) { fMinimizer = m; }
virtual void CreateChi2FCN();
virtual void CreateChi2ExtendedFCN();
virtual void CreateBinLikelihoodFCN();
virtual void CreateUnbinLikelihoodFCN() {}
virtual ROOT::Minuit2::FunctionMinimum DoMinimization( int nfcn = 0, double edmval = 0.1);
virtual int ExamineMinimum(const ROOT::Minuit2::FunctionMinimum & );
virtual void Initialize();
private:
double fErrorDef;
double fEDMVal;
bool fGradient;
ROOT::Minuit2::MnUserParameterState fState;
std::vector<ROOT::Minuit2::MinosError> fMinosErrors;
ROOT::Minuit2::ModularFunctionMinimizer * fMinimizer;
ROOT::Minuit2::FCNBase * fMinuitFCN;
int fDebug;
int fStrategy;
double fMinTolerance;
mutable std::vector<double> fCovar;
ClassDef(TFitterMinuit,1)
};
R__EXTERN TFitterMinuit* gMinuit2;
#endif //ROOT_TFitterMinuit_H_
Last change: Thu Dec 18 10:00:40 2008
Last generated: 2008-12-18 10:00
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.