Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:46

0001 // @(#)root/minuit:$Id$
0002 // Author: Rene Brun   31/08/99
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 #ifndef ROOT_TFitter
0012 #define ROOT_TFitter
0013 
0014 
0015 #include "TVirtualFitter.h"
0016 
0017 class TMinuit;
0018 
0019 class TFitter : public TVirtualFitter {
0020 
0021 private:
0022    Int_t      fNlog;       //Number of elements in fSunLog
0023    Double_t  *fCovar;      //Covariance matrix
0024    Double_t  *fSumLog;     //Sum of logs (array of fNlog elements)
0025    TMinuit   *fMinuit;     //pointer to the TMinuit object
0026 
0027    TFitter(const TFitter&); // Not implemented
0028    TFitter& operator=(const TFitter&); // Not implemented
0029 
0030 public:
0031    TFitter(Int_t maxpar = 25);
0032    ~TFitter() override;
0033    Double_t   Chisquare(Int_t npar, Double_t *params) const override ;
0034    void       Clear(Option_t *option="") override;
0035    Int_t      ExecuteCommand(const char *command, Double_t *args, Int_t nargs) override;
0036    // virtual void       FitChisquare(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag);
0037    // virtual void       FitChisquareI(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag);
0038    // virtual void       FitLikelihood(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag);
0039    // virtual void       FitLikelihoodI(Int_t &npar, Double_t *gin, Double_t &f, Double_t *u, Int_t flag);
0040    void       FixParameter(Int_t ipar) override;
0041    void       GetConfidenceIntervals(Int_t n, Int_t ndim, const Double_t *x, Double_t *ci, Double_t cl=0.95) override;
0042    void       GetConfidenceIntervals(TObject *obj, Double_t cl=0.95) override;
0043    Double_t  *GetCovarianceMatrix() const override;
0044    Double_t   GetCovarianceMatrixElement(Int_t i, Int_t j) const override;
0045    Int_t      GetErrors(Int_t ipar,Double_t &eplus, Double_t &eminus, Double_t &eparab, Double_t &globcc) const override;
0046    TMinuit           *GetMinuit() const {return fMinuit;}
0047    Int_t      GetNumberTotalParameters() const override;
0048    Int_t      GetNumberFreeParameters() const override;
0049    Double_t   GetParError(Int_t ipar) const override;
0050    Double_t   GetParameter(Int_t ipar) const override;
0051    Int_t      GetParameter(Int_t ipar,char *name,Double_t &value,Double_t &verr,Double_t &vlow, Double_t &vhigh) const override;
0052    const char *GetParName(Int_t ipar) const override;
0053    Int_t      GetStats(Double_t &amin, Double_t &edm, Double_t &errdef, Int_t &nvpar, Int_t &nparx) const override;
0054    Double_t   GetSumLog(Int_t i) override;
0055    Bool_t     IsFixed(Int_t ipar) const override;
0056    void       PrintResults(Int_t level, Double_t amin) const override;
0057    void       ReleaseParameter(Int_t ipar) override;
0058    void       SetFCN(void (*fcn)(Int_t &, Double_t *, Double_t &f, Double_t *, Int_t)) override;
0059    void       SetFitMethod(const char *name) override;
0060    Int_t      SetParameter(Int_t ipar,const char *parname,Double_t value,Double_t verr,Double_t vlow, Double_t vhigh) override;
0061 
0062     ClassDefOverride(TFitter,0)  //The ROOT standard fitter based on TMinuit
0063 };
0064 
0065 #endif