#ifndef SCATTERING_ANGLE_DISTRIBUTION_H #define SCATTERING_ANGLE_DISTRIBUTION_H #include #include #include #include #include #include "simulation/energy_binning.h" class ScatteringAngleDistribution { public: virtual double roll(std::mt19937* engine, double energy_eV) = 0; }; class IsotropicAngleDistribution : public ScatteringAngleDistribution { public: IsotropicAngleDistribution(); double roll(std::mt19937* engine, double energy_eV = 0.); private: std::uniform_real_distribution distribution_; }; class AngleDistributionFromFile : public ScatteringAngleDistribution { public: AngleDistributionFromFile(std::string absolute_filepath); double roll(std::mt19937* engine, double energy_eV); private: std::shared_ptr energy_binning_; std::vector> angle_distributions_; }; class CompositeAngleDistribution : public ScatteringAngleDistribution { public: CompositeAngleDistribution( std::shared_ptr lower_distribution, std::shared_ptr higher_distribution, double decider_energy); double roll(std::mt19937* engine, double energy_eV); private: std::shared_ptr lower_distribution_; std::shared_ptr higher_distribution_; const double decider_energy_; }; #endif /* SCATTERING_ANGLE_DISTRIBUTION_H */