diff --git a/src/celeritas/em/data/MollerBhabhaData.hh b/src/celeritas/em/data/MollerBhabhaData.hh index ba45bba6c6..143cbf1c22 100644 --- a/src/celeritas/em/data/MollerBhabhaData.hh +++ b/src/celeritas/em/data/MollerBhabhaData.hh @@ -43,11 +43,6 @@ struct MollerBhabhaData //! Electron mass * c^2 [MeV] units::MevMass electron_mass; - //! Model's mininum energy limit [MeV] - static CELER_CONSTEXPR_FUNCTION units::MevEnergy min_valid_energy() - { - return units::MevEnergy{1e-3}; - } //! Model's maximum energy limit [MeV] static CELER_CONSTEXPR_FUNCTION units::MevEnergy max_valid_energy() { diff --git a/src/celeritas/em/interactor/detail/BhabhaEnergyDistribution.hh b/src/celeritas/em/distribution/BhabhaEnergyDistribution.hh similarity index 100% rename from src/celeritas/em/interactor/detail/BhabhaEnergyDistribution.hh rename to src/celeritas/em/distribution/BhabhaEnergyDistribution.hh diff --git a/src/celeritas/em/interactor/MollerBhabhaInteractor.hh b/src/celeritas/em/interactor/MollerBhabhaInteractor.hh index a8a0444398..cf0037b550 100644 --- a/src/celeritas/em/interactor/MollerBhabhaInteractor.hh +++ b/src/celeritas/em/interactor/MollerBhabhaInteractor.hh @@ -18,6 +18,7 @@ #include "celeritas/Constants.hh" #include "celeritas/Quantities.hh" #include "celeritas/em/data/MollerBhabhaData.hh" +#include "celeritas/em/distribution/BhabhaEnergyDistribution.hh" #include "celeritas/em/distribution/MollerEnergyDistribution.hh" #include "celeritas/phys/CutoffView.hh" #include "celeritas/phys/Interaction.hh" @@ -26,8 +27,6 @@ #include "celeritas/random/distribution/BernoulliDistribution.hh" #include "celeritas/random/distribution/UniformRealDistribution.hh" -#include "detail/BhabhaEnergyDistribution.hh" - namespace celeritas { //---------------------------------------------------------------------------// @@ -105,8 +104,6 @@ CELER_FUNCTION MollerBhabhaInteractor::MollerBhabhaInteractor( { CELER_EXPECT(particle.particle_id() == shared_.ids.electron || particle.particle_id() == shared_.ids.positron); - CELER_EXPECT(electron_cutoff_ - >= value_as(shared_.min_valid_energy())); } //---------------------------------------------------------------------------// diff --git a/src/celeritas/em/model/MollerBhabhaModel.cc b/src/celeritas/em/model/MollerBhabhaModel.cc index 44f59e8218..ba65b268d9 100644 --- a/src/celeritas/em/model/MollerBhabhaModel.cc +++ b/src/celeritas/em/model/MollerBhabhaModel.cc @@ -46,12 +46,12 @@ MollerBhabhaModel::MollerBhabhaModel(ActionId id, */ auto MollerBhabhaModel::applicability() const -> SetApplicability { + // TODO: potentially set lower energy bound based on (material-dependent) + // IonizationProcess lambda table energy grid to avoid invoking the + // interactor for tracks with energy below the interaction threshold + Applicability electron_applic, positron_applic; - // The electron applicability.lower is twice the one for positrons due to - // its maximum transferable energy fraction being 0.5 (which is 1/2 the - // positron's). This prevents it to run an infinite number of Moller - // sampling loops. electron_applic.particle = interface_.ids.electron; electron_applic.lower = zero_quantity(); electron_applic.upper = units::MevEnergy{interface_.max_valid_energy()}; diff --git a/src/celeritas/em/model/MuBremsstrahlungModel.cc b/src/celeritas/em/model/MuBremsstrahlungModel.cc index 26d027e53f..e00c953f41 100644 --- a/src/celeritas/em/model/MuBremsstrahlungModel.cc +++ b/src/celeritas/em/model/MuBremsstrahlungModel.cc @@ -51,7 +51,7 @@ auto MuBremsstrahlungModel::applicability() const -> SetApplicability Applicability mu_minus_applic, mu_plus_applic; mu_minus_applic.particle = interface_.ids.mu_minus; - mu_minus_applic.lower = interface_.min_incident_energy(); + mu_minus_applic.lower = zero_quantity(); mu_minus_applic.upper = interface_.max_incident_energy(); mu_plus_applic.particle = interface_.ids.mu_plus; diff --git a/src/celeritas/em/model/SeltzerBergerModel.cc b/src/celeritas/em/model/SeltzerBergerModel.cc index 0d7d5cc92c..48893855df 100644 --- a/src/celeritas/em/model/SeltzerBergerModel.cc +++ b/src/celeritas/em/model/SeltzerBergerModel.cc @@ -84,8 +84,9 @@ SeltzerBergerModel::SeltzerBergerModel(ActionId id, */ auto SeltzerBergerModel::applicability() const -> SetApplicability { - // TODO: bounds need to be adjusted based on BremsstrahlungProcess data and - // SB table data + // TODO: potentially set lower energy bound based on (material-dependent) + // BremsstrahlungProcess lambda table energy grid to avoid invoking the + // interactor for tracks with energy below the interaction threshold Applicability electron_applic; electron_applic.particle = this->host_ref().ids.electron; diff --git a/src/celeritas/phys/ParticleTrackView.hh b/src/celeritas/phys/ParticleTrackView.hh index d8ae8d7205..892413f3ac 100644 --- a/src/celeritas/phys/ParticleTrackView.hh +++ b/src/celeritas/phys/ParticleTrackView.hh @@ -340,7 +340,7 @@ CELER_FUNCTION units::MevMomentumSq ParticleTrackView::momentum_sq() const { const real_type energy = this->energy().value(); real_type result = energy * energy + 2 * this->mass().value() * energy; - CELER_ENSURE(result > 0); + CELER_ENSURE(result >= 0); return units::MevMomentumSq{result}; }