Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
ObsManager.h File Reference

High-level manager for observable evaluation. More...

#include <memory>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <optional>
#include <any>
#include "ParamID.h"
#include "Observable.h"
#include "Decays.h"
#include "IObsParameterProxy.h"
#include "ObsPortsConfig.h"
Include dependency graph for ObsManager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ObservableSelectionSnapshot
 
class  ObsManager
 

Typedefs

using DecayThreadSnapshot = std::unordered_map< DecayId, size_t >
 
using DecayConfigSnapshot = std::unordered_map< DecayId, std::any >
 

Detailed Description

High-level manager for observable evaluation.

ObsManager is the main entry point on the observable side: it owns a registry of:

  • available decay engines (DecayParent instances),
  • selected observables (Observable instances) bound to those decays.

It provides convenient methods to:

  • add/remove observables to be evaluated,
  • evaluate one observable or all registered ones,
  • manage observable dependencies (parameter lists),
  • configure decays and reload cached parameters,
  • register custom decays.

Design notes

  • Each observable is backed by a decay. Dynamic ObservableId values are routed through DecayMapper::get_decay_id, so builtin observables and custom observable ids registered in the mapper layer follow the same path.
  • When evaluating a specific observable, ObsManager selects the associated decay: it enables the needed one and disables the others (see select_decay).
  • Decays lazily build Wilson groups when enabled (through DecayParent::enable), using the observable ports (Wilson builder, parameter proxies, freezer, etc.).

Scales defaulting

In the default constructor path (when init_default_decays is true), matching and hadronic scales are inferred from SM inputs:

  • mu_W = 2 * m_W
  • mu_b = m_b(pole) / 2

Typical usage

ObservablePortsConfig ports{ ... };
ObsManager mgr(ports);
// Add one observable with a chosen QCD order
mgr.add_obs(Observables::BR_B_to_Xs_gamma, QCDOrder::NLO, add_deps=true);
// Evaluate it (returns possibly binned results)
auto values = mgr.evaluate(Observables::BR_B_to_Xs_gamma);
for (auto& v : values) {
std::cout << v.id.str() << " = " << v.value << "\n";
}
// Evaluate all registered observables
auto all = mgr.evaluate_all();
Dependency container (“ports”) for observable computations.
See also
Observable
DecayParent
ObservablePortsConfig
DependenciesHelper

Definition in file ObsManager.h.

Typedef Documentation

◆ DecayConfigSnapshot

using DecayConfigSnapshot = std::unordered_map<DecayId, std::any>

Definition at line 80 of file ObsManager.h.

◆ DecayThreadSnapshot

using DecayThreadSnapshot = std::unordered_map<DecayId, size_t>

Definition at line 79 of file ObsManager.h.