mirror of
https://github.com/gwm17/PunchTable.git
synced 2025-04-21 15:18:51 -04:00
30 lines
609 B
C++
30 lines
609 B
C++
#ifndef PUNCHTABLE_H
|
|
#define PUNCHTABLE_H
|
|
|
|
#include "CubicSpline.h"
|
|
#include <vector>
|
|
#include <string>
|
|
#include <cmath>
|
|
|
|
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<CubicSpline> m_splines;
|
|
double m_thetaStep, m_thetaMin, m_thetaMax;
|
|
|
|
bool m_validFlag;
|
|
|
|
static constexpr double s_deg2rad = M_PI/180.0;
|
|
};
|
|
|
|
}
|
|
#endif |