Version: SMASH-3.4
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 26 of file decayactionsfinder.h.

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

Public Member Functions

 DecayActionsFinder (const ExperimentParameters &par)
 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) const override
 Force all resonances to decay at the end of the simulation. More...
 
- Public Member Functions inherited from smash::ActionFinderInterface
virtual ~ActionFinderInterface ()=default
 

Public Attributes

const double res_lifetime_factor_
 Multiplicative factor to be applied to resonance lifetimes. More...
 
const bool ignore_minimum_width_at_end_
 Do all non-strong decays (including weak and electro-magnetic ones) More...
 
const bool force_decays_at_end_
 Whether to find final decay actions. More...
 
const bool decay_initial_particles_
 Whether to initial state particles can decay. More...
 
const SpinInteractionType spin_interaction_type_
 Spin interaction type. More...
 
const CharmRescattering charm_rescattering_method_
 Charm rescattering method. More...
 

Constructor & Destructor Documentation

◆ DecayActionsFinder()

smash::DecayActionsFinder::DecayActionsFinder ( const ExperimentParameters par)
inlineexplicit

Initialize the finder.

Parameters
[in]parparameters from Experiment

Definition at line 33 of file decayactionsfinder.h.

34  : res_lifetime_factor_(par.res_lifetime_factor),
35  ignore_minimum_width_at_end_(par.ignore_minimum_width_at_end),
36  force_decays_at_end_(par.force_decays_at_end),
37  decay_initial_particles_(par.decay_initial_particles),
38  spin_interaction_type_(par.spin_interaction_type),
39  charm_rescattering_method_(par.charm_rescattering) {}
const bool ignore_minimum_width_at_end_
Do all non-strong decays (including weak and electro-magnetic ones)
const bool decay_initial_particles_
Whether to initial state particles can decay.
const CharmRescattering charm_rescattering_method_
Charm rescattering method.
const double res_lifetime_factor_
Multiplicative factor to be applied to resonance lifetimes.
const bool force_decays_at_end_
Whether to find final decay actions.
const SpinInteractionType spin_interaction_type_
Spin interaction type.

Member Function Documentation

◆ find_actions_in_cell()

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 20 of file decayactionsfinder.cc.

22  {
23  ActionList actions;
24  /* for short time steps this seems reasonable to expect
25  * less than 10 decays in most time steps */
26  actions.reserve(10);
27 
28  for (const auto &p : search_list) {
29  if (p.type().is_stable()) {
30  continue; // particle doesn't decay
31  }
33  p.get_history().collisions_per_particle == 0) {
34  continue;
35  }
36  /* Prevent decays of charmed particles if 'Charm_Rescattering_Method' is set
37  * to 'none' and D* meson decays if set to 'T-matrix'. Adding it in this
38  * function ensures that find_final_actions will still lead to forced decays
39  * for all charmed hardons if 'Force_Decays_At_End' is set to true. */
41  p.type().pdgcode().frac_charm() != 0) ||
43  p.type().pdgcode().is_Dstar2007())) {
44  continue;
45  }
46 
47  DecayBranchList processes = p.type().get_partial_widths(
48  p.momentum(), p.position().threevec(), WhichDecaymodes::Hadronic);
49  // total decay width (mass-dependent)
50  const double width = total_weight<DecayBranch>(processes);
51 
52  // check if there are any (hadronic) decays
53  if (!(width > 0.0)) {
54  continue;
55  }
56 
57  constexpr double one_over_hbarc = 1. / hbarc;
58 
59  /* The decay_time is sampled from an exponential distribution.
60  * Even though it may seem suspicious that it is sampled every
61  * timestep, it can be proven that this still overall obeys
62  * the exponential decay law. */
63  double decay_time =
64  res_lifetime_factor_ * random::exponential<double>(
65  /* The clock goes slower in the rest
66  * frame of the resonance */
67  one_over_hbarc * p.inverse_gamma() * width);
68  /* If the particle is not yet formed, shift the decay time by the time it
69  * takes the particle to form */
70  if (p.xsec_scaling_factor() < 1.0) {
71  decay_time += p.formation_time() - p.position().x0();
72  }
73  if (decay_time < dt) {
74  /* => decay_time ∈ [0, dt[
75  * => the particle decays in this timestep. */
76  auto act =
77  std::make_unique<DecayAction>(p, decay_time, spin_interaction_type_);
78  act->add_decays(std::move(processes));
79  actions.emplace_back(std::move(act));
80  }
81  }
82  return actions;
83 }
@ T_Matrix
Charm interactions via T-matrix approach.
@ None
Disable charm interactions.
constexpr int p
Proton.
constexpr double hbarc
GeV <-> fm conversion factor.
Definition: constants.h:29
@ Hadronic
Ignore dilepton decay modes widths.

◆ find_actions_with_neighbors()

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 53 of file decayactionsfinder.h.

55  {
56  return {};
57  }

◆ find_actions_with_surrounding_particles()

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 60 of file decayactionsfinder.h.

62  {
63  return {};
64  }

◆ find_final_actions()

ActionList smash::DecayActionsFinder::find_final_actions ( const Particles search_list) const
overridevirtual

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

Parameters
[in]search_listAll particles at the end of simulation.
Returns
List with the found (Decay)Action objects.

Implements smash::ActionFinderInterface.

Definition at line 85 of file decayactionsfinder.cc.

86  {
87  ActionList actions;
89  for (const auto &p : search_list) {
90  if (!ignore_minimum_width_at_end_ && p.type().is_stable()) {
91  continue; // particle is stable with respect to strong interaction
92  }
94  p.get_history().collisions_per_particle == 0) {
95  continue;
96  }
97  if (p.type().decay_modes().is_empty()) {
98  continue; // particle cannot decay (not even e.m. or weakly)
99  }
100 
101  auto act = std::make_unique<DecayAction>(p, 0., spin_interaction_type_);
102  act->add_decays(p.type().get_partial_widths(
103  p.momentum(), p.position().threevec(), WhichDecaymodes::All));
104  actions.emplace_back(std::move(act));
105  }
106  }
107  return actions;
108 }
@ All
All decay mode widths.

Member Data Documentation

◆ res_lifetime_factor_

const double smash::DecayActionsFinder::res_lifetime_factor_
Initial value:
=
default_type default_value() const
Get the default value of the key.
Definition: key.h:217
static const Key< double > collTerm_resonanceLifetimeModifier
See user guide description for more information.
Definition: input_keys.h:3001

Multiplicative factor to be applied to resonance lifetimes.

Definition at line 75 of file decayactionsfinder.h.

◆ ignore_minimum_width_at_end_

const bool smash::DecayActionsFinder::ignore_minimum_width_at_end_
Initial value:
=
static const Key< bool > collTerm_ignoreDecayWidthAtTheEnd
See user guide description for more information.
Definition: input_keys.h:2770

Do all non-strong decays (including weak and electro-magnetic ones)

Definition at line 79 of file decayactionsfinder.h.

◆ force_decays_at_end_

const bool smash::DecayActionsFinder::force_decays_at_end_
Initial value:
=
static const Key< bool > collTerm_forceDecaysAtEnd
See user guide description for more information.
Definition: input_keys.h:2659

Whether to find final decay actions.

Definition at line 83 of file decayactionsfinder.h.

◆ decay_initial_particles_

const bool smash::DecayActionsFinder::decay_initial_particles_
Initial value:
=
static const Key< bool > collTerm_decayInitial
See user guide description for more information.
Definition: input_keys.h:2676

Whether to initial state particles can decay.

Useful for analyzing interactions involving one or more resonances.

Definition at line 90 of file decayactionsfinder.h.

◆ spin_interaction_type_

const SpinInteractionType smash::DecayActionsFinder::spin_interaction_type_
Initial value:
=
static const Key< SpinInteractionType > collTerm_spinInteractions
See user guide description for more information.
Definition: input_keys.h:3017

Spin interaction type.

Definition at line 94 of file decayactionsfinder.h.

◆ charm_rescattering_method_

const CharmRescattering smash::DecayActionsFinder::charm_rescattering_method_
Initial value:
=
static const Key< CharmRescattering > collTerm_charmRescatteringMethod
See user guide description for more information.
Definition: input_keys.h:2509

Charm rescattering method.

Definition at line 98 of file decayactionsfinder.h.


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