From f01ff652c9a56ef0ed5bc34875f66166e2d41a96 Mon Sep 17 00:00:00 2001 From: csendlinger Date: Mon, 13 Jan 2025 10:05:56 +0100 Subject: [PATCH] corrected comments for ionization; changed non-diss ion. energy to fit with value used in cross section calc --- include/constants/ionization_constants.h | 2 +- src/interactions/ionization.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/constants/ionization_constants.h b/include/constants/ionization_constants.h index 51ada0d..b6810e6 100755 --- a/include/constants/ionization_constants.h +++ b/include/constants/ionization_constants.h @@ -2,7 +2,7 @@ #define IONIZATION_CONSTANTS_H namespace ionization { -static const double ionization_energy_janev_non_diss = 15.42; // (eV) +static const double ionization_energy_janev_non_diss = 15.43; // (eV) static const double ionization_energy_janev_diss_first = 30.6; // (eV) static const double ionization_energy_janev_diss_ground = 18.15; // (eV) } // namespace ionization diff --git a/src/interactions/ionization.cpp b/src/interactions/ionization.cpp index 589414f..ad779a3 100755 --- a/src/interactions/ionization.cpp +++ b/src/interactions/ionization.cpp @@ -57,7 +57,7 @@ InteractionOutput ElectronIonization::performInteraction( UnitConversion::JouleToeV; } while (E_impact <= ionization_energy_eV_); -// draw the impact energy of the slower of the two electrons after the interaction +// draw the impact energy of the faster of the two electrons after the interaction const double E_impact_new = energy_distribution_->rollImpactParticleEnergyAfterCollision(E_impact, generator); @@ -66,13 +66,15 @@ InteractionOutput ElectronIonization::performInteraction( const double E_ejected = std::max(0., E_impact - E_impact_new - ionization_energy_eV_); -// draw the polar angle of the slower electron +// Note: wrong naming; is actually the azimuthal angle +// draw the polar angle of the faster electron const double polar_angle_impact_new = generator->rollUniform(0., 2 * M_PI); -// calculate the polar angle of the faster electron +// calculate the polar angle of the slower electron const double polar_angle_ejected = (polar_angle_impact_new - M_PI) < 0. ? (polar_angle_impact_new + M_PI) : (polar_angle_impact_new - M_PI); +// wrong naming; is actually the polar angle const double azimuth_angle_impact_new = angle_distribution_->rollAzimuthImpactParticleAfterCollision( E_impact, E_impact_new, generator); @@ -136,7 +138,7 @@ double IonizationEnergyDistribution::rollImpactParticleEnergyAfterCollision( cross_section = generator->rollUniform(cross_section_min, cross_section_max); } while (cross_section > d2_cross_section_(impact_energy, energy_after)); -// outgoing particles are indistiquishable, therefore always return the lower of the +// outgoing particles are indistiquishable, therefore always return the higher of the // two possible energies energy_after = energy_after > (impact_energy - ionization_energy_eV_) / 2. ? energy_after