6 std::shared_ptr<ObservableInterface> oi = oi_;
7 std::shared_ptr<IStatParamOptimizerProxy> spop = std::make_shared<StatParamOptimizerProxy>();
8 std::shared_ptr<IModel> oia = std::make_shared<ObservableInterfaceProxy>(oi, spop);
9 std::shared_ptr<IStatCorrelationProxy> pscp = std::make_shared<StatCorrelationProxy>();
10 std::shared_ptr<IStatParameterProxy> pspp = std::make_shared<StatParameterProxy>();
11 std::shared_ptr<IStatSourcesProxy> sp = std::make_shared<StatParamSourcesProxy>();
12 std::shared_ptr<IStatDependencyPruner> sdp = std::make_shared<StatDependencyPruner>();
13 std::shared_ptr<INuisancePathsProvider> npp =
14 std::make_shared<RuntimeNuisancePathsAdapter>();
15 std::shared_ptr<INuisanceReader> nr = std::make_shared<NuisanceReader>(npp);
17 manager = std::make_shared<StatisticManager>(config, oia, pscp, pspp, sp, sdp, nr, spop);
19 manager->select_experiments_all();
20 manager->update_cache();
24 manager->select_experiment(experiment);
25 manager->update_cache();
29 manager->select_experiments(experiments);
30 manager->update_cache();
34 manager->select_experiments_all();
35 manager->update_cache();
39 return manager->has_experiment_selection();
43 return manager->selected_experiments();
47 const std::vector<ExperimentObs>& observables
49 manager->select_experiment_observables(observables);
50 manager->update_cache();
54 manager->select_experiment_observables_all();
55 manager->update_cache();
59 return manager->has_experiment_observable_selection();
63 return manager->selected_experiment_observables();
67 return manager->compute_uncertainties();
71 return manager->get_all_obss_deps();
75 return manager->compute_uncertainties_and_sampling();
79 return manager->compute_MLE(p_specs);
83 return manager->confidence_contour(p1, p2, z, bounds, options);
87 manager->reload_nuisance_specs();
88 manager->update_cache();
92 manager->set_nuisance_user_file(user_yaml_path);
93 manager->update_cache();
97 manager->clear_nuisance_user_file();
98 manager->update_cache();
102 manager->prepare_likelihood_for_scan(p_specs);
106 const std::map<ParamId, double>& eta_hat) {
107 manager->set_manual_scan_point(p_hat, eta_hat);
118 return manager->scan_likelihood_around_current_point(
119 p1, p2, x_half_width, y_half_width, nx, ny
125 manager->save_likelihood_scan_csv(path, grid);
129 manager->update_cache(p_specs);
132std::map<ParamId, double>StatisticInterface:: get_all_obss_deps() {
133 return manager->get_all_obss_deps();
137 return manager->get_p_specs(p_specs);
141 return manager->get_all_correlations();
145 return manager->get_all_obs_correlations();
149 return manager->get_obs_exp();
153 manager->print_cache();
High-level facade for statistical computations.
MCResult compute_uncertainties_and_sampling()
Runs uncertainty propagation and returns both samples and summaries.
std::map< ParamId, double > get_p_specs(const std::vector< ParamId > &p_specs)
std::map< BinnedObservableId, GaussianSummary > compute_uncertainties()
Computes Gaussian uncertainty summaries for all active observables.
void update_cache(const std::vector< ParamId > &p_specs=std::vector< ParamId >())
Refreshes the cached statistical inputs.
std::set< ExperimentObs > selected_experiment_observables() const
Returns the active exact experimental-observable selection.
void select_experiments_all()
Clears any experiment restriction and uses all experiments.
std::map< ParamId, std::map< ParamId, double > > get_all_correlations()
void print_cache()
Prints the current manager cache for diagnostics.
Contour compute_confidence_contour(ParamId p1, ParamId p2, double z, std::array< double, 4 > bounds, ContourOptions options)
Computes a two-dimensional confidence contour.
std::map< ExperimentObs, std::map< ExperimentObs, double > > get_all_obs_correlations()
void set_manual_scan_point(const std::map< ParamId, double > &p_hat, const std::map< ParamId, double > &eta_hat)
Manually sets the central point used by likelihood scans.
void reload_nuisance_specs()
Reloads default and user nuisance specifications.
std::map< ExperimentObs, double > get_obs_exp()
bool has_experiment_observable_selection() const noexcept
Tests whether an exact experimental-observable selection is active.
void clear_nuisance_user_file()
Restores the default user nuisance file lookup.
void set_nuisance_user_file(const std::string &user_yaml_path)
Uses a specific user nuisance configuration file.
FitResultWithMaps compute_MLE(const std::vector< ParamId > &p_specs)
Runs a maximum-likelihood fit for the requested fit parameters.
void save_likelihood_scan_csv(const std::string &path, const LikelihoodScanGrid &grid) const
Saves a likelihood scan grid as a CSV file.
void prepare_likelihood_for_scan(const std::vector< ParamId > &p_specs)
Builds and stores the likelihood objects required for scan calls.
bool has_experiment_selection() const noexcept
Tests whether an experiment selection is active.
void select_experiment(const std::string &experiment)
Restricts the analysis to a single experiment.
void select_experiment_observables(const std::vector< ExperimentObs > &observables)
Restricts the analysis to exact experiment/observable/bin entries.
void select_experiment_observables_all()
Clears any exact experimental-observable restriction.
LikelihoodScanGrid scan_likelihood_around_current_point(ParamId p1, ParamId p2, double x_half_width, double y_half_width, std::size_t nx, std::size_t ny) const
Evaluates a rectangular likelihood scan around the current point.
std::set< std::string > selected_experiments() const
Returns the currently selected experiments.
std::map< ParamId, double > get_active_observable_dependencies()
Returns the nuisance/input parameters currently seen by the statistical manager.
void select_experiments(const std::vector< std::string > &experiments)
Restricts the analysis to a set of experiments.
Runtime options controlling 2D contour computation.
Output of a contour extraction algorithm.
User-facing MLE result keyed by physics parameter identifiers.
Regular two-dimensional grid of likelihood-scan evaluations.
Composite identifier for a single parameter.