Version: SMASH-3.4
scatteractionphoton.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2016-2018,2020,2025
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_SMASH_SCATTERACTIONPHOTON_H_
11 #define SRC_INCLUDE_SMASH_SCATTERACTIONPHOTON_H_
12 
13 #include <utility>
14 
15 #include "scatteraction.h"
16 
17 namespace smash {
18 
19 /**
20  * \ingroup action
21  * ScatterActionPhoton is a special action which takes two incoming particles
22  * and performs a perturbative electromagnetic scattering.
23  * The final state particles are not further propagated, only written
24  * to the output.
25  */
26 
28  public:
29  /**
30  * Construct a ScatterActionPhoton object.
31  *
32  * \param[in] in ParticleList of incoming particles.
33  * \param[in] time Time relative to underlying hadronic action.
34  * \param[in] n_frac_photons Number of photons to produce for each hadronic
35  * scattering.
36  * \param[in] hadronic_cross_section_input Cross-section of
37  * underlying hadronic cross-section.
38  * \param[in] spin_interaction_type Which type of spin interaction to use
39  * \return The constructed object.
40  */
41 
42  ScatterActionPhoton(const ParticleList &in, const double time,
43  const int n_frac_photons,
44  const double hadronic_cross_section_input,
45  const SpinInteractionType spin_interaction_type =
47 
48  /**
49  * Create the photon final state and write to output.
50  *
51  * \param[in] outputs List of all outputs. Does not have to be a specific
52  * photon output, the function will take care of this.
53  */
54  void perform_photons(const OutputsList &outputs);
55 
56  /**
57  * Generate the final-state for the photon scatter process. Generates only one
58  * photon / hadron pair
59  */
60  void generate_final_state() override;
61 
62  /**
63  * Return the weight of the last created photon.
64  *
65  * \return The total weight.
66  */
67  double get_total_weight() const override { return weight_; }
68 
69  /**
70  * Return the total cross section of the underlying hadronic scattering
71  *
72  * \return total cross-section [mb]
73  */
75 
76  /**
77  * Sample the mass of the outgoing hadron. Returns the pole mass if
78  * particle is stable.
79  *
80  * \param[in] out_type TypePtr of the outgoing hadron.
81  *
82  * \return Mass of outgoing hadron [GeV]
83  *
84  */
85  double sample_out_hadron_mass(const ParticleTypePtr out_type);
86 
87  /**
88  * Adds one hadronic process with a given cross-section.
89  *
90  * The intended use is to add the hadronic cross-section from the already
91  * performed hadronic
92  * action without recomputing it.
93  *
94  * \param[in] reaction_cross_section Total cross-section of underlying
95  * hadronic process [mb]
96  */
97  void add_dummy_hadronic_process(double reaction_cross_section);
98 
99  /**
100  * Add the photonic process. Also compute the total cross section as a side
101  * effect.
102  */
104  add_processes<CollisionBranch>(create_collision_branch(),
107  }
108 
109  /**
110  * Enum for encoding the photon process. It is uniquely determined by the
111  * incoming particles. The naming scheme is :
112  * Incoming_1__Incoming_2__Outgoing_hadron. The photon is omitted in the
113  * naming.
114  */
115  enum class ReactionType {
116  no_reaction,
127  };
128 
129  /**
130  * Determine photon process from incoming particles.
131  *
132  * If incoming particles are not part of any implemented photonic process,
133  * return no_reaction.
134  *
135  * \param[in] in ParticleList of incoming particles.
136  * \return ReactionType enum-member
137  */
138  static ReactionType photon_reaction_type(const ParticleList &in);
139 
140  /**
141  * Check if particles can undergo an implemented photon process.
142  *
143  * This function does not check the involved kinematics.
144  *
145  * \param[in] in ParticleList of incoming particles.
146  * \return bool if photon reaction implemented.
147  */
148  static bool is_photon_reaction(const ParticleList &in) {
150  }
151 
152  /**
153  * Return ParticleTypePtr of hadron in the out channel, given the incoming
154  * particles.
155  *
156  * This function is overloaded since we need the hadron type in different
157  * places.
158  *
159  * \param [in] in ParticleList of incoming particles.
160  * \return ParticeTypePtr to hadron in outgoing channel.
161  */
162  static ParticleTypePtr outgoing_hadron_type(const ParticleList &in);
163 
164  /**
165  * Return ParticleTypePtr of hadron in the out channel,
166  * given the ReactionType.
167  *
168  * This function is overloaded since we need the hadron type in different
169  * places.
170  *
171  * \param [in] reaction ReactionType, determined from incoming particles.
172  * \returns ParticeTypePtr to hadron in outgoing channel.
173  */
174  static ParticleTypePtr outgoing_hadron_type(const ReactionType reaction);
175 
176  /**
177  * Check if CM-energy is sufficient to produce hadron in final state.
178  *
179  * \param [in] s_sqrt CM-energy [GeV]
180  * \param [in] in ParticleList of incoming hadrons
181  * \returns true if particles can be produced.
182  */
183  static bool is_kinematically_possible(const double s_sqrt,
184  const ParticleList &in);
185 
186  private:
187  /**
188  * Holds the photon branch. As of now, this will always
189  * hold only one branch.
190  */
191  CollisionBranchList collision_processes_photons_;
192 
193  /// Was the collision branch already created?
195 
196  /// Photonic process as determined from incoming particles.
198 
199  /**
200  * Number of photons created for each hadronic scattering, needed for correct
201  * weighting. Note that in generate_final_state() only one photon + hadron is
202  * created.
203  */
205 
206  /// ParticleTypePtr to the type of the outgoing hadron.
208 
209  /// Mass of outgoing hadron
210  const double hadron_out_mass_;
211 
212  /**
213  * Compile-time switch for setting the handling of processes which can happen
214  * via different mediating particles. Relevant only for the processes
215  * pi0 + rho => pi + y and pi + rho => pi0 + gamma, which both can happen
216  * via exchange of (rho, a1, pi) or omega.
217  * If MediatorType::SUM is set, the cross section for both processes is added.
218  * If MediatorType::PION/ OMEGA is set, only the respective processes are
219  * computed.
220  */
221  enum class MediatorType { SUM, PION, OMEGA };
222  /// Value used for default exchange particle. See MediatorType.
224 
225  /// Weight of the produced photon.
226  double weight_ = 0.0;
227 
228  /// Total cross section of photonic process.
230 
231  /// Total hadronic cross section
233 
234  /// Type of spin interaction to use
236 
237  /**
238  * Find the mass of the participating rho-particle.
239  *
240  * In case of a rho in the incoming channel it is the mass of the incoming
241  * rho, in case of an rho in the outgoing channel it is the mass sampled in
242  * the constructor. When an rho acts in addition as a mediator, its mass is
243  * the same as the incoming / outgoing rho. This function returns the alrady
244  * sampled mass or the mass of the incoming rho, depending on the process.
245  *
246  * \returns mass of participating rho [GeV]
247  */
248  double rho_mass() const;
249 
250  /**
251  * Creates a CollisionBranchList containing the photon processes.
252  * By construction (perturbative treatment) this list will always contain only
253  * one branch.
254  *
255  * \returns List containing the photon collision branch
256  *
257  */
258  CollisionBranchList create_collision_branch();
259 
260  /**
261  * Calculate the total cross section of the photon process.
262  * Formfactors are not included
263  *
264  * \param[in] mediator Switch for determing which mediating particle to use
265  *
266  * \return Total cross section. [mb]
267  */
268  double total_cross_section(MediatorType mediator = default_mediator_) const;
269 
270  /**
271  * Compute the total cross corrected for form factors.
272  *
273  * Takes care of correct handling of reactions with multiple processes by
274  * reading the default_mediator_ member variable.
275  *
276  * \param[in] E_photon of outgoing photon [GeV]
277  *
278  * \returns total cross section including form factors [mb]
279  */
280  double total_cross_section_w_ff(const double E_photon);
281 
282  /**
283  * Calculate the differential cross section of the photon process.
284  * Formfactors are not included
285  *
286  * \param[in] t Mandelstam-t [GeV^2].
287  * \param[in] m_rho Mass of the incoming or outgoing rho-particle [GeV]
288  * \param[in] mediator Switch for determing which mediating particle to use
289  *
290  * \return Differential cross section. [mb/\f$GeV^2\f$]
291  */
292  double diff_cross_section(const double t, const double m_rho,
293  MediatorType mediator = default_mediator_) const;
294 
295  /**
296  * Compute the differential cross section corrected for form factors
297  *
298  * Takes care of correct handling of reactions with multiple processes by
299  * reading the default_mediator_ member variable.
300  *
301  * \param[in] t Mandelstam-t [GeV^2]
302  * \param[in] m_rho Mass of the incoming or outgoing rho-particle [GeV]
303  * \param[in] E_photon of outgoing photon [GeV]
304  *
305  * \returns diff. cross section [mb / GeV \f$^2\f$]
306  */
307  double diff_cross_section_w_ff(const double t, const double m_rho,
308  const double E_photon);
309 
310  /**
311  * Compute the form factor for a process with a pion as the lightest exchange
312  * particle.
313  *
314  * See wiki for details how form factors are handled.
315  *
316  * \param[in] E_photon Energy of photon [GeV]
317  * \returns form factor
318  */
319  double form_factor_pion(const double E_photon) const;
320 
321  /**
322  * Compute the form factor for a process with a omega as the lightest exchange
323  * particle.
324  *
325  * See wiki for details how form factors are handled.
326  *
327  * \param[in] E_photon Energy of photon [GeV]
328  * \returns form factor
329  */
330  double form_factor_omega(const double E_photon) const;
331 
332  /**
333  * For processes which can happen via (pi, a1, rho) and omega exchange,
334  * return the form factor for the (pi, a1, rho) process in
335  * the first argument, for the omega process in the second. If only
336  * one process exists, both values are the same. Helper function to easier
337  * combine processes with different mediating particles.
338  *
339  * \param[in] E_photon Energy of the photon [GeV]
340  *
341  * \return Form factor for (pi,a1,rho) in the first argument,
342  * for omega in the second.
343  */
344  std::pair<double, double> form_factor_pair(const double E_photon);
345 
346  /**
347  * For processes which can happen via (pi, a1, rho) and omega exchange,
348  * return the total cross section for the (pi, a1, rho) process in
349  * the first argument, for the omega process in the second. If only
350  * one process exists, both values are the same.Helper function to easier
351  * combine processes with different mediating particles.
352  *
353  * \returns total cross section for (pi,a1,rho) in the first argument,
354  * for omega in the second.
355  */
356  std::pair<double, double> total_cross_section_pair();
357 
358  /**
359  * For processes which can happen via (pi, a1, rho) and omega exchange,
360  * return the differential cross section for the (pi, a1, rho) process in
361  * the first argument, for the omega process in the second. If only
362  * one process exists, both values are the same.Helper function to easier
363  * combine processes with different mediating particles.
364  *
365  * \param[in] t Mandelstam-t [GeV^2]
366  * \param[in] m_rho Mass of the incoming or outgoing rho-particle [GeV]
367  *
368  * \returns diff. cross section for (pi,a1,rho) in the first argument,
369  * for omega in the second.
370  */
371  std::pair<double, double> diff_cross_section_pair(const double t,
372  const double m_rho);
373 };
374 
375 } // namespace smash
376 
377 #endif // SRC_INCLUDE_SMASH_SCATTERACTIONPHOTON_H_
A pointer-like interface to global references to ParticleType objects.
Definition: particletype.h:731
ScatterActionPhoton is a special action which takes two incoming particles and performs a perturbativ...
std::pair< double, double > diff_cross_section_pair(const double t, const double m_rho)
For processes which can happen via (pi, a1, rho) and omega exchange, return the differential cross se...
double diff_cross_section(const double t, const double m_rho, MediatorType mediator=default_mediator_) const
Calculate the differential cross section of the photon process.
double cross_section_photons_
Total cross section of photonic process.
const int number_of_fractional_photons_
Number of photons created for each hadronic scattering, needed for correct weighting.
const double hadronic_cross_section_
Total hadronic cross section.
std::pair< double, double > total_cross_section_pair()
For processes which can happen via (pi, a1, rho) and omega exchange, return the total cross section f...
const SpinInteractionType spin_interaction_type_
Type of spin interaction to use.
ReactionType
Enum for encoding the photon process.
double total_cross_section_w_ff(const double E_photon)
Compute the total cross corrected for form factors.
const ReactionType reac_
Photonic process as determined from incoming particles.
double form_factor_omega(const double E_photon) const
Compute the form factor for a process with a omega as the lightest exchange particle.
double diff_cross_section_w_ff(const double t, const double m_rho, const double E_photon)
Compute the differential cross section corrected for form factors.
MediatorType
Compile-time switch for setting the handling of processes which can happen via different mediating pa...
void perform_photons(const OutputsList &outputs)
Create the photon final state and write to output.
CollisionBranchList collision_processes_photons_
Holds the photon branch.
double total_cross_section(MediatorType mediator=default_mediator_) const
Calculate the total cross section of the photon process.
void generate_final_state() override
Generate the final-state for the photon scatter process.
bool collision_branch_created_
Was the collision branch already created?
double rho_mass() const
Find the mass of the participating rho-particle.
double form_factor_pion(const double E_photon) const
Compute the form factor for a process with a pion as the lightest exchange particle.
static ParticleTypePtr outgoing_hadron_type(const ParticleList &in)
Return ParticleTypePtr of hadron in the out channel, given the incoming particles.
double weight_
Weight of the produced photon.
CollisionBranchList create_collision_branch()
Creates a CollisionBranchList containing the photon processes.
std::pair< double, double > form_factor_pair(const double E_photon)
For processes which can happen via (pi, a1, rho) and omega exchange, return the form factor for the (...
static constexpr MediatorType default_mediator_
Value used for default exchange particle. See MediatorType.
double get_total_weight() const override
Return the weight of the last created photon.
const double hadron_out_mass_
Mass of outgoing hadron.
void add_dummy_hadronic_process(double reaction_cross_section)
Adds one hadronic process with a given cross-section.
static ReactionType photon_reaction_type(const ParticleList &in)
Determine photon process from incoming particles.
static bool is_photon_reaction(const ParticleList &in)
Check if particles can undergo an implemented photon process.
void add_single_process()
Add the photonic process.
static bool is_kinematically_possible(const double s_sqrt, const ParticleList &in)
Check if CM-energy is sufficient to produce hadron in final state.
double hadronic_cross_section() const
Return the total cross section of the underlying hadronic scattering.
ScatterActionPhoton(const ParticleList &in, const double time, const int n_frac_photons, const double hadronic_cross_section_input, const SpinInteractionType spin_interaction_type=SpinInteractionType::Off)
Construct a ScatterActionPhoton object.
const ParticleTypePtr hadron_out_t_
ParticleTypePtr to the type of the outgoing hadron.
double sample_out_hadron_mass(const ParticleTypePtr out_type)
Sample the mass of the outgoing hadron.
ScatterAction is a special action which takes two incoming particles and performs a scattering,...
Definition: scatteraction.h:30
SpinInteractionType
Possible spin interaction types.
@ Off
No spin interactions.
Definition: action.h:24