42 lines
1.5 KiB
C++
Executable File
42 lines
1.5 KiB
C++
Executable File
#ifndef ELASTIC_SCATTERING_H
|
|
#define ELASTIC_SCATTERING_H
|
|
|
|
#include "simulation/interaction.h"
|
|
|
|
class ScatteringAngleDistribution;
|
|
|
|
namespace interaction {
|
|
|
|
class ElasticScattering : public Interaction {
|
|
public:
|
|
ElasticScattering(std::function<double(double)> cross_section,
|
|
std::shared_ptr<species::Specie> target,
|
|
std::shared_ptr<ScatteringAngleDistribution> theta_distrib);
|
|
|
|
virtual InteractionOutput performInteraction(particle::Particle& particle,
|
|
RandomNumbers* generator);
|
|
virtual double drawCollisionTime(particle::Particle& particle,
|
|
RandomNumbers* generator);
|
|
protected:
|
|
std::shared_ptr<ScatteringAngleDistribution> theta_distrib_;
|
|
};
|
|
|
|
// Full elastic scattering in the sense that both particles after scattering
|
|
// become tracked
|
|
class ElasticScatteringFull : public ElasticScattering {
|
|
public:
|
|
ElasticScatteringFull(std::function<double(double)> cross_section,
|
|
std::shared_ptr<species::Specie> target,
|
|
std::shared_ptr<ScatteringAngleDistribution> theta_distrib,
|
|
std::shared_ptr<species::TrackedSpecie> product);
|
|
|
|
InteractionOutput performInteraction(particle::Particle& particle,
|
|
RandomNumbers* generator);
|
|
protected:
|
|
std::shared_ptr<species::TrackedSpecie> product_;
|
|
};
|
|
|
|
}; // namespace interaction
|
|
|
|
#endif /* ELASTIC_SCATTERING_H */
|