 |
Version: SMASH-2.0
|
|
#include <action.h>
Action is the base class for a generic process that takes a number of incoming particles and transforms them into any number of outgoing particles. Currently such an action can be either a decay, a two-body collision, a wallcrossing or a thermalization. (see derived classes).
Definition at line 35 of file action.h.
|
| 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 double | get_total_weight () const =0 |
| Return the total weight value, which is mainly used for the weight output entry. More...
|
|
virtual double | get_partial_weight () const =0 |
| Return the specific weight for the chosen outgoing channel, which is mainly used for the partial weight output entry. 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 | generate_final_state ()=0 |
| Generate the final state for this action. 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, FourVector > | get_potential_at_interaction_point () const |
| Get the skyrme and asymmetry potential at the interaction point. More...
|
|
void | set_stochastic_pos_idx () |
| Setter function that stores a random incoming particle index latter used to determine the interaction point. More...
|
|
|
static double | lambda_tilde (double a, double b, double c) |
| Little helper function that calculates the lambda function (sometimes written with a tilde to better distinguish it) that appears e.g. More...
|
|
|
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 std::pair< double, double > | sample_masses (double kinetic_energy_cm) const |
| Sample final-state masses in general X->2 processes (thus also fixing the absolute c.o.m. 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...
|
|
void | assign_formation_time_to_outgoing_particles () |
| Assign the formation time to the outgoing particles. More...
|
|
virtual void | format_debug_output (std::ostream &out) const =0 |
|
◆ Action() [1/4]
smash::Action::Action |
( |
const ParticleList & |
in_part, |
|
|
double |
time |
|
) |
| |
|
inline |
Construct an action object with incoming particles and relative time.
- Parameters
-
[in] | in_part | list of incoming particles |
[in] | time | time at which the action is supposed to take place (relative to the current time of the incoming particles) |
Definition at line 44 of file action.h.
◆ Action() [2/4]
Construct an action object with the incoming particles, relative time, and the already known outgoing particles and type of the process.
- Parameters
-
[in] | in_part | list of incoming particles |
[in] | out_part | list of outgoing particles |
[in] | time | time at which the action is supposed to take place (relative to the current time of the incoming particles) |
[in] | type | type of the interaction |
Definition at line 58 of file action.h.
◆ Action() [3/4]
smash::Action::Action |
( |
const ParticleList & |
in_part, |
|
|
const ParticleList & |
out_part, |
|
|
double |
absolute_execution_time, |
|
|
ProcessType |
type |
|
) |
| |
|
inline |
Construct an action object with the incoming particles, absolute time, and the already known outgoing particles and type of the process.
- Parameters
-
[in] | in_part | list of incoming particles |
[in] | out_part | list of outgoing particles |
[in] | absolute_execution_time | absolute time at which the action is supposed to take place |
[in] | type | type of the interaction |
Definition at line 75 of file action.h.
◆ Action() [4/4]
smash::Action::Action |
( |
const Action & |
| ) |
|
|
delete |
Copying is disabled. Use pointers or create a new Action.
◆ ~Action()
smash::Action::~Action |
( |
| ) |
|
|
virtualdefault |
Virtual Destructor.
Destructor.
The declaration of the destructor is necessary to make it virtual.
◆ operator<()
bool smash::Action::operator< |
( |
const Action & |
rhs | ) |
const |
|
inline |
Determine whether one action takes place before another in time.
- Returns
- if the first argument action takes place before the other
Definition at line 96 of file action.h.
◆ get_total_weight()
virtual double smash::Action::get_total_weight |
( |
| ) |
const |
|
pure virtual |
Return the total weight value, which is mainly used for the weight output entry.
It has different meanings depending of the type of action. It is the total cross section in case of a ScatterAction, the total decay width in case of a DecayAction and the shining weight in case of a DecayActionDilepton.
Prefer to use a more specific function. If there is no weight for the action type, 0 should be returned.
- Returns
- total cross section, decay width or shining weight
Implemented in smash::ScatterAction, smash::BremsstrahlungAction, smash::DecayAction, smash::ScatterActionPhoton, smash::ScatterActionMulti, smash::DecayActionDilepton, smash::HypersurfacecrossingAction, smash::WallcrossingAction, and smash::ThermalizationAction.
◆ get_partial_weight()
virtual double smash::Action::get_partial_weight |
( |
| ) |
const |
|
pure virtual |
◆ get_type()
Get the process type.
- Returns
- type of the process
Definition at line 131 of file action.h.
◆ add_process()
template<typename Branch >
void smash::Action::add_process |
( |
ProcessBranchPtr< Branch > & |
p, |
|
|
ProcessBranchList< Branch > & |
subprocesses, |
|
|
double & |
total_weight |
|
) |
| |
|
inline |
Add a new subprocess.
- Parameters
-
[in] | p | process to be added |
[out] | subprocesses | processes, where p is added to |
[out] | total_weight | summed weights of all the subprocesses |
Definition at line 141 of file action.h.
144 if (
p->weight() > 0) {
145 total_weight +=
p->weight();
146 subprocesses.emplace_back(std::move(
p));
◆ add_processes()
template<typename Branch >
void smash::Action::add_processes |
( |
ProcessBranchList< Branch > |
pv, |
|
|
ProcessBranchList< Branch > & |
subprocesses, |
|
|
double & |
total_weight |
|
) |
| |
|
inline |
Add several new subprocesses at once.
- Parameters
-
[in] | pv | processes list to be added |
[out] | subprocesses | processes, where pv are added to |
[out] | total_weight | summed weights of all the subprocesses |
Definition at line 158 of file action.h.
161 subprocesses.reserve(subprocesses.size() + pv.size());
162 for (
auto &proc : pv) {
163 if (proc->weight() > 0) {
164 total_weight += proc->weight();
165 subprocesses.emplace_back(std::move(proc));
◆ generate_final_state()
virtual void smash::Action::generate_final_state |
( |
| ) |
|
|
pure virtual |
◆ perform()
void smash::Action::perform |
( |
Particles * |
particles, |
|
|
uint32_t |
id_process |
|
) |
| |
|
virtual |
Actually perform the action, e.g.
carry out a decay or scattering by updating the particle list.
This function removes the initial-state particles from the particle list and then inserts the final-state particles. It does not do any sanity checks, but assumes that is_valid has been called to determine if the action is still valid.
- Parameters
-
[in] | id_process | unique id of the performed process |
[out] | particles | particle list that is updated |
Note that you are required to increase id_process before the next call, such that you get unique numbers.
Definition at line 124 of file action.cc.
125 assert(id_process != 0);
130 p.set_history(
p.get_history().collisions_per_particle + 1, id_process,
142 logg[
LAction].debug(
"Particle map now has ", particles->size(),
" elements.");
◆ is_valid()
bool smash::Action::is_valid |
( |
const Particles & |
particles | ) |
const |
Check whether the action still applies.
It can happen that a different action removed the incoming_particles from the set of existing particles in the experiment, or that the particle has scattered elastically in the meantime. In this case the Action doesn't apply anymore and should be discarded.
- Parameters
-
[in] | particles | current particle list |
- Returns
- true, if action still applies; false otherwise
Definition at line 28 of file action.cc.
31 [&particles](
const ParticleData &
p) {
return particles.is_valid(
p); });
◆ is_pauli_blocked()
Check if the action is Pauli-blocked.
If there are baryons in the final state then blocking probability is \( 1 - \Pi (1-f_i) \), where the product is taken by all fermions in the final state and \( f_i \) denotes the phase-space density at the position of i-th final-state fermion.
- Parameters
-
[in] | particles | current particle list |
[in] | p_bl | PauliBlocker that stores the configurations concerning Pauli-blocking. |
- Returns
- true, if the action is Pauli-blocked, false otherwise
Definition at line 34 of file action.cc.
45 p_bl.phasespace_dens(
p.position().threevec(),
p.momentum().threevec(),
49 " is pauli-blocked with f = ", f);
◆ incoming_particles()
const ParticleList & smash::Action::incoming_particles |
( |
| ) |
const |
Get the list of particles that go into the action.
- Returns
- a list of incoming particles
Definition at line 57 of file action.cc.
◆ update_incoming()
void smash::Action::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.
- Parameters
-
[in] | particles | current particle list |
Definition at line 61 of file action.cc.
63 p = particles.lookup(
p);
◆ outgoing_particles()
const ParticleList& smash::Action::outgoing_particles |
( |
| ) |
const |
|
inline |
Get the list of particles that resulted from the action.
- Returns
- list of outgoing particles
Definition at line 245 of file action.h.
◆ time_of_execution()
double smash::Action::time_of_execution |
( |
| ) |
const |
|
inline |
Get the time at which the action is supposed to be performed.
- Returns
- absolute time in the calculation frame in fm/c
Definition at line 252 of file action.h.
◆ check_conservation()
void smash::Action::check_conservation |
( |
const uint32_t |
id_process | ) |
const |
|
virtual |
Check various conservation laws.
- Parameters
-
[in] | id_process | process id only used for debugging output |
Reimplemented in smash::HypersurfacecrossingAction.
Definition at line 345 of file action.cc.
348 if (before != after) {
349 std::stringstream particle_names;
351 particle_names <<
p.type().name();
353 particle_names <<
" vs. ";
355 particle_names <<
p.type().name();
357 particle_names <<
"\n";
358 std::string err_msg = before.report_deviations(after);
359 logg[
LAction].error() << particle_names.str() << err_msg;
367 throw std::runtime_error(
"Conservation laws violated in photon process");
369 throw std::runtime_error(
"Conservation laws violated in process " +
370 std::to_string(id_process));
◆ sqrt_s()
double smash::Action::sqrt_s |
( |
| ) |
const |
|
inline |
Determine the total energy in the center-of-mass frame [GeV].
- Returns
- \( \sqrt{s}\) of incoming particles
Definition at line 266 of file action.h.
◆ total_momentum_of_outgoing_particles()
FourVector smash::Action::total_momentum_of_outgoing_particles |
( |
| ) |
const |
Calculate the total kinetic momentum of the outgoing particles.
Use this to determine the momemtum and boost of the outgoing particles by calcluating the total momentum of the incoming particles and correcting it for the effect of potentials. This function is used when the species of the outgoing particles are already determined.
- Returns
- total kinetic momentum of the outgoing particles [GeV]
Definition at line 152 of file action.cc.
156 double scale_B = 0.0;
159 double scale_I3 = 0.0;
164 : std::make_pair(0.0, 0));
165 scale_B += scale.first;
166 scale_I3 += scale.second * p_in.type().isospin3_rel();
172 : std::make_pair(0.0, 0));
173 scale_B -= scale.first;
180 potentials.second * scale_I3;
◆ get_interaction_point()
FourVector smash::Action::get_interaction_point |
( |
| ) |
const |
Get the interaction point.
- Returns
- four vector of interaction point
Definition at line 67 of file action.cc.
69 FourVector interaction_point = FourVector(0., 0., 0., 0.);
71 interaction_point += part.position();
88 for (
int i = 1; i < 4; i++) {
89 const double d = std::abs(r[i]);
105 return interaction_point;
◆ get_potential_at_interaction_point()
Get the skyrme and asymmetry potential at the interaction point.
- Returns
- skyrme and asymmetry potential [GeV]
Definition at line 108 of file action.cc.
111 FourVector UB = FourVector();
112 FourVector UI3 = FourVector();
121 return std::make_pair(UB, UI3);
◆ set_stochastic_pos_idx()
void smash::Action::set_stochastic_pos_idx |
( |
| ) |
|
|
inline |
Setter function that stores a random incoming particle index latter used to determine the interaction point.
Definition at line 298 of file action.h.
◆ lambda_tilde()
static double smash::Action::lambda_tilde |
( |
double |
a, |
|
|
double |
b, |
|
|
double |
c |
|
) |
| |
|
inlinestatic |
Little helper function that calculates the lambda function (sometimes written with a tilde to better distinguish it) that appears e.g.
in the relative velocity or 3-to-2 probability calculation, where it is used with a=s, b=m1^2 and c=m2^2. Defintion found e.g. in Seifert:2017oyb [44], eq. (5).
Definition at line 310 of file action.h.
311 return (a - b - c) * (a - b - c) - 4. * b * c;
◆ total_momentum()
FourVector smash::Action::total_momentum |
( |
| ) |
const |
|
inlineprotected |
Sum of 4-momenta of incoming particles.
Definition at line 360 of file action.h.
361 FourVector mom(0.0, 0.0, 0.0, 0.0);
◆ choose_channel()
template<typename Branch >
const Branch* smash::Action::choose_channel |
( |
const ProcessBranchList< Branch > & |
subprocesses, |
|
|
double |
total_weight |
|
) |
| |
|
inlineprotected |
Decide for a particular final-state channel via Monte-Carlo and return it as a ProcessBranch.
- Template Parameters
-
Branch | Type of processbranch |
- Parameters
-
[in] | subprocesses | list of possible processes |
[in] | total_weight | summed weight of all processes |
- Returns
- ProcessBranch that is sampled
Definition at line 378 of file action.h.
381 double weight_sum = 0.;
384 for (
const auto &proc : subprocesses) {
385 weight_sum += proc->weight();
386 if (random_weight <= weight_sum) {
393 "Problem in choose_channel: ", subprocesses.size(),
" ",
394 weight_sum,
" ", total_weight,
" ",
396 random_weight,
"\n");
◆ sample_masses()
std::pair< double, double > smash::Action::sample_masses |
( |
double |
kinetic_energy_cm | ) |
const |
|
protectedvirtual |
Sample final-state masses in general X->2 processes (thus also fixing the absolute c.o.m.
momentum).
- Parameters
-
[in] | kinetic_energy_cm | total kinetic energy of the outgoing particles in their center of mass frame [GeV] |
- Exceptions
-
- Returns
- masses of final state particles
Reimplemented in smash::DecayAction.
Definition at line 245 of file action.cc.
250 std::pair<double, double> masses = {t_a.mass(), t_b.mass()};
252 if (kinetic_energy_cm < t_a.min_mass_kinematic() + t_b.min_mass_kinematic()) {
255 t_a.name() + t_b.name();
256 throw InvalidResonanceFormation(
257 reaction +
": not enough energy, " + std::to_string(kinetic_energy_cm) +
258 " < " + std::to_string(t_a.min_mass_kinematic()) +
" + " +
259 std::to_string(t_b.min_mass_kinematic()));
263 if (!t_a.is_stable() && t_b.is_stable()) {
264 masses.first = t_a.sample_resonance_mass(t_b.mass(), kinetic_energy_cm);
265 }
else if (!t_b.is_stable() && t_a.is_stable()) {
266 masses.second = t_b.sample_resonance_mass(t_a.mass(), kinetic_energy_cm);
267 }
else if (!t_a.is_stable() && !t_b.is_stable()) {
269 masses = t_a.sample_resonance_masses(t_b, kinetic_energy_cm);
◆ sample_angles()
void smash::Action::sample_angles |
( |
std::pair< double, double > |
masses, |
|
|
double |
kinetic_energy_cm |
|
) |
| |
|
protectedvirtual |
Sample final-state momenta in general X->2 processes (here: using an isotropical angular distribution).
- Parameters
-
[in] | kinetic_energy_cm | total kinetic energy of the outgoing particles in their center of mass frame [GeV] |
[in] | masses | masses of each of the final state particles |
Reimplemented in smash::ScatterAction.
Definition at line 274 of file action.cc.
279 const double pcm =
pCM(kinetic_energy_cm, masses.first, masses.second);
281 logg[
LAction].warn(
"Particle: ", p_a->pdgcode(),
" radial momentum: ", pcm);
282 logg[
LAction].warn(
"Ektot: ", kinetic_energy_cm,
" m_a: ", masses.first,
283 " m_b: ", masses.second);
287 phitheta.distribute_isotropically();
289 p_a->set_4momentum(masses.first, phitheta.threevec() * pcm);
290 p_b->set_4momentum(masses.second, -phitheta.threevec() * pcm);
294 logg[
LAction].debug(
"p_a: ", *p_a,
"\np_b: ", *p_b);
◆ sample_2body_phasespace()
void smash::Action::sample_2body_phasespace |
( |
| ) |
|
|
protected |
Sample the full 2-body phase-space (masses, momenta, angles) in the center-of-mass frame for the final state particles.
Definition at line 297 of file action.cc.
301 const double cm_kin_energy = p_tot.abs();
303 const std::pair<double, double> masses =
sample_masses(cm_kin_energy);
◆ sample_3body_phasespace()
void smash::Action::sample_3body_phasespace |
( |
| ) |
|
|
protectedvirtual |
Sample the full 3-body phase-space (masses, momenta, angles) in the center-of-mass frame for the final state particles.
- Exceptions
-
std::invalid_argument | if one outgoing particle is a resonance |
Reimplemented in smash::BremsstrahlungAction, and smash::DecayActionDilepton.
Definition at line 308 of file action.cc.
313 throw std::invalid_argument(
314 "sample_3body_phasespace: Found resonance in to be sampled outgoing "
315 "particles, but assumes stable particles.");
321 const double sqrts =
sqrt_s();
324 double mab, r, probability, pcm_ab, pcm;
328 pcm =
pCM(sqrts, mab, m_c);
329 pcm_ab =
pCM(mab, m_a, m_b);
330 probability = pcm * pcm_ab * 4 / (sqrts * sqrts);
331 }
while (r > probability);
333 phitheta.distribute_isotropically();
335 const ThreeVector beta_cm =
336 pcm * phitheta.threevec() / std::sqrt(pcm * pcm + mab * mab);
338 phitheta.distribute_isotropically();
◆ assign_formation_time_to_outgoing_particles()
void smash::Action::assign_formation_time_to_outgoing_particles |
( |
| ) |
|
|
protected |
Assign the formation time to the outgoing particles.
The formation time is set to the largest formation time of the incoming particles, if it is larger than the execution time. The newly produced particles are supposed to continue forming exactly like the latest forming ingoing particle. Therefore the details on the formation are adopted. The initial cross section scaling factor of the incoming particles is considered to also be the scaling factor of the newly produced outgoing particles. If the formation time is smaller than the exectution time, the execution time is taken to be the formation time.
Note: Make sure to assign the formation times before boosting the outgoing particles to the computational frame.
Definition at line 183 of file action.cc.
187 ParticleList::iterator last_formed_in_part;
188 bool all_incoming_same_formation_time =
190 [&](
const ParticleData &data_comp) {
194 if (all_incoming_same_formation_time) {
195 last_formed_in_part =
197 [](
const ParticleData &a,
const ParticleData &b) {
198 return a.initial_xsec_scaling_factor() <
199 b.initial_xsec_scaling_factor();
202 last_formed_in_part =
204 [](
const ParticleData &a,
const ParticleData &b) {
205 return a.formation_time() < b.formation_time();
209 const double form_time_begin = last_formed_in_part->begin_formation_time();
210 const double sc = last_formed_in_part->initial_xsec_scaling_factor();
214 if (new_particle.initial_xsec_scaling_factor() < 1.0) {
219 double sc_out = new_particle.initial_xsec_scaling_factor();
220 new_particle.set_cross_section_scaling_factor(sc * sc_out);
221 if (last_formed_in_part->formation_time() >
222 new_particle.formation_time()) {
226 new_particle.set_slow_formation_times(
231 new_particle.set_slow_formation_times(
232 form_time_begin, last_formed_in_part->formation_time());
233 new_particle.set_cross_section_scaling_factor(sc);
238 if (new_particle.initial_xsec_scaling_factor() == 1.0) {
◆ type_of_pout() [1/2]
Get the type of a given particle.
- Parameters
-
[in] | p_out | particle of which the type will be returned |
- Returns
- type of given particle
Definition at line 480 of file action.h.
◆ type_of_pout() [2/2]
Get the particle type for given pointer to a particle type.
Helper function for total_momentum_of_outgoing_particles
- Parameters
-
[in] | p_out | pointer to a particle type |
- Returns
- particle type
Definition at line 491 of file action.h.
◆ incoming_particles_
ParticleList smash::Action::incoming_particles_ |
|
protected |
List with data of incoming particles.
Definition at line 326 of file action.h.
◆ outgoing_particles_
ParticleList smash::Action::outgoing_particles_ |
|
protected |
Initially this stores only the PDG codes of final-state particles.
After perform was called it contains the complete particle data of the outgoing particles.
Definition at line 334 of file action.h.
◆ time_of_execution_
const double smash::Action::time_of_execution_ |
|
protected |
Time at which the action is supposed to be performed (absolute time in the lab frame in fm/c).
Definition at line 340 of file action.h.
◆ process_type_
type of process
Definition at line 343 of file action.h.
◆ box_length_
double smash::Action::box_length_ = -1.0 |
|
protected |
Box length: needed to determine coordinates of collision correctly in case of collision through the wall.
Ignored if negative.
Definition at line 350 of file action.h.
◆ stochastic_position_idx_
int smash::Action::stochastic_position_idx_ = -1 |
|
protected |
This stores a randomly-chosen index to an incoming particle.
If non-negative, the the interaction point equals the postion of the chosen particle (index). This is done for the stochastic criterion.
Definition at line 357 of file action.h.
The documentation for this class was generated from the following files:
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...
ParticleList incoming_particles_
List with data of incoming particles.
hard string process involving 2->2 QCD process by PYTHIA.
FourVector total_momentum() const
Sum of 4-momenta of incoming particles.
const double time_of_execution_
Time at which the action is supposed to be performed (absolute time in the lab frame in fm/c).
static constexpr int LPauliBlocking
static std::pair< double, int > force_scale(const ParticleType &data)
Evaluates the scaling factor of the forces acting on the particles.
virtual void check_conservation(const uint32_t id_process) const
Check various conservation laws.
bool is_string_soft_process(ProcessType p)
Check if a given process type is a soft string excitation.
T uniform_int(T min, T max)
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
bool all_of(Container &&c, UnaryPredicate &&p)
Convenience wrapper for std::all_of that operates on a complete container.
T pCM(const T sqrts, const T mass_a, const T mass_b) noexcept
constexpr double really_small
Numerical error tolerance.
RectangularLattice< FourVector > * UI3_lat_pointer
Pointer to the symmmetry potential on the lattice.
#define source_location
Hackery that is required to output the location in the source code where the log statement occurs.
double box_length_
Box length: needed to determine coordinates of collision correctly in case of collision through the w...
RectangularLattice< FourVector > * UB_lat_pointer
Pointer to the skyrme potential on the lattice.
const ParticleType & type_of_pout(const ParticleData &p_out) const
Get the type of a given particle.
double isospin3_rel() const
ProcessType process_type_
type of process
static constexpr int LAction
std::pair< FourVector, FourVector > get_potential_at_interaction_point() const
Get the skyrme and asymmetry potential at the interaction point.
int stochastic_position_idx_
This stores a randomly-chosen index to an incoming particle.
FourVector total_momentum_of_outgoing_particles() const
Calculate the total kinetic momentum of the outgoing particles.
ParticleList outgoing_particles_
Initially this stores only the PDG codes of final-state particles.
double abs() const
calculate the lorentz invariant absolute value
double sqrt_s() const
Determine the total energy in the center-of-mass frame [GeV].
elastic scattering: particles remain the same, only momenta change
FourVector get_interaction_point() const
Get the interaction point.
constexpr std::uint32_t ID_PROCESS_PHOTON
Process ID for any photon process.
Potentials * pot_pointer
Pointer to a Potential class.
virtual std::pair< double, double > sample_masses(double kinetic_energy_cm) const
Sample final-state masses in general X->2 processes (thus also fixing the absolute c....
ThreeVector threevec() const