Version: SMASH-3.1
scatteractionmulti.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2020-2022
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_SMASH_SCATTERACTIONMULTI_H_
11 #define SRC_INCLUDE_SMASH_SCATTERACTIONMULTI_H_
12 
13 #include "action.h"
14 
15 namespace smash {
16 
23 class ScatterActionMulti : public Action {
24  public:
31  ScatterActionMulti(const ParticleList& in_plist, double time);
32 
39  void generate_final_state() override;
40 
47  double get_total_weight() const override;
48 
55  double get_partial_weight() const override;
56 
64  void add_possible_reactions(double dt, const double gcell_vol,
65  const MultiParticleReactionsBitSet incl_multi);
66 
72  const CollisionBranchList& reaction_channels() { return reaction_channels_; }
73 
80  class InvalidScatterActionMulti : public std::invalid_argument {
81  using std::invalid_argument::invalid_argument;
82  };
83 
98  double calculate_I3(const double sqrts) const;
99 
120  double parametrizaton_phi4(const double man_s) const;
121 
122  protected:
123  /*
124  * \ingroup logging
125  * Writes information about this action to the \p out stream.
126  */
127  void format_debug_output(std::ostream& out) const override;
128 
129  private:
135  void add_reaction(CollisionBranchPtr p);
136 
142  void add_reactions(CollisionBranchList pv);
143 
148  void annihilation();
149 
151  void n_to_two();
152 
178  double probability_three_to_one(const ParticleType& type_out, double dt,
179  const double gcell_vol,
180  const int degen_sym_factor = 1) const;
181 
204  double probability_three_to_two(const ParticleType& type_out1,
205  const ParticleType& type_out2, double dt,
206  const double gcell_vol,
207  const double degen_sym_factor = 1.0) const;
228  double probability_four_to_two(const ParticleType& type_out1,
229  const ParticleType& type_out2, double dt,
230  const double gcell_vol,
231  const double degen_sym_factor = 1.0) const;
253  double probability_five_to_two(const double m_out, double dt,
254  const double gcell_vol,
255  const double degen_sym_factor = 1.0) const;
256 
268  double parametrizaton_phi5_pions(const double man_s) const;
269 
283  double react_degen_factor(const int spin_factor_inc,
284  const int spin_degen_out1,
285  const int spin_degen_out2) const {
286  return static_cast<double>(spin_degen_out1 * spin_degen_out2) /
287  static_cast<double>(spin_factor_inc);
288  }
289 
299  bool three_different_pions(const ParticleData& data_a,
300  const ParticleData& data_b,
301  const ParticleData& data_c) const;
302 
312  bool two_pions_eta(const ParticleData& data_a, const ParticleData& data_b,
313  const ParticleData& data_c) const;
314 
320 
323 
326 
328  CollisionBranchList reaction_channels_;
329 };
330 
331 } // namespace smash
332 
333 #endif // SRC_INCLUDE_SMASH_SCATTERACTIONMULTI_H_
Action is the base class for a generic process that takes a number of incoming particles and transfor...
Definition: action.h:35
ParticleData contains the dynamic information of a certain particle.
Definition: particledata.h:58
Particle type contains the static properties of a particle species.
Definition: particletype.h:98
Thrown when ScatterActionMulti is called to perform with unknown combination of incoming and outgoing...
ScatterActionMulti is a special action which takes any number of incoming particles and performs a sc...
double probability_four_to_two(const ParticleType &type_out1, const ParticleType &type_out2, double dt, const double gcell_vol, const double degen_sym_factor=1.0) const
Calculate the probability for a 4-to-2 reaction according to the stochastic collision criterion as gi...
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.
double probability_three_to_one(const ParticleType &type_out, double dt, const double gcell_vol, const int degen_sym_factor=1) const
Calculate the probability for a 3m-to-1 reaction according to the stochastic collision criterion as g...
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 N->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.
const CollisionBranchList & reaction_channels()
Get list of possible reaction channels.
double probability_five_to_two(const double m_out, double dt, const double gcell_vol, const double degen_sym_factor=1.0) const
Calculate the probability for a 5-to-2 reaction according to the stochastic collision criterion as gi...
CollisionBranchList reaction_channels_
List of possible collisions.
double probability_three_to_two(const ParticleType &type_out1, const ParticleType &type_out2, double dt, const double gcell_vol, const double degen_sym_factor=1.0) const
Calculate the probability for a 3-to-2 reaction according to the stochastic collision criterion as gi...
double calculate_I3(const double sqrts) const
Calculate the integration necessary for the three-body phase space.
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.
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 n_to_two()
Perform a n->2 process.
void annihilation()
Perform a n->1 annihilation process.
double parametrizaton_phi4(const double man_s) const
Calculate the parametrized 4-body relativistic phase space integral.
std::bitset< 4 > MultiParticleReactionsBitSet
Container for the n to m reactions in the code.
constexpr int p
Proton.
Definition: action.h:24