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);
356 table.
card(
"LO_THRES",
m_lo_thres,
"[TeV] Lower energy threshold");
359 table.
card(
"HI_THRES",
m_hi_thres,
"[TeV] Upper energy threshold");
364 table.
card(
"RAD_MAX",
m_rad_max,
"[deg] Applied radius cut");
389 GFits fits(filename);
394 if (extname.empty()) {
441 if (fits.contains(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");
int m_inx_aeff
Effective area (true energy)
GFitsTable * table(const int &extno)
Get pointer to table HDU.
GCTAResponseTable m_aeff
Aeff response table.
bool has_card(const int &cardno) const
Check existence of header card.
double m_theta_max
Maximum theta (radians)
double m_hi_thres
Upper energy threshold (TeV)
double m_logE_max
Maximum logE (log10(E/TeV))
void append(const GEnergy &emin, const GEnergy &emax)
Append energy interval.
GCTAAeff2D & operator=(const GCTAAeff2D &aeff)
Assignment operator.
void copy_members(const GCTAAeff2D &aeff)
Copy class members.
std::string extname(const std::string &defaultname="") const
Return extension name.
const int & tables(void) const
Return number of tables.
GEbounds m_ebounds
Energy boundaries.
double m_logE_min
Minimum logE (log10(E/TeV))
void scale(const int &table, const double &scale)
Scale table.
void set_boundaries(void)
Set effective area boundaries.
void axis_radians(const int &axis)
Set nodes for a radians axis.
FITS file class interface definition.
GCTAAeff & operator=(const GCTAAeff &aeff)
Assignment operator.
GCTAAeff2D(void)
Void constructor.
double m_rad_max
Radius cut (degrees)
void read(const GFitsTable &table)
Read response table from FITS table HDU.
void free_members(void)
Delete class members.
virtual ~GCTAAeff2D(void)
Destructor.
double m_theta_min
Minimum theta (radians)
const double & axis_lo(const int &axis, const int &bin) const
Return lower bin boundary for bin in axis.
void read(const GFitsTable &table)
Read effective area from FITS table.
Definition of support function used by CTA classes.
double real(const std::string &keyname) const
Return card value as double precision.
void write(GFitsTable &table) const
Write response table into FITS table HDU.
int axis(const std::string &name) const
Determine index of an axis.
const GCTAResponseTable & table(void) const
Return response table.
GFilename filename(void) const
Return filename.
GCTAAeff2D * clone(void) const
Clone effective area.
CTA 2D effective area class.
bool has_table(const std::string &name) const
Check whether a table exists.
double m_lo_thres
Lower energy threshold (TeV)
void remove(const int &extno)
Remove HDU from FITS file.
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.
std::string print(const GChatter &chatter=NORMAL) const
Print effective area information.
void clear(void)
Clear response table.
CTA 2D effective area class definition.
void init_members(void)
Initialise class members.
Abstract interface for FITS table.
void clear(void)
Clear effective area.
const std::string extname_cta_aeff2d
void set_indices(void)
Set table indices.
int m_inx_theta
Theta index.
void write(GFitsBinTable &table) const
Write effective area into FITS binary table.
const std::string & extname(void) const
Return extension name.
void axis_log10(const int &axis)
Set nodes for a logarithmic (base 10) axis.
void clear(void)
Clear energy boundaries.
int table(const std::string &name) const
Determine index of table.
std::string gadf_hduclas4(const GFits &fits, const std::string &hduclas4)
Return extension name for GADF response table of given HDU class 4.
Abstract base class for the CTA effective area.
void init_members(void)
Initialise class members.
void save(const GFilename &filename, const bool &clobber=false) const
Save effective area into FITS file.
std::string url(void) const
Return Uniform Resource Locator (URL)
int axis_bins(const int &axis) const
Return number bins in an axis.
void clear(void)
Clear file name.
void free_members(void)
Delete class members.
int m_inx_energy
Energy index.
void load(const GFilename &filename)
Load effective area from FITS file.
const double & axis_hi(const int &axis, const int &bin) const
Return upper bin boundary for bin in axis.
Exception handler interface definition.
FITS binary table class definition.
CTA response table class.
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.
const std::string & axis_lo_unit(const int &axis) const
Return lower bin boundary unit for axis.
const std::string & axis_hi_unit(const int &axis) const
Return upper bin boundary unit for axis.
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
GFitsHeaderCard & card(const int &cardno)
Return header card.
void close(void)
Close FITS file.
const int & axes(void) const
Return number of axes of the tables.
int m_inx_aeff_reco
Effective area (reco. energy)
Filename class interface definition.
Mathematical function definitions.
Class that handles energies in a unit independent way.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
FITS table abstract base class interface definition.
GFilename m_filename
Name of Aeff response file.