12#include "detray/definitions/algebra.hpp"
13#include "detray/definitions/detail/qualifiers.hpp"
14#include "detray/definitions/math.hpp"
15#include "detray/definitions/pdg_particle.hpp"
16#include "detray/definitions/units.hpp"
17#include "detray/material/detail/relativistic_quantities.hpp"
22template <concepts::scalar scalar_t>
47 return stopping_power;
58 const scalar_type eps_per_length{rq.compute_epsilon_per_length(mat)};
59 if (eps_per_length <= 0.f) {
63 const scalar_type dhalf{rq.compute_delta_half(mat)};
64 const scalar_type A = rq.compute_bethe_bloch_log_term(mat);
66 return 2.f * eps_per_length * running;
102 stopping_power = rq.m_gamma * ptc.
mass() / mat.
X0();
105 return stopping_power;
144 const scalar_type eps_per_length{rq.compute_epsilon_per_length(mat)};
145 if (eps_per_length <= 0.f) {
169 2.f / (rq.m_qOverP * rq.m_gamma2) * bethe_stopping_power;
171 const scalar_type dAdqop = rq.derive_bethe_bloch_log_term();
173 const scalar_type dCdqop = rq.derive_delta_half(mat);
176 2.f * eps_per_length * (dAdqop - dBdqop - dCdqop);
178 return first_term + second_term;
198 -rq.m_beta2 * rq.m_gamma / rq.m_qOverP * ptc.
mass() / mat.
X0();
227 const scalar_type eps{rq.compute_epsilon(mat, path_segment)};
233 const scalar_type dhalf{rq.compute_delta_half(mat)};
236 const scalar_type running{math::log(t / I) + math::log(eps / I) + 0.2f -
237 rq.m_beta2 - 2.f * dhalf};
238 return eps * running;
251 return 4.f * rq.compute_epsilon(mat, path_segment);
267 return convert_landau_fwhm_to_gaussian_sigma(fwhm);
276 template <
typename material_t>
278 const scalar_type path_segment,
const material_t& mat,
292 return math::sqrt(rq.m_q2OverBeta2) * pInv * pInv * sigmaE;
312 return theta0RossiGreisen(xOverX0, momentumInv, rq.m_q2OverBeta2);
314 return theta0Highland(xOverX0, momentumInv, rq.m_q2OverBeta2);
325 if (xOverX0 <= 0.f) {
330 const scalar_type t{math::sqrt(xOverX0 * q2OverBeta2)};
334 (1.0f + 0.038f * 2.f * math::log(t));
341 if (xOverX0 <= 0.f) {
346 const scalar_type t{math::sqrt(xOverX0 * q2OverBeta2)};
348 (1.0f + 0.125f * math::log10(10.0f * xOverX0));
361 convert_landau_fwhm_to_gaussian_sigma(
const scalar_type fwhm)
const {
Detray include(s).
Definition array_operators.hpp:18
static constexpr scalar_t inv_sqrt2
1/(√2)
Definition units.hpp:151
static constexpr scalar_t m_e
Electron rest energy expressed in the internal energy unit.
Definition units.hpp:168
static constexpr scalar_t ln2
Natural logarithm of 2.
Definition units.hpp:131
Electron hypothesis.
Definition pdg_particle.hpp:103
Computes energy loss and multiple scattering in detector material.
Definition interaction.hpp:23
detail::relativistic_quantities< scalar_type > relativistic_quantities
Cached particle kinematics used by the interaction formulas.
Definition interaction.hpp:27
scalar_type compute_energy_loss_landau_fwhm(const scalar_type path_segment, const material< scalar_type > &mat, const pdg_particle< scalar_type > &, const relativistic_quantities &rq) const
Compute the Landau energy-loss distribution full width at half maximum.
Definition interaction.hpp:246
scalar_type compute_energy_loss_landau(const scalar_type path_segment, const material< scalar_type > &mat, const pdg_particle< scalar_type > &, const relativistic_quantities &rq) const
Compute the most-probable energy loss using the Landau approximation.
Definition interaction.hpp:222
scalar_type derive_bethe_bloch(const detray::material< scalar_type > &mat, const pdg_particle< scalar_type > &ptc, const relativistic_quantities &rq) const
Differentiate the Bethe–Bloch stopping power with respect to q/p.
Definition interaction.hpp:138
scalar_type derive_bremsstrahlung(const detray::material< scalar_type > &mat, const pdg_particle< scalar_type > &ptc, const relativistic_quantities &rq) const
Differentiate the bremsstrahlung stopping power with respect to q/p.
Definition interaction.hpp:187
scalar_type compute_multiple_scattering_theta0(const scalar_type xOverX0, const pdg_particle< scalar_type > &ptc, const relativistic_quantities &rq) const
Estimate the projected multiple-scattering angle for a material thickness.
Definition interaction.hpp:300
scalar_type compute_energy_loss_bethe_bloch(const scalar_type path_segment, const detray::material< scalar_type > &mat, const pdg_particle< scalar_type > &ptc, const relativistic_quantities &rq) const
Compute the collisional energy loss over a path segment.
Definition interaction.hpp:210
scalar_type compute_energy_loss_landau_sigma_QOverP(const scalar_type path_segment, const material_t &mat, const pdg_particle< scalar_type > &ptc, const relativistic_quantities &rq) const
Convert energy-loss sigma to a q/p uncertainty.
Definition interaction.hpp:277
scalar_t scalar_type
Scalar type used by the interaction calculations.
Definition interaction.hpp:25
scalar_type compute_bremsstrahlung(const detray::material< scalar_type > &mat, const pdg_particle< scalar_type > &ptc, const relativistic_quantities &rq) const
Estimate electron or positron radiative stopping power using Rossi’s approximation.
Definition interaction.hpp:81
scalar_type compute_stopping_power(const detray::material< scalar_type > &mat, const pdg_particle< scalar_type > &ptc, const relativistic_quantities &rq) const
Sum collisional and radiative stopping-power contributions.
Definition interaction.hpp:36
scalar_type derive_stopping_power(const detray::material< scalar_type > &mat, const pdg_particle< scalar_type > &ptc, const relativistic_quantities &rq) const
Differentiate the total stopping power with respect to q/p.
Definition interaction.hpp:116
scalar_type compute_energy_loss_landau_sigma(const scalar_type path_segment, const material< scalar_type > &mat, const pdg_particle< scalar_type > &ptc, const relativistic_quantities &rq) const
Convert the Landau width to a Gaussian-equivalent energy-loss sigma.
Definition interaction.hpp:260
scalar_type compute_bethe_bloch(const detray::material< scalar_type > &mat, const pdg_particle< scalar_type > &, const relativistic_quantities &rq) const
Compute the collisional stopping power from the Bethe–Bloch expression.
Definition interaction.hpp:55
Material composition properties and density data used by interactions.
Definition material.hpp:36
scalar_type mean_excitation_energy() const
Definition material.hpp:154
constexpr scalar_type X0() const
Definition material.hpp:118
Particle hypothesis identified by PDG number, mass, and electric charge.
Definition pdg_particle.hpp:24
constexpr std::int32_t pdg_num() const
Definition pdg_particle.hpp:41
constexpr scalar_type mass() const
Definition pdg_particle.hpp:45
constexpr scalar_type charge() const
Definition pdg_particle.hpp:49
Positron hypothesis.
Definition pdg_particle.hpp:106
static constexpr scalar_t MeV
Megaelectronvolt expressed in GeV.
Definition units.hpp:79