Logo ROOT   6.18/05
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
15
16namespace ROOT {
17
18 namespace Minuit2 {
19
20
21class 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
29class MnMinimize : public MnApplication {
30
31public:
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
78
79private:
80
82
83private:
84
85 //forbidden assignment operator
86 MnMinimize& operator=(const MnMinimize&) {return *this;}
87};
88
89 } // namespace Minuit2
90
91} // namespace ROOT
92
93#endif // ROOT_Minuit2_MnMinimize
Combined minimizer: combination of Migrad and Simplex.
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
Definition: FCNBase.h:47
Extension of the FCNBase for providing the analytical Gradient of the function.
application interface class for minimizers (migrad, simplex, Minimize, Scan) User normally instantiat...
Definition: MnApplication.h:37
unsigned int NumOfCalls() const
Definition: MnApplication.h:70
const MnStrategy & Strategy() const
Definition: MnApplication.h:69
const MnUserParameterState & State() const
Definition: MnApplication.h:65
virtual const FCNBase & Fcnbase() const
Definition: MnApplication.h:68
API class for minimization using Variable Metric technology ("MIGRAD"); allows for user interaction: ...
Definition: MnMinimize.h:29
MnMinimize(const FCNBase &fcn, const MnUserParameters &par, unsigned int stra=1)
construct from FCNBase + MnUserParameters
Definition: MnMinimize.h:43
MnMinimize(const FCNBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNBase + MnUserParameters + MnUserCovariance
Definition: MnMinimize.h:46
MnMinimize & operator=(const MnMinimize &)
Definition: MnMinimize.h:86
const ModularFunctionMinimizer & Minimizer() const
Definition: MnMinimize.h:77
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
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
MnMinimize(const MnMinimize &migr)
Definition: MnMinimize.h:72
MnMinimize(const FCNGradientBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNGradientBase + MnUserParameters + MnUserCovariance
Definition: MnMinimize.h:66
MnMinimize(const FCNGradientBase &fcn, const MnUserParameters &par, unsigned int stra=1)
construct from FCNGradientBase + MnUserParameters
Definition: MnMinimize.h:63
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
ModularFunctionMinimizer & Minimizer()
Definition: MnMinimize.h:76
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 FCNBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
construct from FCNBase + MnUserParameterState + MnStrategy
Definition: MnMinimize.h:49
CombinedMinimizer fMinimizer
Definition: MnMinimize.h:81
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 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 FCNGradientBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
construct from FCNGradientBase + MnUserParameterState + MnStrategy
Definition: MnMinimize.h:69
API class for defining three levels of strategies: low (0), medium (1), high (>=2); acts on: Migrad (...
Definition: MnStrategy.h:27
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...
class which holds the external user and/or internal Minuit representation of the parameters and error...
API class for the user interaction with the parameters; serves as input to the minimizer as well as o...
Base common class providing the API for all the minimizer Various Minimize methods are provided varyi...
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21