File indexing completed on 2025-10-14 08:48:25
0001
0002
0003
0004
0005
0006
0007 #pragma once
0008
0009 #include "corecel/Types.hh"
0010 #include "celeritas/Constants.hh"
0011 #include "celeritas/Quantities.hh"
0012
0013 #include "GeantOpticalPhysicsOptions.hh"
0014
0015 namespace celeritas
0016 {
0017
0018
0019 enum class BremsModelSelection
0020 {
0021 none,
0022 seltzer_berger,
0023 relativistic,
0024 all,
0025 size_
0026 };
0027
0028
0029
0030 enum class MscModelSelection
0031 {
0032 none,
0033 urban,
0034 wentzelvi,
0035 urban_wentzelvi,
0036 size_
0037 };
0038
0039
0040
0041 enum class RelaxationSelection
0042 {
0043 none,
0044 radiative,
0045 all,
0046 size_
0047 };
0048
0049
0050
0051
0052
0053 struct GeantMuonPhysicsOptions
0054 {
0055
0056 bool pair_production{false};
0057
0058 bool ionization{false};
0059
0060 bool bremsstrahlung{false};
0061
0062 bool coulomb{false};
0063
0064 MscModelSelection msc{MscModelSelection::none};
0065
0066
0067 explicit operator bool() const
0068 {
0069 return pair_production || ionization || bremsstrahlung || coulomb
0070 || msc != MscModelSelection::none;
0071 }
0072 };
0073
0074
0075 constexpr bool
0076 operator==(GeantMuonPhysicsOptions const& a, GeantMuonPhysicsOptions const& b)
0077 {
0078
0079 return a.pair_production == b.pair_production
0080 && a.ionization == b.ionization
0081 && a.bremsstrahlung == b.bremsstrahlung
0082 && a.coulomb == b.coulomb
0083 && a.msc == b.msc;
0084
0085 }
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096 struct GeantPhysicsOptions
0097 {
0098 using MevEnergy = Quantity<units::Mev, double>;
0099
0100
0101
0102
0103
0104 bool compton_scattering{true};
0105
0106 bool photoelectric{true};
0107
0108 bool rayleigh_scattering{true};
0109
0110 bool gamma_conversion{true};
0111
0112 bool gamma_general{false};
0113
0114
0115
0116
0117
0118
0119 bool coulomb_scattering{false};
0120
0121 bool ionization{true};
0122
0123 bool annihilation{true};
0124
0125 BremsModelSelection brems{BremsModelSelection::all};
0126
0127 MevEnergy seltzer_berger_limit{1e3};
0128
0129 MscModelSelection msc{MscModelSelection::urban};
0130
0131 RelaxationSelection relaxation{RelaxationSelection::none};
0132
0133
0134
0135 GeantMuonPhysicsOptions muon;
0136
0137
0138
0139
0140
0141 int em_bins_per_decade{7};
0142
0143 bool eloss_fluctuation{true};
0144
0145 bool lpm{true};
0146
0147 bool integral_approach{true};
0148
0149
0150
0151
0152
0153
0154 MevEnergy min_energy{0.1 * 1e-3};
0155
0156 MevEnergy max_energy{100 * 1e6};
0157
0158 double linear_loss_limit{0.01};
0159
0160 MevEnergy lowest_electron_energy{0.001};
0161
0162 MevEnergy lowest_muhad_energy{0.001};
0163
0164 bool apply_cuts{false};
0165
0166 double default_cutoff{0.1 * units::centimeter};
0167
0168
0169
0170
0171
0172
0173 double msc_range_factor{0.04};
0174
0175 double msc_muhad_range_factor{0.2};
0176
0177 double msc_safety_factor{0.6};
0178
0179 double msc_lambda_limit{0.1 * units::centimeter};
0180
0181 double msc_theta_limit{constants::pi};
0182
0183 double angle_limit_factor{1};
0184
0185 bool msc_displaced{true};
0186
0187 bool msc_muhad_displaced{false};
0188
0189 MscStepLimitAlgorithm msc_step_algorithm{MscStepLimitAlgorithm::safety};
0190
0191 MscStepLimitAlgorithm msc_muhad_step_algorithm{
0192 MscStepLimitAlgorithm::minimal};
0193
0194 NuclearFormFactorType form_factor{NuclearFormFactorType::exponential};
0195
0196
0197
0198 bool verbose{false};
0199
0200
0201 GeantOpticalPhysicsOptions optical{
0202 GeantOpticalPhysicsOptions::deactivated()};
0203 };
0204
0205
0206
0207 constexpr bool
0208 operator==(GeantPhysicsOptions const& a, GeantPhysicsOptions const& b)
0209 {
0210
0211 return a.coulomb_scattering == b.coulomb_scattering
0212 && a.photoelectric == b.photoelectric
0213 && a.rayleigh_scattering == b.rayleigh_scattering
0214 && a.gamma_conversion == b.gamma_conversion
0215 && a.gamma_general == b.gamma_general
0216 && a.compton_scattering == b.compton_scattering
0217 && a.ionization == b.ionization
0218 && a.annihilation == b.annihilation
0219 && a.brems == b.brems
0220 && a.seltzer_berger_limit == b.seltzer_berger_limit
0221 && a.msc == b.msc
0222 && a.relaxation == b.relaxation
0223 && a.em_bins_per_decade == b.em_bins_per_decade
0224 && a.eloss_fluctuation == b.eloss_fluctuation
0225 && a.lpm == b.lpm
0226 && a.integral_approach == b.integral_approach
0227 && a.min_energy == b.min_energy
0228 && a.max_energy == b.max_energy
0229 && a.linear_loss_limit == b.linear_loss_limit
0230 && a.lowest_electron_energy == b.lowest_electron_energy
0231 && a.lowest_muhad_energy == b.lowest_muhad_energy
0232 && a.apply_cuts == b.apply_cuts
0233 && a.msc_range_factor == b.msc_range_factor
0234 && a.msc_muhad_range_factor == b.msc_muhad_range_factor
0235 && a.msc_safety_factor == b.msc_safety_factor
0236 && a.msc_lambda_limit == b.msc_lambda_limit
0237 && a.msc_theta_limit == b.msc_theta_limit
0238 && a.angle_limit_factor == b.angle_limit_factor
0239 && a.msc_displaced == b.msc_displaced
0240 && a.msc_muhad_displaced == b.msc_muhad_displaced
0241 && a.msc_step_algorithm == b.msc_step_algorithm
0242 && a.msc_muhad_step_algorithm == b.msc_muhad_step_algorithm
0243 && a.form_factor == b.form_factor
0244 && a.verbose == b.verbose
0245 && a.optical == b.optical;
0246
0247 }
0248
0249
0250
0251
0252
0253 char const* to_cstring(BremsModelSelection value);
0254 char const* to_cstring(MscModelSelection value);
0255 char const* to_cstring(RelaxationSelection value);
0256
0257
0258 }