Files
karl/include/interactions/ionization.h
T
2024-12-04 17:15:04 +01:00

85 lines
3.9 KiB
C++
Executable File

#ifndef IONIZATION_H
#define IONIZATION_H
#include "simulation/interaction.h"
namespace interaction {
// class for drawing the energy of the outgoing electron (i.e. the slower one of the
// two electrons that exist after the interaction)
class IonizationEnergyDistribution {
public:
// Constructor: takes a function dependent on the energy of the incident particle
// and the energy of the ejected electron. Function should describe
// the energy distribution of the ejected electron.
// takes the ionization threshold energy in eV
IonizationEnergyDistribution(
std::function<double(double, double)> d2_cross_section,
double ionization_energy_eV);
// draw the energy (always < (impact_energy - ionization_energy)/2) of the ejected particle
double rollImpactParticleEnergyAfterCollision(double impact_energy,
RandomNumbers* generator);
private:
std::function<double(double, double)> d2_cross_section_;
const double ionization_energy_eV_;
};
// function handling the azimuthal angle distribution for
// electron ionization
class IonizationScatteringAngleDistribution {
public:
// draw the azimuthal angle of the faster electron after collision
// impact_energy is the kinetic energy of the particle in the rest frame of the target in eV before the collision
// impact_energy is the kinetic energy of the particle (the faster of the two electrons) in the rest frame of the target in eV after the collision
double rollAzimuthImpactParticleAfterCollision(
double impact_energy,
double energy_impact_particle_new,
RandomNumbers* generator);
// draw the azimuthal angle of the slower electron after collision
// impact_energy is the kinetic energy of the particle in the rest frame of the target in eV before the collision
// impact_energy is the kinetic energy of the particle (the slower of the two electrons) in the rest frame of the target in eV after the collision
double rollAzimuthEjectedParticleAfterCollision(
double impact_energy,
double energy_impactParticle_new,
RandomNumbers* generator);
};
// class for handling electron impact ionization
class ElectronIonization : public Interaction {
public:
// Constructor: takes a function describing the cross section for the interaction
// a shared_ptr to the Specie of the target particle
// a shared_ptr to the TrackedSpecie electron describing the incident electron
// a shared_ptr to the TrackedSpecie ion describing the positive ion type that is created
// a shared_ptr to the IonizationEnergyDistribution, descibing the energy distribution of either
// of the two electrons after the interaction
// a shared_ptr to the IonizationScatterinAngleDistribution, which describes the
// azimuthal angle distribution of both final electrons
ElectronIonization(
std::function<double(double)> cross_section,
std::shared_ptr<species::Specie> target,
std::shared_ptr<species::TrackedSpecie> electron,
std::shared_ptr<species::TrackedSpecie> ion,
std::shared_ptr<IonizationEnergyDistribution> distribution,
std::shared_ptr<IonizationScatteringAngleDistribution> angle_distribution,
double ionization_energy_eV);
// perform the interaction and return an InteractionOutput object
// containing the corresponding information (new particles)
InteractionOutput performInteraction(particle::Particle& particle,
RandomNumbers* generator);
private:
std::shared_ptr<IonizationEnergyDistribution> energy_distribution_;
std::shared_ptr<IonizationScatteringAngleDistribution> angle_distribution_;
const double ionization_energy_eV_;
std::shared_ptr<species::TrackedSpecie> electron_;
std::shared_ptr<species::TrackedSpecie> ion_;
};
} // namespace interaction
#endif /* IONIZATION_H */