Version: SMASH-3.4
bremsstrahlungactionphoton.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (c) 2019-2022,2025-2026
4  * SMASH Team
5  *
6  * GNU General Public License (GPLv3 or later)
7  *
8  */
9 
10 #ifndef SRC_INCLUDE_SMASH_BREMSSTRAHLUNGACTIONPHOTON_H_
11 #define SRC_INCLUDE_SMASH_BREMSSTRAHLUNGACTIONPHOTON_H_
12 
13 #include <utility>
14 
15 #include "scatteraction.h"
16 
17 namespace smash {
18 /**
19  * \ingroup action
20  * BremsAction is a special action which takes two incoming particles
21  * and performs a perturbative scattering where a Bremsstrahlung photon is
22  * produced.
23  * The final state particles are not further propagated, only written
24  * to the photon output.
25  */
27  public:
28  /**
29  * Construct a ScatterActionBrems object.
30  *
31  * \param[in] in ParticleList of incoming particles.
32  * \param[in] time Time relative to underlying hadronic action.
33  * \param[in] n_frac_photons Number of photons to produce for each hadronic
34  * scattering.
35  * \param[in] hadronic_cross_section_input Cross-section of
36  * underlying hadronic cross-section.
37  * \param[in] spin_interaction_type Which type of spin interaction to use.
38  * \return The constructed object.
39  */
40 
41  BremsstrahlungActionPhoton(const ParticleList &in, const double time,
42  const int n_frac_photons,
43  const double hadronic_cross_section_input,
44  const SpinInteractionType spin_interaction_type =
46  /**
47  * Create the final state and write to output.
48  *
49  * \param[in] outputs List of all outputs. Does not have to be a specific
50  * photon output, the function will take care of this.
51  */
52  void perform_bremsstrahlung(const OutputsList &outputs);
53 
54  /**
55  * Generate the final-state for the Bremsstrahlung process. Generates only
56  * 3-body final state.
57  */
58  void generate_final_state() override;
59 
60  /**
61  * Sample the final state anisotropically, considering the differential
62  * cross sections with respect to theta and k.
63  */
65 
66  /**
67  * Return the weight of the last created photon.
68  *
69  * \return The total weight.
70  */
71  double get_total_weight() const override { return weight_; }
72 
73  /**
74  * Return the total cross section of the underlying hadronic scattering
75  * It is necessary for the weighting procedure.
76  *
77  * \return total cross-section [mb]
78  */
80 
81  /**
82  * Adds one hadronic process with a given cross-section.
83  *
84  * The intended use is to add the hadronic cross-section from the already
85  * performed hadronic
86  * action without recomputing it.
87  *
88  * \param[in] reaction_cross_section Total cross-section of underlying
89  * hadronic process [mb]
90  */
91  void add_dummy_hadronic_process(double reaction_cross_section);
92 
93  /**
94  * Add the photonic process. Also compute the total cross section as a side
95  * effect.
96  */
98  add_processes<CollisionBranch>(brems_cross_sections(),
101  }
102 
103  /**
104  * Enum for encoding the photon process. It is uniquely determined by the
105  * incoming particles. The naming scheme is :
106  * Incoming_1_Incoming_2_.
107  */
108  enum class ReactionType {
109  no_reaction,
110  pi_z_pi_m,
111  pi_z_pi_p,
112  pi_p_pi_m,
113  pi_m_pi_m,
114  pi_p_pi_p,
115  pi_z_pi_z
116  };
117 
118  /**
119  * Determine photon process from incoming particles.
120  *
121  * If incoming particles are not part of any implemented photonic process,
122  * return no_reaction.
123  *
124  * \param[in] in ParticleList of incoming particles.
125  * \return ReactionType enum-member
126  */
127  static ReactionType bremsstrahlung_reaction_type(const ParticleList &in);
128 
129  /**
130  * Check if particles can undergo an implemented photon process.
131  *
132  * This function does not check the involved kinematics.
133  *
134  * \param[in] in ParticleList of incoming particles.
135  * \return bool if photon reaction implemented.
136  */
137  static bool is_photon_brems_reaction(const ParticleList &in) {
139  }
140 
141  private:
142  /**
143  * Holds the bremsstrahlung branch. As of now, this will always
144  * hold only one branch.
145  */
147 
148  /// Reaction process as determined from incoming particles.
150 
151  /**
152  * Number of photons created for each hadronic scattering, needed for correct
153  * weighting. Note that in generate_final_state() only one photon + two pions
154  * are created.
155  */
157 
158  /// Weight of the produced photon.
159  double weight_ = 0.0;
160 
161  /// Total cross section of bremsstrahlung process.
163 
164  /// Total hadronic cross section
166 
167  /// Sampled value of k (photon momentum)
168  double k_;
169 
170  /// Sampled value of theta (angle of the photon)
171  double theta_;
172 
173  /// Type of spin interaction to use
175 
176  /**
177  * Create interpolation objects for tabularized cross sections:
178  * total cross section, differential dSigma/dk, differential dSigma/dtheta
179  */
180  void create_interpolations();
181 
182  /**
183  * Computes the total cross section of the bremsstrahlung process.
184  *
185  * \returns List of photon reaction branches.
186  */
187  CollisionBranchList brems_cross_sections();
188 
189  /**
190  * Computes the differential cross sections dSigma/dk and dSigma/dtheta of the
191  * bremsstrahlung process.
192  *
193  * \returns Pair containing dSigma/dk as a first argument and dSigma/dtheta
194  * as a second argument
195  */
196  std::pair<double, double> brems_diff_cross_sections();
197 };
198 
199 } // namespace smash
200 
201 #endif // SRC_INCLUDE_SMASH_BREMSSTRAHLUNGACTIONPHOTON_H_
BremsAction is a special action which takes two incoming particles and performs a perturbative scatte...
static bool is_photon_brems_reaction(const ParticleList &in)
Check if particles can undergo an implemented photon process.
void add_dummy_hadronic_process(double reaction_cross_section)
Adds one hadronic process with a given cross-section.
ReactionType
Enum for encoding the photon process.
void perform_bremsstrahlung(const OutputsList &outputs)
Create the final state and write to output.
std::pair< double, double > brems_diff_cross_sections()
Computes the differential cross sections dSigma/dk and dSigma/dtheta of the bremsstrahlung process.
double get_total_weight() const override
Return the weight of the last created photon.
void create_interpolations()
Create interpolation objects for tabularized cross sections: total cross section, differential dSigma...
double cross_section_bremsstrahlung_
Total cross section of bremsstrahlung process.
const SpinInteractionType spin_interaction_type_
Type of spin interaction to use.
static ReactionType bremsstrahlung_reaction_type(const ParticleList &in)
Determine photon process from incoming particles.
const int number_of_fractional_photons_
Number of photons created for each hadronic scattering, needed for correct weighting.
void add_single_process()
Add the photonic process.
void sample_3body_phasespace()
Sample the final state anisotropically, considering the differential cross sections with respect to t...
double k_
Sampled value of k (photon momentum)
CollisionBranchList brems_cross_sections()
Computes the total cross section of the bremsstrahlung process.
double hadronic_cross_section() const
Return the total cross section of the underlying hadronic scattering It is necessary for the weightin...
const double hadronic_cross_section_
Total hadronic cross section.
void generate_final_state() override
Generate the final-state for the Bremsstrahlung process.
const ReactionType reac_
Reaction process as determined from incoming particles.
double theta_
Sampled value of theta (angle of the photon)
double weight_
Weight of the produced photon.
CollisionBranchList collision_processes_bremsstrahlung_
Holds the bremsstrahlung branch.
BremsstrahlungActionPhoton(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 ScatterActionBrems object.
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