42#define G_READ "GCTAAeff2D::read(GFitsTable&)"
192 const double& zenith,
193 const double& azimuth,
194 const bool& etrue)
const
208 m_aeff(index, theta, logE);
298 std::string msg =
"Expected two-dimensional effective area response "
300 " dimensions. Please specify a two-dimensional "
347 for (
int i = 0; i < aeff.
tables(); ++i) {
348 aeff.
scale(i, 1.0e-4);
394 if (extname.empty()) {
452 table.extname(extname);
478 const double& zenith,
479 const double& azimuth,
480 const bool& etrue)
const
483 double max_aeff = 0.0;
492 for (
int i = 0; i < n_theta; ++i) {
500 m_aeff(index, theta_lo, logE);
502 m_aeff(index, theta_hi, logE);
506 if (aeff_lo > max_aeff) {
509 if (aeff_hi > max_aeff) {
565 result.append(
"=== GCTAAeff2D ===");
602 result.append(
"not specified");
609 result.append(
"not specified");
616 result.append(
"none");
CTA 2D effective area class definition.
Definition of support function used by CTA classes.
Exception handler interface definition.
Filename class interface definition.
FITS binary table class definition.
FITS table abstract base class interface definition.
FITS file class interface definition.
Mathematical function definitions.
CTA 2D effective area class.
GFilename filename(void) const
Return filename.
void set_indices(void)
Set table indices.
GCTAAeff2D & operator=(const GCTAAeff2D &aeff)
Assignment operator.
double operator()(const double &logE, const double &theta=0.0, const double &phi=0.0, const double &zenith=0.0, const double &azimuth=0.0, const bool &etrue=true) const
Return effective area in units of cm2.
void free_members(void)
Delete class members.
virtual ~GCTAAeff2D(void)
Destructor.
GEbounds m_ebounds
Energy boundaries.
double m_lo_thres
Lower energy threshold (TeV)
double max(const double &logE, const double &zenith, const double &azimuth, const bool &etrue=true) const
Return maximum effective area at a given energy in cm2.
void clear(void)
Clear effective area.
void load(const GFilename &filename)
Load effective area from FITS file.
void write(GFitsBinTable &table) const
Write effective area into FITS binary table.
double m_rad_max
Radius cut (degrees)
int m_inx_aeff
Effective area (true energy)
GFilename m_filename
Name of Aeff response file.
double m_logE_min
Minimum logE (log10(E/TeV))
GCTAAeff2D(void)
Void constructor.
GCTAAeff2D * clone(void) const
Clone effective area.
double m_theta_min
Minimum theta (radians)
double m_hi_thres
Upper energy threshold (TeV)
double m_logE_max
Maximum logE (log10(E/TeV))
void save(const GFilename &filename, const bool &clobber=false) const
Save effective area into FITS file.
int m_inx_energy
Energy index.
int m_inx_theta
Theta index.
void copy_members(const GCTAAeff2D &aeff)
Copy class members.
std::string print(const GChatter &chatter=NORMAL) const
Print effective area information.
GCTAResponseTable m_aeff
Aeff response table.
double m_theta_max
Maximum theta (radians)
void set_boundaries(void)
Set effective area boundaries.
void init_members(void)
Initialise class members.
void read(const GFitsTable &table)
Read effective area from FITS table.
int m_inx_aeff_reco
Effective area (reco. energy)
const GCTAResponseTable & table(void) const
Return response table.
Abstract base class for the CTA effective area.
void init_members(void)
Initialise class members.
void free_members(void)
Delete class members.
GCTAAeff & operator=(const GCTAAeff &aeff)
Assignment operator.
CTA response table class.
void read(const GFitsTable &table)
Read response table from FITS table HDU.
const std::string & axis_lo_unit(const int &axis) const
Return lower bin boundary unit for axis.
int table(const std::string &name) const
Determine index of table.
const std::string & axis_hi_unit(const int &axis) const
Return upper bin boundary unit for axis.
void axis_log10(const int &axis)
Set nodes for a logarithmic (base 10) axis.
const int & tables(void) const
Return number of tables.
void axis_radians(const int &axis)
Set nodes for a radians axis.
int axis(const std::string &name) const
Determine index of an axis.
const int & axes(void) const
Return number of axes of the tables.
void write(GFitsTable &table) const
Write response table into FITS table HDU.
int axis_bins(const int &axis) const
Return number bins in an axis.
const double & axis_hi(const int &axis, const int &bin) const
Return upper bin boundary for bin in axis.
bool has_table(const std::string &name) const
Check whether a table exists.
void scale(const int &table, const double &scale)
Scale table.
void clear(void)
Clear response table.
const double & axis_lo(const int &axis, const int &bin) const
Return lower bin boundary for bin in axis.
void append(const GEnergy &emin, const GEnergy &emax)
Append energy interval.
void clear(void)
Clear energy boundaries.
Class that handles energies in a unit independent way.
double log10TeV(void) const
Return log10 of energy in TeV.
std::string url(void) const
Return Uniform Resource Locator (URL)
std::string extname(const std::string &defaultname="") const
Return extension name.
void clear(void)
Clear file name.
Abstract interface for FITS table.
bool contains(const int &extno) const
Check if HDU exists in FITS file.
GFitsHDU * append(const GFitsHDU &hdu)
Append HDU to FITS file.
void close(void)
Close FITS file.
void remove(const int &extno)
Remove HDU from FITS file.
void save(const bool &clobber=false)
Saves FITS file.
GFitsTable * table(const int &extno)
Get pointer to table HDU.
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.
const std::string extname_cta_aeff2d
std::string gadf_hduclas4(const GFits &fits, const std::string &hduclas4)
Return extension name for GADF response table of given HDU class 4.