ROOT logo
// @(#)root/minuit:$Id: TFitter.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Rene Brun   31/08/99

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/
#ifndef ROOT_TFitter
#define ROOT_TFitter


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TFitter                                                              //
//                                                                      //
// The ROOT standard fitter based on TMinuit                            //
//                                                                      //
//////////////////////////////////////////////////////////////////////////


#ifndef ROOT_TVirtualFitter
#include "TVirtualFitter.h"
#endif

class TMinuit;

class TFitter : public TVirtualFitter {

private:
   Int_t      fNlog;       //Number of elements in fSunLog
   Double_t  *fCovar;      //Covariance matrix
   Double_t  *fSumLog;     //Sum of logs (array of fNlog elements)
   TMinuit   *fMinuit;     //pointer to the TMinuit object

   TFitter(const TFitter&); // Not implemented
   TFitter& operator=(const TFitter&); // Not implemented

public:
   TFitter(Int_t maxpar = 25);
   virtual ~TFitter();
   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       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 void       GetConfidenceIntervals(Int_t n, Int_t ndim, const Double_t *x, Double_t *ci, Double_t cl=0.95);
   virtual void       GetConfidenceIntervals(TObject *obj, Double_t cl=0.95);
   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;
   TMinuit           *GetMinuit() const {return fMinuit;}
   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       SetFCN(void *fcn);
   virtual void       SetFCN(void (*fcn)(Int_t &, Double_t *, Double_t &f, Double_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);

    ClassDef(TFitter,0)  //The ROOT standard fitter based on TMinuit
};

#endif
 TFitter.h:1
 TFitter.h:2
 TFitter.h:3
 TFitter.h:4
 TFitter.h:5
 TFitter.h:6
 TFitter.h:7
 TFitter.h:8
 TFitter.h:9
 TFitter.h:10
 TFitter.h:11
 TFitter.h:12
 TFitter.h:13
 TFitter.h:14
 TFitter.h:15
 TFitter.h:16
 TFitter.h:17
 TFitter.h:18
 TFitter.h:19
 TFitter.h:20
 TFitter.h:21
 TFitter.h:22
 TFitter.h:23
 TFitter.h:24
 TFitter.h:25
 TFitter.h:26
 TFitter.h:27
 TFitter.h:28
 TFitter.h:29
 TFitter.h:30
 TFitter.h:31
 TFitter.h:32
 TFitter.h:33
 TFitter.h:34
 TFitter.h:35
 TFitter.h:36
 TFitter.h:37
 TFitter.h:38
 TFitter.h:39
 TFitter.h:40
 TFitter.h:41
 TFitter.h:42
 TFitter.h:43
 TFitter.h:44
 TFitter.h:45
 TFitter.h:46
 TFitter.h:47
 TFitter.h:48
 TFitter.h:49
 TFitter.h:50
 TFitter.h:51
 TFitter.h:52
 TFitter.h:53
 TFitter.h:54
 TFitter.h:55
 TFitter.h:56
 TFitter.h:57
 TFitter.h:58
 TFitter.h:59
 TFitter.h:60
 TFitter.h:61
 TFitter.h:62
 TFitter.h:63
 TFitter.h:64
 TFitter.h:65
 TFitter.h:66
 TFitter.h:67
 TFitter.h:68
 TFitter.h:69
 TFitter.h:70
 TFitter.h:71
 TFitter.h:72
 TFitter.h:73
 TFitter.h:74
 TFitter.h:75
 TFitter.h:76
 TFitter.h:77