GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GLATPsfBase Class Referenceabstract

Abstract Fermi/LAT point spread function base class. More...

#include <GLATPsfBase.hpp>

Inheritance diagram for GLATPsfBase:
GBase GLATPsfV1 GLATPsfV3

Public Member Functions

 GLATPsfBase (void)
 Void constructor. More...
 
 GLATPsfBase (const GLATPsfBase &psf)
 Copy constructor. More...
 
virtual ~GLATPsfBase (void)
 Destructor. More...
 
GLATPsfBaseoperator= (const GLATPsfBase &psf)
 Assignment operator. More...
 
virtual void clear (void)=0
 Clear object. More...
 
virtual GLATPsfBaseclone (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

GLATPsfBase::GLATPsfBase ( void  )

Void constructor.

Definition at line 57 of file GLATPsfBase.cpp.

References init_members().

GLATPsfBase::GLATPsfBase ( const GLATPsfBase psf)

Copy constructor.

Parameters
[in]psfPoint spread function.

Definition at line 72 of file GLATPsfBase.cpp.

References copy_members(), and init_members().

GLATPsfBase::~GLATPsfBase ( void  )
virtual

Destructor.

Definition at line 88 of file GLATPsfBase.cpp.

References free_members().

Member Function Documentation

virtual std::string GLATPsfBase::classname ( void  ) const
pure virtual

Return class name.

Returns
String containing the class name.

Returns the class name for non-abstract classes in a human readable way.

Implements GBase.

Implemented in GLATPsfV3, and GLATPsfV1.

virtual void GLATPsfBase::clear ( void  )
pure virtual

Clear object.

Sets the object to a clean initial state. After calling the method the object will be in the same state as it were if an empty instance of the object would have been created.

Implements GBase.

Implemented in GLATPsfV3, and GLATPsfV1.

virtual GLATPsfBase* GLATPsfBase::clone ( void  ) const
pure virtual

Clones object.

Returns
Pointer to deep copy of 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().

void GLATPsfBase::copy_members ( const GLATPsfBase psf)
protected

Copy class members.

Parameters
[in]psfPoint 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=().

const double & GLATPsfBase::costhetamin ( void  ) const
inline

Return cosine theta minimum.

Returns
Cosine theta minimum.

Definition at line 143 of file GLATPsfBase.hpp.

References m_min_ctheta.

Referenced by GLATPsf::costhetamin().

void GLATPsfBase::costhetamin ( const double &  ctheta)
inline

Set minimum cos(theta) angle for point spread function.

Parameters
[in]cthetaCosine of maximum zenith angle.

Definition at line 155 of file GLATPsfBase.hpp.

References m_min_ctheta.

void GLATPsfBase::free_members ( void  )
protected

Delete class members.

Definition at line 185 of file GLATPsfBase.cpp.

Referenced by GLATPsfV1::clear(), GLATPsfV3::clear(), operator=(), and ~GLATPsfBase().

const bool & GLATPsfBase::front ( void  ) const
inline

Signal that point spread function is for front section.

Returns
True if 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().

void GLATPsfBase::front ( const bool &  front)
inline

Set if point spread function is for front section.

Parameters
[in]frontTrue if point spread function is for front section.

Definition at line 192 of file GLATPsfBase.hpp.

References front(), and m_front.

bool GLATPsfBase::has_phi ( void  ) const
inline

Signal that point spread function has Phi dependence.

Returns
True if point spread function has Phi dependence.

Definition at line 168 of file GLATPsfBase.hpp.

void GLATPsfBase::init_members ( void  )
protected
int GLATPsfBase::ncostheta ( void  ) const
inline

Return number of cosine theta bins in point spread function.

Returns
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().

int GLATPsfBase::nenergies ( void  ) const
inline

Return number of energies in point spread function.

Returns
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.

Parameters
[in]psfPoint spread function.
Returns
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=().

virtual std::string GLATPsfBase::print ( const GChatter chatter = NORMAL) const
pure virtual

Print content of object.

Parameters
[in]chatterChattiness (defaults to NORMAL).
Returns
String containing the content of the object.

Formats the content in a standard way and puts this content in a C++ string that is returned.

Implements GBase.

Implemented in GLATPsfV3, and GLATPsfV1.

virtual double GLATPsfBase::psf ( const double &  offset,
const double &  logE,
const double &  ctheta 
)
pure virtual

Implemented in GLATPsfV3, and GLATPsfV1.

Referenced by GLATPsf::operator()().

virtual void GLATPsfBase::read ( const GFitsTable table)
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.

Parameters
[in]tableFITS 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().

double GLATPsfBase::scale_factor ( const double &  energy) const
protected

Return scale factor for energy (in MeV)

Parameters
[in]energyPhoton 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().

const double & GLATPsfBase::scale_index ( void  ) const
inline

Return scaling index.

Returns
Scaling index.

Definition at line 229 of file GLATPsfBase.hpp.

References m_scale_index.

Referenced by GLATPsf::print().

const double & GLATPsfBase::scale_par1 ( void  ) const
inline

Return first scaling parameter.

Returns
First scaling parameter.

Definition at line 205 of file GLATPsfBase.hpp.

References m_scale_par1.

Referenced by GLATPsf::print().

const double & GLATPsfBase::scale_par2 ( void  ) const
inline

Return second scaling parameter.

Returns
Second scaling parameter.

Definition at line 217 of file GLATPsfBase.hpp.

References m_scale_par2.

Referenced by GLATPsf::print().

int GLATPsfBase::size ( void  ) const
inline

Return number of bins in point spread function.

Returns
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().

virtual int GLATPsfBase::version ( void  ) const
pure virtual

Implemented in GLATPsfV3, and GLATPsfV1.

Referenced by GLATPsf::version().

virtual void GLATPsfBase::write ( GFits file) const
pure virtual

Implemented in GLATPsfV3, and GLATPsfV1.

Referenced by GLATPsf::write().

void GLATPsfBase::write_scale ( GFits file) const

Write PSF scale factors.

Parameters
[in]fileFITS 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".

Todo:
Check if PSF_SCALING_PARAMS exists already in FITS file

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().

Member Data Documentation

bool GLATPsfBase::m_front
protected

PSF is for front section?

Definition at line 92 of file GLATPsfBase.hpp.

Referenced by copy_members(), front(), and init_members().

double GLATPsfBase::m_min_ctheta
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().

double GLATPsfBase::m_scale_index
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().

double GLATPsfBase::m_scale_par1
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().

double GLATPsfBase::m_scale_par2
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().


The documentation for this class was generated from the following files: