27 const ParticleList &in,
const double time,
const int n_frac_photons,
28 const double hadronic_cross_section_input)
30 reac_(photon_reaction_type(in)),
31 number_of_fractional_photons_(n_frac_photons),
32 hadron_out_t_(outgoing_hadron_type(in)),
33 hadron_out_mass_(sample_out_hadron_mass(hadron_out_t_)),
34 hadronic_cross_section_(hadronic_cross_section_input) {}
37 const ParticleList &in) {
92 for (
const auto &output : outputs) {
93 if (output->is_photon_output()) {
95 output->at_interaction(*
this, 0.0);
118 return rho_p_particle_ptr;
121 return rho_m_particle_ptr;
124 return rho_z_particle_ptr;
129 return pi_p_particle_ptr;
133 return pi_m_particle_ptr;
138 return pi_z_particle_ptr;
148 const ParticleList &in) {
154 const ParticleList &in) {
178 if (hadron->is_stable() && s_sqrt < hadron->mass()) {
182 }
else if (!hadron->is_stable() &&
183 s_sqrt < (hadron->min_mass_spectral() +
really_small)) {
194 <<
"Problem in ScatterActionPhoton::generate_final_state().\n";
195 throw std::runtime_error(
"");
221 const double sqrts =
sqrt_s();
222 std::array<double, 2> mandelstam_t =
get_t_range(sqrts, m1, m2, m_out, 0.0);
223 const double t1 = mandelstam_t[1];
224 const double t2 = mandelstam_t[0];
226 const double pcm_out =
pCM(sqrts, m_out, 0.0);
230 double costheta = (t -
pow_int(m2, 2) +
233 (pcm_in * (s -
pow_int(m_out, 2)) / sqrts);
237 if (costheta > 1 || costheta < -1) {
239 <<
"Cos(theta)of photon scattering out of physical bounds in "
240 "the following scattering: "
254 new_particle.set_4position(middle_point);
255 new_particle.boost_momentum(
270 weight_ = diff_xs * (t2 - t1) /
289 double reaction_cross_section) {
290 CollisionBranchPtr dummy_process = std::make_unique<CollisionBranch>(
298 double mass = out_t->
mass();
299 const double cms_energy =
sqrt_s();
300 if (cms_energy <= out_t->min_mass_kinematic()) {
302 "Problem in ScatterActionPhoton::sample_hadron_mass");
333 throw std::runtime_error(
334 "Invalid ReactionType in ScatterActionPhoton::rho_mass()");
339 CollisionBranchList process_list;
344 process_list.push_back(std::make_unique<CollisionBranch>(
351 CollisionBranchList process_list;
359 double xsection = 0.0;
388 throw std::runtime_error(
"");
402 throw std::runtime_error(
"");
414 if (xsection == 0.0) {
426 }
else if (xsection < 0) {
434 " mass rho particle: ", m_rho,
", sqrt_s: ", std::sqrt(s));
464 pow_int(FF.first, 4) * xs.first +
pow_int(FF.second, 4) * xs.second;
484 const double xs_ff =
pow_int(FF, 4) * xs;
491 const double xs_ff =
pow_int(FF, 4) * xs;
497 throw std::runtime_error(
"");
506 double diff_xsection = 0.0;
565 if (diff_xsection < 0) {
566 diff_xsection = 0.01;
568 return diff_xsection;
573 const double E_photon) {
597 const double xs_ff =
pow_int(FF.first, 4) * diff_xs.first +
598 pow_int(FF.second, 4) * diff_xs.second;
618 const double xs_ff =
pow_int(FF, 4) * xs;
625 const double xs_ff =
pow_int(FF, 4) * xs;
631 throw std::runtime_error(
"");
637 const double Lambda = 1.0;
640 const double t_ff = 34.5096 * std::pow(E_photon, 0.737) -
641 67.557 * std::pow(E_photon, 0.7584) +
642 32.858 * std::pow(E_photon, 0.7806);
643 const double ff = 2 * Lambda2 / (2 * Lambda2 - t_ff);
649 const double Lambda = 1.0;
652 const double t_ff = -61.595 * std::pow(E_photon, 0.9979) +
653 28.592 * std::pow(E_photon, 1.1579) +
654 37.738 * std::pow(E_photon, 0.9317) -
655 5.282 * std::pow(E_photon, 1.3686);
656 const double ff = 2 * Lambda2 / (2 * Lambda2 - t_ff);
662 const double E_photon) {
671 return std::pair<double, double>(xs_pion, xs_omega);
675 const double t,
const double m_rho) {
677 const double diff_xs_omega =
680 return std::pair<double, double>(diff_xs_pion, diff_xs_omega);
FourVector total_momentum_of_outgoing_particles() const
Calculate the total kinetic momentum of the outgoing particles.
ParticleList outgoing_particles_
Initially this stores only the PDG codes of final-state particles.
virtual double check_conservation(const uint32_t id_process) const
Check various conservation laws.
double sqrt_s() const
Determine the total energy in the center-of-mass frame [GeV].
ParticleList incoming_particles_
List with data of incoming particles.
FourVector get_interaction_point() const
Get the interaction point.
ProcessType process_type_
type of process
Angles provides a common interface for generating directions: i.e., two angles that should be interpr...
ThreeVector threevec() const
Class to calculate the cross-section of a meson-meson to meson-photon process.
static double xs_diff_pi0_rho_pi_omega_mediated(const double s, const double t, const double m_rho)
Differential cross section for given photon process.
static double xs_diff_pi_rho0_pi(const double s, const double t, const double m_rho)
Differential cross section for given photon process.
static double xs_diff_pi0_rho_pi_rho_mediated(const double s, const double t, const double m_rho)
Differential cross section for given photon process.
static double xs_diff_pi_rho_pi0_omega_mediated(const double s, const double t, const double m_rho)
Differential cross section for given photon process.
static double xs_pi_rho_pi0(const double s, const double m_rho)
Total cross sections for given photon process:
static double xs_diff_pi_pi_rho0(const double s, const double t, const double m_rho)
Differential cross section for given photon process.
static double xs_pi_rho0_pi(const double s, const double m_rho)
Total cross sections for given photon process:
static double xs_pi_pi_rho0(const double s, const double m_rho)
Total cross sections for given photon process:
static double xs_diff_pi_pi0_rho(const double s, const double t, const double m_rho)
Differential cross section for given photon process.
static double xs_diff_pi_rho_pi0_rho_mediated(const double s, const double t, const double m_rho)
Differential cross section for given photon process.
static double xs_pi0_rho_pi(const double s, const double m_rho)
Total cross sections for given photon process:
static double xs_pi0_rho_pi_omega_mediated(const double s, const double m_rho)
Total cross sections for given photon process:
static double xs_pi0_rho0_pi0(const double s, const double m_rho)
Total cross sections for given photon process:
static double xs_diff_pi0_rho0_pi0(const double s, const double t, const double m_rho)
Differential cross section for given photon process.
static double xs_pi_pi0_rho(const double s, const double m_rho)
Total cross sections for given photon process:
static double xs_pi_rho_pi0_omega_mediated(const double s, const double m_rho)
Total cross sections for given photon process:
static double xs_pi_rho_pi0_rho_mediated(const double s, const double m_rho)
Total cross sections for given photon process:
static double xs_pi0_rho_pi_rho_mediated(const double s, const double m_rho)
Total cross sections for given photon process:
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
ParticleData contains the dynamic information of a certain particle.
A pointer-like interface to global references to ParticleType objects.
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 ...
static const ParticleType & find(PdgCode pdgcode)
Returns the ParticleType object for the given pdgcode.
PdgCode stores a Particle Data Group Particle Numbering Scheme particle type number.
std::int32_t code() const
std::pair< double, double > diff_cross_section_pair(const double t, const double m_rho)
For processes which can happen via (pi, a1, rho) and omega exchange, return the differential cross se...
double diff_cross_section(const double t, const double m_rho, MediatorType mediator=default_mediator_) const
Calculate the differential cross section of the photon process.
ScatterActionPhoton(const ParticleList &in, const double time, const int n_frac_photons, const double hadronic_cross_section_input)
Construct a ScatterActionPhoton object.
const int number_of_fractional_photons_
Number of photons created for each hadronic scattering, needed for correct weighting.
std::pair< double, double > total_cross_section_pair()
For processes which can happen via (pi, a1, rho) and omega exchange, return the total cross section f...
ReactionType
Enum for encoding the photon process.
double total_cross_section_w_ff(const double E_photon)
Compute the total cross corrected for form factors.
const ReactionType reac_
Photonic process as determined from incoming 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 diff_cross_section_w_ff(const double t, const double m_rho, const double E_photon)
Compute the differential cross section corrected for form factors.
MediatorType
Compile-time switch for setting the handling of processes which can happen via different mediating pa...
void perform_photons(const OutputsList &outputs)
Create the photon final state and write to output.
CollisionBranchList collision_processes_photons_
Holds the photon branch.
double total_cross_section(MediatorType mediator=default_mediator_) const
Calculate the total cross section of the photon process.
void generate_final_state() override
Generate the final-state for the photon scatter process.
bool collision_branch_created_
Was the collision branch already created?
double rho_mass() const
Find the mass of the participating rho-particle.
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 ParticleTypePtr outgoing_hadron_type(const ParticleList &in)
Return ParticleTypePtr of hadron in the out channel, given the incoming particles.
double weight_
Weight of the produced photon.
CollisionBranchList create_collision_branch()
Creates a CollisionBranchList containing the photon processes.
std::pair< double, double > form_factor_pair(const double E_photon)
For processes which can happen via (pi, a1, rho) and omega exchange, return the form factor for the (...
static constexpr MediatorType default_mediator_
Value used for default exchange particle. See MediatorType.
const double hadron_out_mass_
Mass of outgoing hadron.
void add_dummy_hadronic_process(double reaction_cross_section)
Adds one hadronic process with a given cross-section.
static ReactionType photon_reaction_type(const ParticleList &in)
Determine photon process from incoming particles.
static bool is_kinematically_possible(const double s_sqrt, const ParticleList &in)
Check if CM-energy is sufficient to produce hadron in final state.
double hadronic_cross_section() const
Return the total cross section of the underlying hadronic scattering.
const ParticleTypePtr hadron_out_t_
ParticleTypePtr to the type of the outgoing hadron.
double sample_out_hadron_mass(const ParticleTypePtr out_type)
Sample the mass of the outgoing hadron.
ScatterAction is a special action which takes two incoming particles and performs a scattering,...
void add_collision(CollisionBranchPtr p)
Add a new collision channel.
double mandelstam_s() const
Determine the Mandelstam s variable,.
double cm_momentum() const
Get the momentum of the center of mass of the incoming particles in the calculation frame.
Collection of useful constants that are known at compile time.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > logg
An array that stores all pre-configured Logger objects.
constexpr int photon
Photon.
T pCM(const T sqrts, const T mass_a, const T mass_b) noexcept
constexpr std::uint32_t ID_PROCESS_PHOTON
Process ID for any photon process.
@ TwoToTwo
See here for a short description.
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,...
constexpr T pow_int(const T base, unsigned const exponent)
Efficient template for calculating integer powers using squaring.
constexpr uint64_t pack(int32_t x, int32_t y)
Pack two int32_t into an uint64_t.
constexpr double really_small
Numerical error tolerance.
static constexpr int LScatterAction
double cut_off(const double sigma_mb)
Cross section after cut off.
constexpr double omega_mass
omega mass in GeV.