Version: SMASH-1.6
smash::decaytree Namespace Reference

Classes

struct  Node
 Node of a decay tree, representing a possible action (2-to-2 or 1-to-2). More...
 

Functions

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. More...
 
static void add_decays (Node &node, double sqrts)
 Add nodes for all decays possible from the given node and all of its children. More...
 

Function Documentation

static std::string smash::decaytree::make_decay_name ( const std::string &  res_name,
const DecayBranchPtr &  decay,
ParticleTypePtrList &  final_state 
)
static

Generate name for decay and update final state.

Parameters
[in]res_nameName of resonance.
[in]decayDecay branch.
[out]final_stateFinal state of decay.
Returns
Name of decay.

Definition at line 679 of file scatteractionsfinder.cc.

681  {
682  std::stringstream name;
683  name << "[" << res_name << "->";
684  for (const auto& p : decay->particle_types()) {
685  name << p->name();
686  final_state.push_back(p);
687  }
688  name << "]";
689  return name.str();
690 }
constexpr int p
Proton.

Here is the caller graph for this function:

static void smash::decaytree::add_decays ( Node node,
double  sqrts 
)
static

Add nodes for all decays possible from the given node and all of its children.

Parameters
nodeStarting node.

Definition at line 698 of file scatteractionsfinder.cc.

698  {
699  // If there is more than one unstable particle in the current state, then
700  // there will be redundant paths in the decay tree, corresponding to
701  // reorderings of the decays. To avoid double counting, we normalize by the
702  // number of possible decay orderings. Normalizing by the number of unstable
703  // particles recursively corresponds to normalizing by the factorial that
704  // gives the number of reorderings.
705  //
706  // Ideally, the redundant paths should never be added to the decay tree, but
707  // we never have more than two redundant paths, so it probably does not matter
708  // much.
709  uint32_t n_unstable = 0;
710  double sqrts_minus_masses = sqrts;
711  for (const ParticleTypePtr ptype : node.state_) {
712  if (!ptype->is_stable()) {
713  n_unstable += 1;
714  }
715  sqrts_minus_masses -= ptype->mass();
716  }
717  const double norm =
718  n_unstable != 0 ? 1. / static_cast<double>(n_unstable) : 1.;
719 
720  for (const ParticleTypePtr ptype : node.state_) {
721  if (!ptype->is_stable()) {
722  const double sqrts_decay = sqrts_minus_masses + ptype->mass();
723  for (const auto& decay : ptype->decay_modes().decay_mode_list()) {
724  // Make sure to skip kinematically impossible decays.
725  // In principle, we would have to integrate over the mass of the
726  // resonance, but as an approximation we just assume it at its pole.
727  double final_state_mass = 0.;
728  for (const auto& p : decay->particle_types()) {
729  final_state_mass += p->mass();
730  }
731  if (final_state_mass > sqrts_decay) {
732  continue;
733  }
734 
735  ParticleTypePtrList parts;
736  const auto name = make_decay_name(ptype->name(), decay, parts);
737  auto& new_node = node.add_action(name, norm * decay->weight(), {ptype},
738  std::move(parts));
739  add_decays(new_node, sqrts_decay);
740  }
741  }
742  }
743 }
static void add_decays(Node &node, double sqrts)
Add nodes for all decays possible from the given node and all of its children.
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.
constexpr int p
Proton.

Here is the call graph for this function:

Here is the caller graph for this function: