Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
MnContourExtractor.cpp
Go to the documentation of this file.
2
4 auto minuit_backend = fit_app::make_minuit_backend();
5
7 co.npoints = 4 * cr.resolution;
8 co.up = cr.level;
9
11 [field] (std::vector<double>theta) { return field(theta[0], theta[1]); },
12 cr.level
13 );
14
16 fopt.run_hesse = false;
17 fopt.verbose = false;
18 std::vector<fit_app::ParameterDefinition> p_defs = {cr.p_defs[0], cr.p_defs[1]};
19 fit_app::BackendFitResult bfr = minuit_backend->minimize(f, p_defs, fopt);
20 fit_app::BackendContourResult cres = minuit_backend->contour(f, bfr, 0, 1, co);
21
22 Contour cont;
23 cont.level = cr.level;
24 cont.paths = {cres.points};
25 cont.success = cres.success;
26
27 return cont;
28}
Minuit-backed implementation of the contour extraction interface.
Contour extract(const ScalarField2D &field, const ContourRequest &cr) override
Computes a Minuit contour for the requested scalar field level.
std::function< double(double, double)> ScalarField2D
Definition contour.h:17
std::unique_ptr< IFitBackend > make_minuit_backend()
double f(double x)
Wilson special function f depending on x.
Input configuration for a two-dimensional contour extraction.
std::size_t resolution
Requested grid or sampling resolution.
std::array< fit_app::ParameterDefinition, 2 > p_defs
Parameter definitions for the two scanned axes.
double level
Target scalar-field level to extract.
Output of a contour extraction algorithm.
bool success
Whether extraction produced a valid contour.
std::set< Path > paths
Extracted contour paths.
double level
Level actually targeted by the extraction.
std::vector< std::pair< double, double > > points