ROOT  6.06/09
Reference Guide
MinuitFitter.h
Go to the documentation of this file.
1 // @(#)root/tmva $Id$
2 // Author: Andreas Hoecker
3 
4 /**********************************************************************************
5  * Project: TMVA - a Root-integrated toolkit for multivariate data analysis *
6  * Package: TMVA *
7  * Class : MinuitFitter *
8  * Web : http://tmva.sourceforge.net *
9  * *
10  * Description: *
11  * Fitter using MINUIT *
12  * *
13  * Authors (alphabetical): *
14  * Andreas Hoecker <Andreas.Hocker@cern.ch> - CERN, Switzerland *
15  * *
16  * Copyright (c) 2005: *
17  * CERN, Switzerland *
18  * MPI-K Heidelberg, Germany *
19  * *
20  * Redistribution and use in source and binary forms, with or without *
21  * modification, are permitted according to the terms listed in LICENSE *
22  * (http://tmva.sourceforge.net/LICENSE) *
23  **********************************************************************************/
24 
25 #ifndef ROOT_TMVA_MinuitFitter
26 #define ROOT_TMVA_MinuitFitter
27 
28 //////////////////////////////////////////////////////////////////////////
29 // //
30 // MinuitFitter //
31 // //
32 // Fitter using MINUIT //
33 // //
34 //////////////////////////////////////////////////////////////////////////
35 
36 #ifndef ROOT_TMVA_FitterBase
37 #include "TMVA/FitterBase.h"
38 #endif
39 #ifndef ROOT_TMVA_IFitterTarget
40 #include "TMVA/IFitterTarget.h"
41 #endif
42 
43 class TFitter;
44 
45 namespace TMVA {
46 
47  class IFitterTarget;
48  class Interval;
49  class MinuitWrapper;
50 
51  class MinuitFitter : public FitterBase, public IFitterTarget {
52 
53  public:
54 
55  MinuitFitter( IFitterTarget& target, const TString& name,
56  std::vector<TMVA::Interval*>& ranges, const TString& theOption );
57 
58  virtual ~MinuitFitter();
59 
60  void Init();
61 
62  Double_t Run( std::vector<Double_t>& pars );
63  Double_t EstimatorFunction( std::vector<Double_t>& pars );
64 
65  protected:
66 
67  MinuitWrapper *fMinWrap; // holds a wrapper around TMinuit
68 
69  private:
70 
71  void DeclareOptions();
72 
73  Int_t fErrorLevel; // minuit error level
74  Int_t fPrintLevel; // minuit printout level
75  Int_t fFitStrategy; // minuit strategy level
76  Bool_t fPrintWarnings; // minuit warnings level
77  Bool_t fUseImprove; // flag for 'IMPROVE' use
78  Bool_t fUseMinos; // flag for 'MINOS' use
79  Bool_t fBatch; // batch mode
80  Int_t fMaxCalls; // (approximate) maximum number of function calls
81  Double_t fTolerance; // tolerance to the function value at the minimum
82 
83  ClassDef(MinuitFitter,0) // Fitter using a Genetic Algorithm
84  };
85 
86 } // namespace TMVA
87 
88 #endif
89 
90 
virtual ~MinuitFitter()
destructor
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDef(name, id)
Definition: Rtypes.h:254
Double_t Run()
estimator function interface for fitting
Definition: FitterBase.cxx:73
void Init()
minuit-specific settings
MinuitFitter(IFitterTarget &target, const TString &name, std::vector< TMVA::Interval * > &ranges, const TString &theOption)
double Double_t
Definition: RtypesCore.h:55
MinuitWrapper * fMinWrap
Definition: MinuitFitter.h:67
#define name(a, b)
Definition: linkTestLib0.cpp:5
Abstract ClassifierFactory template that handles arbitrary types.
Double_t EstimatorFunction(std::vector< Double_t > &pars)
performs the fit by calliung Run(pars)
void DeclareOptions()
declare SA options