Version: SMASH-3.1
smash::BremsstrahlungAction Class Reference

#include <bremsstrahlungaction.h>

BremsAction is a special action which takes two incoming particles and performs a perturbative scattering where a Bremsstrahlung photon is produced.

The final state particles are not further propagated, only written to the photon output.

Definition at line 26 of file bremsstrahlungaction.h.

Inheritance diagram for smash::BremsstrahlungAction:
smash::ScatterAction smash::Action

Public Types

enum class  ReactionType {
  no_reaction , pi_z_pi_m , pi_z_pi_p , pi_p_pi_m ,
  pi_m_pi_m , pi_p_pi_p , pi_z_pi_z
}
 Enum for encoding the photon process. More...
 

Public Member Functions

 BremsstrahlungAction (const ParticleList &in, const double time, const int n_frac_photons, const double hadronic_cross_section_input)
 Construct a ScatterActionBrems object. More...
 
void perform_bremsstrahlung (const OutputsList &outputs)
 Create the final state and write to output. More...
 
void generate_final_state () override
 Generate the final-state for the Bremsstrahlung process. More...
 
void sample_3body_phasespace ()
 Sample the final state anisotropically, considering the differential cross sections with respect to theta and k. More...
 
double get_total_weight () const override
 Return the weight of the last created photon. More...
 
double hadronic_cross_section () const
 Return the total cross section of the underlying hadronic scattering It is necessary for the weighting procedure. More...
 
void add_dummy_hadronic_process (double reaction_cross_section)
 Adds one hadronic process with a given cross-section. More...
 
void add_single_process ()
 Add the photonic process. More...
 
- Public Member Functions inherited from smash::ScatterAction
 ScatterAction (const ParticleData &in_part1, const ParticleData &in_part2, double time, bool isotropic=false, double string_formation_time=1.0, double box_length=-1.0, bool is_total_parametrized=false)
 Construct a ScatterAction object. More...
 
void add_collision (CollisionBranchPtr p)
 Add a new collision channel. More...
 
void add_collisions (CollisionBranchList pv)
 Add several new collision channels at once. More...
 
double transverse_distance_sqr () const
 Calculate the transverse distance of the two incoming particles in their local rest frame. More...
 
double cov_transverse_distance_sqr () const
 Calculate the transverse distance of the two incoming particles in their local rest frame written in a covariant form. More...
 
double mandelstam_s () const
 Determine the Mandelstam s variable,. More...
 
double relative_velocity () const
 Get the relative velocity of the two incoming particles. More...
 
void generate_final_state () override
 Generate the final-state of the scattering process. More...
 
double get_total_weight () const override
 Get the total cross section of scattering particles. More...
 
double get_partial_weight () const override
 Get the partial cross section of the chosen channel. More...
 
void sample_angles (std::pair< double, double > masses, double kinetic_energy_cm) override
 Sample final-state angles in a 2->2 collision (possibly anisotropic). More...
 
void add_all_scatterings (const ScatterActionsFinderParameters &finder_parameters)
 Add all possible scattering subprocesses for this action object. More...
 
void set_parametrized_total_cross_section (const ScatterActionsFinderParameters &finder_parameters)
 Given the incoming particles, assigns the correct parametrization of the total cross section. More...
 
const CollisionBranchList & collision_channels ()
 Get list of possible collision channels. More...
 
void set_string_interface (StringProcess *str_proc)
 Set the StringProcess object to be used. More...
 
virtual double cross_section () const
 Get the total cross section of the scattering particles, either from a parametrization, or from the sum of partials. More...
 
- Public Member Functions inherited from smash::Action
 Action (const ParticleList &in_part, double time)
 Construct an action object with incoming particles and relative time. More...
 
 Action (const ParticleData &in_part, const ParticleData &out_part, double time, ProcessType type)
 Construct an action object with the incoming particles, relative time, and the already known outgoing particles and type of the process. More...
 
 Action (const ParticleList &in_part, const ParticleList &out_part, double absolute_execution_time, ProcessType type)
 Construct an action object with the incoming particles, absolute time, and the already known outgoing particles and type of the process. More...
 
 Action (const Action &)=delete
 Copying is disabled. Use pointers or create a new Action. More...
 
virtual ~Action ()
 Virtual Destructor. More...
 
bool operator< (const Action &rhs) const
 Determine whether one action takes place before another in time. More...
 
virtual ProcessType get_type () const
 Get the process type. More...
 
template<typename Branch >
void add_process (ProcessBranchPtr< Branch > &p, ProcessBranchList< Branch > &subprocesses, double &total_weight)
 Add a new subprocess. More...
 
template<typename Branch >
void add_processes (ProcessBranchList< Branch > pv, ProcessBranchList< Branch > &subprocesses, double &total_weight)
 Add several new subprocesses at once. More...
 
virtual double perform (Particles *particles, uint32_t id_process)
 Actually perform the action, e.g. More...
 
bool is_valid (const Particles &particles) const
 Check whether the action still applies. More...
 
bool is_pauli_blocked (const std::vector< Particles > &ensembles, const PauliBlocker &p_bl) const
 Check if the action is Pauli-blocked. More...
 
const ParticleList & incoming_particles () const
 Get the list of particles that go into the action. More...
 
void update_incoming (const Particles &particles)
 Update the incoming particles that are stored in this action to the state they have in the global particle list. More...
 
const ParticleList & outgoing_particles () const
 Get the list of particles that resulted from the action. More...
 
double time_of_execution () const
 Get the time at which the action is supposed to be performed. More...
 
virtual double check_conservation (const uint32_t id_process) const
 Check various conservation laws. More...
 
double sqrt_s () const
 Determine the total energy in the center-of-mass frame [GeV]. More...
 
FourVector total_momentum_of_outgoing_particles () const
 Calculate the total kinetic momentum of the outgoing particles. More...
 
FourVector get_interaction_point () const
 Get the interaction point. More...
 
std::pair< FourVector, FourVectorget_potential_at_interaction_point () const
 Get the skyrme and asymmetry potential at the interaction point. More...
 
void set_stochastic_pos_idx ()
 Setter function that stores a random incoming particle index latter used to determine the interaction point. More...
 

Static Public Member Functions

static ReactionType bremsstrahlung_reaction_type (const ParticleList &in)
 Determine photon process from incoming particles. More...
 
static bool is_bremsstrahlung_reaction (const ParticleList &in)
 Check if particles can undergo an implemented photon process. More...
 
- Static Public Member Functions inherited from smash::Action
static double lambda_tilde (double a, double b, double c)
 Little helper function that calculates the lambda function (sometimes written with a tilde to better distinguish it) that appears e.g. More...
 
static void sample_manybody_phasespace_impl (double sqrts, const std::vector< double > &m, std::vector< FourVector > &sampled_momenta)
 Implementation of the full n-body phase-space sampling (masses, momenta, angles) in the center-of-mass frame for the final state particles. More...
 

Private Member Functions

void create_interpolations ()
 Create interpolation objects for tabularized cross sections: total cross section, differential dSigma/dk, differential dSigma/dtheta. More...
 
CollisionBranchList brems_cross_sections ()
 Computes the total cross section of the bremsstrahlung process. More...
 
std::pair< double, double > brems_diff_cross_sections ()
 Computes the differential cross sections dSigma/dk and dSigma/dtheta of the bremsstrahlung process. More...
 

Private Attributes

CollisionBranchList collision_processes_bremsstrahlung_
 Holds the bremsstrahlung branch. More...
 
const ReactionType reac_
 Reaction process as determined from incoming particles. More...
 
const int number_of_fractional_photons_
 Number of photons created for each hadronic scattering, needed for correct weighting. More...
 
double weight_ = 0.0
 Weight of the produced photon. More...
 
double cross_section_bremsstrahlung_ = 0.0
 Total cross section of bremsstrahlung process. More...
 
const double hadronic_cross_section_
 Total hadronic cross section. More...
 
double k_
 Sampled value of k (photon momentum) More...
 
double theta_
 Sampled value of theta (angle of the photon) More...
 

Additional Inherited Members

- Protected Member Functions inherited from smash::ScatterAction
double cm_momentum () const
 Get the momentum of the center of mass of the incoming particles in the calculation frame. More...
 
double cm_momentum_squared () const
 Get the squared momentum of the center of mass of the incoming particles in the calculation frame. More...
 
ThreeVector beta_cm () const
 Get the velocity of the center of mass of the scattering/incoming particles in the calculation frame. More...
 
double gamma_cm () const
 Get the gamma factor corresponding to a boost to the center of mass frame of the colliding particles. More...
 
void elastic_scattering ()
 Perform an elastic two-body scattering, i.e. just exchange momentum. More...
 
void inelastic_scattering ()
 Perform an inelastic two-body scattering, i.e. new particles are formed. More...
 
void two_to_many_scattering ()
 Perform an inelastic two-to-many-body scattering (more than 2) More...
 
void create_string_final_state ()
 Creates the final states for string-processes after they are performed. More...
 
void string_excitation ()
 Todo(ryu): document better - it is not really UrQMD-based, isn't it? Perform the UrQMD-based string excitation and decay. More...
 
void format_debug_output (std::ostream &out) const override
 Writes information about this scatter action to the out stream. More...
 
- Protected Member Functions inherited from smash::Action
FourVector total_momentum () const
 Sum of 4-momenta of incoming particles. More...
 
template<typename Branch >
const Branch * choose_channel (const ProcessBranchList< Branch > &subprocesses, double total_weight)
 Decide for a particular final-state channel via Monte-Carlo and return it as a ProcessBranch. More...
 
virtual std::pair< double, double > sample_masses (double kinetic_energy_cm) const
 Sample final-state masses in general X->2 processes (thus also fixing the absolute c.o.m. More...
 
void sample_2body_phasespace ()
 Sample the full 2-body phase-space (masses, momenta, angles) in the center-of-mass frame for the final state particles. More...
 
virtual void sample_manybody_phasespace ()
 Sample the full n-body phase-space (masses, momenta, angles) in the center-of-mass frame for the final state particles. More...
 
void assign_formation_time_to_outgoing_particles ()
 Assign the formation time to the outgoing particles. More...
 
- Protected Attributes inherited from smash::ScatterAction
CollisionBranchList collision_channels_
 List of possible collisions. More...
 
double sum_of_partial_cross_sections_
 Current sum of partial hadronic cross sections. More...
 
double partial_cross_section_
 Partial cross-section to the chosen outgoing channel. More...
 
bool isotropic_ = false
 Do this collision isotropically? More...
 
double string_formation_time_ = 1.0
 Time fragments take to be fully formed in hard string excitation. More...
 
- Protected Attributes inherited from smash::Action
ParticleList incoming_particles_
 List with data of incoming particles. More...
 
ParticleList outgoing_particles_
 Initially this stores only the PDG codes of final-state particles. More...
 
const double time_of_execution_
 Time at which the action is supposed to be performed (absolute time in the lab frame in fm). More...
 
ProcessType process_type_
 type of process More...
 
double box_length_ = -1.0
 Box length: needed to determine coordinates of collision correctly in case of collision through the wall. More...
 
int stochastic_position_idx_ = -1
 This stores a randomly-chosen index to an incoming particle. More...
 

Member Enumeration Documentation

◆ ReactionType

Enum for encoding the photon process.

It is uniquely determined by the incoming particles. The naming scheme is : Incoming_1_Incoming_2_.

Enumerator
no_reaction 
pi_z_pi_m 
pi_z_pi_p 
pi_p_pi_m 
pi_m_pi_m 
pi_p_pi_p 
pi_z_pi_z 

Definition at line 105 of file bremsstrahlungaction.h.

105  {
106  no_reaction,
107  pi_z_pi_m,
108  pi_z_pi_p,
109  pi_p_pi_m,
110  pi_m_pi_m,
111  pi_p_pi_p,
112  pi_z_pi_z
113  };

Constructor & Destructor Documentation

◆ BremsstrahlungAction()

smash::BremsstrahlungAction::BremsstrahlungAction ( const ParticleList &  in,
const double  time,
const int  n_frac_photons,
const double  hadronic_cross_section_input 
)

Construct a ScatterActionBrems object.

Parameters
[in]inParticleList of incoming particles.
[in]timeTime relative to underlying hadronic action.
[in]n_frac_photonsNumber of photons to produce for each hadronic scattering.
[in]hadronic_cross_section_inputCross-section of underlying hadronic cross-section.
Returns
The constructed object.

Definition at line 19 of file bremsstrahlungaction.cc.

22  : ScatterAction(in[0], in[1], time),
24  number_of_fractional_photons_(n_frac_photons),
25  hadronic_cross_section_(hadronic_cross_section_input) {}
const ReactionType reac_
Reaction process as determined from incoming particles.
const int number_of_fractional_photons_
Number of photons created for each hadronic scattering, needed for correct weighting.
static ReactionType bremsstrahlung_reaction_type(const ParticleList &in)
Determine photon process from incoming particles.
const double hadronic_cross_section_
Total hadronic cross section.
ScatterAction(const ParticleData &in_part1, const ParticleData &in_part2, double time, bool isotropic=false, double string_formation_time=1.0, double box_length=-1.0, bool is_total_parametrized=false)
Construct a ScatterAction object.

Member Function Documentation

◆ perform_bremsstrahlung()

void smash::BremsstrahlungAction::perform_bremsstrahlung ( const OutputsList &  outputs)

Create the final state and write to output.

Parameters
[in]outputsList of all outputs. Does not have to be a specific photon output, the function will take care of this.

Definition at line 63 of file bremsstrahlungaction.cc.

63  {
64  for (int i = 0; i < number_of_fractional_photons_; i++) {
66  for (const auto &output : outputs) {
67  if (output->is_photon_output()) {
68  // we do not care about the local density
69  output->at_interaction(*this, 0.0);
70  }
71  }
72  }
73 }
void generate_final_state() override
Generate the final-state for the Bremsstrahlung process.

◆ generate_final_state()

void smash::BremsstrahlungAction::generate_final_state ( )
overridevirtual

Generate the final-state for the Bremsstrahlung process.

Generates only 3-body final state.

Implements smash::Action.

Definition at line 75 of file bremsstrahlungaction.cc.

75  {
76  // we have only one reaction per incoming particle pair
77  if (collision_processes_bremsstrahlung_.size() != 1) {
78  logg[LScatterAction].fatal()
79  << "Problem in BremsstrahlungAction::generate_final_state().\nThe "
80  "brocess branch has "
82  << " entries. It should however have 1.";
83  throw std::runtime_error("");
84  }
85 
86  auto *proc = collision_processes_bremsstrahlung_[0].get();
87 
88  outgoing_particles_ = proc->particle_list();
89  process_type_ = proc->get_type();
90  FourVector interaction_point = get_interaction_point();
91 
92  // Sample k and theta:
93  // minimum cutoff for k to be in accordance with cross section calculations
94  double delta_k; // k-range
95  double k_min = 0.001;
96  double k_max =
97  (sqrt_s() * sqrt_s() - 2 * outgoing_particles_[0].type().mass() * 2 *
98  outgoing_particles_[1].type().mass()) /
99  (2 * sqrt_s());
100 
101  if ((k_max - k_min) < 0.0) {
102  // Make sure it is kinematically even possible to create a photon that is
103  // in accordance with the cross section cutoff
104  k_ = 0.0;
105  delta_k = 0.0;
106  } else {
107  k_ = random::uniform(k_min, k_max);
108  delta_k = (k_max - k_min);
109  }
110  theta_ = random::uniform(0.0, M_PI);
111 
112  // Sample the phase space anisotropically in the local rest frame
114 
115  // Get differential cross sections
116  std::pair<double, double> diff_xs_pair = brems_diff_cross_sections();
117  double diff_xs_k = diff_xs_pair.first;
118  double diff_xs_theta = diff_xs_pair.second;
119 
120  // Assign weighting factor
121  const double W_theta = diff_xs_theta * (M_PI - 0.0);
122  const double W_k = diff_xs_k * delta_k;
123  weight_ = std::sqrt(W_theta * W_k) /
125 
126  // Scale weight by cross section scaling factor of incoming particles
127  weight_ *= incoming_particles_[0].xsec_scaling_factor() *
128  incoming_particles_[1].xsec_scaling_factor();
129 
130  // Set position and formation time and boost back to computational frame
131  for (auto &new_particle : outgoing_particles_) {
132  // assuming decaying particles are always fully formed
133  new_particle.set_formation_time(time_of_execution_);
134  new_particle.set_4position(interaction_point);
135  new_particle.boost_momentum(
137  }
138 
139  // Photons are not really part of the normal processes, so we have to set a
140  // constant arbitrary number.
141  const auto id_process = ID_PROCESS_PHOTON;
142  Action::check_conservation(id_process);
143 }
FourVector total_momentum_of_outgoing_particles() const
Calculate the total kinetic momentum of the outgoing particles.
Definition: action.cc:157
ParticleList outgoing_particles_
Initially this stores only the PDG codes of final-state particles.
Definition: action.h:363
const double time_of_execution_
Time at which the action is supposed to be performed (absolute time in the lab frame in fm).
Definition: action.h:369
virtual double check_conservation(const uint32_t id_process) const
Check various conservation laws.
Definition: action.cc:475
double sqrt_s() const
Determine the total energy in the center-of-mass frame [GeV].
Definition: action.h:271
ParticleList incoming_particles_
List with data of incoming particles.
Definition: action.h:355
FourVector get_interaction_point() const
Get the interaction point.
Definition: action.cc:68
ProcessType process_type_
type of process
Definition: action.h:372
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)
double hadronic_cross_section() const
Return the total cross section of the underlying hadronic scattering It is necessary for the weightin...
CollisionBranchList collision_processes_bremsstrahlung_
Holds the bremsstrahlung branch.
double weight_
Weight of the produced photon.
double theta_
Sampled value of theta (angle of the photon)
std::pair< double, double > brems_diff_cross_sections()
Computes the differential cross sections dSigma/dk and dSigma/dtheta of the bremsstrahlung process.
ThreeVector velocity() const
Get the velocity (3-vector divided by zero component).
Definition: fourvector.h:333
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:39
T uniform(T min, T max)
Definition: random.h:88
constexpr std::uint32_t ID_PROCESS_PHOTON
Process ID for any photon process.
Definition: constants.h:118
static constexpr int LScatterAction

◆ sample_3body_phasespace()

void smash::BremsstrahlungAction::sample_3body_phasespace ( )

Sample the final state anisotropically, considering the differential cross sections with respect to theta and k.

Definition at line 145 of file bremsstrahlungaction.cc.

145  {
146  assert(outgoing_particles_.size() == 3);
147  const double m_a = outgoing_particles_[0].type().mass(),
148  m_b = outgoing_particles_[1].type().mass(),
149  m_c = outgoing_particles_[2].type().mass();
150  const double sqrts = sqrt_s();
151  const double E_ab = sqrts - m_c - k_; // Ekin of the pion pair in cm frame
152  const double pcm = pCM(sqrts, E_ab, m_c); // cm momentum of (π pair - photon)
153  const double pcm_pions = pCM(E_ab, m_a, m_b); // cm momentum within pion pair
154 
155  // Photon angle: Phi random, theta from theta_ sampled above
156  const Angles phitheta_photon(random::uniform(0.0, twopi), std::cos(theta_));
157  outgoing_particles_[2].set_4momentum(m_c, pcm * phitheta_photon.threevec());
158  // Boost velocity to cm frame of the two pions
159  const ThreeVector beta_cm_pion_pair_photon =
160  pcm * phitheta_photon.threevec() / std::sqrt(pcm * pcm + E_ab * E_ab);
161 
162  // Sample pion pair isotropically
163  Angles phitheta;
164  phitheta.distribute_isotropically();
165  outgoing_particles_[0].set_4momentum(m_a, pcm_pions * phitheta.threevec());
166  outgoing_particles_[1].set_4momentum(m_b, -pcm_pions * phitheta.threevec());
167  outgoing_particles_[0].boost_momentum(beta_cm_pion_pair_photon);
168  outgoing_particles_[1].boost_momentum(beta_cm_pion_pair_photon);
169 }
T pCM(const T sqrts, const T mass_a, const T mass_b) noexcept
Definition: kinematics.h:79
constexpr double twopi
.
Definition: constants.h:45

◆ get_total_weight()

double smash::BremsstrahlungAction::get_total_weight ( ) const
inlineoverridevirtual

Return the weight of the last created photon.

Returns
The total weight.

Implements smash::Action.

Definition at line 68 of file bremsstrahlungaction.h.

68 { return weight_; }

◆ hadronic_cross_section()

double smash::BremsstrahlungAction::hadronic_cross_section ( ) const
inline

Return the total cross section of the underlying hadronic scattering It is necessary for the weighting procedure.

Returns
total cross-section [mb]

Definition at line 76 of file bremsstrahlungaction.h.

76 { return hadronic_cross_section_; }

◆ add_dummy_hadronic_process()

void smash::BremsstrahlungAction::add_dummy_hadronic_process ( double  reaction_cross_section)

Adds one hadronic process with a given cross-section.

The intended use is to add the hadronic cross-section from the already performed hadronic action without recomputing it.

Parameters
[in]reaction_cross_sectionTotal cross-section of underlying hadronic process [mb]

Definition at line 171 of file bremsstrahlungaction.cc.

172  {
173  CollisionBranchPtr dummy_process = std::make_unique<CollisionBranch>(
174  incoming_particles_[0].type(), incoming_particles_[1].type(),
175  reaction_cross_section, ProcessType::Bremsstrahlung);
176  add_collision(std::move(dummy_process));
177 }
void add_collision(CollisionBranchPtr p)
Add a new collision channel.
@ Bremsstrahlung
See here for a short description.

◆ add_single_process()

void smash::BremsstrahlungAction::add_single_process ( )
inline

Add the photonic process.

Also compute the total cross section as a side effect.

Definition at line 94 of file bremsstrahlungaction.h.

94  {
95  add_processes<CollisionBranch>(brems_cross_sections(),
98  }
double cross_section_bremsstrahlung_
Total cross section of bremsstrahlung process.
CollisionBranchList brems_cross_sections()
Computes the total cross section of the bremsstrahlung process.

◆ bremsstrahlung_reaction_type()

BremsstrahlungAction::ReactionType smash::BremsstrahlungAction::bremsstrahlung_reaction_type ( const ParticleList &  in)
static

Determine photon process from incoming particles.

If incoming particles are not part of any implemented photonic process, return no_reaction.

Parameters
[in]inParticleList of incoming particles.
Returns
ReactionType enum-member

Definition at line 28 of file bremsstrahlungaction.cc.

28  {
29  if (in.size() != 2) {
31  }
32 
33  PdgCode a = in[0].pdgcode();
34  PdgCode b = in[1].pdgcode();
35 
36  switch (pack(a.code(), b.code())) {
37  case (pack(pdg::pi_z, pdg::pi_m)):
38  case (pack(pdg::pi_m, pdg::pi_z)):
40 
41  case (pack(pdg::pi_z, pdg::pi_p)):
42  case (pack(pdg::pi_p, pdg::pi_z)):
44 
45  case (pack(pdg::pi_m, pdg::pi_p)):
46  case (pack(pdg::pi_p, pdg::pi_m)):
48 
49  case (pack(pdg::pi_m, pdg::pi_m)):
51 
52  case (pack(pdg::pi_p, pdg::pi_p)):
54 
55  case (pack(pdg::pi_z, pdg::pi_z)):
57 
58  default:
60  }
61 }
constexpr int pi_p
π⁺.
constexpr int pi_z
π⁰.
constexpr int pi_m
π⁻.
constexpr uint64_t pack(int32_t x, int32_t y)
Pack two int32_t into an uint64_t.

◆ is_bremsstrahlung_reaction()

static bool smash::BremsstrahlungAction::is_bremsstrahlung_reaction ( const ParticleList &  in)
inlinestatic

Check if particles can undergo an implemented photon process.

This function does not check the involved kinematics.

Parameters
[in]inParticleList of incoming particles.
Returns
bool if photon reaction implemented.

Definition at line 134 of file bremsstrahlungaction.h.

134  {
136  }

◆ create_interpolations()

void smash::BremsstrahlungAction::create_interpolations ( )
private

Create interpolation objects for tabularized cross sections: total cross section, differential dSigma/dk, differential dSigma/dtheta.

Definition at line 320 of file bremsstrahlungaction.cc.

320  {
321  // Read in tabularized values for sqrt(s), k and theta
322  std::vector<double> sqrts = BREMS_SQRTS;
323  std::vector<double> photon_momentum = BREMS_K;
324  std::vector<double> photon_angle = BREMS_THETA;
325 
326  // Read in tabularized total cross sections
327  std::vector<double> sigma_pipi_pipi_opp = BREMS_PIPI_PIPI_OPP_SIG;
328  std::vector<double> sigma_pipi_pipi_same = BREMS_PIPI_PIPI_SAME_SIG;
329  std::vector<double> sigma_pipi0_pipi0 = BREMS_PIPI0_PIPI0_SIG;
330  std::vector<double> sigma_pipi_pi0pi0 = BREMS_PIPI_PI0PI0_SIG;
331  std::vector<double> sigma_pi0pi0_pipi = BREMS_PI0PI0_PIPI_SIG;
332 
333  // Read in tabularized differential cross sections dSigma/dk
334  std::vector<double> dsigma_dk_pipi_pipi_opp = BREMS_PIPI_PIPI_OPP_DIFF_SIG_K;
335  std::vector<double> dsigma_dk_pipi_pipi_same =
337  std::vector<double> dsigma_dk_pipi0_pipi0 = BREMS_PIPI0_PIPI0_DIFF_SIG_K;
338  std::vector<double> dsigma_dk_pipi_pi0pi0 = BREMS_PIPI_PI0PI0_DIFF_SIG_K;
339  std::vector<double> dsigma_dk_pi0pi0_pipi = BREMS_PI0PI0_PIPI_DIFF_SIG_K;
340 
341  // Read in tabularized differential cross sections dSigma/dtheta
342  std::vector<double> dsigma_dtheta_pipi_pipi_opp =
344  std::vector<double> dsigma_dtheta_pipi_pipi_same =
346  std::vector<double> dsigma_dtheta_pipi0_pipi0 =
348  std::vector<double> dsigma_dtheta_pipi_pi0pi0 =
350  std::vector<double> dsigma_dtheta_pi0pi0_pipi =
352 
353  // Create interpolation objects containing linear interpolations for
354  // total cross sections
355  pipi_pipi_opp_interpolation = std::make_unique<InterpolateDataLinear<double>>(
356  sqrts, sigma_pipi_pipi_opp);
358  std::make_unique<InterpolateDataLinear<double>>(sqrts,
359  sigma_pipi_pipi_same);
361  std::make_unique<InterpolateDataLinear<double>>(sqrts, sigma_pipi0_pipi0);
363  std::make_unique<InterpolateDataLinear<double>>(sqrts, sigma_pipi_pi0pi0);
365  std::make_unique<InterpolateDataLinear<double>>(sqrts, sigma_pi0pi0_pipi);
366 
367  // Create interpolation objects containing bicubic interpolations for
368  // differential dSigma/dk
370  std::make_unique<InterpolateData2DSpline>(photon_momentum, sqrts,
371  dsigma_dk_pipi_pipi_opp);
373  std::make_unique<InterpolateData2DSpline>(photon_momentum, sqrts,
374  dsigma_dk_pipi_pipi_same);
376  std::make_unique<InterpolateData2DSpline>(photon_momentum, sqrts,
377  dsigma_dk_pipi0_pipi0);
379  std::make_unique<InterpolateData2DSpline>(photon_momentum, sqrts,
380  dsigma_dk_pipi_pi0pi0);
382  std::make_unique<InterpolateData2DSpline>(photon_momentum, sqrts,
383  dsigma_dk_pi0pi0_pipi);
384 
385  // Create interpolation objects containing bicubic interpolations for
386  // differential dSigma/dtheta
388  std::make_unique<InterpolateData2DSpline>(photon_angle, sqrts,
389  dsigma_dtheta_pipi_pipi_opp);
391  std::make_unique<InterpolateData2DSpline>(photon_angle, sqrts,
392  dsigma_dtheta_pipi_pipi_same);
394  std::make_unique<InterpolateData2DSpline>(photon_angle, sqrts,
395  dsigma_dtheta_pipi0_pipi0);
397  std::make_unique<InterpolateData2DSpline>(photon_angle, sqrts,
398  dsigma_dtheta_pipi_pi0pi0);
400  std::make_unique<InterpolateData2DSpline>(photon_angle, sqrts,
401  dsigma_dtheta_pi0pi0_pipi);
402 }
static std::unique_ptr< InterpolateData2DSpline > pipi_pi0pi0_dsigma_dk_interpolation
const std::initializer_list< double > BREMS_PIPI_PIPI_SAME_DIFF_SIG_K
dSigma/dk for π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ
const std::initializer_list< double > BREMS_PIPI_PI0PI0_SIG
Total π+- + π-+ -> π0 + π0 + γ cross section.
static std::unique_ptr< InterpolateDataLinear< double > > pipi_pipi_opp_interpolation
const std::initializer_list< double > BREMS_PIPI_PIPI_OPP_SIG
Total π+- + π-+ -> π+- + π-+ + γ cross section.
const std::initializer_list< double > BREMS_PIPI_PI0PI0_DIFF_SIG_THETA
dSigma/dtheta for π+- + π-+ -> π0 + π0 + γ
const std::initializer_list< double > BREMS_PIPI0_PIPI0_DIFF_SIG_K
dSigma/dk for π0 + π -> π0 + π + γ
const std::initializer_list< double > BREMS_PIPI_PIPI_SAME_SIG
Total π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ cross section.
static std::unique_ptr< InterpolateDataLinear< double > > pipi_pipi_same_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi0_pipi0_dsigma_dtheta_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi_pipi_opp_dsigma_dk_interpolation
static std::unique_ptr< InterpolateData2DSpline > pi0pi0_pipi_dsigma_dk_interpolation
static std::unique_ptr< InterpolateDataLinear< double > > pipi0_pipi0_interpolation
const std::initializer_list< double > BREMS_PIPI_PIPI_OPP_DIFF_SIG_THETA
dSigma/dtheta for π+- + π-+ -> π+- + π-+ + γ
static std::unique_ptr< InterpolateData2DSpline > pipi0_pipi0_dsigma_dk_interpolation
const std::initializer_list< double > BREMS_PI0PI0_PIPI_SIG
Total π0 + π0 -> π+- + π-+ + γ cross section.
const std::initializer_list< double > BREMS_K
photon momentum
const std::initializer_list< double > BREMS_SQRTS
Center-of-mass energy.
const std::initializer_list< double > BREMS_THETA
theta angle with respect to collision axis of incoming pions
const std::initializer_list< double > BREMS_PI0PI0_PIPI_DIFF_SIG_THETA
dSigma/dtheta for π0 + π0 -> π+- + π-+ + γ
static std::unique_ptr< InterpolateDataLinear< double > > pipi_pi0pi0_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi_pipi_same_dsigma_dtheta_interpolation
const std::initializer_list< double > BREMS_PIPI0_PIPI0_SIG
Total π0 + π -> π0 + π + γ cross section.
const std::initializer_list< double > BREMS_PI0PI0_PIPI_DIFF_SIG_K
dSigma/dk for π0 + π0 -> π+- + π-+ + γ
const std::initializer_list< double > BREMS_PIPI_PI0PI0_DIFF_SIG_K
dSigma/dk for π+- + π-+ -> π0 + π0 + γ
static std::unique_ptr< InterpolateDataLinear< double > > pi0pi0_pipi_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi_pipi_same_dsigma_dk_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi_pi0pi0_dsigma_dtheta_interpolation
static std::unique_ptr< InterpolateData2DSpline > pi0pi0_pipi_dsigma_dtheta_interpolation
const std::initializer_list< double > BREMS_PIPI_PIPI_OPP_DIFF_SIG_K
dSigma/dk for π+- + π-+ -> π+- + π-+ + γ
static std::unique_ptr< InterpolateData2DSpline > pipi_pipi_opp_dsigma_dtheta_interpolation
const std::initializer_list< double > BREMS_PIPI0_PIPI0_DIFF_SIG_THETA
dSigma/dtheta for π0 + π -> π0 + π + γ
const std::initializer_list< double > BREMS_PIPI_PIPI_SAME_DIFF_SIG_THETA
dSigma/dtheta for π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ

◆ brems_cross_sections()

CollisionBranchList smash::BremsstrahlungAction::brems_cross_sections ( )
private

Computes the total cross section of the bremsstrahlung process.

Returns
List of photon reaction branches.

Definition at line 179 of file bremsstrahlungaction.cc.

179  {
180  CollisionBranchList process_list;
181  // ParticleList final_state_particles;
182  static const ParticleTypePtr photon_particle =
184  static const ParticleTypePtr pi_z_particle = &ParticleType::find(pdg::pi_z);
185  static const ParticleTypePtr pi_p_particle = &ParticleType::find(pdg::pi_p);
186  static const ParticleTypePtr pi_m_particle = &ParticleType::find(pdg::pi_m);
187 
188  // Create interpolation objects, if not yet existent; only trigger for one
189  // of them as either all or none is created
192  }
193 
194  // Find cross section corresponding to given sqrt(s)
195  double sqrts = sqrt_s();
196  double xsection;
197 
199  // Here the final state is determined by the the final state provided by the
200  // sampled process using Monte Carlo techniqus
201 
202  // In the case of two oppositely charged pions as incoming particles,
203  // there are two potential final states: pi+ + pi- and pi0 + pi0
204  double xsection_pipi = (*pipi_pipi_opp_interpolation)(sqrts);
205  double xsection_pi0pi0 = (*pipi_pi0pi0_interpolation)(sqrts);
206 
207  // Prevent negative cross sections due to numerics in interpolation
208  xsection_pipi = (xsection_pipi <= 0.0) ? really_small : xsection_pipi;
209  xsection_pi0pi0 = (xsection_pi0pi0 <= 0.0) ? really_small : xsection_pi0pi0;
210 
211  // Necessary only to decide for a final state with pi+ and pi- as incoming
212  // particles.
213  CollisionBranchList process_list_pipi;
214 
215  // Add both processes to the process_list
216  process_list_pipi.push_back(std::make_unique<CollisionBranch>(
217  incoming_particles_[0].type(), incoming_particles_[1].type(),
218  *photon_particle, xsection_pipi, ProcessType::Bremsstrahlung));
219  process_list_pipi.push_back(std::make_unique<CollisionBranch>(
220  *pi_z_particle, *pi_z_particle, *photon_particle, xsection_pi0pi0,
222 
223  // Decide for one of the possible final states
224  double total_cross_section = xsection_pipi + xsection_pi0pi0;
225  const CollisionBranch *proc =
226  choose_channel<CollisionBranch>(process_list_pipi, total_cross_section);
227 
228  xsection = proc->weight();
229 
230  process_list.push_back(std::make_unique<CollisionBranch>(
231  proc->particle_list()[0].type(), proc->particle_list()[1].type(),
232  *photon_particle, xsection, ProcessType::Bremsstrahlung));
233 
234  } else if (reac_ == ReactionType::pi_m_pi_m ||
238  // Here the final state hadrons are identical to the initial state hadrons
240  xsection = (*pipi_pipi_same_interpolation)(sqrts);
241  } else {
242  // One pi0 in initial and final state
243  xsection = (*pipi0_pipi0_interpolation)(sqrts);
244  }
245 
246  // Prevent negative cross sections due to numerics in interpolation
247  xsection = (xsection <= 0.0) ? really_small : xsection;
248 
249  process_list.push_back(std::make_unique<CollisionBranch>(
250  incoming_particles_[0].type(), incoming_particles_[1].type(),
251  *photon_particle, xsection, ProcessType::Bremsstrahlung));
252 
253  } else if (reac_ == ReactionType::pi_z_pi_z) {
254  // Here we have a hard-coded final state that differs from the initial
255  // state, namely: pi0 + pi0 -> pi+- + pi-+ + gamma
256  xsection = (*pi0pi0_pipi_interpolation)(sqrts);
257 
258  // Prevent negative cross sections due to numerics in interpolation
259  xsection = (xsection <= 0.0) ? really_small : xsection;
260 
261  process_list.push_back(std::make_unique<CollisionBranch>(
262  *pi_p_particle, *pi_m_particle, *photon_particle, xsection,
264  } else {
265  throw std::runtime_error("Unknown ReactionType in BremsstrahlungAction.");
266  }
267 
268  return process_list;
269 }
void create_interpolations()
Create interpolation objects for tabularized cross sections: total cross section, differential dSigma...
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
Definition: particletype.cc:99
constexpr int photon
Photon.
constexpr double really_small
Numerical error tolerance.
Definition: constants.h:37

◆ brems_diff_cross_sections()

std::pair< double, double > smash::BremsstrahlungAction::brems_diff_cross_sections ( )
private

Computes the differential cross sections dSigma/dk and dSigma/dtheta of the bremsstrahlung process.

Returns
Pair containing dSigma/dk as a first argument and dSigma/dtheta as a second argument

Definition at line 271 of file bremsstrahlungaction.cc.

271  {
272  static const ParticleTypePtr pi_z_particle = &ParticleType::find(pdg::pi_z);
273  const double collision_energy = sqrt_s();
274  double dsigma_dk;
275  double dsigma_dtheta;
276 
278  if (outgoing_particles_[0].type() != *pi_z_particle) {
279  // pi+- + pi+-- -> pi+- + pi+- + gamma
280  dsigma_dk =
281  (*pipi_pipi_opp_dsigma_dk_interpolation)(k_, collision_energy);
282  dsigma_dtheta = (*pipi_pipi_opp_dsigma_dtheta_interpolation)(
283  theta_, collision_energy);
284  } else {
285  // pi+- + pi+-- -> pi0 + pi0 + gamma
286  dsigma_dk = (*pipi_pi0pi0_dsigma_dk_interpolation)(k_, collision_energy);
287  dsigma_dtheta =
288  (*pipi_pi0pi0_dsigma_dtheta_interpolation)(theta_, collision_energy);
289  }
290  } else if (reac_ == ReactionType::pi_p_pi_p ||
292  dsigma_dk = (*pipi_pipi_same_dsigma_dk_interpolation)(k_, collision_energy);
293  dsigma_dtheta =
294  (*pipi_pipi_same_dsigma_dtheta_interpolation)(theta_, collision_energy);
295  } else if (reac_ == ReactionType::pi_z_pi_p ||
297  dsigma_dk = (*pipi0_pipi0_dsigma_dk_interpolation)(k_, collision_energy);
298  dsigma_dtheta =
299  (*pipi0_pipi0_dsigma_dtheta_interpolation)(theta_, collision_energy);
300  } else if (reac_ == ReactionType::pi_z_pi_z) {
301  dsigma_dk = (*pi0pi0_pipi_dsigma_dk_interpolation)(k_, collision_energy);
302  dsigma_dtheta =
303  (*pi0pi0_pipi_dsigma_dtheta_interpolation)(theta_, collision_energy);
304  } else {
305  throw std::runtime_error(
306  "Unkown channel when computing differential cross sections for "
307  "bremsstrahlung processes.");
308  }
309 
310  // Prevent negative cross sections due to numerics in interpolation
311  dsigma_dk = (dsigma_dk < 0.0) ? really_small : dsigma_dk;
312  dsigma_dtheta = (dsigma_dtheta < 0.0) ? really_small : dsigma_dtheta;
313 
314  // Combine differential cross sections to a pair
315  std::pair<double, double> diff_x_sections = {dsigma_dk, dsigma_dtheta};
316 
317  return diff_x_sections;
318 }

Member Data Documentation

◆ collision_processes_bremsstrahlung_

CollisionBranchList smash::BremsstrahlungAction::collision_processes_bremsstrahlung_
private

Holds the bremsstrahlung branch.

As of now, this will always hold only one branch.

Definition at line 143 of file bremsstrahlungaction.h.

◆ reac_

const ReactionType smash::BremsstrahlungAction::reac_
private

Reaction process as determined from incoming particles.

Definition at line 146 of file bremsstrahlungaction.h.

◆ number_of_fractional_photons_

const int smash::BremsstrahlungAction::number_of_fractional_photons_
private

Number of photons created for each hadronic scattering, needed for correct weighting.

Note that in generate_final_state() only one photon + two pions are created.

Definition at line 153 of file bremsstrahlungaction.h.

◆ weight_

double smash::BremsstrahlungAction::weight_ = 0.0
private

Weight of the produced photon.

Definition at line 156 of file bremsstrahlungaction.h.

◆ cross_section_bremsstrahlung_

double smash::BremsstrahlungAction::cross_section_bremsstrahlung_ = 0.0
private

Total cross section of bremsstrahlung process.

Definition at line 159 of file bremsstrahlungaction.h.

◆ hadronic_cross_section_

const double smash::BremsstrahlungAction::hadronic_cross_section_
private

Total hadronic cross section.

Definition at line 162 of file bremsstrahlungaction.h.

◆ k_

double smash::BremsstrahlungAction::k_
private

Sampled value of k (photon momentum)

Definition at line 165 of file bremsstrahlungaction.h.

◆ theta_

double smash::BremsstrahlungAction::theta_
private

Sampled value of theta (angle of the photon)

Definition at line 168 of file bremsstrahlungaction.h.


The documentation for this class was generated from the following files: