#ifndef INTERACTION_H #define INTERACTION_H #include "simulation/particle.h" #include "simulation/random_numbers.h" #include "simulation/species.h" #include #include #include namespace interaction { class InteractionOutput { public: InteractionOutput(); void deleteCurrentParticle(bool new_decider); bool deleteCurrentParticle(); void add(const particle::Particle& new_particle); std::vector newParticles(); private: bool delete_current_particle_; std::vector new_particles_; }; class Interaction { public: Interaction(std::function cross_section, std::shared_ptr target); virtual double microscopicCrossSection(double energy_eV, const Coordinate& position); virtual double macroscopicCrossSection(particle::Particle& particle); // return the time the given particle can travel in the laboratory frame // before this specific interaction occurs (also stores the velocity of the // target particle) virtual double drawCollisionTime(particle::Particle& particle, RandomNumbers* generator); virtual InteractionOutput performInteraction(particle::Particle& particle, RandomNumbers* generator) = 0; protected: std::function cross_section_; std::shared_ptr target_; CartesianVector target_velocity_; double threshold_increase_J = 6.9032515e-26; // J (5 mK) }; }; // namespace interaction #endif /* INTERACTION_H */