File indexing completed on 2026-01-10 10:05:47
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include "corecel/Types.hh"
0010
0011 namespace celeritas
0012 {
0013 template<Ownership W, MemSpace M>
0014 struct CherenkovData;
0015 class CherenkovGenerator;
0016 class CherenkovParams;
0017 template<Ownership W, MemSpace M>
0018 struct ScintillationData;
0019 class ScintillationGenerator;
0020 class ScintillationParams;
0021
0022 namespace detail
0023 {
0024 struct CherenkovOffloadExecutor;
0025 struct ScintOffloadExecutor;
0026
0027
0028
0029 enum class GeneratorType
0030 {
0031 cherenkov,
0032 scintillation,
0033 };
0034
0035
0036
0037 template<GeneratorType G>
0038 struct GeneratorTraits;
0039
0040 template<>
0041 struct GeneratorTraits<GeneratorType::cherenkov>
0042 {
0043
0044 template<Ownership W, MemSpace M>
0045 using Data = CherenkovData<W, M>;
0046
0047
0048 using Params = CherenkovParams;
0049
0050
0051 using Generator = CherenkovGenerator;
0052
0053
0054 static constexpr char const label[] = "cherenkov-generate";
0055
0056
0057 static constexpr char const description[]
0058 = "generate Cherenkov photons from optical distribution data";
0059 };
0060
0061 template<>
0062 struct GeneratorTraits<GeneratorType::scintillation>
0063 {
0064
0065 template<Ownership W, MemSpace M>
0066 using Data = ScintillationData<W, M>;
0067
0068
0069 using Params = ScintillationParams;
0070
0071
0072 using Generator = ScintillationGenerator;
0073
0074
0075 static constexpr char const label[] = "scintillation-generate";
0076
0077
0078 static constexpr char const description[]
0079 = "generate scintillation photons from optical distribution data";
0080 };
0081
0082
0083
0084 template<GeneratorType G>
0085 struct OffloadTraits;
0086
0087 template<>
0088 struct OffloadTraits<GeneratorType::cherenkov>
0089 {
0090
0091 using Params = CherenkovParams;
0092
0093
0094 using Executor = CherenkovOffloadExecutor;
0095
0096
0097 static constexpr char const label[] = "cherenkov-offload";
0098
0099
0100 static constexpr char const description[]
0101 = "generate Cherenkov optical distribution data";
0102 };
0103
0104 template<>
0105 struct OffloadTraits<GeneratorType::scintillation>
0106 {
0107
0108 using Params = ScintillationParams;
0109
0110
0111 using Executor = ScintOffloadExecutor;
0112
0113
0114 static constexpr char const label[] = "scintillation-offload";
0115
0116
0117 static constexpr char const description[]
0118 = "generate scintillation optical distribution data";
0119 };
0120
0121
0122 }
0123 }