File indexing completed on 2025-09-17 08:53:33
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include "corecel/Macros.hh"
0010 #include "corecel/cont/Array.hh"
0011 #include "corecel/data/Collection.hh"
0012 #include "celeritas/Quantities.hh"
0013 #include "celeritas/Types.hh"
0014 #include "celeritas/grid/XsGridData.hh"
0015
0016 #include "CommonCoulombData.hh"
0017
0018 namespace celeritas
0019 {
0020
0021
0022
0023
0024 struct WentzelVIMscParameters
0025 {
0026 using Energy = units::MevEnergy;
0027
0028 real_type single_scattering_factor{1.25};
0029 Energy low_energy_limit{0};
0030 Energy high_energy_limit{0};
0031
0032
0033 static constexpr real_type min_step{real_type{1} * units::nanometer};
0034 };
0035
0036
0037
0038
0039
0040 template<Ownership W, MemSpace M>
0041 struct WentzelVIMscData
0042 {
0043
0044
0045 template<class T>
0046 using Items = Collection<T, W, M>;
0047 template<class T>
0048 using ParticleItems = Collection<T, W, M, ParticleId>;
0049
0050
0051
0052
0053 CoulombIds ids;
0054
0055 units::MevMass electron_mass;
0056
0057 WentzelVIMscParameters params;
0058
0059 ParticleId::size_type num_particles;
0060
0061 ParticleItems<MscParticleId> pid_to_xs;
0062
0063 Items<UniformGridRecord> xs;
0064
0065
0066 Items<real_type> reals;
0067
0068
0069
0070
0071 explicit CELER_FUNCTION operator bool() const
0072 {
0073 return ids && electron_mass > zero_quantity() && num_particles >= 2
0074 && !pid_to_xs.empty() && !xs.empty() && !reals.empty();
0075 }
0076
0077
0078 template<Ownership W2, MemSpace M2>
0079 WentzelVIMscData& operator=(WentzelVIMscData<W2, M2> const& other)
0080 {
0081 CELER_EXPECT(other);
0082 ids = other.ids;
0083 electron_mass = other.electron_mass;
0084 params = other.params;
0085 num_particles = other.num_particles;
0086 pid_to_xs = other.pid_to_xs;
0087 xs = other.xs;
0088 reals = other.reals;
0089 return *this;
0090 }
0091 };
0092
0093 }