![]() |
|
|||
File indexing completed on 2025-02-22 10:31:19
0001 //----------------------------------*-C++-*----------------------------------// 0002 // Copyright 2023-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/xs/MottRatioCalculator.hh 0007 //---------------------------------------------------------------------------// 0008 #pragma once 0009 0010 #include "corecel/Macros.hh" 0011 #include "corecel/Types.hh" 0012 #include "corecel/math/ArrayUtils.hh" 0013 #include "celeritas/em/data/WentzelOKVIData.hh" 0014 #include "celeritas/grid/PolyEvaluator.hh" 0015 0016 namespace celeritas 0017 { 0018 0019 //---------------------------------------------------------------------------// 0020 /*! 0021 * Calculates the ratio of Mott cross section to the Rutherford cross section. 0022 * 0023 * This ratio is an adjustment of the cross section from a purely classical 0024 * treatment of a point nucleus in an electronic cloud (Rutherford scattering) 0025 * to a quantum mechanical treatment. The implementation is an interpolated 0026 * approximation developed in [LQZ95] and described in the Geant Physics 0027 * Reference Manual [PRM] (Release 1.11) section 8.4 0028 * 0029 * [LQZ95] T. Lijian, H. Quing and L. Zhengming, Radiat. Phys. Chem. 45 (1995), 0030 * 235-245 0031 * 0032 * The parameter \c cos_theta is the cosine of the scattered angle in the 0033 * z-aligned momentum frame. 0034 */ 0035 class MottRatioCalculator 0036 { 0037 public: 0038 //!@{ 0039 //! \name Type aliases 0040 using MottCoeffMatrix = MottElementData::MottCoeffMatrix; 0041 //!@} 0042 0043 public: 0044 // Construct with state data 0045 inline CELER_FUNCTION 0046 MottRatioCalculator(MottCoeffMatrix const& coeffs, real_type beta); 0047 0048 // Ratio of Mott and Rutherford cross sections 0049 inline CELER_FUNCTION real_type operator()(real_type cos_t) const; 0050 0051 private: 0052 MottCoeffMatrix const& coeffs_; 0053 real_type beta_; 0054 }; 0055 0056 //---------------------------------------------------------------------------// 0057 // INLINE DEFINITIONS 0058 //---------------------------------------------------------------------------// 0059 /*! 0060 * Construct with state data. 0061 */ 0062 CELER_FUNCTION 0063 MottRatioCalculator::MottRatioCalculator(MottCoeffMatrix const& coeffs, 0064 real_type beta) 0065 : coeffs_(coeffs), beta_(beta) 0066 { 0067 CELER_EXPECT(0 <= beta_ && beta_ < 1); 0068 } 0069 0070 //---------------------------------------------------------------------------// 0071 /*! 0072 * Compute the ratio of Mott to Rutherford cross sections. 0073 */ 0074 CELER_FUNCTION 0075 real_type MottRatioCalculator::operator()(real_type cos_theta) const 0076 { 0077 CELER_EXPECT(cos_theta >= -1 && cos_theta <= 1); 0078 0079 // (Exponent) Base for theta powers 0080 real_type fcos_t = std::sqrt(1 - cos_theta); 0081 0082 // Mean velocity of electrons between ~KeV and 900 MeV 0083 real_type const beta_shift = 0.7181228; 0084 0085 // (Exponent) Base for beta powers 0086 real_type beta0 = beta_ - beta_shift; 0087 0088 // Evaluate polynomial of powers of beta0 and fcos_t 0089 MottElementData::ThetaArray theta_coeffs; 0090 for (auto i : range(theta_coeffs.size())) 0091 { 0092 theta_coeffs[i] = PolyEvaluator(coeffs_[i])(beta0); 0093 } 0094 real_type result = PolyEvaluator(theta_coeffs)(fcos_t); 0095 CELER_ENSURE(result >= 0); 0096 return result; 0097 } 0098 0099 //---------------------------------------------------------------------------// 0100 } // 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 |
![]() ![]() |