Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
DslnuDecay.cpp
Go to the documentation of this file.
1#include "DslnuDecay.h"
2
3#include <stdexcept>
4
11
12double DslnuDecay::BR(int gen) {
13 double BR = 0.0;
14 switch (gen)
15 {
16 case 2:
17 BR = cache.calc_mu.BR_0_SM() * cache.calc_mu.R_SM_BSM();
18 break;
19 case 3:
20 BR = cache.calc_tau.BR_0_SM() * cache.calc_tau.R_SM_BSM();
21 break;
22 default:
23 throw std::invalid_argument("DslnuDecay supports only muon (2) and tau (3) generations");
24 }
25 return BR;
26}
27
28std::vector<ObservableValue> DslnuDecay::compute_observable(Observables obs) {
29 double value = 0.0;
30 switch (obs) {
32 value = BR(2);
33 break;
35 value = BR(3);
36 break;
37 default:
38 throw std::invalid_argument(
39 "Observable " + ObservableMapper::str(obs) + " does not belong to " + DecayMapper::str(this->id)
40 );
41 }
42
43 return {ObservableValue(ObservableMapper::to_id(obs), value)};
44}
45
46
47std::vector<ObservableValue> DslnuDecay::compute_observable(ObservableId obs) {
49}
Observables
Definition GeneralEnum.h:4
std::complex< double > complex_t
Convenience alias for std::complex<double>.
Definition Utils.h:35
std::shared_ptr< IObsParameterProxy< ParamId, DataType, std::string, LhaID > > p
Parameter proxy for SM-like quantities used by the decay (may be SM/BSM depending on wiring).
std::shared_ptr< IObsWilsonProxy > w_proxy
Wilson proxy used at compute-time to query coefficients (matching/run).
Definition DecayParent.h:99
void load_params() override
Load and cache parameters needed by this decay.
Definition DslnuDecay.cpp:5
double BR(int gen)
std::vector< ObservableValue > compute_observable(Observables obs) override
Compute an observable given a public observable enum.
static std::optional< Observables > enum_of(const IdOf< ObservableTag > &id)
Attempts to recover the enum value associated with an identifier.
static IdOf< ObservableTag > to_id(Observables e)
Converts an enum value to an IdOf<Tag>.
static std::string str(const IdOf< ObservableTag > &id)
Returns the string representation of an identifier.
PlnuCalculator calc_tau
Definition DslnuDecay.h:11
PlnuCalculator calc_mu
Definition DslnuDecay.h:10
Container for a computed observable value, optionally binned.