1#ifndef OBSERVABLE_INTERFACE_H
2#define OBSERVABLE_INTERFACE_H
75 std::shared_ptr<ObsManager> manager;
78 std::shared_ptr<ObservablePortsConfig> ports;
198 void add_observables(std::map<Observables, QCDOrder> obss,
bool add_dependencies=
false);
206 void add_observables(std::map<ObservableId, QCDOrder> obss,
bool add_dependencies=
false);
217 std::pair<double, double> bin={1.0, 6.0});
228 std::pair<double, double> bin={1.0, 6.0});
448 std::map<ObservableId, std::vector<ObservableValue>>
compute_all();
High-level manager for observable evaluation.
std::unordered_map< DecayId, size_t > DecayThreadSnapshot
Observable-layer API exposing whether MARTY backend is active.
Concrete freezer for Wilson coefficient blocks (matching + hadronic).
Small extension point for additive Wilson matching terms.
void add_observables(std::map< Observables, QCDOrder > obss, bool add_dependencies=false)
Add multiple observables at once (enum map).
std::vector< BinnedObservableId > get_current_observables()
Return the set of currently registered observables.
void set_bkstarll_threads(size_t n_threads)
Set the thread option for the bkstarll decay.
ObservableInterface()
Construct a ready-to-use observable interface.
bool is_observable_binned(Observables obs) const
Return whether a specific observable requires q² bins.
void add_observable_parameter(Observables obs, ParamId pid)
Manually add a single parameter dependence to an observable (enum API).
void set_all_decay_threads(size_t n_threads)
Set every thread-configurable decay to the same value.
std::shared_ptr< ObservableInterface > clone_for_worker() const
Build a fresh ObservableInterface with the same selected builtin observables.
void set_bkll_threads(size_t n_threads)
Set the thread option for the bkll decay.
double get_param(const std::string &block, LhaID code, ParameterType type)
Read an input parameter in a given parameter space.
DecayThreadSnapshot snapshot_decay_threads() const
Snapshot thread settings for thread-configurable decays.
void set_param(const std::string &block, LhaID code, double value, ParameterType type)
Set an input parameter in a given parameter space.
scalar_t get_exp_uncertainty(Observables id, UncertaintyType u_type=UncertaintyType::COMBINED)
Get experimental uncertainty for an observable (enum API).
void remove_observable(Observables id)
Remove an observable from the manager (enum API).
void set_decay_config(Decays dec, std::any config)
Set configuration for a given decay.
void set_decay_threads(Decays dec, size_t n_threads)
Set the thread option for any decay that supports it.
void add_custom_decay(DecayId id, std::shared_ptr< DecayParent > ptr)
Register a custom decay implementation.
std::vector< ObservableValue > compute_observable(Observables obs) const
Compute a theory prediction for an observable (enum API).
void enable_obs()
Force enabling/re-enabling currently registered observables.
void restore_decay_threads(const DecayThreadSnapshot &snapshot)
Restore a previous decay-thread snapshot.
std::map< ObservableId, std::vector< ObservableValue > > compute_all()
Compute all currently registered observables.
ObservablePortsConfig & get_ports()
Access the underlying ports configuration (advanced use).
ObservableInterface & add_observable(Observables obs, QCDOrder order, bool add_dependencies=false)
Add an observable to the manager (enum API).
ObservableInterface & addMatchingPatch(const WilsonMatchingPatch &patch)
Camel-case alias for add_matching_patch.
ObservableInterface & add_lambda_decay(LambdaDecayConfig config, bool add_observables=true)
Register a complete custom decay backed by user lambdas.
void add_observable_parameters(Observables obs, std::unordered_set< ParamId > pids)
Manually add multiple parameter dependences to an observable (enum API).
void set_bsphi_threads(size_t n_threads)
Set the thread option for the bsphi decay.
ObservableInterface & add_matching_patch(const WilsonMatchingPatch &patch)
Add an additive Wilson matching patch through the observable layer.
bool is_decay_binned(Decays decay) const
Return whether this decay has at least one observable requiring q² bins.
std::unordered_set< ParamId > get_all_ops_deps(ObservableId id)
Retrieve the full allow-list of parameter dependences for an observable (id API).
void set_lblll_threads(size_t n_threads)
Set the thread option for the Lambda_b -> Lambda l+ l- decay.
void reload_params()
Reload cached parameters for all registered decays.
scalar_t get_exp_value(Observables id)
Get experimental central value for an observable (enum API).
void remove_observables(std::unordered_set< Observables > ids)
Remove several observables (enum set).
Identifies an observable together with a numerical bin.
Full runtime definition of a custom decay and its observables.
Represents an identifier of a LHA element, possibly containing several sub-ids.
Dependency container (“ports”) for observable computations.
Container for a computed observable value, optionally binned.
Composite identifier for a single parameter.