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