#ifndef ROOT_TFumili
#define ROOT_TFumili
#ifndef ROOT_TVirtualFitter
#include "TVirtualFitter.h"
#endif
class TF1;
class TFumili : public TVirtualFitter {
private:
Int_t fMaxParam;
Int_t fNlog;
Int_t fNfcn;
Int_t fNED1;
Int_t fNED2;
Int_t fNED12;
Int_t fNpar;
Int_t fNstepDec;
Int_t fNlimMul;
Int_t fNmaxIter;
Int_t fLastFixed;
Int_t fENDFLG;
Int_t fINDFLG[5];
Bool_t fGRAD;
Bool_t fWARN;
Bool_t fDEBUG;
Bool_t fLogLike;
Bool_t fNumericDerivatives;
Double_t *fZ0;
Double_t *fZ;
Double_t *fGr;
Double_t *fParamError;
Double_t *fSumLog;
Double_t *fEXDA;
Double_t *fA;
Double_t *fPL0;
Double_t *fPL;
Double_t *fDA;
Double_t *fAMX;
Double_t *fAMN;
Double_t *fR;
Double_t *fDF;
Double_t *fCmPar;
Double_t fS;
Double_t fEPS;
Double_t fRP;
Double_t fAKAPPA;
Double_t fGT;
TString *fANames;
TString fCword;
public:
TFumili(Int_t maxpar=25);
virtual ~TFumili();
void BuildArrays();
virtual Double_t Chisquare(Int_t npar, Double_t *params) const;
virtual void Clear(Option_t *opt="");
void DeleteArrays();
void Derivatives(Double_t*,Double_t*);
Int_t Eval(Int_t& npar, Double_t *grad, Double_t &fval, Double_t *par, Int_t flag);
Double_t EvalTFN(Double_t *,Double_t*);
virtual Int_t ExecuteCommand(const char *command, Double_t *args, Int_t nargs);
Int_t ExecuteSetCommand(Int_t );
virtual void FitChisquare(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag);
virtual void FitChisquareI(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag);
virtual void FitLikelihood(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag);
virtual void FitLikelihoodI(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag);
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;
Double_t* GetPL0() const { return fPL0;}
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 );
Double_t* GetZ() const { return fZ;}
void InvertZ(Int_t);
virtual Bool_t IsFixed(Int_t ipar) const;
Int_t Minimize();
virtual void PrintResults(Int_t k,Double_t p) const;
virtual void ReleaseParameter(Int_t ipar);
Int_t SGZ();
void SetData(Double_t *,Int_t,Int_t);
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);
void SetParNumber(Int_t ParNum) { fNpar = ParNum;};
ClassDef(TFumili,0)
};
R__EXTERN TFumili * gFumili;
#endif