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()) {
191 const auto &log = logger<LogArea::ScatterAction>();
192 log.fatal() <<
"Problem in ScatterActionPhoton::generate_final_state().\n";
193 throw std::runtime_error(
"");
219 const double sqrts =
sqrt_s();
220 std::array<double, 2> mandelstam_t =
get_t_range(sqrts, m1, m2, m_out, 0.0);
221 const double t1 = mandelstam_t[1];
222 const double t2 = mandelstam_t[0];
224 const double pcm_out =
pCM(sqrts, m_out, 0.0);
228 double costheta = (t -
pow_int(m2, 2) +
231 (pcm_in * (s -
pow_int(m_out, 2)) / sqrts);
235 if (costheta > 1 || costheta < -1) {
236 const auto &log = logger<LogArea::ScatterAction>();
237 log.warn() <<
"Cos(theta)of photon scattering out of physical bounds in " 238 "the following scattering: " 252 new_particle.set_4position(middle_point);
253 new_particle.boost_momentum(-
beta_cm());
267 weight_ = diff_xs * (t2 - t1) /
279 double reaction_cross_section) {
280 CollisionBranchPtr dummy_process = make_unique<CollisionBranch>(
288 double mass = out_t->
mass();
289 const double cms_energy =
sqrt_s();
290 if (cms_energy <= out_t->min_mass_kinematic()) {
292 "Problem in ScatterActionPhoton::sample_hadron_mass");
323 throw std::runtime_error(
324 "Invalid ReactionType in ScatterActionPhoton::rho_mass()");
330 CollisionBranchList process_list;
340 double xsection = 0.0;
369 throw std::runtime_error(
"");
383 throw std::runtime_error(
"");
402 const auto &log = logger<LogArea::ScatterAction>();
403 log.warn(
"Calculated negative cross section.\nParticles ",
405 ", sqrt_s: ", std::sqrt(s));
407 process_list.push_back(make_unique<CollisionBranch>(
416 double diff_xsection = 0.0;
470 return diff_xsection;
475 const double E_photon) {
499 const double xs_ff =
pow_int(FF.first, 4) * diff_xs.first +
500 pow_int(FF.second, 4) * diff_xs.second;
505 return pow_int(FF, 4) * diff_xs;
509 return pow_int(FF, 4) * diff_xs;
520 const double xs_ff =
pow_int(FF, 4) * xs;
527 const double xs_ff =
pow_int(FF, 4) * xs;
533 throw std::runtime_error(
"");
539 const double Lambda = 1.0;
542 const double t_ff = 34.5096 * pow(E_photon, 0.737) -
543 67.557 * pow(E_photon, 0.7584) +
544 32.858 * pow(E_photon, 0.7806);
545 const double ff = 2 * Lambda2 / (2 * Lambda2 - t_ff);
551 const double Lambda = 1.0;
555 -61.595 * pow(E_photon, 0.9979) + 28.592 * pow(E_photon, 1.1579) +
556 37.738 * pow(E_photon, 0.9317) - 5.282 * pow(E_photon, 1.3686);
557 const double ff = 2 * Lambda2 / (2 * Lambda2 - t_ff);
563 const double E_photon) {
569 const double t,
const double m_rho) {
571 const double diff_xs_omega =
574 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.
FourVector get_interaction_point() const
Get the interaction point.
static ParticleTypePtr outgoing_hadron_type(const ParticleList &in)
Return ParticleTypePtr of hadron in the out channel, given the incoming particles.
double diff_cross_section(const double t, const double m_rho, MediatorType mediator=default_mediator_) const
Calculate the differential cross section of photon process.
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 ...
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.
double cm_momentum() const
Get the momentum of the center of mass of the incoming particles in the calculation frame...
double hadronic_cross_section() const
Return the total cross section of the underlying hadronic scattering.
ProcessType process_type_
type of process
static double xs_diff_pi_pi0_rho(const double s, const double t, const double m_rho)
ThreeVector beta_cm() const
Get the velocity of the center of mass of the scattering particles in the calculation frame...
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...
ThreeVector threevec() const
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.
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.
double mandelstam_s() const
Determine the Mandelstam s variable,.
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.
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 form_factor_omega(const double E_photon) const
Compute the form factor for a process with a omega as the lightest exchange particle.
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.
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)
static double xs_pi0_rho0_pi0(const double s, const double m_rho)
static double xs_pi0_rho_pi(const double s, const double m_rho)
const double hadron_out_mass_
Mass of outgoing hadron.
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.
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)
double rho_mass() const
Find the mass of the participating rho-particle.
static double xs_pi_rho0_pi(const double s, const double m_rho)
double form_factor_pion(const double E_photon) const
Compute the form factor for a process with a pion as the lightest exchange particle.
static 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.
void check_conservation(const uint32_t id_process) const
Check various conservation laws.
static ReactionType photon_reaction_type(const ParticleList &in)
Determine photon process from incoming particles.
std::int32_t code() const
double sqrt_s() const
Determine the total energy in the center-of-mass frame [GeV].
static double xs_pi_rho_pi0_omega_mediated(const double s, const double m_rho)