Version: SMASH-3.4
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 
17 /**
18  * \ingroup action
19  * ScatterActionMulti is a special action which takes any number of incoming
20  * particles and performs a scattering with the use of the stochastic criterion,
21  * producing one or more final-state particles.
22  */
23 class ScatterActionMulti : public Action {
24  public:
25  /**
26  * Construct a ScatterActionMulti object.
27  *
28  * \param[in] in_plist List of reaction partners
29  * \param[in] time Time at which the action is supposed to take place
30  * \param[in] spin_interaction_type Type of spin interaction
31  */
32  ScatterActionMulti(const ParticleList& in_plist, double time,
33  const SpinInteractionType spin_interaction_type =
35 
36  /**
37  * Generate the final-state of the multi-particle scattering process.
38  * Assign position and momenta to outgoing particles.
39  *
40  * \throw InvalidScatterActionMulti
41  */
42  void generate_final_state() override;
43 
44  /**
45  * Get the total probability for the reaction (scaled with the cross section
46  * scaling factors of the incoming particles).
47  *
48  * \return total probability.
49  */
50  double get_total_weight() const override;
51 
52  /**
53  * Get the partial probability for the chosen channel (scaled with the cross
54  * section scaling factors of the incoming particles).
55  *
56  * \return partial probability.
57  */
58  double get_partial_weight() const override;
59 
60  /**
61  * Add all possible multi-particle reactions for the given incoming particles.
62  *
63  * \param[in] dt timestep size
64  * \param[in] gcell_vol gcell_vol grid cell volume
65  * \param[in] incl_multi Which multi-particle reactions are enabled?
66  */
67  void add_possible_reactions(double dt, const double gcell_vol,
68  const MultiParticleReactionsBitSet incl_multi);
69 
70  /**
71  * Get list of possible reaction channels.
72  *
73  * \return list of possible reaction channels.
74  */
75  const CollisionBranchList& reaction_channels() { return reaction_channels_; }
76 
77  /**
78  * \ingroup exception
79  * Thrown when ScatterActionMulti is called to perform with unknown
80  * combination of incoming and outgoing number of particles or unknown process
81  * type.
82  */
83  class InvalidScatterActionMulti : public std::invalid_argument {
84  using std::invalid_argument::invalid_argument;
85  };
86 
87  /**
88  * Calculate the integration necessary for the three-body phase space. The
89  * defintion for the integral is given by
90  * \f[I_3 = \int dm^2_{23}dm^2_{12} =
91  * \int^{(M-m_3)^2}_{(m_1+m_2)^2}[m^2_{23, max}- m^2_{23, min}]dm^2_{12}\f]
92  * see PDG book (chapter Kinematics) for defintions of variables. The numbered
93  * masses reference the incoming particles and \f$M\f$ the mass of the
94  * outgoing particles in this case, since we are looking at the backreaction
95  * to the 1-to-3 decay.
96  *
97  * \param[in] sqrts center of mass energy of incoming particles
98  * (= mass of outgoing particle)
99  * \return result of integral
100  */
101  double calculate_I3(const double sqrts) const;
102 
103  /**
104  * Calculate the parametrized 4-body relativistic phase space integral.
105  *
106  * The 4-body phase space is a n = 4 case of general integral over
107  * \f[d\Phi_n = (2\pi)^4 \prod_{i=1}^n \frac{d^3p_i}{2E_i (2\pi)^3}
108  * \times \delta(E_{tot} - \sum E_i) \delta^{(3)}(p_{tot} - \sum p_i)\f].
109  * This is a Lorentz-invariant quantity, so the result of the integration
110  * depends only on \f[ s = E_{tot}^2 - p_{tot}^2\f] and masses of the
111  * particles \f[ m_i^2 = E_i^2 - p_i^2 \f]. The dimension in general case is
112  * \f[\mathrm{GeV}^{2n-4}\f]. The \f[\hbar = c = 1 \f] convention is used
113  * here, so when this integral is used in the acceptance probability for
114  * collision, one has to restore \f[\hbar\f] to obtain correct dimensionless
115  * probability. More on phase space integrals can be found, for example, in
116  * CERN-68-15 report. For developers, I (oliiny) have compiled a document with
117  * properties and parametrizations of many-body phase space integrals here:
118  * github.com/smash-transport/smash-devel/files/7791360/n_body_relativistic_phase_space.pdf
119  *
120  * \param[in] man_s mandelstam s of reaction
121  * \return phase space integral value for 4 bodies [GeV^4]
122  */
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:
133  /**
134  * Add a new reaction channel.
135  *
136  * \param[in] p Channel to be added.
137  */
138  void add_reaction(CollisionBranchPtr p);
139 
140  /**
141  * Add several new reaction channels at once.
142  *
143  * \param[in] pv list of channels to be added.
144  */
145  void add_reactions(CollisionBranchList pv);
146 
147  /**
148  * Perform a n->1 annihilation process.
149  * \throw InvalidScatterActionMulti
150  */
151  void annihilation();
152 
153  /// Perform a n->2 process.
154  void n_to_two();
155 
156  /**
157  * Calculate the probability for a 3m-to-1 reaction according to the
158  * stochastic collision criterion as given in \iref{Staudenmaier:2021lrg}.
159  *
160  * The formula for the probablilty is not taken from a reference, but derived
161  * following the same idea as specified e.g. in the paper above.
162  *
163  * \f[ P_{3\rightarrow 1} = \frac{\Delta t}{(\Delta^3x)^2}
164  * \frac{\pi}{4E_1E_2E_3}\frac{\Gamma_{1\rightarrow3}}{\Phi_3}
165  * \mathcal{A}(\sqrt{s}),\f]
166  *
167  * where \f$\Phi_3\f$ represents the 3-body phase space:
168  * \f[\Phi_3 = \frac{1}{(2\pi)^3)}\frac{1}{16M^2}I_3.\f]
169  *
170  * The defintion for the integral \f$I_3\f$ is given in the documentation of
171  * calculate_I3(). Degeneracy and symmetry factors are neglected in the
172  * formula, since they are treated as input for the function.
173  *
174  * \param[in] type_out type of outgoing particle
175  * \param[in] dt timestep size
176  * \param[in] gcell_vol grid cell volume
177  * \param[in] degen_sym_factor degeneracy factor for reaction
178  * (including symmetry factors)
179  * \return probabilty for 3-to-1 reaction
180  */
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 
185  /**
186  * Calculate the probability for a 3-to-2 reaction according to the
187  * stochastic collision criterion as given in \iref{Staudenmaier:2021lrg}.
188  *
189  * \f[ P_{3 \rightarrow 2} = \frac{1}{4E_1E_2E_3} \frac{\Delta t}{(\Delta^3
190  * x)^2} \frac{\tilde{\lambda}}{\Phi_38\pi s}\sigma_{2 \rightarrow 3},\f]
191  *
192  * where \f$\Phi_3\f$ represents the 3-body phase space:
193  * \f[\Phi_3 = \frac{1}{(2\pi)^3)}\frac{1}{16M^2}I_3.\f]
194  *
195  * The defintion for the integral \f$I_3\f$ is given in the documentation of
196  * calculate_I3(). Degeneracy and symmetry factors are neglected in the
197  * formula, since they are treated as input for the function.
198  *
199  * \param[in] type_out1 type of outgoing particle 1
200  * \param[in] type_out2 type of outgoing particle 2
201  * \param[in] dt timestep size
202  * \param[in] gcell_vol grid cell volume
203  * \param[in] degen_sym_factor degeneracy factor for reaction
204  * (including symmetry factors)
205  * \return probabilty for 3-to-2 reaction
206  */
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;
211  /**
212  * Calculate the probability for a 4-to-2 reaction according to the
213  * stochastic collision criterion as given in \iref{Staudenmaier:2021lrg}.
214  *
215  * \f[ P_{4 \rightarrow 2} = \frac{1}{16E_1E_2E_3E_4}
216  * \frac{\Delta t}{(\Delta^3 x)^3} \frac{\tilde{\lambda}}{\Phi_44\pi s}
217  * \sigma_{2 \rightarrow 4},\f]
218  *
219  * where \f$\Phi_4\f$ represents the 4-body phase space. Degeneracy and
220  * symmetry factors are neglected in the formula, since they are treated as
221  * input for the function.
222  *
223  * \param[in] type_out1 type of outgoing particle 1
224  * \param[in] type_out2 type of outgoing particle 2
225  * \param[in] dt timestep size
226  * \param[in] gcell_vol grid cell volume
227  * \param[in] degen_sym_factor degeneracy factor for reaction
228  * (including symmetry factors)
229  * \return probabilty for 4-to-2 reaction
230  */
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;
235  /**
236  * Calculate the probability for a 5-to-2 reaction according to the
237  * stochastic collision criterion as given in \iref{Garcia-Montero:2021haa}.
238  *
239  * \f[ P_{5 \rightarrow 2} = \frac{1}{32E_1E_2E_3E_4E_5} \frac{\Delta
240  * t}{(\Delta^3 x)^4} \frac{\tilde{\lambda}}{\Phi_54\pi s}\sigma_{2
241  * \rightarrow 5},\f]
242  *
243  * where the defintion is given without the necessary symmetry and spin
244  * degeneracy factors, which are input to the function and \f$\Phi_5\f$
245  * represents the 5-body phase space, which is paramaterized for the relevent
246  * 5 pion state here, see documentation of parametrizaton_phi5_pions().
247  *
248  *
249  * \param[in] m_out mass of outgoing particle types (assumes equal masses)
250  * \param[in] dt timestep size
251  * \param[in] gcell_vol grid cell volume
252  * \param[in] degen_sym_factor degeneracy factor for reaction
253  * (including symmetry factors)
254  * \return probabilty for 5-to-2 reaction
255  */
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 
260  /**
261  * Calculate the parametrized 5-pion phase space. The
262  * defintion for the paramterization is given by
263  * \f[\Phi_5^{param.} = A(s-s_0)^5(1+\frac{s}{s_0})^{-\alpha}\f]
264  * with \f$s_0 = 25 m_{\pi}^2\f$. \f$A\f$ and \f$\alpha\f$ are fitted to
265  * reproduce the phase space distribution.
266  *
267  *
268  * \param[in] man_s mandelstam s of reaction
269  * \return phase space value for 5 pions
270  */
271  double parametrizaton_phi5_pions(const double man_s) const;
272 
273  /**
274  * Determine the spin degeneracy factor (\f$D_{spin}\f$) for the N->2
275  * reaction.
276  *
277  * \f[D_{spin} = \frac{(2J_{out1}+1)(2J_{out2}+1)}
278  * {(2J_{in1}+1)(2J_{in2}+1)(2J_{in3}+1)...(2J_{inN}+1)}\f]
279  *
280  * \param[in] spin_factor_inc product of incoming spin degeneracy
281  * (denominator in above expression)
282  * \param[in] spin_degen_out1 degeneracy factor of outgoing particle 1
283  * \param[in] spin_degen_out2 degeneracy factor of outgoing particle 2
284  * \return spin degeneracy factor
285  */
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 
293  /**
294  * Check wether the three incoming particles are π⁺,π⁻,π⁰ in any order.
295  * Wrapper for unwieldy if statment.
296  *
297  * \param[in] data_a data for first incoming particle
298  * \param[in] data_b data for second incoming particle
299  * \param[in] data_c data for third incoming particle
300  * \return true if combination of π⁺,π⁻,π⁰
301  */
302  bool three_different_pions(const ParticleData& data_a,
303  const ParticleData& data_b,
304  const ParticleData& data_c) const;
305 
306  /**
307  * Check wether the three incoming particles are π⁺,π⁻,η or π⁰,π⁰,η in any
308  * order. Wrapper for unwieldy if statment.
309  *
310  * \param[in] data_a data for first incoming particle
311  * \param[in] data_b data for second incoming particle
312  * \param[in] data_c data for third incoming particle
313  * \return true if combination of π⁺,π⁻,η or π⁰,π⁰,η
314  */
315  bool two_pions_eta(const ParticleData& data_a, const ParticleData& data_b,
316  const ParticleData& data_c) const;
317 
318  /**
319  * Check if 5 incoming particles match intial pion state for 5-to-2, which is
320  * pi+ pi- pi+ pi- pi0 in order to match the NNbar resonance treatment.
321  */
323 
324  /// Total probability of reaction
326 
327  /// Partial probability of the chosen outgoing channel
329 
330  /// Spin interaction type
332 
333  /// List of possible collisions
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:100
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