File indexing completed on 2025-02-22 10:31:27
0001
0002
0003
0004
0005
0006
0007
0008 #pragma once
0009
0010 #include "corecel/Macros.hh"
0011 #include "corecel/Types.hh"
0012 #include "corecel/data/Collection.hh"
0013 #include "celeritas/Types.hh"
0014 #include "celeritas/grid/GenericGridData.hh"
0015 #include "celeritas/optical/Types.hh"
0016
0017 namespace celeritas
0018 {
0019 namespace optical
0020 {
0021
0022
0023
0024
0025 template<Ownership W, MemSpace M>
0026 struct CerenkovData
0027 {
0028 template<class T>
0029 using Items = Collection<T, W, M>;
0030 template<class T>
0031 using OpticalMaterialItems = Collection<T, W, M, OpticalMaterialId>;
0032
0033
0034
0035 OpticalMaterialItems<GenericGridRecord> angle_integral;
0036
0037
0038 Items<real_type> reals;
0039
0040
0041
0042
0043 explicit CELER_FUNCTION operator bool() const
0044 {
0045 return !angle_integral.empty() && !reals.empty();
0046 }
0047
0048
0049 template<Ownership W2, MemSpace M2>
0050 CerenkovData& operator=(CerenkovData<W2, M2> const& other)
0051 {
0052 CELER_EXPECT(other);
0053 angle_integral = other.angle_integral;
0054 reals = other.reals;
0055 return *this;
0056 }
0057 };
0058
0059
0060 }
0061 }