File indexing completed on 2025-01-18 10:10:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_Minuit2_MnScan
0011 #define ROOT_Minuit2_MnScan
0012
0013 #include "Minuit2/MnApplication.h"
0014 #include "Minuit2/ScanMinimizer.h"
0015
0016 #include <vector>
0017 #include <utility>
0018
0019 namespace ROOT {
0020
0021 namespace Minuit2 {
0022
0023 class FCNBase;
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 class MnScan : public MnApplication {
0034
0035 public:
0036
0037 MnScan(const FCNBase &fcn, const std::vector<double> &par, const std::vector<double> &err, unsigned int stra = 1)
0038 : MnApplication(fcn, MnUserParameterState(par, err), MnStrategy(stra)), fMinimizer(ScanMinimizer())
0039 {
0040 }
0041
0042
0043 MnScan(const FCNBase &fcn, const std::vector<double> &par, unsigned int nrow, const std::vector<double> &cov,
0044 unsigned int stra = 1)
0045 : MnApplication(fcn, MnUserParameterState(par, cov, nrow), MnStrategy(stra)), fMinimizer(ScanMinimizer())
0046 {
0047 }
0048
0049
0050 MnScan(const FCNBase &fcn, const std::vector<double> &par, const MnUserCovariance &cov, unsigned int stra = 1)
0051 : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(ScanMinimizer())
0052 {
0053 }
0054
0055
0056 MnScan(const FCNBase &fcn, const MnUserParameters &par, unsigned int stra = 1)
0057 : MnApplication(fcn, MnUserParameterState(par), MnStrategy(stra)), fMinimizer(ScanMinimizer())
0058 {
0059 }
0060
0061
0062 MnScan(const FCNBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra = 1)
0063 : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(ScanMinimizer())
0064 {
0065 }
0066
0067
0068 MnScan(const FCNBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
0069 : MnApplication(fcn, MnUserParameterState(par), str), fMinimizer(ScanMinimizer())
0070 {
0071 }
0072
0073 MnScan(const MnScan &migr)
0074 : MnApplication(migr.Fcnbase(), migr.State(), migr.Strategy(), migr.NumOfCalls()), fMinimizer(migr.fMinimizer)
0075 {
0076 }
0077
0078 ~MnScan() override {}
0079
0080 ModularFunctionMinimizer &Minimizer() override { return fMinimizer; }
0081 const ModularFunctionMinimizer &Minimizer() const override { return fMinimizer; }
0082
0083 std::vector<std::pair<double, double>>
0084 Scan(unsigned int par, unsigned int maxsteps = 41, double low = 0., double high = 0.);
0085
0086 private:
0087 ScanMinimizer fMinimizer;
0088
0089 private:
0090
0091 MnScan &operator=(const MnScan &) { return *this; }
0092 };
0093
0094 }
0095
0096 }
0097
0098 #endif