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