Version: SMASH-2.0
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:
[legend]
Collaboration diagram for smash::BremsstrahlungAction:
[legend]

Public Types

enum  ReactionType {
  ReactionType::no_reaction, ReactionType::pi_z_pi_m, ReactionType::pi_z_pi_p, ReactionType::pi_p_pi_m,
  ReactionType::pi_m_pi_m, ReactionType::pi_p_pi_p, ReactionType::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 () override
 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)
 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 (double elastic_parameter, bool two_to_one, ReactionsBitSet included_2to2, MultiParticleReactionsBitSet included_multi, double low_snn_cut, bool strings_switch, bool use_AQM, bool strings_with_probability, NNbarTreatment nnbar_treatment, double scale_xs, double additional_el_xs)
 Add all possible scattering subprocesses for this action object. 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. 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 void 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 Particles &particles, 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 void 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...
 

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_three_scattering ()
 Perform a two-to-three-body scattering. 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
 
- 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...
 
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 total_cross_section_
 Total hadronic cross section. 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/c). 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 18 of file bremsstrahlungaction.cc.

21  : ScatterAction(in[0], in[1], time),
23  number_of_fractional_photons_(n_frac_photons),
24  hadronic_cross_section_(hadronic_cross_section_input) {}

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 62 of file bremsstrahlungaction.cc.

62  {
63  for (int i = 0; i < number_of_fractional_photons_; i++) {
65  for (const auto &output : outputs) {
66  if (output->is_photon_output()) {
67  // we do not care about the local density
68  output->at_interaction(*this, 0.0);
69  }
70  }
71  }
72 }
Here is the call graph for this function:

◆ 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 74 of file bremsstrahlungaction.cc.

74  {
75  // we have only one reaction per incoming particle pair
76  if (collision_processes_bremsstrahlung_.size() != 1) {
77  logg[LScatterAction].fatal()
78  << "Problem in BremsstrahlungAction::generate_final_state().\nThe "
79  "brocess branch has "
81  << " entries. It should however have 1.";
82  throw std::runtime_error("");
83  }
84 
85  auto *proc = collision_processes_bremsstrahlung_[0].get();
86 
87  outgoing_particles_ = proc->particle_list();
88  process_type_ = proc->get_type();
89  FourVector interaction_point = get_interaction_point();
90 
91  // Sample k and theta:
92  // minimum cutoff for k to be in accordance with cross section calculations
93  double delta_k; // k-range
94  double k_min = 0.001;
95  double k_max =
96  (sqrt_s() * sqrt_s() - 2 * outgoing_particles_[0].type().mass() * 2 *
97  outgoing_particles_[1].type().mass()) /
98  (2 * sqrt_s());
99 
100  if ((k_max - k_min) < 0.0) {
101  // Make sure it is kinematically even possible to create a photon that is
102  // in accordance with the cross section cutoff
103  k_ = 0.0;
104  delta_k = 0.0;
105  } else {
106  k_ = random::uniform(k_min, k_max);
107  delta_k = (k_max - k_min);
108  }
109  theta_ = random::uniform(0.0, M_PI);
110 
111  // Sample the phase space anisotropically in the local rest frame
113 
114  // Get differential cross sections
115  std::pair<double, double> diff_xs_pair = brems_diff_cross_sections();
116  double diff_xs_k = diff_xs_pair.first;
117  double diff_xs_theta = diff_xs_pair.second;
118 
119  // Assign weighting factor
120  const double W_theta = diff_xs_theta * (M_PI - 0.0);
121  const double W_k = diff_xs_k * delta_k;
122  weight_ = std::sqrt(W_theta * W_k) /
124 
125  // Scale weight by cross section scaling factor of incoming particles
126  weight_ *= incoming_particles_[0].xsec_scaling_factor() *
127  incoming_particles_[1].xsec_scaling_factor();
128 
129  // Set position and formation time and boost back to computational frame
130  for (auto &new_particle : outgoing_particles_) {
131  // assuming decaying particles are always fully formed
132  new_particle.set_formation_time(time_of_execution_);
133  new_particle.set_4position(interaction_point);
134  new_particle.boost_momentum(
136  }
137 
138  // Photons are not really part of the normal processes, so we have to set a
139  // constant arbitrary number.
140  const auto id_process = ID_PROCESS_PHOTON;
141  Action::check_conservation(id_process);
142 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sample_3body_phasespace()

void smash::BremsstrahlungAction::sample_3body_phasespace ( )
overridevirtual

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

Reimplemented from smash::Action.

Definition at line 144 of file bremsstrahlungaction.cc.

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

◆ 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_; }
Here is the caller graph for this function:

◆ 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 170 of file bremsstrahlungaction.cc.

171  {
172  CollisionBranchPtr dummy_process = make_unique<CollisionBranch>(
173  incoming_particles_[0].type(), incoming_particles_[1].type(),
174  reaction_cross_section, ProcessType::Bremsstrahlung);
175  add_collision(std::move(dummy_process));
176 }
Here is the call graph for this function:

◆ 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  }
Here is the call graph for this function:

◆ 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 27 of file bremsstrahlungaction.cc.

27  {
28  if (in.size() != 2) {
30  }
31 
32  PdgCode a = in[0].pdgcode();
33  PdgCode b = in[1].pdgcode();
34 
35  switch (pack(a.code(), b.code())) {
36  case (pack(pdg::pi_z, pdg::pi_m)):
37  case (pack(pdg::pi_m, pdg::pi_z)):
39 
40  case (pack(pdg::pi_z, pdg::pi_p)):
41  case (pack(pdg::pi_p, pdg::pi_z)):
43 
44  case (pack(pdg::pi_m, pdg::pi_p)):
45  case (pack(pdg::pi_p, pdg::pi_m)):
47 
48  case (pack(pdg::pi_m, pdg::pi_m)):
50 
51  case (pack(pdg::pi_p, pdg::pi_p)):
53 
54  case (pack(pdg::pi_z, pdg::pi_z)):
56 
57  default:
59  }
60 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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  }
Here is the call graph for this function:

◆ 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 319 of file bremsstrahlungaction.cc.

319  {
320  // Read in tabularized values for sqrt(s), k and theta
321  std::vector<double> sqrts = BREMS_SQRTS;
322  std::vector<double> photon_momentum = BREMS_K;
323  std::vector<double> photon_angle = BREMS_THETA;
324 
325  // Read in tabularized total cross sections
326  std::vector<double> sigma_pipi_pipi_opp = BREMS_PIPI_PIPI_OPP_SIG;
327  std::vector<double> sigma_pipi_pipi_same = BREMS_PIPI_PIPI_SAME_SIG;
328  std::vector<double> sigma_pipi0_pipi0 = BREMS_PIPI0_PIPI0_SIG;
329  std::vector<double> sigma_pipi_pi0pi0 = BREMS_PIPI_PI0PI0_SIG;
330  std::vector<double> sigma_pi0pi0_pipi = BREMS_PI0PI0_PIPI_SIG;
331 
332  // Read in tabularized differential cross sections dSigma/dk
333  std::vector<double> dsigma_dk_pipi_pipi_opp = BREMS_PIPI_PIPI_OPP_DIFF_SIG_K;
334  std::vector<double> dsigma_dk_pipi_pipi_same =
336  std::vector<double> dsigma_dk_pipi0_pipi0 = BREMS_PIPI0_PIPI0_DIFF_SIG_K;
337  std::vector<double> dsigma_dk_pipi_pi0pi0 = BREMS_PIPI_PI0PI0_DIFF_SIG_K;
338  std::vector<double> dsigma_dk_pi0pi0_pipi = BREMS_PI0PI0_PIPI_DIFF_SIG_K;
339 
340  // Read in tabularized differential cross sections dSigma/dtheta
341  std::vector<double> dsigma_dtheta_pipi_pipi_opp =
343  std::vector<double> dsigma_dtheta_pipi_pipi_same =
345  std::vector<double> dsigma_dtheta_pipi0_pipi0 =
347  std::vector<double> dsigma_dtheta_pipi_pi0pi0 =
349  std::vector<double> dsigma_dtheta_pi0pi0_pipi =
351 
352  // Create interpolation objects containing linear interpolations for
353  // total cross sections
355  make_unique<InterpolateDataLinear<double>>(sqrts, sigma_pipi_pipi_opp);
357  make_unique<InterpolateDataLinear<double>>(sqrts, sigma_pipi_pipi_same);
359  make_unique<InterpolateDataLinear<double>>(sqrts, sigma_pipi0_pipi0);
361  make_unique<InterpolateDataLinear<double>>(sqrts, sigma_pipi_pi0pi0);
363  make_unique<InterpolateDataLinear<double>>(sqrts, sigma_pi0pi0_pipi);
364 
365  // Create interpolation objects containing bicubic interpolations for
366  // differential dSigma/dk
367  pipi_pipi_opp_dsigma_dk_interpolation = make_unique<InterpolateData2DSpline>(
368  photon_momentum, sqrts, dsigma_dk_pipi_pipi_opp);
369  pipi_pipi_same_dsigma_dk_interpolation = make_unique<InterpolateData2DSpline>(
370  photon_momentum, sqrts, dsigma_dk_pipi_pipi_same);
371  pipi0_pipi0_dsigma_dk_interpolation = make_unique<InterpolateData2DSpline>(
372  photon_momentum, sqrts, dsigma_dk_pipi0_pipi0);
373  pipi_pi0pi0_dsigma_dk_interpolation = make_unique<InterpolateData2DSpline>(
374  photon_momentum, sqrts, dsigma_dk_pipi_pi0pi0);
375  pi0pi0_pipi_dsigma_dk_interpolation = make_unique<InterpolateData2DSpline>(
376  photon_momentum, sqrts, dsigma_dk_pi0pi0_pipi);
377 
378  // Create interpolation objects containing bicubic interpolations for
379  // differential dSigma/dtheta
381  make_unique<InterpolateData2DSpline>(photon_angle, sqrts,
382  dsigma_dtheta_pipi_pipi_opp);
384  make_unique<InterpolateData2DSpline>(photon_angle, sqrts,
385  dsigma_dtheta_pipi_pipi_same);
387  make_unique<InterpolateData2DSpline>(photon_angle, sqrts,
388  dsigma_dtheta_pipi0_pipi0);
390  make_unique<InterpolateData2DSpline>(photon_angle, sqrts,
391  dsigma_dtheta_pipi_pi0pi0);
393  make_unique<InterpolateData2DSpline>(photon_angle, sqrts,
394  dsigma_dtheta_pi0pi0_pipi);
395 }
Here is the caller graph for this function:

◆ 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 178 of file bremsstrahlungaction.cc.

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

◆ 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 270 of file bremsstrahlungaction.cc.

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

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:
smash::pipi_pipi_same_interpolation
static std::unique_ptr< InterpolateDataLinear< double > > pipi_pipi_same_interpolation
Definition: crosssectionsbrems.h:8969
smash::Action::incoming_particles_
ParticleList incoming_particles_
List with data of incoming particles.
Definition: action.h:326
smash::BremsstrahlungAction::create_interpolations
void create_interpolations()
Create interpolation objects for tabularized cross sections: total cross section, differential dSigma...
Definition: bremsstrahlungaction.cc:319
smash::BREMS_PIPI_PIPI_SAME_DIFF_SIG_K
const std::initializer_list< double > BREMS_PIPI_PIPI_SAME_DIFF_SIG_K
dSigma/dk for π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ
Definition: crosssectionsbrems.h:9025
smash::BremsstrahlungAction::brems_cross_sections
CollisionBranchList brems_cross_sections()
Computes the total cross section of the bremsstrahlung process.
Definition: bremsstrahlungaction.cc:178
smash::BREMS_PIPI_PI0PI0_SIG
const std::initializer_list< double > BREMS_PIPI_PI0PI0_SIG
Total π+- + π-+ -> π0 + π0 + γ cross section.
Definition: crosssectionsbrems.h:27647
smash::BREMS_PI0PI0_PIPI_DIFF_SIG_THETA
const std::initializer_list< double > BREMS_PI0PI0_PIPI_DIFF_SIG_THETA
dSigma/dtheta for π0 + π0 -> π+- + π-+ + γ
Definition: crosssectionsbrems.h:41341
smash::Action::time_of_execution_
const double time_of_execution_
Time at which the action is supposed to be performed (absolute time in the lab frame in fm/c).
Definition: action.h:340
smash::BREMS_K
const std::initializer_list< double > BREMS_K
photon momentum
Definition: crosssectionsbrems.h:50
smash::BREMS_PIPI_PI0PI0_DIFF_SIG_K
const std::initializer_list< double > BREMS_PIPI_PI0PI0_DIFF_SIG_K
dSigma/dk for π+- + π-+ -> π0 + π0 + γ
Definition: crosssectionsbrems.h:27695
smash::BREMS_PIPI_PIPI_OPP_SIG
const std::initializer_list< double > BREMS_PIPI_PIPI_OPP_SIG
Total π+- + π-+ -> π+- + π-+ + γ cross section.
Definition: crosssectionsbrems.h:97
smash::BremsstrahlungAction::number_of_fractional_photons_
const int number_of_fractional_photons_
Number of photons created for each hadronic scattering, needed for correct weighting.
Definition: bremsstrahlungaction.h:153
smash::BremsstrahlungAction::ReactionType::pi_z_pi_z
smash::BremsstrahlungAction::k_
double k_
Sampled value of k (photon momentum)
Definition: bremsstrahlungaction.h:165
smash::pipi_pipi_opp_dsigma_dtheta_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi_pipi_opp_dsigma_dtheta_interpolation
Definition: crosssectionsbrems.h:93
smash::pipi0_pipi0_interpolation
static std::unique_ptr< InterpolateDataLinear< double > > pipi0_pipi0_interpolation
Definition: crosssectionsbrems.h:18754
smash::BREMS_SQRTS
const std::initializer_list< double > BREMS_SQRTS
Center-of-mass energy.
Definition: crosssectionsbrems.h:24
smash::BremsstrahlungAction::brems_diff_cross_sections
std::pair< double, double > brems_diff_cross_sections()
Computes the differential cross sections dSigma/dk and dSigma/dtheta of the bremsstrahlung process.
Definition: bremsstrahlungaction.cc:270
smash::BREMS_PI0PI0_PIPI_DIFF_SIG_K
const std::initializer_list< double > BREMS_PI0PI0_PIPI_DIFF_SIG_K
dSigma/dk for π0 + π0 -> π+- + π-+ + γ
Definition: crosssectionsbrems.h:35938
smash::BremsstrahlungAction::bremsstrahlung_reaction_type
static ReactionType bremsstrahlung_reaction_type(const ParticleList &in)
Determine photon process from incoming particles.
Definition: bremsstrahlungaction.cc:27
smash::Action::check_conservation
virtual void check_conservation(const uint32_t id_process) const
Check various conservation laws.
Definition: action.cc:345
smash::BremsstrahlungAction::sample_3body_phasespace
void sample_3body_phasespace() override
Sample the final state anisotropically, considering the differential cross sections with respect to t...
Definition: bremsstrahlungaction.cc:144
smash::BremsstrahlungAction::ReactionType::pi_z_pi_m
smash::BremsstrahlungAction::hadronic_cross_section
double hadronic_cross_section() const
Return the total cross section of the underlying hadronic scattering It is necessary for the weightin...
Definition: bremsstrahlungaction.h:76
smash::BREMS_PIPI_PI0PI0_DIFF_SIG_THETA
const std::initializer_list< double > BREMS_PIPI_PI0PI0_DIFF_SIG_THETA
dSigma/dtheta for π+- + π-+ -> π0 + π0 + γ
Definition: crosssectionsbrems.h:31556
smash::pi0pi0_pipi_interpolation
static std::unique_ptr< InterpolateDataLinear< double > > pi0pi0_pipi_interpolation
Definition: crosssectionsbrems.h:35882
smash::pipi_pipi_opp_interpolation
static std::unique_ptr< InterpolateDataLinear< double > > pipi_pipi_opp_interpolation
Definition: crosssectionsbrems.h:89
smash::BremsstrahlungAction::ReactionType::pi_m_pi_m
smash::BREMS_THETA
const std::initializer_list< double > BREMS_THETA
theta angle with respect to collision axis of incoming pions
Definition: crosssectionsbrems.h:70
smash::pdg::pi_z
constexpr int pi_z
π⁰.
Definition: pdgcode_constants.h:64
smash::logg
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
Definition: logging.cc:39
smash::pdg::photon
constexpr int photon
Photon.
Definition: pdgcode_constants.h:25
smash::BremsstrahlungAction::weight_
double weight_
Weight of the produced photon.
Definition: bremsstrahlungaction.h:156
smash::pCM
T pCM(const T sqrts, const T mass_a, const T mass_b) noexcept
Definition: kinematics.h:79
smash::really_small
constexpr double really_small
Numerical error tolerance.
Definition: constants.h:37
smash::ParticleType::find
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
Definition: particletype.cc:99
smash::pipi_pi0pi0_interpolation
static std::unique_ptr< InterpolateDataLinear< double > > pipi_pi0pi0_interpolation
Definition: crosssectionsbrems.h:27639
smash::BremsstrahlungAction::theta_
double theta_
Sampled value of theta (angle of the photon)
Definition: bremsstrahlungaction.h:168
smash::ScatterAction::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)
Construct a ScatterAction object.
Definition: scatteraction.cc:29
smash::BREMS_PIPI0_PIPI0_DIFF_SIG_THETA
const std::initializer_list< double > BREMS_PIPI0_PIPI0_DIFF_SIG_THETA
dSigma/dtheta for π0 + π -> π0 + π + γ
Definition: crosssectionsbrems.h:23313
smash::BREMS_PIPI_PIPI_OPP_DIFF_SIG_THETA
const std::initializer_list< double > BREMS_PIPI_PIPI_OPP_DIFF_SIG_THETA
dSigma/dtheta for π+- + π-+ -> π+- + π-+ + γ
Definition: crosssectionsbrems.h:4642
smash::twopi
constexpr double twopi
.
Definition: constants.h:42
smash::BremsstrahlungAction::collision_processes_bremsstrahlung_
CollisionBranchList collision_processes_bremsstrahlung_
Holds the bremsstrahlung branch.
Definition: bremsstrahlungaction.h:143
smash::pipi0_pipi0_dsigma_dtheta_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi0_pipi0_dsigma_dtheta_interpolation
Definition: crosssectionsbrems.h:18758
smash::Action::process_type_
ProcessType process_type_
type of process
Definition: action.h:343
smash::BREMS_PIPI0_PIPI0_DIFF_SIG_K
const std::initializer_list< double > BREMS_PIPI0_PIPI0_DIFF_SIG_K
dSigma/dk for π0 + π -> π0 + π + γ
Definition: crosssectionsbrems.h:18810
smash::LScatterAction
static constexpr int LScatterAction
Definition: bremsstrahlungaction.cc:16
smash::BremsstrahlungAction::cross_section_bremsstrahlung_
double cross_section_bremsstrahlung_
Total cross section of bremsstrahlung process.
Definition: bremsstrahlungaction.h:159
smash::Action::total_momentum_of_outgoing_particles
FourVector total_momentum_of_outgoing_particles() const
Calculate the total kinetic momentum of the outgoing particles.
Definition: action.cc:152
smash::ProcessType::Bremsstrahlung
bremsstrahlung process: a + b -> a + b + photon
smash::pipi_pipi_same_dsigma_dtheta_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi_pipi_same_dsigma_dtheta_interpolation
Definition: crosssectionsbrems.h:8973
smash::BremsstrahlungAction::ReactionType::pi_p_pi_m
smash::BREMS_PIPI_PIPI_SAME_DIFF_SIG_THETA
const std::initializer_list< double > BREMS_PIPI_PIPI_SAME_DIFF_SIG_THETA
dSigma/dtheta for π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ
Definition: crosssectionsbrems.h:14428
smash::Action::outgoing_particles_
ParticleList outgoing_particles_
Initially this stores only the PDG codes of final-state particles.
Definition: action.h:334
smash::Action::sqrt_s
double sqrt_s() const
Determine the total energy in the center-of-mass frame [GeV].
Definition: action.h:266
smash::BremsstrahlungAction::ReactionType::pi_p_pi_p
smash::pipi_pipi_same_dsigma_dk_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi_pipi_same_dsigma_dk_interpolation
Definition: crosssectionsbrems.h:8971
smash::BREMS_PI0PI0_PIPI_SIG
const std::initializer_list< double > BREMS_PI0PI0_PIPI_SIG
Total π0 + π0 -> π+- + π-+ + γ cross section.
Definition: crosssectionsbrems.h:35890
smash::pi0pi0_pipi_dsigma_dtheta_interpolation
static std::unique_ptr< InterpolateData2DSpline > pi0pi0_pipi_dsigma_dtheta_interpolation
Definition: crosssectionsbrems.h:35886
smash::BremsstrahlungAction::reac_
const ReactionType reac_
Reaction process as determined from incoming particles.
Definition: bremsstrahlungaction.h:146
smash::ScatterAction::add_collision
void add_collision(CollisionBranchPtr p)
Add a new collision channel.
Definition: scatteraction.cc:40
smash::BremsstrahlungAction::ReactionType::pi_z_pi_p
smash::pipi0_pipi0_dsigma_dk_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi0_pipi0_dsigma_dk_interpolation
Definition: crosssectionsbrems.h:18756
smash::Action::get_interaction_point
FourVector get_interaction_point() const
Get the interaction point.
Definition: action.cc:67
smash::BREMS_PIPI0_PIPI0_SIG
const std::initializer_list< double > BREMS_PIPI0_PIPI0_SIG
Total π0 + π -> π0 + π + γ cross section.
Definition: crosssectionsbrems.h:18762
smash::random::uniform
T uniform(T min, T max)
Definition: random.h:88
smash::ID_PROCESS_PHOTON
constexpr std::uint32_t ID_PROCESS_PHOTON
Process ID for any photon process.
Definition: constants.h:118
smash::pi0pi0_pipi_dsigma_dk_interpolation
static std::unique_ptr< InterpolateData2DSpline > pi0pi0_pipi_dsigma_dk_interpolation
Definition: crosssectionsbrems.h:35884
smash::pipi_pi0pi0_dsigma_dtheta_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi_pi0pi0_dsigma_dtheta_interpolation
Definition: crosssectionsbrems.h:27643
smash::BREMS_PIPI_PIPI_OPP_DIFF_SIG_K
const std::initializer_list< double > BREMS_PIPI_PIPI_OPP_DIFF_SIG_K
dSigma/dk for π+- + π-+ -> π+- + π-+ + γ
Definition: crosssectionsbrems.h:139
smash::pdg::pi_m
constexpr int pi_m
π⁻.
Definition: pdgcode_constants.h:66
smash::BREMS_PIPI_PIPI_SAME_SIG
const std::initializer_list< double > BREMS_PIPI_PIPI_SAME_SIG
Total π+ + π+ -> π+ + π+ + γ or π- + π- -> π- + π- + γ cross section.
Definition: crosssectionsbrems.h:8977
smash::BremsstrahlungAction::ReactionType::no_reaction
smash::pdg::pi_p
constexpr int pi_p
π⁺.
Definition: pdgcode_constants.h:62
smash::BremsstrahlungAction::generate_final_state
void generate_final_state() override
Generate the final-state for the Bremsstrahlung process.
Definition: bremsstrahlungaction.cc:74
smash::pack
constexpr uint64_t pack(int32_t x, int32_t y)
Pack two int32_t into an uint64_t.
Definition: pdgcode_constants.h:107
smash::pipi_pi0pi0_dsigma_dk_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi_pi0pi0_dsigma_dk_interpolation
Definition: crosssectionsbrems.h:27641
smash::pipi_pipi_opp_dsigma_dk_interpolation
static std::unique_ptr< InterpolateData2DSpline > pipi_pipi_opp_dsigma_dk_interpolation
Definition: crosssectionsbrems.h:91
smash::BremsstrahlungAction::hadronic_cross_section_
const double hadronic_cross_section_
Total hadronic cross section.
Definition: bremsstrahlungaction.h:162