27 const ParticleList &in,
const double time,
const int n_frac_photons,
28 const double hadronic_cross_section_input,
31 reac_(photon_reaction_type(in)),
32 number_of_fractional_photons_(n_frac_photons),
33 hadron_out_t_(outgoing_hadron_type(in)),
34 hadron_out_mass_(sample_out_hadron_mass(hadron_out_t_)),
35 hadronic_cross_section_(hadronic_cross_section_input),
36 spin_interaction_type_(spin_interaction_type) {}
39 const ParticleList &in) {
94 for (
const auto &output : outputs) {
95 if (output->is_photon_output()) {
97 output->at_interaction(*
this, 0.0);
120 return rho_p_particle_ptr;
123 return rho_m_particle_ptr;
126 return rho_z_particle_ptr;
131 return pi_p_particle_ptr;
135 return pi_m_particle_ptr;
140 return pi_z_particle_ptr;
150 const ParticleList &in) {
156 const ParticleList &in) {
180 if (hadron->is_stable() && s_sqrt < hadron->mass()) {
184 }
else if (!hadron->is_stable() &&
185 s_sqrt < (hadron->min_mass_spectral() +
really_small)) {
196 <<
"Problem in ScatterActionPhoton::generate_final_state().\n";
197 throw std::runtime_error(
"");
223 const double sqrts =
sqrt_s();
224 std::array<double, 2> mandelstam_t =
get_t_range(sqrts, m1, m2, m_out, 0.0);
225 const double t1 = mandelstam_t[1];
226 const double t2 = mandelstam_t[0];
228 const double pcm_out =
pCM(sqrts, m_out, 0.0);
232 double costheta = (t -
pow_int(m2, 2) +
235 (pcm_in * (s -
pow_int(m_out, 2)) / sqrts);
239 if (costheta > 1 || costheta < -1) {
241 <<
"Cos(theta)of photon scattering out of physical bounds in "
242 "the following scattering: "
256 new_particle.set_4position(middle_point);
257 new_particle.boost_momentum(
276 weight_ = diff_xs * (t2 - t1) /
295 double reaction_cross_section) {
296 CollisionBranchPtr dummy_process = std::make_unique<CollisionBranch>(
304 double mass = out_t->
mass();
305 const double cms_energy =
sqrt_s();
306 if (cms_energy <= out_t->min_mass_kinematic()) {
308 "Problem in ScatterActionPhoton::sample_hadron_mass");
339 throw std::runtime_error(
340 "Invalid ReactionType in ScatterActionPhoton::rho_mass()");
345 CollisionBranchList process_list;
350 process_list.push_back(std::make_unique<CollisionBranch>(
357 CollisionBranchList process_list;
365 double xsection = 0.0;
394 throw std::runtime_error(
"");
408 throw std::runtime_error(
"");
420 if (xsection == 0.0) {
432 }
else if (xsection < 0) {
440 " mass rho particle: ", m_rho,
", sqrt_s: ", std::sqrt(s));
470 pow_int(FF.first, 4) * xs.first +
pow_int(FF.second, 4) * xs.second;
490 const double xs_ff =
pow_int(FF, 4) * xs;
497 const double xs_ff =
pow_int(FF, 4) * xs;
503 throw std::runtime_error(
"");
512 double diff_xsection = 0.0;
571 if (diff_xsection < 0) {
572 diff_xsection = 0.01;
574 return diff_xsection;
579 const double E_photon) {
603 const double xs_ff =
pow_int(FF.first, 4) * diff_xs.first +
604 pow_int(FF.second, 4) * diff_xs.second;
624 const double xs_ff =
pow_int(FF, 4) * xs;
631 const double xs_ff =
pow_int(FF, 4) * xs;
637 throw std::runtime_error(
"");
643 const double Lambda = 1.0;
646 const double t_ff = 34.5096 * std::pow(E_photon, 0.737) -
647 67.557 * std::pow(E_photon, 0.7584) +
648 32.858 * std::pow(E_photon, 0.7806);
649 const double ff = 2 * Lambda2 / (2 * Lambda2 - t_ff);
655 const double Lambda = 1.0;
658 const double t_ff = -61.595 * std::pow(E_photon, 0.9979) +
659 28.592 * std::pow(E_photon, 1.1579) +
660 37.738 * std::pow(E_photon, 0.9317) -
661 5.282 * std::pow(E_photon, 1.3686);
662 const double ff = 2 * Lambda2 / (2 * Lambda2 - t_ff);
668 const double E_photon) {
677 return std::pair<double, double>(xs_pion, xs_omega);
681 const double t,
const double m_rho) {
683 const double diff_xs_omega =
686 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.
void assign_unpolarized_spin_vector_to_outgoing_particles()
Assign an unpolarized spin vector to all outgoing 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.
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...
const SpinInteractionType spin_interaction_type_
Type of spin interaction to use.
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.
ScatterActionPhoton(const ParticleList &in, const double time, const int n_frac_photons, const double hadronic_cross_section_input, const SpinInteractionType spin_interaction_type=SpinInteractionType::Off)
Construct a ScatterActionPhoton object.
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.
SpinInteractionType
Possible spin interaction types.
@ Off
No spin interactions.
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.