Version: SMASH-1.7
smash::DecayActionsFinder Class Reference

#include <decayactionsfinder.h>

A simple decay finder: Just loops through all particles and checks if they can decay during the next timestep.

Definition at line 25 of file decayactionsfinder.h.

Inheritance diagram for smash::DecayActionsFinder:
[legend]
Collaboration diagram for smash::DecayActionsFinder:
[legend]

Public Member Functions

 DecayActionsFinder ()
 Initialize the finder. More...
 
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. More...
 
ActionList find_actions_with_neighbors (const ParticleList &, const ParticleList &, double, const std::vector< FourVector > &) const override
 Ignore the neighbor searches for decays. More...
 
ActionList find_actions_with_surrounding_particles (const ParticleList &, const Particles &, double, const std::vector< FourVector > &) const override
 Ignore the surrounding searches for decays. More...
 
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. More...
 
- Public Member Functions inherited from smash::ActionFinderInterface
virtual ~ActionFinderInterface ()=default
 

Constructor & Destructor Documentation

smash::DecayActionsFinder::DecayActionsFinder ( )
inline

Initialize the finder.

Definition at line 28 of file decayactionsfinder.h.

28 {}

Here is the call graph for this function:

Member Function Documentation

ActionList smash::DecayActionsFinder::find_actions_in_cell ( const ParticleList &  search_list,
double  dt,
const double  ,
const std::vector< FourVector > &   
) const
overridevirtual

Check the whole particle list for decays.

Parameters
[in]search_listAll particles in grid cell.
[in]dtSize of timestep [fm]
Returns
List with the found (Decay)Action objects.

Implements smash::ActionFinderInterface.

Definition at line 22 of file decayactionsfinder.cc.

24  {
25  ActionList actions;
26  /* for short time steps this seems reasonable to expect
27  * less than 10 decays in most time steps */
28  actions.reserve(10);
29 
30  for (const auto &p : search_list) {
31  if (p.type().is_stable()) {
32  continue; // particle doesn't decay
33  }
34 
35  DecayBranchList processes = p.type().get_partial_widths(
36  p.momentum(), p.position().threevec(), WhichDecaymodes::Hadronic);
37  // total decay width (mass-dependent)
38  const double width = total_weight<DecayBranch>(processes);
39 
40  // check if there are any (hadronic) decays
41  if (!(width > 0.0)) {
42  continue;
43  }
44 
45  constexpr double one_over_hbarc = 1. / hbarc;
46 
47  /* The decay_time is sampled from an exponential distribution.
48  * Even though it may seem suspicious that it is sampled every
49  * timestep, it can be proven that this still overall obeys
50  * the exponential decay law.
51  */
52  double decay_time = random::exponential<double>(
53  /* The clock goes slower in the rest
54  * frame of the resonance */
55  one_over_hbarc * p.inverse_gamma() * width);
56  /* If the particle is not yet formed, shift the decay time by the time it
57  * takes the particle to form */
58  if (p.xsec_scaling_factor() < 1.0) {
59  decay_time += p.formation_time() - p.position().x0();
60  }
61  if (decay_time < dt) {
62  /* => decay_time ∈ [0, dt[
63  * => the particle decays in this timestep. */
64  auto act = make_unique<DecayAction>(p, decay_time);
65  act->add_decays(std::move(processes));
66  actions.emplace_back(std::move(act));
67  }
68  }
69  return actions;
70 }
constexpr double hbarc
GeV <-> fm conversion factor.
Definition: constants.h:25
Ignore dilepton decay modes widths.
constexpr int p
Proton.

Here is the caller graph for this function:

ActionList smash::DecayActionsFinder::find_actions_with_neighbors ( const ParticleList &  ,
const ParticleList &  ,
double  ,
const std::vector< FourVector > &   
) const
inlineoverridevirtual

Ignore the neighbor searches for decays.

Implements smash::ActionFinderInterface.

Definition at line 42 of file decayactionsfinder.h.

44  {
45  return {};
46  }
ActionList smash::DecayActionsFinder::find_actions_with_surrounding_particles ( const ParticleList &  ,
const Particles ,
double  ,
const std::vector< FourVector > &   
) const
inlineoverridevirtual

Ignore the surrounding searches for decays.

Implements smash::ActionFinderInterface.

Definition at line 49 of file decayactionsfinder.h.

51  {
52  return {};
53  }

Here is the call graph for this function:

ActionList smash::DecayActionsFinder::find_final_actions ( const Particles search_list,
bool  only_res = false 
) const
overridevirtual

Force all resonances to decay at the end of the simulation.

Parameters
[in]search_listAll particles at the end of simulation.
[in]only_resoptional parameter that requests that only actions regarding resonances are considered (disregarding stable particles)
Returns
List with the found (Decay)Action objects.

Implements smash::ActionFinderInterface.

Definition at line 72 of file decayactionsfinder.cc.

73  {
74  ActionList actions;
75 
76  for (const auto &p : search_list) {
77  if (p.type().is_stable()) {
78  continue; // particle doesn't decay
79  }
80  auto act = make_unique<DecayAction>(p, 0.);
81  act->add_decays(p.type().get_partial_widths(
82  p.momentum(), p.position().threevec(), WhichDecaymodes::All));
83  actions.emplace_back(std::move(act));
84  }
85  return actions;
86 }
All decay mode widths.
constexpr int p
Proton.

Here is the caller graph for this function:


The documentation for this class was generated from the following files: