|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Samples nuisance parameters and propagates them through a model. More...
#include <MCEngine.h>
Public Member Functions | |
| MonteCarloEngine (const std::shared_ptr< IModel > &model, const INuisanceSampler &sampler, MCConfig cfg) | |
| Constructs the Monte Carlo engine. | |
| MCRealization | sample_predictions (const std::map< ParamId, double > &p) const |
| Generates accepted model predictions for a fixed fit-parameter point. | |
| MCRealization | sample_predictions_serial (const std::map< ParamId, double > &p) const |
| MCRealization | sample_predictions_parallel (const std::map< ParamId, double > &p) const |
| MCResult | summarize (const std::map< ParamId, double > &p) const |
| Runs Monte Carlo propagation and computes summary statistics. | |
Samples nuisance parameters and propagates them through a model.
The engine repeatedly draws nuisance values from an INuisanceSampler, calls IModel::predict_optimized, rejects failed or non-finite predictions when configured to do so, and returns both raw and summarized Monte Carlo outputs.
Definition at line 171 of file MCEngine.h.
|
inline |
Constructs the Monte Carlo engine.
| model | Model used to compute predictions for each nuisance draw. |
| sampler | Nuisance sampler used to generate random parameter maps. |
| cfg | Monte Carlo configuration. |
Definition at line 180 of file MCEngine.h.
| MCRealization MonteCarloEngine::sample_predictions | ( | const std::map< ParamId, double > & | p | ) | const |
Generates accepted model predictions for a fixed fit-parameter point.
| p | Fit-parameter values held fixed during the Monte Carlo run. |
| std::exception | Re-throws model or sampler failures once the retry policy is exhausted. |
Definition at line 287 of file MCEngine.cpp.
| MCRealization MonteCarloEngine::sample_predictions_parallel | ( | const std::map< ParamId, double > & | p | ) | const |
Definition at line 304 of file MCEngine.cpp.
| MCRealization MonteCarloEngine::sample_predictions_serial | ( | const std::map< ParamId, double > & | p | ) | const |
Definition at line 179 of file MCEngine.cpp.
Runs Monte Carlo propagation and computes summary statistics.
In addition to returning the result, the current implementation writes the accepted observable samples to obs_samples.csv.
| p | Fit-parameter values held fixed during the Monte Carlo run. |
Definition at line 504 of file MCEngine.cpp.