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) {
218 if (m_energy_num > 0) {
230 if (m_ctheta_num > 0) {
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);
601 weights.push_back(
m_wgt1);
602 weights.push_back(
m_wgt2);
603 weights.push_back(
m_wgt3);
604 weights.push_back(
m_wgt4);
626 result.append(
"=== GLATResponseTable ===");
int m_ctheta_num
Number of cos theta bins in table.
void number(const int &number)
Set number of elements in column.
double costheta_hi(const int &inx) const
Return upper bin cos theta.
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.
const double & wgt_left(void) const
Returns left node weight.
void clear(void)
Clear node array.
Fermi-LAT response table class definition.
void clear(void)
Clear instance.
GFitsTableCol * append(const GFitsTableCol &column)
Append column to the table.
void write(GFitsTable &hdu) const
Write response table into FITS table.
GNodeArray m_logE
Energy nodes (log10 mean energy)
GLATResponseTable(void)
Void constructor.
FITS table float column class interface definition.
void set_value(const double &value) const
Set indices and weighting factors for interpolation.
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.
const double & wgt_right(void) const
Returns right node weight.
const int & nenergies(void) const
Return number of energies in response table.
GLATResponseTable * clone(void) const
Clone instance.
Abstract interface for FITS table column.
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.
const int & inx_left(void) const
Returns left node index.
GLATResponseTable & operator=(const GLATResponseTable &table)
Assignment operator.
int m_energy_num
Number of energy bins in table.
void nodes(const int &num, const double *array)
Set node array.
const int & inx_right(void) const
Returns right node index.
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.
virtual double real(const int &row, const int &inx=0) const =0
double m_wgt1
Weighting factor 1.
GVector pow(const GVector &vector, const double &power)
Computes tanh of vector elements.
Exception handler interface definition.
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
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
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.
GVector log10(const GVector &vector)
Computes base10 logarithm of vector elements.
std::vector< int > indices(void) const
Return indices of 4 corners used for interpolation.
double m_wgt3
Weighting factor 3.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.