ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
13 #include "Minuit2/MnApplication.h"
15 
16 namespace ROOT {
17 
18  namespace Minuit2 {
19 
20 
21 class 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 
31 class MnMigrad : public MnApplication {
32 
33 public:
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
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 
75  ~MnMigrad() {}
76 
78 
79 private:
80 
82 
83 private:
84 
85  //forbidden assignment of migrad (const FCNBase& = )
86  MnMigrad& operator=(const MnMigrad&) {return *this;}
87 };
88 
89  } // namespace Minuit2
90 
91 } // namespace ROOT
92 
93 #endif // ROOT_Minuit2_MnMigrad
double par[1]
Definition: unuranDistr.cxx:38
API class for minimization using Variable Metric technology ("MIGRAD"); allows for user interaction: ...
Definition: MnMigrad.h:31
virtual const FCNBase & Fcnbase() const
Definition: MnApplication.h:67
void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
Definition: Ifit.C:26
VariableMetricMinimizer fMinimizer
Definition: MnMigrad.h:81
MnMigrad(const MnMigrad &migr)
Definition: MnMigrad.h:73
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 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
Extension of the FCNBase for providing the analytical Gradient of the function.
const MnUserParameterState & State() const
Definition: MnApplication.h:64
MnMigrad(const FCNBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNBase + MnUserParameters + MnUserCovariance
Definition: MnMigrad.h:48
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
Definition: FCNBase.h:47
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
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
class which holds the external user and/or internal Minuit representation of the parameters and error...
Instantiates the SeedGenerator and MinimumBuilder for Variable Metric Minimization method...
API class for the user interaction with the parameters; serves as input to the minimizer as well as o...
MnMigrad(const FCNGradientBase &fcn, const MnUserParameters &par, unsigned int stra=1)
construct from FCNGradientBase + MnUserParameters
Definition: MnMigrad.h:65
MnMigrad & operator=(const MnMigrad &)
Definition: MnMigrad.h:86
unsigned int NumOfCalls() const
Definition: MnApplication.h:69
application interface class for minimizers (migrad, simplex, Minimize, Scan) User normally instantiat...
Definition: MnApplication.h:37
MnMigrad(const FCNBase &fcn, const MnUserParameters &par, unsigned int stra=1)
construct from FCNBase + MnUserParameters
Definition: MnMigrad.h:45
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(const FCNGradientBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra=1)
construct from FCNGradientBase + MnUserParameters + MnUserCovariance
Definition: MnMigrad.h:68
const ModularFunctionMinimizer & Minimizer() const
Definition: MnMigrad.h:77
MnMigrad(const FCNGradientBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
construct from FCNGradientBase + MnUserParameterState + MnStrategy
Definition: MnMigrad.h:71
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...
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 MnUserParameterState &par, const MnStrategy &str)
construct from FCNBase + MnUserParameterState + MnStrategy
Definition: MnMigrad.h:51
const MnStrategy & Strategy() const
Definition: MnApplication.h:68
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...