Version: SMASH-2.2
scatteractionmulti.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2015-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 
122  double parametrizaton_phi4(const double man_s) const;
123 
124  protected:
125  /*
126  * \ingroup logging
127  * Writes information about this action to the \p out stream.
128  */
129  void format_debug_output(std::ostream& out) const override;
130 
131  private:
137  void add_reaction(CollisionBranchPtr p);
138 
144  void add_reactions(CollisionBranchList pv);
145 
150  void annihilation();
151 
153  void n_to_two();
154 
180  double probability_three_to_one(const ParticleType& type_out, double dt,
181  const double gcell_vol,
182  const int degen_sym_factor = 1) const;
183 
206  double probability_three_to_two(const ParticleType& type_out1,
207  const ParticleType& type_out2, double dt,
208  const double gcell_vol,
209  const double degen_sym_factor = 1.0) const;
229  double probability_four_to_two(const ParticleType& type_out1,
230  const ParticleType& type_out2, double dt,
231  const double gcell_vol,
232  const double degen_sym_factor = 1.0) const;
254  double probability_five_to_two(const double m_out, double dt,
255  const double gcell_vol,
256  const double degen_sym_factor = 1.0) const;
257 
269  double parametrizaton_phi5_pions(const double man_s) const;
270 
284  double react_degen_factor(const int spin_factor_inc,
285  const int spin_degen_out1,
286  const int spin_degen_out2) const {
287  return static_cast<double>(spin_degen_out1 * spin_degen_out2) /
288  static_cast<double>(spin_factor_inc);
289  }
290 
300  bool three_different_pions(const ParticleData& data_a,
301  const ParticleData& data_b,
302  const ParticleData& data_c) const;
303 
313  bool two_pions_eta(const ParticleData& data_a, const ParticleData& data_b,
314  const ParticleData& data_c) const;
315 
321 
324 
327 
329  CollisionBranchList reaction_channels_;
330 };
331 
332 } // namespace smash
333 
334 #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:97
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