Version: SMASH-1.7
smash::DecayAction Class Reference

#include <decayaction.h>

DecayAction is a special action which takes one single particle in the initial state and makes it decay into a number of daughter particles (currently two or three).

Definition at line 25 of file decayaction.h.

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

Classes

class  InvalidDecay
 Thrown when DecayAction is called to perform with 0 or more than 2 entries in outgoing_particles. More...
 

Public Member Functions

 DecayAction (const ParticleData &p, double time)
 Construct a DecayAction from a particle p. More...
 
void add_decays (DecayBranchList pv)
 Add several new decays at once. More...
 
void add_decay (DecayBranchPtr p)
 Add one new decay. More...
 
void generate_final_state () override
 Generate the final state of the decay process. More...
 
std::pair< double, double > sample_masses (double kinetic_energy_cm) const override
 Sample the masses of the final particles. More...
 
double get_total_weight () const override
 Return the total width of the decay process. More...
 
double get_partial_weight () const override
 Get partial width of chosen channel. More...
 
double total_width () const
 Get total decay width. More...
 
- Public Member Functions inherited from smash::Action
 Action (const ParticleList &in_part, double time)
 Construct an action object with incoming particles and relative time. More...
 
 Action (const ParticleData &in_part, const ParticleData &out_part, double time, ProcessType type)
 Construct an action object with the incoming particles, relative time, and the already known outgoing particles and type of the process. More...
 
 Action (const ParticleList &in_part, const ParticleList &out_part, double absolute_execution_time, ProcessType type)
 Construct an action object with the incoming particles, absolute time, and the already known outgoing particles and type of the process. More...
 
 Action (const Action &)=delete
 Copying is disabled. Use pointers or create a new Action. More...
 
virtual ~Action ()
 Virtual Destructor. More...
 
bool operator< (const Action &rhs) const
 Determine whether one action takes place before another in time. More...
 
virtual ProcessType get_type () const
 Get the process type. More...
 
template<typename Branch >
void add_process (ProcessBranchPtr< Branch > &p, ProcessBranchList< Branch > &subprocesses, double &total_weight)
 Add a new subprocess. More...
 
template<typename Branch >
void add_processes (ProcessBranchList< Branch > pv, ProcessBranchList< Branch > &subprocesses, double &total_weight)
 Add several new subprocesses at once. More...
 
virtual void perform (Particles *particles, uint32_t id_process)
 Actually perform the action, e.g. More...
 
bool is_valid (const Particles &particles) const
 Check whether the action still applies. More...
 
bool is_pauli_blocked (const Particles &particles, const PauliBlocker &p_bl) const
 Check if the action is Pauli-blocked. More...
 
const ParticleList & incoming_particles () const
 Get the list of particles that go into the action. More...
 
void update_incoming (const Particles &particles)
 Update the incoming particles that are stored in this action to the state they have in the global particle list. More...
 
const ParticleList & outgoing_particles () const
 Get the list of particles that resulted from the action. More...
 
double time_of_execution () const
 Get the time at which the action is supposed to be performed. More...
 
virtual void check_conservation (const uint32_t id_process) const
 Check various conservation laws. More...
 
double sqrt_s () const
 Determine the total energy in the center-of-mass frame [GeV]. More...
 
FourVector total_momentum_of_outgoing_particles () const
 Calculate the total kinetic momentum of the outgoing particles. More...
 
FourVector get_interaction_point () const
 Get the interaction point. More...
 
std::pair< FourVector, FourVectorget_potential_at_interaction_point () const
 Get the skyrme and asymmetry potential at the interaction point. More...
 

Protected Member Functions

void format_debug_output (std::ostream &out) const override
 Writes information about this decay action to the out stream. More...
 
- Protected Member Functions inherited from smash::Action
FourVector total_momentum () const
 Sum of 4-momenta of incoming particles. More...
 
template<typename Branch >
const Branch * choose_channel (const ProcessBranchList< Branch > &subprocesses, double total_weight)
 Decide for a particular final-state channel via Monte-Carlo and return it as a ProcessBranch. More...
 
virtual void sample_angles (std::pair< double, double > masses, double kinetic_energy_cm)
 Sample final-state momenta in general X->2 processes (here: using an isotropical angular distribution). More...
 
void sample_2body_phasespace ()
 Sample the full 2-body phase-space (masses, momenta, angles) in the center-of-mass frame for the final state particles. More...
 
virtual void sample_3body_phasespace ()
 Sample the full 3-body phase-space (masses, momenta, angles) in the center-of-mass frame for the final state particles. More...
 

Protected Attributes

DecayBranchList decay_channels_
 List of possible decays. More...
 
double total_width_
 total decay width More...
 
double partial_width_
 partial decay width to the chosen outgoing channel More...
 
int L_ = 0
 Angular momentum of the decay. More...
 
- Protected Attributes inherited from smash::Action
ParticleList incoming_particles_
 List with data of incoming particles. More...
 
ParticleList outgoing_particles_
 Initially this stores only the PDG codes of final-state particles. More...
 
const double time_of_execution_
 Time at which the action is supposed to be performed (absolute time in the lab frame in fm/c). More...
 
ProcessType process_type_
 type of process More...
 

Constructor & Destructor Documentation

smash::DecayAction::DecayAction ( const ParticleData p,
double  time 
)

Construct a DecayAction from a particle p.

It does not initialize the list of possible decay processes. You need to call add_processes after construction.

Parameters
[in]pThe particle that should decay if the action is performed.
[in]timeTime at which the action is supposed to take place

Definition at line 21 of file decayaction.cc.

22  : Action({p}, time), total_width_(0.) {}
Action(const ParticleList &in_part, double time)
Construct an action object with incoming particles and relative time.
Definition: action.h:43
double total_width_
total decay width
Definition: decayaction.h:100
constexpr int p
Proton.

Member Function Documentation

void smash::DecayAction::add_decays ( DecayBranchList  pv)

Add several new decays at once.

Parameters
[in]pvList of decays to be added.

Definition at line 24 of file decayaction.cc.

24  {
25  add_processes<DecayBranch>(std::move(pv), decay_channels_, total_width_);
26 }
DecayBranchList decay_channels_
List of possible decays.
Definition: decayaction.h:97
double total_width_
total decay width
Definition: decayaction.h:100
void smash::DecayAction::add_decay ( DecayBranchPtr  p)

Add one new decay.

Parameters
[in]pDecay to be added.

Definition at line 28 of file decayaction.cc.

28  {
29  add_process<DecayBranch>(p, decay_channels_, total_width_);
30 }
DecayBranchList decay_channels_
List of possible decays.
Definition: decayaction.h:97
double total_width_
total decay width
Definition: decayaction.h:100
constexpr int p
Proton.

Here is the caller graph for this function:

void smash::DecayAction::generate_final_state ( )
overridevirtual

Generate the final state of the decay process.

Performs a decay of one particle to two or three particles.

Exceptions
InvalidDecay

Implements smash::Action.

Definition at line 32 of file decayaction.cc.

32  {
33  const auto &log = logger<LogArea::DecayModes>();
34  log.debug("Process: Resonance decay. ");
35  /* Execute a decay process for the selected particle.
36  *
37  * randomly select one of the decay modes of the particle
38  * according to their relative weights. Then decay the particle
39  * by calling function sample_2body_phasespace or sample_3body_phasespace.
40  */
41  const DecayBranch *proc =
42  choose_channel<DecayBranch>(decay_channels_, total_width_);
43  outgoing_particles_ = proc->particle_list();
44  // set positions of the outgoing particles
45  for (auto &p : outgoing_particles_) {
46  p.set_4position(incoming_particles_[0].position());
47  }
48  process_type_ = proc->get_type();
49  L_ = proc->angular_momentum();
50  partial_width_ = proc->weight();
51 
52  switch (outgoing_particles_.size()) {
53  case 2:
55  break;
56  case 3:
58  break;
59  default:
60  throw InvalidDecay(
61  "DecayAction::perform: Only 1->2 or 1->3 processes are supported. "
62  "Decay from 1->" +
63  std::to_string(outgoing_particles_.size()) +
64  " was requested. (PDGcode=" +
65  incoming_particles_[0].pdgcode().string() + ", mass=" +
66  std::to_string(incoming_particles_[0].effective_mass()) + ")");
67  }
68 
69  // Set formation time.
70  for (auto &p : outgoing_particles_) {
71  log.debug("particle momenta in lrf ", p);
72  // assuming decaying particles are always fully formed
73  p.set_formation_time(time_of_execution_);
74  // Boost to the computational frame
75  p.boost_momentum(-total_momentum_of_outgoing_particles().velocity());
76  log.debug("particle momenta in comp ", p);
77  }
78 }
ProcessType process_type_
type of process
Definition: action.h:320
DecayBranchList decay_channels_
List of possible decays.
Definition: decayaction.h:97
double total_width_
total decay width
Definition: decayaction.h:100
FourVector total_momentum_of_outgoing_particles() const
Calculate the total kinetic momentum of the outgoing particles.
Definition: action.cc:123
int L_
Angular momentum of the decay.
Definition: decayaction.h:106
ParticleList outgoing_particles_
Initially this stores only the PDG codes of final-state particles.
Definition: action.h:311
virtual void sample_3body_phasespace()
Sample the full 3-body phase-space (masses, momenta, angles) in the center-of-mass frame for the fina...
Definition: action.cc:219
ParticleList incoming_particles_
List with data of incoming particles.
Definition: action.h:303
constexpr int p
Proton.
void sample_2body_phasespace()
Sample the full 2-body phase-space (masses, momenta, angles) in the center-of-mass frame for the fina...
Definition: action.cc:208
double partial_width_
partial decay width to the chosen outgoing channel
Definition: decayaction.h:103
const double time_of_execution_
Time at which the action is supposed to be performed (absolute time in the lab frame in fm/c)...
Definition: action.h:317

Here is the call graph for this function:

Here is the caller graph for this function:

std::pair< double, double > smash::DecayAction::sample_masses ( double  kinetic_energy_cm) const
overridevirtual

Sample the masses of the final particles.

Returns
Pair of sampled masses of particle 1 and 2

Reimplemented from smash::Action.

Definition at line 82 of file decayaction.cc.

83  {
84  const ParticleType &t_a = outgoing_particles_[0].type();
85  const ParticleType &t_b = outgoing_particles_[1].type();
86 
87  // start with pole masses
88  std::pair<double, double> masses = {t_a.mass(), t_b.mass()};
89 
90  if (kinetic_energy_cm < t_a.min_mass_kinematic() + t_b.min_mass_kinematic()) {
91  const std::string reaction =
92  incoming_particles_[0].type().name() + "→" + t_a.name() + t_b.name();
93  throw InvalidResonanceFormation(
94  reaction + ": not enough energy, " + std::to_string(kinetic_energy_cm) +
95  " < " + std::to_string(t_a.min_mass_kinematic()) + " + " +
96  std::to_string(t_b.min_mass_kinematic()));
97  }
98 
99  // If one of the particles is a resonance, sample its mass.
100  if (!t_a.is_stable() && t_b.is_stable()) {
101  masses.first = t_a.sample_resonance_mass(t_b.mass(), kinetic_energy_cm, L_);
102  } else if (!t_b.is_stable() && t_a.is_stable()) {
103  masses.second =
104  t_b.sample_resonance_mass(t_a.mass(), kinetic_energy_cm, L_);
105  } else if (!t_a.is_stable() && !t_b.is_stable()) {
106  // two resonances in final state
107  masses = t_a.sample_resonance_masses(t_b, kinetic_energy_cm, L_);
108  }
109 
110  return masses;
111 }
int L_
Angular momentum of the decay.
Definition: decayaction.h:106
ParticleList outgoing_particles_
Initially this stores only the PDG codes of final-state particles.
Definition: action.h:311
ParticleList incoming_particles_
List with data of incoming particles.
Definition: action.h:303

Here is the call graph for this function:

double smash::DecayAction::get_total_weight ( ) const
inlineoverridevirtual

Return the total width of the decay process.

Implements smash::Action.

Reimplemented in smash::DecayActionDilepton.

Definition at line 66 of file decayaction.h.

66 { return total_width_; }
double total_width_
total decay width
Definition: decayaction.h:100
double smash::DecayAction::get_partial_weight ( ) const
inlineoverridevirtual

Get partial width of chosen channel.

Returns
Partial width of chosen channel

Implements smash::Action.

Definition at line 72 of file decayaction.h.

72 { return partial_width_; }
double partial_width_
partial decay width to the chosen outgoing channel
Definition: decayaction.h:103
double smash::DecayAction::total_width ( ) const
inline

Get total decay width.

Returns
Total width of decay

Definition at line 78 of file decayaction.h.

78 { return total_width_; }
double total_width_
total decay width
Definition: decayaction.h:100

Member Data Documentation

DecayBranchList smash::DecayAction::decay_channels_
protected

List of possible decays.

Definition at line 97 of file decayaction.h.

double smash::DecayAction::total_width_
protected

total decay width

Definition at line 100 of file decayaction.h.

double smash::DecayAction::partial_width_
protected

partial decay width to the chosen outgoing channel

Definition at line 103 of file decayaction.h.

int smash::DecayAction::L_ = 0
protected

Angular momentum of the decay.

Definition at line 106 of file decayaction.h.


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