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