Version: SMASH-1.5
decayactionsfinderdilepton.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2014-2018
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
11 
12 #include "smash/constants.h"
13 #include "smash/cxx14compat.h"
15 #include "smash/decaymodes.h"
16 #include "smash/particles.h"
17 
18 namespace smash {
19 
21  OutputInterface *output,
22  double dt) const {
23  if (!output->is_dilepton_output()) {
24  return;
25  }
26  for (const auto &p : search_list) {
27  // effective mass of decaying particle
28  const double m_eff = p.effective_mass();
29  const auto n_all_modes = p.type().get_partial_widths(m_eff).size();
30  if (n_all_modes == 0) {
31  continue;
32  }
33 
34  const double inv_gamma = p.inverse_gamma();
35  DecayBranchList dil_modes = p.type().get_partial_widths_dilepton(m_eff);
36 
37  /* if particle can only decay into dileptons or is stable, use shining only
38  * in find_final_actions and ignore them here, also unformed
39  * resonances cannot decay */
40  if (dil_modes.size() == n_all_modes || p.type().is_stable() ||
41  (p.formation_time() > p.position().x0())) {
42  continue;
43  }
44 
45  for (DecayBranchPtr &mode : dil_modes) {
46  // SHINING as described in \iref{Schmidt:2008hm}, chapter 2D
47  const double shining_weight = dt * inv_gamma * mode->weight() / hbarc;
48 
49  if (shining_weight > 0.0) { // decays that can happen
50  DecayActionDilepton act(p, 0., shining_weight);
51  act.add_decay(std::move(mode));
53  output->at_interaction(act, 0.0);
54  }
55  }
56  }
57 }
58 
60  OutputInterface *output,
61  bool only_res) const {
62  if (!output->is_dilepton_output()) {
63  return;
64  }
65  for (const auto &p : search_list) {
66  const ParticleType &t = p.type();
67  if (t.decay_modes().decay_mode_list().empty() ||
68  (only_res && t.is_stable())) {
69  continue;
70  }
71 
72  // effective mass of decaying particle
73  const double m_eff = p.effective_mass();
74  DecayBranchList dil_modes = t.get_partial_widths_dilepton(m_eff);
75 
76  // total decay width, also hadronic decays
77  const double width_tot =
78  total_weight<DecayBranch>(t.get_partial_widths(m_eff));
79 
80  for (DecayBranchPtr &mode : dil_modes) {
81  const double shining_weight = mode->weight() / width_tot;
82 
83  if (shining_weight > 0.0) { // decays that can happen
84  DecayActionDilepton act(p, 0., shining_weight);
85  act.add_decay(std::move(mode));
87  output->at_interaction(act, 0.0);
88  }
89  }
90  }
91 }
92 
93 } // namespace smash
DecayActionDilepton is special action created for particles that can decay into dileptons.
Collection of useful constants that are known at compile time.
void shine(const Particles &search_list, OutputInterface *output, double dt) const
Check the whole particles list and print out possible dilepton decays.
void add_decay(DecayBranchPtr p)
Add one new decay.
Definition: decayaction.cc:28
bool is_dilepton_output() const
Get, whether this is the dilepton output?
constexpr double hbarc
GeV <-> fm conversion factor.
Definition: constants.h:25
virtual void at_interaction(const Action &action, const double density)
Called whenever an action modified one or more particles.
bool is_stable() const
Definition: particletype.h:226
Particle type contains the static properties of a particle species.
Definition: particletype.h:87
DecayBranchList get_partial_widths_dilepton(const double m) const
Get the mass-dependent dilepton partial decay widths of a particle with mass m.
void shine_final(const Particles &search_list, OutputInterface *output, bool only_res=false) const
Shine dileptons from resonances at the end of the simulation.
void generate_final_state() override
Generate the final state of the decay process.
Definition: decayaction.cc:149
const DecayModes & decay_modes() const
constexpr int p
Proton.
The Particles class abstracts the storage and manipulation of particles.
Definition: particles.h:33
Abstraction of generic output.
Definition: action.h:24
DecayBranchList get_partial_widths(const double m) const
Get all the mass-dependent partial decay widths of a particle with mass m.
const DecayBranchList & decay_mode_list() const
Definition: decaymodes.h:63