22 :
Action(in_plist, time), total_probability_(0.) {}
34 double xsec_scaling = 1.0;
36 xsec_scaling *= in_part.xsec_scaling_factor();
42 double xsec_scaling = 1.0;
44 xsec_scaling *= in_part.xsec_scaling_factor();
50 double dt,
const double gcell_vol,
81 int sym_factor_in = 1;
92 *type_eta_prime, dt, gcell_vol,
112 if (type_deuteron && type_anti_deuteron) {
121 ParticleList::iterator it = std::find_if(
126 const double spin_degn =
131 type_pi, *type_deuteron,
145 ParticleList::iterator it = std::find_if(
150 const double spin_degn =
155 type_pi, *type_anti_deuteron,
157 gcell_vol, spin_degn),
168 int symmetry_factor = 1;
170 ParticleList::iterator it =
173 return x.pdgcode().antiparticle_sign() == -1;
180 if (pdg_a == pdg_b) {
189 const double spin_degn =
194 type_N, *type_deuteron,
196 symmetry_factor * spin_degn),
207 int symmetry_factor = 1;
209 ParticleList::iterator it =
212 return x.pdgcode().antiparticle_sign() == 1;
219 if (pdg_a == pdg_b) {
228 const double spin_degn =
233 type_N, *type_anti_deuteron,
235 gcell_vol, symmetry_factor * spin_degn),
245 const int spin_factor_inc =
251 const double symmetry_factor = 4.0;
258 const double spin_degn =
262 if (type_p && type_n) {
264 type_p->
mass(), dt, gcell_vol,
265 symmetry_factor * spin_degn);
267 *type_p, *type_anti_p, prob,
270 *type_n, *type_anti_n, prob,
307 "ScatterActionMulti::generate_final_state: Invalid process type " +
308 std::to_string(
static_cast<int>(
process_type_)) +
" was requested.");
316 new_particle.boost_momentum(
319 new_particle.set_4position(middle_point);
328 const double lower_bound = (m1 + m2) * (m1 + m2);
329 const double upper_bound = (sqrts - m3) * (sqrts - m3);
330 const auto result =
integrate(lower_bound, upper_bound, [&](
double m12_sqr) {
331 const double m12 = std::sqrt(m12_sqr);
332 const double e2_star = (m12_sqr - m1 * m1 + m2 * m2) / (2 * m12);
333 const double e3_star = (sqrts * sqrts - m12_sqr - m3 * m3) / (2 * m12);
334 const double m23_sqr_min =
335 (e2_star + e3_star) * (e2_star + e3_star) -
336 std::pow(std::sqrt(e2_star * e2_star - m2 * m2) +
337 std::sqrt(e3_star * e3_star - m3 * m3),
339 const double m23_sqr_max =
340 (e2_star + e3_star) * (e2_star + e3_star) -
341 std::pow(std::sqrt(e2_star * e2_star - m2 * m2) -
342 std::sqrt(e3_star * e3_star - m3 * m3),
344 return m23_sqr_max - m23_sqr_min;
351 const ParticleType& type_out,
double dt,
const double gcell_vol,
352 const int degen_factor)
const {
356 const double sqrts =
sqrt_s();
363 const double ph_sp_3 =
364 1. / (8 * M_PI * M_PI * M_PI) * 1. / (16 * sqrts * sqrts) * I_3;
368 return dt / (gcell_vol * gcell_vol) * M_PI / (4. * e1 * e2 * e3) *
369 gamma_decay / ph_sp_3 * spec_f_val * std::pow(
hbarc, 5.0) *
375 const double gcell_vol,
const double degen_factor)
const {
379 const double m4 = type_out1.
mass();
380 const double m5 = type_out2.
mass();
382 const double sqrts =
sqrt_s();
385 const double lamb =
lambda_tilde(sqrts * sqrts, m4 * m4, m5 * m5);
388 const double ph_sp_3 =
389 1. / (8 * M_PI * M_PI * M_PI) * 1. / (16 * sqrts * sqrts) * I_3;
391 return dt / (gcell_vol * gcell_vol) * 1. / (4. * e1 * e2 * e3) * lamb /
392 (ph_sp_3 * 8 * M_PI * sqrts * sqrts) * xs * std::pow(
hbarc, 5.0) *
397 const double mout,
double dt,
const double gcell_vol,
398 const double degen_factor)
const {
406 const double lamb =
lambda_tilde(man_s, mout * mout, mout * mout);
413 return dt / std::pow(gcell_vol, 4.0) * 1. / (32. * e1 * e2 * e3 * e4 * e5) *
414 xs / (4. * M_PI * man_s) * lamb / ph_sp_5 * std::pow(
hbarc, 11.0) *
421 const double fit_a = 2.1018e-10;
422 const double fit_alpha = 1.982;
423 return fit_a * std::pow(man_s - s_zero, 5.0) *
424 std::pow(1 + man_s / s_zero, -fit_alpha);
431 "Incorrect number of particles in final state: ";
470 (pdg_a != pdg_b && pdg_b != pdg_c && pdg_c != pdg_a);
495 const bool all_inc_pi =
497 [](
const ParticleData& data) { return data.is_pion(); });
498 const int no_of_piz = std::count_if(
500 [](
const ParticleData& data) { return data.pdgcode() == pdg::pi_z; });
502 int total_state_charge = 0;
504 total_state_charge += part.pdgcode().charge();
507 return (all_inc_pi && total_state_charge == 0 && no_of_piz == 1);
513 out <<
" (not performed)";
Action is the base class for a generic process that takes a number of incoming particles and transfor...
void sample_2body_phasespace()
Sample the full 2-body phase-space (masses, momenta, angles) in the center-of-mass frame for the fina...
FourVector total_momentum_of_outgoing_particles() const
Calculate the total kinetic momentum of the outgoing particles.
void assign_formation_time_to_outgoing_particles()
Assign the formation time to the outgoing particles.
ParticleList outgoing_particles_
Initially this stores only the PDG codes of final-state particles.
double sqrt_s() const
Determine the total energy in the center-of-mass frame [GeV].
ParticleList incoming_particles_
List with data of incoming particles.
FourVector get_interaction_point() const
Get the interaction point.
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 ...
ProcessType process_type_
type of process
CollisionBranch is a derivative of ProcessBranch, which is used to represent particular final-state c...
ProcessType get_type() const override
static double two_to_three_xs(const ParticleType &type_in1, const ParticleType &type_in2, double sqrts)
Determine 2->3 cross section for the scattering of the given particle types.
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
A C++ interface for numerical integration in one dimension with the GSL CQUAD integration functions.
ParticleData contains the dynamic information of a certain particle.
PdgCode pdgcode() const
Get the pdgcode of the particle.
A pointer-like interface to global references to ParticleType objects.
Particle type contains the static properties of a particle species.
double spectral_function(double m) const
Full spectral function of the resonance (relativistic Breit-Wigner distribution with mass-dependent ...
double get_partial_width(const double m, const ParticleTypePtrList dlist) const
Get the mass-dependent partial width of a resonance with mass m, decaying into two given daughter par...
static const ParticleTypePtr try_find(PdgCode pdgcode)
Returns the ParticleTypePtr for the given pdgcode.
unsigned int spin_degeneracy() const
PdgCode stores a Particle Data Group Particle Numbering Scheme particle type number.
static PdgCode from_decimal(const int pdgcode_decimal)
Construct PDG code from decimal number.
unsigned int spin_degeneracy() const
ParticleList particle_list() const
Thrown when ScatterActionMulti is called to perform with unknown combination of incoming and outgoing...
double total_probability_
Total probability of reaction.
bool two_pions_eta(const ParticleData &data_a, const ParticleData &data_b, const ParticleData &data_c) const
Check wether the three incoming particles are π⁺,π⁻,η or π⁰,π⁰,η in any order.
bool all_incoming_particles_are_pions_have_zero_charge_only_one_piz() const
Check if 5 incoming particles match intial pion state for 5-to-2, which is pi+ pi- pi+ pi- pi0 in ord...
void generate_final_state() override
Generate the final-state of the multi-particle scattering process.
double get_partial_weight() const override
Get the partial probability for the chosen channel (scaled with the cross section scaling factors of ...
double react_degen_factor(const int spin_factor_inc, const int spin_degen_out1, const int spin_degen_out2) const
Determine the spin degeneracy factor ( ) for the 3->2 reaction.
void format_debug_output(std::ostream &out) const override
Writes information about this action to the out stream.
void add_reactions(CollisionBranchList pv)
Add several new reaction channels at once.
void add_possible_reactions(double dt, const double gcell_vol, const MultiParticleReactionsBitSet incl_multi)
Add all possible multi-particle reactions for the given incoming particles.
double probability_three_to_one(const ParticleType &type_out, double dt, const double gcell_vol, const int degen_factor=1) const
Calculate the probability for a 3m-to-1 reaction according to the stochastic collision criterion as g...
CollisionBranchList reaction_channels_
List of possible collisions.
double calculate_I3(const double sqrts) const
Calculate the integration necessary for the three-body phase space.
void three_to_two()
Perform a 3->2 process.
void five_to_two()
Perform a 5->2 process.
double parametrizaton_phi5_pions(const double man_s) const
Calculate the parametrized 5-pion phase space.
double get_total_weight() const override
Get the total probability for the reaction (scaled with the cross section scaling factors of the inco...
bool three_different_pions(const ParticleData &data_a, const ParticleData &data_b, const ParticleData &data_c) const
Check wether the three incoming particles are π⁺,π⁻,π⁰ in any order.
double probability_three_to_two(const ParticleType &type_out1, const ParticleType &type_out2, double dt, const double gcell_vol, const double degen_factor=1.0) const
Calculate the probability for a 3-to-2 reaction according to the stochastic collision criterion as gi...
double probability_five_to_two(const double m_out, double dt, const double gcell_vol, const double degen_factor=1.0) const
Calculate the probability for a 5-to-2 reaction according to the stochastic collision criterion as gi...
ScatterActionMulti(const ParticleList &in_plist, double time)
Construct a ScatterActionMulti object.
void add_reaction(CollisionBranchPtr p)
Add a new reaction channel.
double partial_probability_
Partial probability of the chosen outgoing channel.
void annihilation()
Perform a n->1 annihilation process.
std::bitset< 3 > MultiParticleReactionsBitSet
Container for the n to m reactions in the code.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
constexpr int decimal_antid
Anti-deuteron in decimal digits.
constexpr int decimal_d
Deuteron in decimal digits.
constexpr double gev2_mb
GeV^-2 <-> mb conversion factor.
double ppbar_total(double mandelstam_s)
ppbar total cross section parametrization Source: Bass:1998ca
static constexpr int LScatterActionMulti
static Integrator integrate
double ppbar_elastic(double mandelstam_s)
ppbar elastic cross section parametrization Source: Bass:1998ca
@ MultiParticleThreeToTwo
@ MultiParticleThreeMesonsToOne
multi particle scattering
bool all_of(Container &&c, UnaryPredicate &&p)
Convenience wrapper for std::all_of that operates on a complete container.
constexpr double pion_mass
Pion mass in GeV.
constexpr double hbarc
GeV <-> fm conversion factor.