Add nodes for all decays possible from the given node and all of its children.
1048 uint32_t n_unstable = 0;
1049 double sqrts_minus_masses = sqrts;
1050 for (
const ParticleTypePtr ptype : node.state_) {
1051 if (!ptype->is_stable()) {
1054 sqrts_minus_masses -= ptype->mass();
1057 n_unstable != 0 ? 1. /
static_cast<double>(n_unstable) : 1.;
1059 for (
const ParticleTypePtr ptype : node.state_) {
1060 if (!ptype->is_stable()) {
1061 const double sqrts_decay = sqrts_minus_masses + ptype->mass();
1062 bool can_decay =
false;
1063 for (
const auto& decay : ptype->decay_modes().decay_mode_list()) {
1067 double final_state_mass = 0.;
1068 for (
const auto&
p : decay->particle_types()) {
1069 final_state_mass +=
p->mass();
1071 if (final_state_mass > sqrts_decay) {
1076 ParticleTypePtrList parts;
1078 auto& new_node = node.add_action(name, norm * decay->weight(), {ptype},
static std::string make_decay_name(const std::string &res_name, const DecayBranchPtr &decay, ParticleTypePtrList &final_state)
Generate name for decay and update final state.
static void add_decays(Node &node, double sqrts)
Add nodes for all decays possible from the given node and all of its children.