37#define G_READ "GLATResponseTable::read(GFitsTable&)"
38#define G_INDEX "GLATResponseTable::index(int&, int&)"
39#define G_ENERGY "GLATResponseTable::energy(int&)"
40#define G_ENERGY_LO "GLATResponseTable::energy_lo(int&)"
41#define G_ENERGY_HI "GLATResponseTable::energy_hi(int&)"
42#define G_COSTHETA_LO "GLATResponseTable::costheta_lo(int&)"
43#define G_COSTHETA_HI "GLATResponseTable::costheta_hi(int&)"
119 if (
this != &table) {
223 m_energy.push_back(std::pow(10.0, logE[i]));
268 hdu.
append(col_energy_lo);
269 hdu.
append(col_energy_hi);
270 hdu.
append(col_ctheta_lo);
271 hdu.
append(col_ctheta_hi);
292 #if defined(G_RANGE_CHECK)
330 #if defined(G_RANGE_CHECK)
411 const double& ctheta,
412 const std::vector<double>& array)
441 const double& ctheta,
442 const std::vector<double>& array,
471 #if defined(G_RANGE_CHECK)
494 #if defined(G_RANGE_CHECK)
517 #if defined(G_RANGE_CHECK)
540 #if defined(G_RANGE_CHECK)
558 std::vector<int> incides;
561 incides.push_back(
m_inx1);
562 incides.push_back(
m_inx2);
563 incides.push_back(
m_inx3);
564 incides.push_back(
m_inx4);
626 result.append(
"=== GLATResponseTable ===");
Exception handler interface definition.
FITS table float column class interface definition.
Fermi-LAT response table class definition.
GVector log10(const GVector &vector)
Computes base10 logarithm of vector elements.
Abstract interface for FITS table column.
void number(const int &number)
Set number of elements in column.
virtual double real(const int &row, const int &inx=0) const =0
Abstract interface for FITS table.
GFitsTableCol * append(const GFitsTableCol &column)
Append column to the 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.
double m_last_energy
Last requested energy for interpolation.
void set_value(const double &value) const
Set indices and weighting factors for interpolation.
const int & inx_right(void) const
Returns right node index.
const int & inx_left(void) const
Returns left node index.
const double & wgt_right(void) const
Returns right node weight.
const double & wgt_left(void) const
Returns left node weight.
void clear(void)
Clear node array.
void nodes(const int &num, const double *array)
Set node array.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.