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);
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) {
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 ===");
XSPEC Auxiliary Response File class definition.
CTA ARF effective area class definition.
CTA instrument response function class definition.
CTA response helper classes definition.
Filename class interface definition.
FITS table column abstract base class definition.
FITS table abstract base class interface definition.
Integration class interface definition.
Mathematical function definitions.
GVector exp(const GVector &vector)
Computes exponential of vector elements.
CTA ARF effective area class.
GFilename m_filename
Name of Aeff response file.
double m_thetacut
Theta cut for ARF.
GCTAAeffArf(void)
Void constructor.
const double & scale(void) const
Return effective area scaling factor.
double m_scale
Scale for ARF.
std::vector< double > m_aeff
Effective area in cm2.
GFilename filename(void) const
Return filename.
GCTAAeffArf & operator=(const GCTAAeffArf &aeff)
Assignment operator.
void clear(void)
Clear instance.
double m_logE_min
Minimum logE (log10(E/TeV))
double m_sigma
Sigma for offset angle computation (0=none)
void remove_thetacut(const GCTAResponseIrf &rsp)
Remove thetacut.
GNodeArray m_logE
log(E) nodes for Aeff interpolation
virtual ~GCTAAeffArf(void)
Destructor.
int size(void) const
Return number of node energies in response.
double m_logE_max
Maximum logE (log10(E/TeV))
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.
void init_members(void)
Initialise class members.
void copy_members(const GCTAAeffArf &aeff)
Copy class members.
void load(const GFilename &filename)
Load effective area from ARF FITS file.
GEbounds m_ebounds
Energy boundaries.
void read(const GFitsTable &table)
Read CTA ARF vector.
std::string print(const GChatter &chatter=NORMAL) const
Print effective area information.
GCTAAeffArf * clone(void) const
Clone instance.
double max(const double &logE, const double &zenith, const double &azimuth, const bool &etrue=true) const
Return maximum effective area at a given energy.
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 instrument response function class.
const GEnergy & emax(void) const
Return maximum energy of all intervals.
void append(const GEnergy &emin, const GEnergy &emax)
Append energy interval.
void clear(void)
Clear energy boundaries.
const GEnergy & emin(void) const
Return minimum energy of all intervals.
Class that handles energies in a unit independent way.
double log10TeV(void) const
Return log10 of energy in TeV.
std::string print(const GChatter &chatter=NORMAL) const
Print energy.
std::string extname(const std::string &defaultname="") const
Return extension name.
void clear(void)
Clear file name.
Abstract interface for FITS table column.
virtual double real(const int &row, const int &inx=0) const =0
void unit(const std::string &unit)
Set column unit.
void nrows(const int &nrows)
Set number of rows in column.
Abstract interface for FITS table.
void close(void)
Close FITS file.
GFitsTable * table(const int &extno)
Get pointer to table HDU.
GIntegral class interface definition.
double romberg(std::vector< double > bounds, const int &order=5)
Perform Romberg integration.
void fixed_iter(const int &iter)
Set fixed number of iterations.
double interpolate(const double &value, const std::vector< double > &vector) const
Interpolate value.
void clear(void)
Clear node array.
void append(const double &node)
Append one node to array.
Integration kernel for npsf() method.
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.
std::string tolower(const std::string &s)
Convert string to lower case.
std::string strip_whitespace(const std::string &arg)
Strip leading and trailing whitespace from string.
const std::string extname_arf