37 return (s < (m_pn * m_pn)) ? 0.0 : std::sqrt(1.0 - (m_pn * m_pn) / s);
45 const ParticleList &in,
const double time,
46 const double hadronic_cross_section_input,
49 reaction_type_(dilepton_brems_reaction_type_(in)),
50 hadronic_cross_section_(hadronic_cross_section_input),
51 form_factor_type_(ff_type) {}
55 const ParticleList &in) {
60 const PdgCode a = in[0].pdgcode();
61 const PdgCode b = in[1].pdgcode();
74 double reaction_cross_section) {
75 CollisionBranchPtr dummy_process = std::make_unique<CollisionBranch>(
87 CollisionBranchList final_state_list;
92 <<
"Problem in " << __func__
93 <<
". Looks like an unknown reaction "
94 "type for this dilepton bremsstrahlung process is present.";
95 throw std::runtime_error(
96 "Unreachable code was reached, "
97 "please check logs for details.");
101 final_state_list.push_back(std::make_unique<CollisionBranch>(
102 *p_particle, *n_particle, *e_p_particle, *e_m_particle,
105 add_processes<CollisionBranch>(std::move(final_state_list),
111 const OutputsList &outputs) {
114 for (
const auto &
output : outputs) {
116 if (
output->is_dilepton_output()) {
118 output->at_interaction(*
this, 0.0);
127 <<
"Problem in " << __func__
128 <<
". The function expects exactly "
129 "one process branch for the dilepton bremsstrahlung process.";
130 throw std::runtime_error(
131 "Unreachable code was reached, "
132 "please check logs for details.");
146 const double M_min = 2.0 * m_e;
147 const double M_max =
sqrt_s() - m_p - m_n;
149 if (M_max <= M_min) {
160 const double q_min = 0.0;
209 new_particle.set_4position(interaction_point);
210 new_particle.boost_momentum(
217 const double M_parent = p_parent.
abs();
229 pcm * phitheta_children.
threevec());
231 -pcm * phitheta_children.
threevec());
241 const double M,
const double q,
const double sqrts)
const {
242 const double s = sqrts * sqrts;
245 const double m_pn = m_p + m_n;
246 const double E = std::sqrt(q * q + M * M);
249 if (E <= 0.0 || M <= 0.0)
252 const double sigma_bar =
253 (s - (m_pn) * (m_pn)) / (2.0 * (m_p * m_p)) *
np_elastic(s);
258 const double s2 = s + M * M - 2.0 * E * sqrts;
260 const double prefactor =
264 return prefactor * (q * q) / (M * E * E * E) * sigma_bar * (R2_s2 / R2_s) *
269 const double M)
const {
281 using namespace std::string_literals;
282 throw std::logic_error(
"Problem in "s + __func__ +
283 ". Unknown pion form factor.");
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.
const double time_of_execution_
Time at which the action is supposed to be performed (absolute time in the lab frame in fm).
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
void distribute_isotropically()
Populate the object with a new direction.
const ReactionType reaction_type_
Reaction process as determined from incoming particles.
double pion_em_form_factor_sq_(double m_inv) const
Returns , the squared pion electromagnetic form factor.
ReactionType
Enum for encoding bremsstrahlung process for n+p only.
const double hadronic_cross_section_
Total hadronic cross section.
void perform_dilepton_bremsstrahlung(const OutputsList &outputs)
Create the final state and write to output.
CollisionBranchList collision_processes_dilepton_bremsstrahlung_
Holds the bremsstrahlung branch.
double diff_xs_pn_dilepton_(double m_inv, double q, double sqrts) const
Fully differential cross section for .
bool sample_2body_isotropic_(const FourVector &p_parent, ParticleData &child_1, ParticleData &child_2)
Generates momenta of outgoing particles (for 2-body isotropic decays only).
static ReactionType dilepton_brems_reaction_type_(const ParticleList &in)
Determine dilepton bremsstrahlung process from incoming particle list.
double m_inv_
Sampled invariant mass of the dilepton pair.
double cross_section_dilepton_bremsstrahlung_
Total cross section of dilepton bremsstrahlung process [mb].
double weight_
Weight of the dilepton event.
double q_
Sampled 3-momentum of dilepton pair in pn-CM frame.
void generate_final_state() override
Main function: sample kinematics and compute weight for one dilepton event.
const DileptonBremsPionFormFactor form_factor_type_
Form factor type: Off, FF1, FF2.
BremsstrahlungActionDilepton(const ParticleList &in, double time, double hadronic_cross_section_input, DileptonBremsPionFormFactor ff_type)
Construct a BremsstrahlungActionDilepton object.
void add_dummy_hadronic_process(double reaction_cross_section)
Adds the hadronic process with a given cross section.
The FourVector class holds relevant values in Minkowski spacetime with (+, −, −, −) metric signature.
double abs() const
calculate the lorentz invariant absolute value
ThreeVector velocity() const
Get the velocity (3-vector divided by zero component).
ParticleData contains the dynamic information of a certain particle.
void set_4momentum(const FourVector &momentum_vector)
Set the particle's 4-momentum directly.
const ParticleType & type() const
Get the type of the particle.
void boost_momentum(const ThreeVector &v)
Apply a Lorentz-boost to only the momentum.
A pointer-like interface to global references to ParticleType objects.
double total_width(const double m) const
Get the mass-dependent total width of a particle with mass m.
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
ScatterAction is a special action which takes two incoming particles and performs a scattering,...
void add_collision(CollisionBranchPtr p)
Add a new collision channel.
The ThreeVector class represents a physical three-vector with the components .
Collection of useful constants that are known at compile time.
DileptonBremsPionFormFactor
Option to use form factors in dilepton bremsstrahlung as described in Shyam:2010vr .
@ FF2
Photon couples 40% directly to intrinsice quark structure of pion and 60% indirectly via meson.
@ FF1
Photon couples to pion only via meson.
@ Off
Don't use form factors, i.e. multiply by 1.
std::array< einhard::Logger<>, std::tuple_size< LogArea::AreaTuple >::value > & logg
An array that stores all pre-configured Logger objects.
double R_2_helper(const double s)
Helper function for calculating R_2 as defined in Weil:2013mya , eq.
constexpr int e_p
Positron.
constexpr int e_m
Electron.
T beta(T a, T b)
Draws a random number from a beta-distribution, where probability density of is .
T pCM(const T sqrts, const T mass_a, const T mass_b) noexcept
double pion_em_form_factor_sqr_FF2(double m_inv_sqr, double m_rho, double gamma_rho)
constexpr double electron_mass
Electron mass in GeV.
@ BremsstrahlungDilepton
See here for a short description.
constexpr double nucleon_mass
Nucleon mass in GeV.
constexpr uint64_t pack(int32_t x, int32_t y)
Pack two int32_t into an uint64_t.
double np_elastic(double mandelstam_s)
np elastic cross section parametrization Source: Weil:2013mya , eq.
static constexpr int LScatterAction
constexpr double fine_structure
Fine-struture constant, approximately 1/137.
double pion_em_form_factor_sqr_FF1(double m_inv_sqr, double m_rho, double gamma_rho)