Logo ROOT   6.10/09
Reference Guide
MnMinimize.h
Go to the documentation of this file.
1 // @(#)root/minuit2:$Id$
2 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3 
4 /**********************************************************************
5  * *
6  * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7  * *
8  **********************************************************************/
9 
10 #ifndef ROOT_Minuit2_MnMinimize
11 #define ROOT_Minuit2_MnMinimize
12 
13 #include "Minuit2/MnApplication.h"
15 
16 namespace ROOT {
17 
18  namespace Minuit2 {
19 
20 
21 class FCNBase;
22 
23 /** API class for minimization using Variable Metric technology ("MIGRAD");
24  allows for user interaction: set/change parameters, do minimization,
25  change parameters, re-do minimization etc.;
26  also used by MnMinos and MnContours;
27  */
28 
29 class MnMinimize : public MnApplication {
30 
31 public:
32 
33  /// construct from FCNBase + std::vector for parameters and errors
34  MnMinimize(const FCNBase& fcn, const std::vector<double>& par, const std::vector<double>& err, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par,err), MnStrategy(stra)), fMinimizer(CombinedMinimizer()) {}
35 
36  /// construct from FCNBase + std::vector for parameters and covariance
37  MnMinimize(const FCNBase& fcn, const std::vector<double>& par, unsigned int nrow, const std::vector<double>& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov, nrow), MnStrategy(stra)), fMinimizer(CombinedMinimizer()) {}
38 
39  /// construct from FCNBase + std::vector for parameters and MnUserCovariance
40  MnMinimize(const FCNBase& fcn, const std::vector<double>& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(CombinedMinimizer()) {}
41 
42  /// construct from FCNBase + MnUserParameters
43  MnMinimize(const FCNBase& fcn, const MnUserParameters& par, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par), MnStrategy(stra)), fMinimizer(CombinedMinimizer()) {}
44 
45  /// construct from FCNBase + MnUserParameters + MnUserCovariance
46  MnMinimize(const FCNBase& fcn, const MnUserParameters& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(CombinedMinimizer()) {}
47 
48  /// construct from FCNBase + MnUserParameterState + MnStrategy
50 
51  // interfaces using FCNGradientBase
52 
53  /// construct from FCNGradientBase + std::vector for parameters and errors
54  MnMinimize(const FCNGradientBase& fcn, const std::vector<double>& par, const std::vector<double>& err, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par,err), MnStrategy(stra)), fMinimizer(CombinedMinimizer()) {}
55 
56  /// construct from FCNGradientBase + std::vector for parameters and covariance
57  MnMinimize(const FCNGradientBase& fcn, const std::vector<double>& par, unsigned int nrow, const std::vector<double>& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov, nrow), MnStrategy(stra)), fMinimizer(CombinedMinimizer()) {}
58 
59  /// construct from FCNGradientBase + std::vector for parameters and MnUserCovariance
60  MnMinimize(const FCNGradientBase& fcn, const std::vector<double>& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(CombinedMinimizer()) {}
61 
62  /// construct from FCNGradientBase + MnUserParameters
63  MnMinimize(const FCNGradientBase& fcn, const MnUserParameters& par, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par), MnStrategy(stra)), fMinimizer(CombinedMinimizer()) {}
64 
65  /// construct from FCNGradientBase + MnUserParameters + MnUserCovariance
66  MnMinimize(const FCNGradientBase& fcn, const MnUserParameters& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(CombinedMinimizer()) {}
67 
68  /// construct from FCNGradientBase + MnUserParameterState + MnStrategy
70 
71 
72  MnMinimize(const MnMinimize& migr) : MnApplication(migr.Fcnbase(), migr.State(), migr.Strategy(), migr.NumOfCalls()), fMinimizer(migr.fMinimizer) {}
73 
75 
77 
78 private:
79 
81 
82 private:
83 
84  //forbidden assignment operator
85  MnMinimize& operator=(const MnMinimize&) {return *this;}
86 };
87 
88  } // namespace Minuit2
89 
90 } // namespace ROOT
91 
92 #endif // ROOT_Minuit2_MnMinimize
double par[1]
Definition: unuranDistr.cxx:38
API class for minimization using Variable Metric technology ("MIGRAD"); allows for user interaction: ...
Definition: MnMinimize.h:29
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
MnMinimize(const FCNGradientBase &fcn, const std::vector< double > &par, unsigned int nrow, const std::vector< double > &cov, unsigned int stra=1)
construct from FCNGradientBase + std::vector for parameters and covariance
Definition: MnMinimize.h:57
MnMinimize(const FCNGradientBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
construct from FCNGradientBase + MnUserParameterState + MnStrategy
Definition: MnMinimize.h:69
Extension of the FCNBase for providing the analytical Gradient of the function.
CombinedMinimizer fMinimizer
Definition: MnMinimize.h:80
MnMinimize(const FCNBase &fcn, const std::vector< double > &par, unsigned int nrow, const std::vector< double > &cov, unsigned int stra=1)
construct from FCNBase + std::vector for parameters and covariance
Definition: MnMinimize.h:37
MnMinimize(const FCNBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNBase + MnUserParameters + MnUserCovariance
Definition: MnMinimize.h:46
virtual const FCNBase & Fcnbase() const
Definition: MnApplication.h:67
MnMinimize(const FCNGradientBase &fcn, const MnUserParameters &par, unsigned int stra=1)
construct from FCNGradientBase + MnUserParameters
Definition: MnMinimize.h:63
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
Definition: FCNBase.h:47
MnMinimize(const MnMinimize &migr)
Definition: MnMinimize.h:72
const MnStrategy & Strategy() const
Definition: MnApplication.h:68
MnMinimize(const FCNBase &fcn, const std::vector< double > &par, const std::vector< double > &err, unsigned int stra=1)
construct from FCNBase + std::vector for parameters and errors
Definition: MnMinimize.h:34
MnMinimize(const FCNGradientBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNGradientBase + MnUserParameters + MnUserCovariance
Definition: MnMinimize.h:66
class which holds the external user and/or internal Minuit representation of the parameters and error...
MnMinimize(const FCNBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
construct from FCNBase + MnUserParameterState + MnStrategy
Definition: MnMinimize.h:49
API class for the user interaction with the parameters; serves as input to the minimizer as well as o...
MnMinimize & operator=(const MnMinimize &)
Definition: MnMinimize.h:85
MnMinimize(const FCNBase &fcn, const MnUserParameters &par, unsigned int stra=1)
construct from FCNBase + MnUserParameters
Definition: MnMinimize.h:43
unsigned int NumOfCalls() const
Definition: MnApplication.h:69
MnMinimize(const FCNGradientBase &fcn, const std::vector< double > &par, const std::vector< double > &err, unsigned int stra=1)
construct from FCNGradientBase + std::vector for parameters and errors
Definition: MnMinimize.h:54
application interface class for minimizers (migrad, simplex, Minimize, Scan) User normally instantiat...
Definition: MnApplication.h:37
const ModularFunctionMinimizer & Minimizer() const
Definition: MnMinimize.h:76
const MnUserParameterState & State() const
Definition: MnApplication.h:64
MnMinimize(const FCNBase &fcn, const std::vector< double > &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNBase + std::vector for parameters and MnUserCovariance
Definition: MnMinimize.h:40
Combined minimizer: combination of Migrad and Simplex.
MnMinimize(const FCNGradientBase &fcn, const std::vector< double > &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNGradientBase + std::vector for parameters and MnUserCovariance
Definition: MnMinimize.h:60
API class for defining three levels of strategies: low (0), medium (1), high (>=2); acts on: Migrad (...
Definition: MnStrategy.h:27
Base common class providing the API for all the minimizer Various Minimize methods are provided varyi...
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...