CLASSpp Manual
Cosmology reference and developer manual
Loading...
Searching...
No Matches
decay_harness.cpp File Reference
#include "decay_harness.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <exception>
#include <map>
#include <sstream>
#include <string>
#include <vector>

Detailed Description

Command-line driver for DecayHarness (tools/decay_harness.h): one decay channel H <-> l + phi through the MeV era, outside CLASS (issue #389).

Arguments are key=value pairs, every one optional except m_H and tau:

decay_harness m_H=5 tau=1 r_l=0.1 [r_phi=0] [T_start=10] [T_end=0.01]
              [samples=2.3,1,0.5] [n_eff_spectator=1] [daughter_thermal=1]
              [inverse_decays=1] [quantum_statistics=1] [balanced_gather=1]
              [parent_n=48] [daughter_n=96] [daughter_q_min=1e-3] [rtol=1e-6]

Masses and temperatures in MeV, tau in s. samples are T_nu values at which to print the spectra in addition to T_end.

Output on stdout: one block per sample, blank-line separated. Each block starts with # lines giving T_nu, T_gamma, t, then one row per daughter bin:

p/T_gamma   f_l   f_phi   (p/T_gamma)^2 f_l   (p/T_gamma)^2 f_phi

then one row per parent bin, prefixed by parent. The run's conservation diagnostics follow on stderr, so a figure script can read stdout untouched.