Version: SMASH-3.3
scatteractionmulti.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2020-2022,2025
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:
32  ScatterActionMulti(const ParticleList& in_plist, double time,
33  const SpinInteractionType spin_interaction_type =
35 
42  void generate_final_state() override;
43 
50  double get_total_weight() const override;
51 
58  double get_partial_weight() const override;
59 
67  void add_possible_reactions(double dt, const double gcell_vol,
68  const MultiParticleReactionsBitSet incl_multi);
69 
75  const CollisionBranchList& reaction_channels() { return reaction_channels_; }
76 
83  class InvalidScatterActionMulti : public std::invalid_argument {
84  using std::invalid_argument::invalid_argument;
85  };
86 
101  double calculate_I3(const double sqrts) const;
102 
123  double parametrizaton_phi4(const double man_s) const;
124 
125  protected:
126  /*
127  * \ingroup logging
128  * Writes information about this action to the \p out stream.
129  */
130  void format_debug_output(std::ostream& out) const override;
131 
132  private:
138  void add_reaction(CollisionBranchPtr p);
139 
145  void add_reactions(CollisionBranchList pv);
146 
151  void annihilation();
152 
154  void n_to_two();
155 
181  double probability_three_to_one(const ParticleType& type_out, double dt,
182  const double gcell_vol,
183  const int degen_sym_factor = 1) const;
184 
207  double probability_three_to_two(const ParticleType& type_out1,
208  const ParticleType& type_out2, double dt,
209  const double gcell_vol,
210  const double degen_sym_factor = 1.0) const;
231  double probability_four_to_two(const ParticleType& type_out1,
232  const ParticleType& type_out2, double dt,
233  const double gcell_vol,
234  const double degen_sym_factor = 1.0) const;
256  double probability_five_to_two(const double m_out, double dt,
257  const double gcell_vol,
258  const double degen_sym_factor = 1.0) const;
259 
271  double parametrizaton_phi5_pions(const double man_s) const;
272 
286  double react_degen_factor(const int spin_factor_inc,
287  const int spin_degen_out1,
288  const int spin_degen_out2) const {
289  return static_cast<double>(spin_degen_out1 * spin_degen_out2) /
290  static_cast<double>(spin_factor_inc);
291  }
292 
302  bool three_different_pions(const ParticleData& data_a,
303  const ParticleData& data_b,
304  const ParticleData& data_c) const;
305 
315  bool two_pions_eta(const ParticleData& data_a, const ParticleData& data_b,
316  const ParticleData& data_c) const;
317 
323 
326 
329 
332 
334  CollisionBranchList reaction_channels_;
335 };
336 
337 } // namespace smash
338 
339 #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:59
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.
ScatterActionMulti(const ParticleList &in_plist, double time, const SpinInteractionType spin_interaction_type=SpinInteractionType::Off)
Construct a ScatterActionMulti object.
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...
SpinInteractionType spin_interaction_type_
Spin interaction type.
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.
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.
SpinInteractionType
Possible spin interaction types.
@ Off
No spin interactions.
constexpr int p
Proton.
Definition: action.h:24