182 const double& zenith,
183 const double& azimuth,
184 const bool& etrue)
const
203 double arg = offset * offset /
m_sigma;
204 double scale =
exp(-0.5 * arg * arg);
265 GFits fits(filename);
315 double c_specresp = 1.0;
316 if (u_specresp ==
"m^2" || u_specresp ==
"m2") {
317 c_specresp = 10000.0;
321 int num = energy_lo->
nrows();
324 for (
int i = 0; i < num; ++i) {
331 double logE = 0.5 * (emin.log10TeV() + emax.log10TeV());
337 double aeff = specresp->
real(i) * c_specresp *
scale;
372 static const int iter = 6;
381 for (
int i = 0; i <
m_aeff.size(); ++i) {
400 double fraction = integral.
romberg(0.0, rmax);
404 if (fraction > 0.0) {
406 #if defined(G_DEBUG_APPLY_THETACUT)
407 std::cout <<
"GCTAAeffArf::apply_thetacut:";
408 std::cout <<
" logE=" <<
m_logE[i];
409 std::cout <<
" scale=" <<
scale;
410 std::cout <<
" fraction=" << fraction;
411 std::cout << std::endl;
415 std::cout <<
"WARNING: GCTAAeffArf::apply_thetacut:";
416 std::cout <<
" Non-positive integral occured in";
417 std::cout <<
" PSF integration.";
418 std::cout << std::endl;
445 const double& zenith,
446 const double& azimuth,
447 const bool& etrue)
const
453 if (aeff_max < 0.0) {
477 result.append(
"=== GCTAAeffArf ===");
void unit(const std::string &unit)
Set column unit.
GFilename filename(void) const
Return filename.
CTA response helper classes definition.
void remove_thetacut(const GCTAResponseIrf &rsp)
Remove thetacut.
GFitsTable * table(const int &extno)
Get pointer to table HDU.
double romberg(std::vector< double > bounds, const int &order=5)
Perform Romberg integration.
GCTAAeffArf & operator=(const GCTAAeffArf &aeff)
Assignment operator.
const double & scale(void) const
Return effective area scaling factor.
GNodeArray m_logE
log(E) nodes for Aeff interpolation
GEbounds m_ebounds
Energy boundaries.
void append(const GEnergy &emin, const GEnergy &emax)
Append energy interval.
GCTAAeffArf * clone(void) const
Clone instance.
std::vector< double > m_aeff
Effective area in cm2.
GFilename m_filename
Name of Aeff response file.
CTA instrument response function class definition.
void nrows(const int &nrows)
Set number of rows in column.
void clear(void)
Clear node array.
void clear(void)
Clear instance.
std::string extname(const std::string &defaultname="") const
Return extension name.
CTA ARF effective area class definition.
double max(const double &logE, const double &zenith, const double &azimuth, const bool &etrue=true) const
Return maximum effective area at a given energy.
GIntegral class interface definition.
int size(void) const
Return number of node energies in response.
GCTAAeff & operator=(const GCTAAeff &aeff)
Assignment operator.
std::string strip_whitespace(const std::string &arg)
Strip leading and trailing whitespace from string.
virtual ~GCTAAeffArf(void)
Destructor.
FITS table column abstract base class definition.
void free_members(void)
Delete class members.
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.
GCTAAeffArf(void)
Void constructor.
const std::string extname_arf
std::string print(const GChatter &chatter=NORMAL) const
Print energy.
const GEnergy & emin(void) const
Return minimum energy of all intervals.
Abstract interface for FITS table column.
XSPEC Auxiliary Response File class definition.
void init_members(void)
Initialise class members.
double interpolate(const double &value, const std::vector< double > &vector) const
Interpolate value.
double m_thetacut
Theta cut for ARF.
Abstract interface for FITS table.
void free_members(void)
Delete class members.
void clear(void)
Clear energy boundaries.
void copy_members(const GCTAAeffArf &aeff)
Copy class members.
double m_sigma
Sigma for offset angle computation (0=none)
CTA instrument response function class.
Abstract base class for the CTA effective area.
void read(const GFitsTable &table)
Read CTA ARF vector.
void load(const GFilename &filename)
Load effective area from ARF FITS file.
void clear(void)
Clear file name.
virtual double real(const int &row, const int &inx=0) const =0
double m_scale
Scale for ARF.
double m_logE_max
Maximum logE (log10(E/TeV))
void fixed_iter(const int &iter)
Set fixed number of iterations.
std::string tolower(const std::string &s)
Convert string to lower case.
GVector exp(const GVector &vector)
Computes exponential of vector elements.
void init_members(void)
Initialise class members.
const GEnergy & emax(void) const
Return maximum energy of all intervals.
double m_logE_min
Minimum logE (log10(E/TeV))
std::string parformat(const std::string &s, const int &indent=0)
Convert string in parameter format.
Integration kernel for npsf() method.
void append(const double &node)
Append one node to array.
Integration class interface definition.
std::string print(const GChatter &chatter=NORMAL) const
Print effective area information.
void close(void)
Close FITS file.
Filename class interface definition.
Mathematical function definitions.
CTA ARF effective area class.
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.