#ifndef PUNCHTABLE_H #define PUNCHTABLE_H #include "CubicSpline.h" #include #include #include namespace PunchTable { class PunchTable { public: PunchTable(); PunchTable(const std::string& filename); ~PunchTable(); void ReadFile(const std::string& filename); double GetInitialKineticEnergy(double theta_incident, double e_deposited); inline bool IsValid() const { return m_validFlag; } private: std::vector m_splines; double m_thetaStep, m_thetaMin, m_thetaMax; bool m_validFlag; static constexpr double s_deg2rad = M_PI/180.0; }; } #endif