GammaLib
2.0.0
|
Abstract Fermi/LAT point spread function base class. More...
#include <GLATPsfBase.hpp>
Public Member Functions | |
GLATPsfBase (void) | |
Void constructor. More... | |
GLATPsfBase (const GLATPsfBase &psf) | |
Copy constructor. More... | |
virtual | ~GLATPsfBase (void) |
Destructor. More... | |
GLATPsfBase & | operator= (const GLATPsfBase &psf) |
Assignment operator. More... | |
virtual void | clear (void)=0 |
Clear object. More... | |
virtual GLATPsfBase * | clone (void) const =0 |
Clones object. More... | |
virtual std::string | classname (void) const =0 |
Return class name. More... | |
virtual void | read (const GFitsTable &table)=0 |
virtual void | write (GFits &file) const =0 |
virtual double | psf (const double &offset, const double &logE, const double &ctheta)=0 |
virtual int | version (void) const =0 |
virtual std::string | print (const GChatter &chatter=NORMAL) const =0 |
Print content of object. More... | |
void | read_scale (const GFitsTable &hdu) |
Read PSF scale factors from FITS table. More... | |
void | write_scale (GFits &file) const |
Write PSF scale factors. More... | |
int | size (void) const |
Return number of bins in point spread function. More... | |
int | nenergies (void) const |
Return number of energies in point spread function. More... | |
int | ncostheta (void) const |
Return number of cosine theta bins in point spread function. More... | |
const double & | costhetamin (void) const |
Return cosine theta minimum. More... | |
void | costhetamin (const double &ctheta) |
Set minimum cos(theta) angle for point spread function. More... | |
bool | has_phi (void) const |
Signal that point spread function has Phi dependence. More... | |
const bool & | front (void) const |
Signal that point spread function is for front section. More... | |
void | front (const bool &front) |
Set if point spread function is for front section. More... | |
const double & | scale_par1 (void) const |
Return first scaling parameter. More... | |
const double & | scale_par2 (void) const |
Return second scaling parameter. More... | |
const double & | scale_index (void) const |
Return scaling index. More... | |
Public Member Functions inherited from GBase | |
virtual | ~GBase (void) |
Destructor. More... | |
Protected Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GLATPsfBase &psf) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
double | scale_factor (const double &energy) const |
Return scale factor for energy (in MeV) More... | |
Protected Attributes | |
bool | m_front |
PSF is for front section? More... | |
GLATResponseTable | m_rpsf_bins |
PSF energy and cos theta binning. More... | |
double | m_scale_par1 |
PSF scaling parameter 1. More... | |
double | m_scale_par2 |
PSF scaling parameter 2. More... | |
double | m_scale_index |
PSF scaling index. More... | |
double | m_min_ctheta |
Minimum valid cos(theta) More... | |
Abstract Fermi/LAT point spread function base class.
This class defines the abstract interface for the Fermi/LAT point spread function (PSF). Classes that are derived from GLATPsfBase implement the version dependent LAT PSFs.
Definition at line 47 of file GLATPsfBase.hpp.
GLATPsfBase::GLATPsfBase | ( | void | ) |
GLATPsfBase::GLATPsfBase | ( | const GLATPsfBase & | psf | ) |
Copy constructor.
[in] | psf | Point spread function. |
Definition at line 72 of file GLATPsfBase.cpp.
References copy_members(), and init_members().
|
virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
Clones object.
Creates a deep copy of the object and returns a pointer to the object.
Implements GBase.
Implemented in GLATPsfV3, and GLATPsfV1.
Referenced by GLATPsf::copy_members().
|
protected |
Copy class members.
[in] | psf | Point spread function. |
Definition at line 167 of file GLATPsfBase.cpp.
References m_front, m_min_ctheta, m_rpsf_bins, m_scale_index, m_scale_par1, and m_scale_par2.
Referenced by GLATPsfBase(), and operator=().
|
inline |
Return cosine theta minimum.
Definition at line 143 of file GLATPsfBase.hpp.
References m_min_ctheta.
Referenced by GLATPsf::costhetamin().
|
inline |
Set minimum cos(theta) angle for point spread function.
[in] | ctheta | Cosine of maximum zenith angle. |
Definition at line 155 of file GLATPsfBase.hpp.
References m_min_ctheta.
|
protected |
Delete class members.
Definition at line 185 of file GLATPsfBase.cpp.
Referenced by GLATPsfV1::clear(), GLATPsfV3::clear(), operator=(), and ~GLATPsfBase().
|
inline |
Signal that point spread function is for front section.
Definition at line 180 of file GLATPsfBase.hpp.
References m_front.
Referenced by front(), GLATPsf::read(), read_scale(), GLATPsfV1::write(), GLATPsfV3::write(), and write_scale().
|
inline |
Set if point spread function is for front section.
[in] | front | True if point spread function is for front section. |
Definition at line 192 of file GLATPsfBase.hpp.
|
inline |
Signal that point spread function has Phi dependence.
Definition at line 168 of file GLATPsfBase.hpp.
|
protected |
Initialise class members.
Definition at line 147 of file GLATPsfBase.cpp.
References GLATResponseTable::clear(), m_front, m_min_ctheta, m_rpsf_bins, m_scale_index, m_scale_par1, and m_scale_par2.
Referenced by GLATPsfV1::clear(), GLATPsfV3::clear(), GLATPsfBase(), and operator=().
|
inline |
Return number of cosine theta bins in point spread function.
Definition at line 131 of file GLATPsfBase.hpp.
References m_rpsf_bins, and GLATResponseTable::ncostheta().
Referenced by GLATPsf::ncostheta(), and size().
|
inline |
Return number of energies in point spread function.
Definition at line 119 of file GLATPsfBase.hpp.
References m_rpsf_bins, and GLATResponseTable::nenergies().
Referenced by GLATPsf::nenergies(), and size().
GLATPsfBase & GLATPsfBase::operator= | ( | const GLATPsfBase & | psf | ) |
Assignment operator.
[in] | psf | Point spread function. |
Definition at line 110 of file GLATPsfBase.cpp.
References copy_members(), free_members(), and init_members().
Referenced by GLATPsfV1::operator=(), and GLATPsfV3::operator=().
|
pure virtual |
Implemented in GLATPsfV3, and GLATPsfV1.
Referenced by GLATPsf::operator()().
|
pure virtual |
Implemented in GLATPsfV3, and GLATPsfV1.
Referenced by GLATPsf::read().
void GLATPsfBase::read_scale | ( | const GFitsTable & | table | ) |
Read PSF scale factors from FITS table.
[in] | table | FITS table. |
Reads the PSF scale factors from column "PSFSCALE" of a FITS table.
Definition at line 199 of file GLATPsfBase.cpp.
References front(), m_scale_index, m_scale_par1, m_scale_par2, GFitsTableCol::number(), and GFitsTableCol::real().
Referenced by GLATPsf::read().
|
protected |
Return scale factor for energy (in MeV)
[in] | energy | Photon energy (in MeV). |
Definition at line 291 of file GLATPsfBase.cpp.
References m_scale_index, m_scale_par1, m_scale_par2, pow(), and sqrt().
Referenced by GLATPsfV3::eval_psf(), GLATPsfV3::integrate_psf(), GLATPsfV3::normalize_psf(), and GLATPsfV1::psf().
|
inline |
Return scaling index.
Definition at line 229 of file GLATPsfBase.hpp.
References m_scale_index.
Referenced by GLATPsf::print().
|
inline |
Return first scaling parameter.
Definition at line 205 of file GLATPsfBase.hpp.
References m_scale_par1.
Referenced by GLATPsf::print().
|
inline |
Return second scaling parameter.
Definition at line 217 of file GLATPsfBase.hpp.
References m_scale_par2.
Referenced by GLATPsf::print().
|
inline |
Return number of bins in point spread function.
Definition at line 107 of file GLATPsfBase.hpp.
References ncostheta(), and nenergies().
Referenced by GLATPsfV1::read(), GLATPsfV3::read(), GLATPsfV1::write(), and GLATPsfV3::write().
|
pure virtual |
Implemented in GLATPsfV3, and GLATPsfV1.
Referenced by GLATPsf::version().
|
pure virtual |
Implemented in GLATPsfV3, and GLATPsfV1.
Referenced by GLATPsf::write().
void GLATPsfBase::write_scale | ( | GFits & | file | ) | const |
Write PSF scale factors.
[in] | file | FITS file. |
Writes the PSF scale factors in the extension "PSF_SCALING_PARAMS". This method appends an extension "PSF_SCALING_PARAMS" to the FITS file, irrespectively of whether the extension exists already or not. The scale facors are written into the column "PSFSCALE".
Definition at line 246 of file GLATPsfBase.cpp.
References GFitsTable::append(), GFits::append(), GFitsHDU::extname(), front(), m_scale_index, m_scale_par1, and m_scale_par2.
Referenced by GLATPsf::write().
|
protected |
PSF is for front section?
Definition at line 92 of file GLATPsfBase.hpp.
Referenced by copy_members(), front(), and init_members().
|
protected |
Minimum valid cos(theta)
Definition at line 97 of file GLATPsfBase.hpp.
Referenced by copy_members(), costhetamin(), init_members(), GLATPsfV1::psf(), GLATPsfV3::psf(), GLATPsfV1::read(), and GLATPsfV3::read().
|
protected |
PSF energy and cos theta binning.
Definition at line 93 of file GLATPsfBase.hpp.
Referenced by copy_members(), init_members(), ncostheta(), nenergies(), GLATPsfV3::normalize_psf(), GLATPsfV1::psf(), GLATPsfV3::psf(), GLATPsfV1::read(), GLATPsfV3::read(), GLATPsfV1::write(), and GLATPsfV3::write().
|
protected |
PSF scaling index.
Definition at line 96 of file GLATPsfBase.hpp.
Referenced by copy_members(), init_members(), read_scale(), scale_factor(), scale_index(), and write_scale().
|
protected |
PSF scaling parameter 1.
Definition at line 94 of file GLATPsfBase.hpp.
Referenced by copy_members(), init_members(), read_scale(), scale_factor(), scale_par1(), and write_scale().
|
protected |
PSF scaling parameter 2.
Definition at line 95 of file GLATPsfBase.hpp.
Referenced by copy_members(), init_members(), read_scale(), scale_factor(), scale_par2(), and write_scale().