23 const ParticleList &search_list,
double dt,
const double,
24 const std::vector<FourVector> &)
const {
30 for (
const auto &
p : search_list) {
31 if (
p.type().is_stable()) {
35 DecayBranchList processes =
p.type().get_partial_widths(
38 const double width = total_weight<DecayBranch>(processes);
45 constexpr
double one_over_hbarc = 1. /
hbarc;
52 double decay_time = random::exponential<double>(
55 one_over_hbarc *
p.inverse_gamma() * width);
58 if (
p.xsec_scaling_factor() < 1.0) {
59 decay_time +=
p.formation_time() -
p.position().x0();
61 if (decay_time < dt) {
64 auto act = make_unique<DecayAction>(
p, decay_time);
65 act->add_decays(std::move(processes));
66 actions.emplace_back(std::move(act));
76 for (
const auto &
p : search_list) {
77 if (
p.type().is_stable()) {
80 auto act = make_unique<DecayAction>(
p, 0.);
81 act->add_decays(p.type().get_partial_widths(
83 actions.emplace_back(std::move(act));
ActionList find_final_actions(const Particles &search_list, bool only_res=false) const override
Force all resonances to decay at the end of the simulation.
Collection of useful constants that are known at compile time.
constexpr double hbarc
GeV <-> fm conversion factor.
Ignore dilepton decay modes widths.
ActionList find_actions_in_cell(const ParticleList &search_list, double dt, const double, const std::vector< FourVector > &) const override
Check the whole particle list for decays.
The Particles class abstracts the storage and manipulation of particles.