27 #ifndef GLATRESPONSETABLE_HPP
28 #define GLATRESPONSETABLE_HPP
65 int index(
const int& ie,
const int& ic)
const;
66 double energy(
const int& ie)
const;
67 void set(
const double& logE,
const double& ctheta);
68 double interpolate(
const double& logE,
const double& ctheta,
69 const std::vector<double>& array);
70 double interpolate(
const double& logE,
const double& ctheta,
71 const std::vector<double>& array,
72 const int& offset,
const int&
size);
80 std::vector<int>
indices(
void)
const;
81 std::vector<double>
energies(
void)
const;
82 std::vector<double>
weights(
void)
const;
124 return (
"GLATResponseTable");
int m_ctheta_num
Number of cos theta bins in table.
double costheta_hi(const int &inx) const
Return upper bin cos theta.
std::string classname(void) const
Return class name.
void read(const GFitsTable &hdu)
Read response table from FITS table HDU.
double m_wgt4
Weighting factor 4.
std::vector< double > energies(void) const
Return energies of 4 corners used for interpolation.
Definition of interface for all GammaLib classes.
void clear(void)
Clear instance.
void write(GFitsTable &hdu) const
Write response table into FITS table.
GNodeArray m_logE
Energy nodes (log10 mean energy)
GLATResponseTable(void)
Void constructor.
void init_members(void)
Initialise class members.
GNodeArray m_ctheta
cos(theta) nodes
double m_last_ctheta
Last requested cos(theta) for interpolation.
virtual ~GLATResponseTable(void)
Destructor.
double interpolate(const double &logE, const double &ctheta, const std::vector< double > &array)
Perform bi-linear interpolation of 2D array.
double energy_hi(const int &inx) const
Return upper bin energy (units: MeV)
void free_members(void)
Delete class members.
std::string print(const GChatter &chatter=NORMAL) const
Print response table information.
Node array class interface definition.
const int & nenergies(void) const
Return number of energies in response table.
GLATResponseTable * clone(void) const
Clone instance.
Interface class for all GammaLib classes.
Interface for the Fermi LAT Response table class.
void copy_members(const GLATResponseTable &table)
Copy class members.
const int & ncostheta(void) const
Return number of cosine theta bins in response table.
Abstract interface for FITS table.
GLATResponseTable & operator=(const GLATResponseTable &table)
Assignment operator.
int m_energy_num
Number of energy bins in table.
double * m_ctheta_lo
cos(theta) bins lower boundary
double * m_energy_hi
Energy bins upper boundary (MeV)
std::vector< double > m_energy
Energy nodes (MeV)
void set(const double &logE, const double &ctheta)
Set indices and weighting for bi-linear interpolation of 2D array.
int index(const int &ie, const int &ic) const
Return table index.
double m_wgt1
Weighting factor 1.
double costheta_lo(const int &inx) const
Return lower bin cos theta [.
double * m_energy_lo
Energy bins lower boundary (MeV)
double m_wgt2
Weighting factor 2.
double energy_lo(const int &inx) const
Return lower bin energy (units: MeV)
double * m_ctheta_hi
cos(theta) bins upper boundary
double energy(const int &ie) const
Return mean energy of bin (units: MeV)
double m_last_energy
Last requested energy for interpolation.
std::vector< double > weights(void) const
Return weights of 4 corners used for interpolation.
int size(void) const
Return number of bins in response table.
std::vector< int > indices(void) const
Return indices of 4 corners used for interpolation.
double m_wgt3
Weighting factor 3.
FITS table abstract base class interface definition.