File indexing completed on 2026-05-13 08:33:31
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include "corecel/Types.hh"
0010 #include "celeritas/Types.hh"
0011
0012 namespace celeritas
0013 {
0014
0015
0016 struct CherenkovPhysicsOptions
0017 {
0018
0019 bool enable{true};
0020
0021 bool stack_photons{true};
0022
0023 bool track_secondaries_first{true};
0024
0025 int max_photons{100};
0026
0027 double max_beta_change{10.0};
0028
0029
0030 explicit operator bool() const { return enable; }
0031 };
0032
0033
0034 constexpr bool
0035 operator==(CherenkovPhysicsOptions const& a, CherenkovPhysicsOptions const& b)
0036 {
0037
0038 return a.enable == b.enable
0039 && a.stack_photons == b.stack_photons
0040 && a.track_secondaries_first == b.track_secondaries_first
0041 && a.max_photons == b.max_photons
0042 && a.max_beta_change == b.max_beta_change;
0043
0044 }
0045
0046
0047
0048 struct ScintillationPhysicsOptions
0049 {
0050
0051 bool enable{true};
0052
0053
0054 bool stack_photons{true};
0055
0056 bool track_secondaries_first{true};
0057
0058 bool by_particle_type{false};
0059
0060 bool finite_rise_time{false};
0061
0062 bool track_info{false};
0063
0064
0065 explicit operator bool() const { return enable; }
0066 };
0067
0068
0069 constexpr bool operator==(ScintillationPhysicsOptions const& a,
0070 ScintillationPhysicsOptions const& b)
0071 {
0072
0073 return a.enable == b.enable
0074 && a.stack_photons == b.stack_photons
0075 && a.track_secondaries_first == b.track_secondaries_first
0076 && a.by_particle_type == b.by_particle_type
0077 && a.finite_rise_time == b.finite_rise_time
0078 && a.track_info == b.track_info;
0079
0080 }
0081
0082
0083
0084 struct WavelengthShiftingOptions
0085 {
0086
0087 bool enable{true};
0088
0089 WlsTimeProfile time_profile{WlsTimeProfile::delta};
0090
0091
0092 explicit operator bool() const { return enable; }
0093 };
0094
0095
0096 constexpr bool operator==(WavelengthShiftingOptions const& a,
0097 WavelengthShiftingOptions const& b)
0098 {
0099 return a.enable == b.enable && a.time_profile == b.time_profile;
0100 }
0101
0102
0103
0104 struct BoundaryPhysicsOptions
0105 {
0106
0107 bool enable{true};
0108
0109 bool invoke_sd{false};
0110
0111
0112 explicit operator bool() const { return enable; }
0113 };
0114
0115
0116 constexpr bool
0117 operator==(BoundaryPhysicsOptions const& a, BoundaryPhysicsOptions const& b)
0118 {
0119 return a.enable == b.enable && a.invoke_sd == b.invoke_sd;
0120 }
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132 struct GeantOpticalPhysicsOptions
0133 {
0134
0135
0136
0137
0138 CherenkovPhysicsOptions cherenkov;
0139
0140 ScintillationPhysicsOptions scintillation;
0141
0142
0143
0144
0145
0146
0147 WavelengthShiftingOptions wavelength_shifting;
0148
0149 WavelengthShiftingOptions wavelength_shifting2;
0150
0151 BoundaryPhysicsOptions boundary;
0152
0153 bool absorption{true};
0154
0155 bool rayleigh_scattering{true};
0156
0157 bool mie_scattering{true};
0158
0159
0160
0161 bool verbose{false};
0162
0163
0164 explicit operator bool() const
0165 {
0166 return cherenkov || scintillation || wavelength_shifting
0167 || wavelength_shifting2 || boundary || absorption
0168 || rayleigh_scattering || mie_scattering;
0169 }
0170
0171
0172 static GeantOpticalPhysicsOptions deactivated()
0173 {
0174 GeantOpticalPhysicsOptions opts;
0175 opts.cherenkov.enable = false;
0176 opts.scintillation.enable = false;
0177 opts.wavelength_shifting.enable = false;
0178 opts.wavelength_shifting2.enable = false;
0179 opts.boundary.enable = false;
0180 opts.absorption = false;
0181 opts.rayleigh_scattering = false;
0182 opts.mie_scattering = false;
0183 return opts;
0184 }
0185 };
0186
0187
0188 constexpr bool operator==(GeantOpticalPhysicsOptions const& a,
0189 GeantOpticalPhysicsOptions const& b)
0190 {
0191
0192 return a.cherenkov == b.cherenkov
0193 && a.scintillation == b.scintillation
0194 && a.wavelength_shifting == b.wavelength_shifting
0195 && a.wavelength_shifting2 == b.wavelength_shifting2
0196 && a.boundary == b.boundary
0197 && a.absorption == b.absorption
0198 && a.rayleigh_scattering == b.rayleigh_scattering
0199 && a.mie_scattering == b.mie_scattering
0200 && a.verbose == b.verbose;
0201
0202 }
0203
0204
0205
0206
0207
0208 char const* to_cstring(WlsTimeProfile value);
0209
0210
0211 }