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