|
CLASSpp Manual
Cosmology reference and developer manual
|
#include <cstdio>#include <cstdlib>#include <cstring>#include <exception>#include <map>#include <sstream>#include <string>#include <vector>#include "common.h"#include "decay_harness.h"Command-line driver for DecayCascade (tools/decay_harness.h): Hannestad & Madsen's three-level cascade nu_tau -> nu_mu + phi, nu_mu -> nu_e + phi through the MeV era, outside CLASS (issue #389, step 3).
Arguments are key=value pairs, every one optional:
decay_cascade [m_tau=2] [m_mu=0.5] [m_e=0.005] [m_phi=0.005]
[tau_tau=0.2] [tau_mu=1] [T_start=5] [T_end=0.01]
[samples=2.3,1] [samples_Tgamma=2.3,1.1,0.5] [spectra=1]
[n_eff_spectator=0] [inverse_decays=1] [quantum_statistics=1]
[balanced_gather=1] [gather_floor=1e-10] [emission_gauss=2]
[tau_n=48] [mu_n=112] [e_n=128] [phi_n=160]
[tau_q_min=1e-2] [mu_q_min=1e-3] [e_q_min=1e-4] [phi_q_min=1e-5]
[tau_q_max=30] [mu_q_max=0] [e_q_max=0] [phi_q_max=0] [rtol=1e-6]
Masses and temperatures in MeV, lifetimes in s. samples are T_nu values and samples_Tgamma real photon temperatures (converted through the plasma's entropy, DecayNetwork::TnuAtTgamma) at which to print the state in addition to T_end.
Output on stdout: one block per sample, blank-line separated. Each block starts with # lines: T_nu, T_gamma, t, the bare numbers N_s = Sum q^2 dq f per dof, and n_s / n_gamma with the real T_gamma. Unless spectra=0, one row per bin follows,
<species> q f q^2 f
with q = p/T_nu and species one of tau, mu, e, phi. The conservation diagnostics and the integrator's counters follow on stderr.