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