Logo ROOT  
Reference Guide
MnScan.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_MnScan
11 #define ROOT_Minuit2_MnScan
12 
13 #include "Minuit2/MnApplication.h"
14 #include "Minuit2/ScanMinimizer.h"
15 
16 #include <vector>
17 #include <utility>
18 
19 namespace ROOT {
20 
21  namespace Minuit2 {
22 
23 
24 class FCNBase;
25 
26 //_______________________________________________________________________
27 /**
28  API class for minimization using a scan method to find the minimum;
29  allows for user interaction: set/change parameters, do minimization,
30  change parameters, re-do minimization etc.;
31 
32  */
33 
34 class MnScan : public MnApplication {
35 
36 public:
37 
38  /// construct from FCNBase + std::vector for parameters and errors
39  MnScan(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(ScanMinimizer()) {}
40 
41  /// construct from FCNBase + std::vector for parameters and covariance
42  MnScan(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(ScanMinimizer()) {}
43 
44  /// construct from FCNBase + std::vector for parameters and MnUserCovariance
45  MnScan(const FCNBase& fcn, const std::vector<double>& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(ScanMinimizer()) {}
46 
47  /// construct from FCNBase + MnUserParameters
48  MnScan(const FCNBase& fcn, const MnUserParameters& par, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par), MnStrategy(stra)), fMinimizer(ScanMinimizer()) {}
49 
50  /// construct from FCNBase + MnUserParameters + MnUserCovariance
51  MnScan(const FCNBase& fcn, const MnUserParameters& par, const MnUserCovariance& cov, unsigned int stra = 1) : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(ScanMinimizer()) {}
52 
53  /// construct from FCNBase + MnUserParameterState + MnStrategy
54  MnScan(const FCNBase& fcn, const MnUserParameterState& par, const MnStrategy& str) : MnApplication(fcn, MnUserParameterState(par), str), fMinimizer(ScanMinimizer()) {}
55 
56  MnScan(const MnScan& migr) : MnApplication(migr.Fcnbase(), migr.State(), migr.Strategy(), migr.NumOfCalls()), fMinimizer(migr.fMinimizer) {}
57 
58  ~MnScan() {}
59 
61  const ModularFunctionMinimizer& Minimizer() const {return fMinimizer;}
62 
63  std::vector<std::pair<double, double> > Scan(unsigned int par, unsigned int maxsteps = 41, double low = 0., double high = 0.);
64 
65 private:
66 
68 
69 private:
70 
71  /// forbidden assignment (const FCNBase& = )
72  MnScan& operator=(const MnScan&) {return *this;}
73 };
74 
75  } // namespace Minuit2
76 
77 } // namespace ROOT
78 
79 #endif // ROOT_Minuit2_MnScan
ROOT::Minuit2::MnScan::MnScan
MnScan(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: MnScan.h:47
ROOT::Minuit2::MnScan::fMinimizer
ScanMinimizer fMinimizer
Definition: MnScan.h:75
ROOT::Minuit2::MnApplication
application interface class for minimizers (migrad, simplex, Minimize, Scan) User normally instantiat...
Definition: MnApplication.h:46
ROOT::Minuit2::FCNBase
Interface (abstract class) defining the function to be minimized, which has to be implemented by the ...
Definition: FCNBase.h:55
ROOT::Minuit2::MnApplication::Fcnbase
virtual const FCNBase & Fcnbase() const
Definition: MnApplication.h:77
ROOT::Minuit2::MnScan::Scan
std::vector< std::pair< double, double > > Scan(unsigned int par, unsigned int maxsteps=41, double low=0., double high=0.)
Definition: MnScan.cxx:26
ROOT::Minuit2::MnUserCovariance
Class containing the covariance matrix data represented as a vector of size n*(n+1)/2 Used to hide in...
Definition: MnUserCovariance.h:35
MnApplication.h
ROOT::Minuit2::MnApplication::State
const MnUserParameterState & State() const
Definition: MnApplication.h:74
ROOT::Minuit2::MnApplication::NumOfCalls
unsigned int NumOfCalls() const
Definition: MnApplication.h:79
ROOT::Minuit2::MnScan::~MnScan
~MnScan()
Definition: MnScan.h:66
ROOT::Minuit2::MnUserParameters
API class for the user interaction with the parameters; serves as input to the minimizer as well as o...
Definition: MnUserParameters.h:45
ROOT::Minuit2::MnScan::Minimizer
ModularFunctionMinimizer & Minimizer()
Definition: MnScan.h:68
ROOT::Minuit2::ModularFunctionMinimizer
Base common class providing the API for all the minimizer Various Minimize methods are provided varyi...
Definition: ModularFunctionMinimizer.h:51
ROOT::Minuit2::MnScan::MnScan
MnScan(const FCNBase &fcn, const MnUserParameters &par, unsigned int stra=1)
construct from FCNBase + MnUserParameters
Definition: MnScan.h:56
ScanMinimizer.h
ROOT::Minuit2::MnUserParameterState
class which holds the external user and/or internal Minuit representation of the parameters and error...
Definition: MnUserParameterState.h:42
ROOT::Minuit2::MnStrategy
API class for defining three levels of strategies: low (0), medium (1), high (>=2); acts on: Migrad (...
Definition: MnStrategy.h:35
ROOT::Minuit2::ScanMinimizer
Class implementing the required methods for a minimization using SCAN API is provided in the upper RO...
Definition: ScanMinimizer.h:36
ROOT::Minuit2::MnScan
API class for minimization using a scan method to find the minimum; allows for user interaction: set/...
Definition: MnScan.h:42
ROOT
VSD Structures.
Definition: StringConv.hxx:21
ROOT::Minuit2::MnScan::operator=
MnScan & operator=(const MnScan &)
forbidden assignment (const FCNBase& = )
Definition: MnScan.h:80
ROOT::Minuit2::MnApplication::Strategy
const MnStrategy & Strategy() const
Definition: MnApplication.h:78
ROOT::Minuit2::MnApplication::MnApplication
MnApplication(const FCNBase &fcn, const MnUserParameterState &state, const MnStrategy &stra, unsigned int nfcn=0)
constructor from non-gradient functions
Definition: MnApplication.cxx:34