30 const ParticleList &in,
const double time,
const int n_frac_photons,
31 const double hadronic_cross_section_input)
33 reac_(photon_reaction_type(in)),
34 number_of_fractional_photons_(n_frac_photons),
35 hadron_out_t_(outgoing_hadron_type(in)),
36 hadron_out_mass_(sample_out_hadron_mass(hadron_out_t_)),
37 hadronic_cross_section_(hadronic_cross_section_input) {}
40 const ParticleList &in) {
95 for (
const auto &output : outputs) {
96 if (output->is_photon_output()) {
98 output->at_interaction(*
this, 0.0);
121 return rho_p_particle_ptr;
124 return rho_m_particle_ptr;
127 return rho_z_particle_ptr;
132 return pi_p_particle_ptr;
136 return pi_m_particle_ptr;
141 return pi_z_particle_ptr;
151 const ParticleList &in) {
157 const ParticleList &in) {
181 if (hadron->is_stable() && s_sqrt < hadron->mass()) {
185 }
else if (!hadron->is_stable() &&
186 s_sqrt < (hadron->min_mass_spectral() +
really_small)) {
196 const auto &log = logger<LogArea::ScatterAction>();
197 log.fatal() <<
"Problem in ScatterActionPhoton::generate_final_state().\n";
198 throw std::runtime_error(
"");
224 const double sqrts =
sqrt_s();
225 std::array<double, 2> mandelstam_t =
get_t_range(sqrts, m1, m2, m_out, 0.0);
226 const double t1 = mandelstam_t[1];
227 const double t2 = mandelstam_t[0];
229 const double pcm_out =
pCM(sqrts, m_out, 0.0);
233 double costheta = (t -
pow_int(m2, 2) +
236 (pcm_in * (s -
pow_int(m_out, 2)) / sqrts);
240 if (costheta > 1 || costheta < -1) {
241 const auto &log = logger<LogArea::ScatterAction>();
242 log.warn() <<
"Cos(theta)of photon scattering out of physical bounds in " 243 "the following scattering: " 257 new_particle.set_4position(middle_point);
258 new_particle.boost_momentum(-
beta_cm());
261 const double E_Photon = outgoing_particles_[1].momentum()[0];
272 weight_ = diff_xs * (t2 - t1) /
284 double reaction_cross_section) {
285 CollisionBranchPtr dummy_process = make_unique<CollisionBranch>(
293 double mass = out_t->
mass();
294 const double cms_energy =
sqrt_s();
295 if (cms_energy <= out_t->min_mass_kinematic()) {
297 "Problem in ScatterActionPhoton::sample_hadron_mass");
328 throw std::runtime_error(
329 "Invalid ReactionType in ScatterActionPhoton::rho_mass()");
335 CollisionBranchList process_list;
345 double xsection = 0.0;
374 throw std::runtime_error(
"");
388 throw std::runtime_error(
"");
407 const auto &log = logger<LogArea::ScatterAction>();
408 log.warn(
"Calculated negative cross section.\nParticles ",
410 ", sqrt_s: ", std::sqrt(s));
412 process_list.push_back(make_unique<CollisionBranch>(
421 double diff_xsection = 0.0;
475 return diff_xsection;
480 const double E_photon) {
504 const double xs_ff =
pow_int(FF.first, 4) * diff_xs.first +
505 pow_int(FF.second, 4) * diff_xs.second;
510 return pow_int(FF, 4) * diff_xs;
514 return pow_int(FF, 4) * diff_xs;
525 const double xs_ff =
pow_int(FF, 4) * xs;
532 const double xs_ff =
pow_int(FF, 4) * xs;
538 throw std::runtime_error(
"");
544 const double Lambda = 1.0;
545 const double Lambda2 = Lambda *
Lambda;
547 const double t_ff = 34.5096 * std::pow(E_photon, 0.737) -
548 67.557 * std::pow(E_photon, 0.7584) +
549 32.858 * std::pow(E_photon, 0.7806);
550 const double ff = 2 * Lambda2 / (2 * Lambda2 - t_ff);
556 const double Lambda = 1.0;
557 const double Lambda2 = Lambda *
Lambda;
559 const double t_ff = -61.595 * std::pow(E_photon, 0.9979) +
560 28.592 * std::pow(E_photon, 1.1579) +
561 37.738 * std::pow(E_photon, 0.9317) -
562 5.282 * std::pow(E_photon, 1.3686);
563 const double ff = 2 * Lambda2 / (2 * Lambda2 - t_ff);
569 const double E_photon) {
575 const double t,
const double m_rho) {
577 const double diff_xs_omega =
580 return std::pair<double, double>(diff_xs_rho, diff_xs_omega);
void generate_final_state() override
Generate the final-state for the photon scatter process.
static double xs_diff_pi_pi_rho0(const double s, const double t, const double m_rho)
void add_collision(CollisionBranchPtr p)
Add a new collision channel.
double form_factor_pion(const double E_photon) const
Compute the form factor for a process with a pion as the lightest exchange particle.
double sqrt_s() const
Determine the total energy in the center-of-mass frame [GeV].
constexpr double really_small
Numerical error tolerance.
static ParticleTypePtr outgoing_hadron_type(const ParticleList &in)
Return ParticleTypePtr of hadron in the out channel, given the incoming particles.
double hadronic_cross_section() const
Return the total cross section of the underlying hadronic scattering.
constexpr std::uint32_t ID_PROCESS_PHOTON
Process ID for any photon process.
constexpr uint64_t pack(int32_t x, int32_t y)
Pack two int32_t into an uint64_t.
ProcessType process_type_
type of process
static double xs_diff_pi_pi0_rho(const double s, const double t, const double m_rho)
Collection of useful constants that are known at compile time.
constexpr int photon
Photon.
MediatorType
Compile-time switch for setting the handling of processes which can happen via different mediating pa...
double weight_
Weight of the produced photon.
Class to calculate the cross-section of a meson-meson to meson-photon process.
constexpr T pow_int(const T base, unsigned const exponent)
Efficient template for calculating integer powers using squaring.
static double xs_diff_pi_rho_pi0_omega_mediated(const double s, const double t, const double m_rho)
ScatterActionPhoton(const ParticleList &in, const double time, const int n_frac_photons, const double hadronic_cross_section_input)
Construct a ScatterActionPhoton object.
double rho_mass() const
Find the mass of the participating rho-particle.
double sample_resonance_mass(const double mass_stable, const double cms_energy, int L=0) const
Resonance mass sampling for 2-particle final state with one resonance (type given by 'this') and one ...
2->2 inelastic scattering
const int number_of_fractional_photons_
Number of photons created for each hadronic scattering, needed for correct weighting.
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
CollisionBranchList collision_processes_photons_
Holds the photon branch.
static bool is_kinematically_possible(const double s_sqrt, const ParticleList &in)
Check if CM-energy is sufficient to produce hadron in final state.
static double xs_diff_pi_rho0_pi(const double s, const double t, const double m_rho)
static constexpr MediatorType default_mediator_
Value used for default exchange particle. See MediatorType.
ThreeVector threevec() const
std::array< T, 2 > get_t_range(const T sqrts, const T m1, const T m2, const T m3, const T m4)
Get the range of Mandelstam-t values allowed in a particular 2->2 process, see PDG 2014 booklet...
const ReactionType reac_
Photonic process as determined from incoming particles.
ParticleList outgoing_particles_
Initially this stores only the PDG codes of final-state particles.
double sample_out_hadron_mass(const ParticleTypePtr out_type)
Sample the mass of the outgoing hadron.
std::pair< double, double > diff_cross_section_single(const double t, const double m_rho)
For processes which can happen via (pi, a1, rho) and omega exchange, return the differential cross se...
ParticleList incoming_particles_
List with data of incoming particles.
static double xs_diff_pi0_rho_pi_rho_mediated(const double s, const double t, const double m_rho)
PdgCode stores a Particle Data Group Particle Numbering Scheme particle type number.
void perform_photons(const OutputsList &outputs)
Create the photon final state and write to output.
void add_dummy_hadronic_process(double reaction_cross_section)
Adds one hadronic process with a given cross-section.
static double xs_diff_pi0_rho_pi_omega_mediated(const double s, const double t, const double m_rho)
static double xs_pi_rho_pi0_rho_mediated(const double s, const double m_rho)
ReactionType
Enum for encoding the photon process.
FourVector get_interaction_point() const
Get the interaction point.
CollisionBranchList photon_cross_sections(MediatorType mediator=default_mediator_)
Computes the total cross section of the photon process.
static double xs_pi0_rho_pi_rho_mediated(const double s, const double m_rho)
static double xs_pi_pi0_rho(const double s, const double m_rho)
void check_conservation(const uint32_t id_process) const
Check various conservation laws.
static double xs_pi0_rho0_pi0(const double s, const double m_rho)
ThreeVector beta_cm() const
Get the velocity of the center of mass of the scattering particles in the calculation frame...
static double xs_pi0_rho_pi(const double s, const double m_rho)
const double hadron_out_mass_
Mass of outgoing hadron.
std::int32_t code() const
double diff_cross_section(const double t, const double m_rho, MediatorType mediator=default_mediator_) const
Calculate the differential cross section of photon process.
static double xs_pi0_rho_pi_omega_mediated(const double s, const double m_rho)
std::pair< double, double > form_factor_single(const double E_photon)
For processes which can happen via (pi, a1, rho) and omega exchange, return the form factor for the (...
static double xs_diff_pi_rho_pi0_rho_mediated(const double s, const double t, const double m_rho)
double diff_cross_section_w_ff(const double t, const double m_rho, const double E_photon)
Compute the differential cross section with form factors included.
double form_factor_omega(const double E_photon) const
Compute the form factor for a process with a omega as the lightest exchange particle.
static double xs_pi_pi_rho0(const double s, const double m_rho)
A pointer-like interface to global references to ParticleType objects.
Angles provides a common interface for generating directions: i.e., two angles that should be interpr...
static double xs_pi_rho_pi0(const double s, const double m_rho)
static double xs_pi_rho0_pi(const double s, const double m_rho)
static double xs_diff_pi0_rho0_pi0(const double s, const double t, const double m_rho)
ScatterAction is a special action which takes two incoming particles and performs a scattering...
T pCM(const T sqrts, const T mass_a, const T mass_b) noexcept
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
constexpr double omega_mass
omega mass in GeV.
const ParticleTypePtr hadron_out_t_
ParticleTypePtr to the type of the outgoing hadron.
ParticleData contains the dynamic information of a certain particle.
static ReactionType photon_reaction_type(const ParticleList &in)
Determine photon process from incoming particles.
double cm_momentum() const
Get the momentum of the center of mass of the incoming particles in the calculation frame...
double mandelstam_s() const
Determine the Mandelstam s variable,.
static double xs_pi_rho_pi0_omega_mediated(const double s, const double m_rho)