Logo ROOT  
Reference Guide
MnMigrad.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_MnMigrad
11#define ROOT_Minuit2_MnMigrad
12
15
16namespace ROOT {
17
18 namespace Minuit2 {
19
20
21class FCNBase;
22
23//_____________________________________________________________________________
24/**
25 API class for minimization using Variable Metric technology ("MIGRAD");
26 allows for user interaction: set/change parameters, do minimization,
27 change parameters, re-do minimization etc.;
28 also used by MnMinos and MnContours;
29 */
30
31class MnMigrad : public MnApplication {
32
33public:
34
35 /// construct from FCNBase + std::vector for parameters and errors
36 MnMigrad(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(VariableMetricMinimizer()) {}
37
38 /// construct from FCNBase + std::vector for parameters and covariance
39 MnMigrad(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(VariableMetricMinimizer()) {}
40
41 /// construct from FCNBase + std::vector for parameters and MnUserCovariance
42 MnMigrad(const FCNBase& fcn, const std::vector<double>& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer()) {}
43
44 /// construct from FCNBase + MnUserParameters
45 MnMigrad(const FCNBase& fcn, const MnUserParameters& par, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer()) {}
46
47 /// construct from FCNBase + MnUserParameters + MnUserCovariance
48 MnMigrad(const FCNBase& fcn, const MnUserParameters& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer()) {}
49
50 /// construct from FCNBase + MnUserParameterState + MnStrategy
52
53 // constructs from gradient FCN
54
55 /// construct from FCNGradientBase + std::vector for parameters and errors
56 MnMigrad(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(VariableMetricMinimizer()) {}
57
58 /// construct from FCNGradientBase + std::vector for parameters and covariance
59 MnMigrad(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(VariableMetricMinimizer()) {}
60
61 /// construct from FCNGradientBase + std::vector for parameters and MnUserCovariance
62 MnMigrad(const FCNGradientBase& fcn, const std::vector<double>& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer()) {}
63
64 /// construct from FCNGradientBase + MnUserParameters
65 MnMigrad(const FCNGradientBase& fcn, const MnUserParameters& par, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer()) {}
66
67 /// construct from FCNGradientBase + MnUserParameters + MnUserCovariance
68 MnMigrad(const FCNGradientBase& fcn, const MnUserParameters& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer()) {}
69
70 /// construct from FCNGradientBase + MnUserParameterState + MnStrategy
72
73 MnMigrad(const MnMigrad& migr) : MnApplication(migr.Fcnbase(), migr.State(), migr.Strategy(), migr.NumOfCalls()), fMinimizer(migr.fMinimizer) {}
74
76
79
80private:
81
83
84private:
85
86 //forbidden assignment of migrad (const FCNBase& = )
87 MnMigrad& operator=(const MnMigrad&) {return *this;}
88};
89
90 } // namespace Minuit2
91
92} // namespace ROOT
93
94#endif // ROOT_Minuit2_MnMigrad
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: MnMigrad.h:31
MnMigrad(const FCNBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNBase + MnUserParameters + MnUserCovariance
Definition: MnMigrad.h:48
MnMigrad(const FCNGradientBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
construct from FCNGradientBase + MnUserParameterState + MnStrategy
Definition: MnMigrad.h:71
MnMigrad(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: MnMigrad.h:59
MnMigrad(const FCNGradientBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNGradientBase + MnUserParameters + MnUserCovariance
Definition: MnMigrad.h:68
ModularFunctionMinimizer & Minimizer()
Definition: MnMigrad.h:77
MnMigrad(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: MnMigrad.h:56
MnMigrad(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: MnMigrad.h:36
const ModularFunctionMinimizer & Minimizer() const
Definition: MnMigrad.h:78
MnMigrad(const FCNBase &fcn, const MnUserParameters &par, unsigned int stra=1)
construct from FCNBase + MnUserParameters
Definition: MnMigrad.h:45
MnMigrad(const FCNBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
construct from FCNBase + MnUserParameterState + MnStrategy
Definition: MnMigrad.h:51
MnMigrad(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: MnMigrad.h:39
MnMigrad & operator=(const MnMigrad &)
Definition: MnMigrad.h:87
MnMigrad(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: MnMigrad.h:42
MnMigrad(const MnMigrad &migr)
Definition: MnMigrad.h:73
MnMigrad(const FCNGradientBase &fcn, const MnUserParameters &par, unsigned int stra=1)
construct from FCNGradientBase + MnUserParameters
Definition: MnMigrad.h:65
MnMigrad(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: MnMigrad.h:62
VariableMetricMinimizer fMinimizer
Definition: MnMigrad.h:82
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...
Instantiates the SeedGenerator and MinimumBuilder for Variable Metric Minimization method.
VSD Structures.
Definition: StringConv.hxx:21