![]() |
|
|||
File indexing completed on 2025-02-22 10:31:15
0001 //----------------------------------*-C++-*----------------------------------// 0002 // Copyright 2024 UT-Battelle, LLC, and other Celeritas developers. 0003 // See the top-level COPYRIGHT file for details. 0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT) 0005 //---------------------------------------------------------------------------// 0006 //! \file celeritas/em/distribution/detail/Utils.hh 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include "corecel/Types.hh" 0011 #include "celeritas/Constants.hh" 0012 #include "celeritas/Quantities.hh" 0013 #include "celeritas/phys/ParticleTrackView.hh" 0014 0015 namespace celeritas 0016 { 0017 namespace detail 0018 { 0019 //---------------------------------------------------------------------------// 0020 /*! 0021 * Calculate the maximum energy transferable to a free electron in ionizaation. 0022 * 0023 * This calculates the maximum kinematically allowed kinetic energy of the 0024 * delta ray produced in muon or hadron ionization, 0025 * \f[ 0026 T_{max} = \frac{2 m_e c^2 (\gamma^2 - 1)}{1 + 2\gamma (m_e/M) + (m_e/M)^2}, 0027 * \f] 0028 * where \f$ m_e \f$ is the electron mass and \f$ M \f$ is the mass of the 0029 * incident particle. 0030 */ 0031 inline CELER_FUNCTION units::MevEnergy 0032 calc_max_secondary_energy(ParticleTrackView const& particle, 0033 units::MevMass electron_mass) 0034 { 0035 real_type inc_mass = value_as<units::MevMass>(particle.mass()); 0036 real_type mass_ratio = value_as<units::MevMass>(electron_mass) / inc_mass; 0037 real_type tau = value_as<units::MevEnergy>(particle.energy()) / inc_mass; 0038 return units::MevEnergy{ 0039 2 * value_as<units::MevMass>(electron_mass) * tau * (tau + 2) 0040 / (1 + 2 * (tau + 1) * mass_ratio + ipow<2>(mass_ratio))}; 0041 } 0042 0043 //---------------------------------------------------------------------------// 0044 } // namespace detail 0045 } // namespace celeritas
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |