File indexing completed on 2025-02-22 10:31:15
0001
0002
0003
0004
0005
0006
0007
0008 #pragma once
0009
0010 #include "corecel/Macros.hh"
0011 #include "corecel/Types.hh"
0012 #include "corecel/cont/Array.hh"
0013 #include "corecel/data/Collection.hh"
0014 #include "corecel/math/Quantity.hh"
0015 #include "celeritas/Quantities.hh"
0016 #include "celeritas/Types.hh"
0017
0018 #include "ElectronBremsData.hh"
0019
0020 namespace celeritas
0021 {
0022
0023
0024
0025
0026
0027 struct RelBremFormFactor
0028 {
0029 real_type el;
0030 real_type inel;
0031 };
0032
0033
0034
0035
0036
0037
0038 struct RelBremElementData
0039 {
0040 real_type fz;
0041 real_type factor1;
0042 real_type factor2;
0043 real_type gamma_factor;
0044 real_type epsilon_factor;
0045 };
0046
0047
0048
0049
0050
0051 template<Ownership W, MemSpace M>
0052 struct RelativisticBremData
0053 {
0054 template<class T>
0055 using ElementItems = celeritas::Collection<T, W, M, ElementId>;
0056
0057
0058
0059
0060 ElectronBremIds ids;
0061
0062
0063 units::MevMass electron_mass;
0064
0065
0066 bool enable_lpm{};
0067
0068
0069 ElementItems<RelBremElementData> elem_data;
0070
0071
0072
0073
0074 static CELER_CONSTEXPR_FUNCTION bool dielectric_suppression()
0075 {
0076 return true;
0077 }
0078
0079
0080 explicit CELER_FUNCTION operator bool() const
0081 {
0082 return ids && electron_mass > zero_quantity() && !elem_data.empty();
0083 }
0084
0085
0086 template<Ownership W2, MemSpace M2>
0087 RelativisticBremData& operator=(RelativisticBremData<W2, M2> const& other)
0088 {
0089 CELER_EXPECT(other);
0090 ids = other.ids;
0091 electron_mass = other.electron_mass;
0092 enable_lpm = other.enable_lpm;
0093 elem_data = other.elem_data;
0094 return *this;
0095 }
0096 };
0097
0098 using RelativisticBremDeviceRef = DeviceCRef<RelativisticBremData>;
0099 using RelativisticBremHostRef = HostCRef<RelativisticBremData>;
0100 using RelativisticBremRef = NativeCRef<RelativisticBremData>;
0101
0102 }