26 for (
const auto &
p : search_list) {
28 const double m_eff =
p.effective_mass();
29 const auto n_all_modes =
p.type().get_partial_widths(m_eff).size();
30 if (n_all_modes == 0) {
34 const double inv_gamma =
p.inverse_gamma();
35 DecayBranchList dil_modes =
p.type().get_partial_widths_dilepton(m_eff);
40 if (dil_modes.size() == n_all_modes ||
p.type().is_stable() ||
41 (
p.formation_time() >
p.position().x0())) {
45 for (DecayBranchPtr &mode : dil_modes) {
47 const double shining_weight = dt * inv_gamma * mode->weight() /
hbarc;
49 if (shining_weight > 0.0) {
61 bool only_res)
const {
65 for (
const auto &
p : search_list) {
73 const double m_eff =
p.effective_mass();
77 const double width_tot =
80 for (DecayBranchPtr &mode : dil_modes) {
81 const double shining_weight = mode->weight() / width_tot;
83 if (shining_weight > 0.0) {
DecayActionDilepton is special action created for particles that can decay into dileptons.
Collection of useful constants that are known at compile time.
void shine(const Particles &search_list, OutputInterface *output, double dt) const
Check the whole particles list and print out possible dilepton decays.
void add_decay(DecayBranchPtr p)
Add one new decay.
bool is_dilepton_output() const
Get, whether this is the dilepton output?
constexpr double hbarc
GeV <-> fm conversion factor.
virtual void at_interaction(const Action &action, const double density)
Called whenever an action modified one or more particles.
Particle type contains the static properties of a particle species.
DecayBranchList get_partial_widths_dilepton(const double m) const
Get the mass-dependent dilepton partial decay widths of a particle with mass m.
void shine_final(const Particles &search_list, OutputInterface *output, bool only_res=false) const
Shine dileptons from resonances at the end of the simulation.
void generate_final_state() override
Generate the final state of the decay process.
const DecayModes & decay_modes() const
The Particles class abstracts the storage and manipulation of particles.
Abstraction of generic output.
DecayBranchList get_partial_widths(const double m) const
Get all the mass-dependent partial decay widths of a particle with mass m.
const DecayBranchList & decay_mode_list() const