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

CTA instrument response function class. More...

#include <GCTAResponse.hpp>

Inheritance diagram for GCTAResponse:
GResponse GBase GCTAResponseCube GCTAResponseIrf

Public Member Functions

 GCTAResponse (void)
 Void constructor. More...
 
 GCTAResponse (const GCTAResponse &rsp)
 Copy constructor. More...
 
virtual ~GCTAResponse (void)
 Destructor. More...
 
virtual GCTAResponseoperator= (const GCTAResponse &rsp)
 Assignment operator. More...
 
virtual void clear (void)=0
 Clear object. More...
 
virtual GCTAResponseclone (void) const =0
 Clones object. More...
 
virtual std::string classname (void) const =0
 Return class name. More...
 
virtual bool is_valid (void) const =0
 
virtual bool use_edisp (void) const =0
 
virtual bool use_tdisp (void) const =0
 
virtual bool apply_edisp (void) const =0
 
virtual void apply_edisp (const bool &apply_edisp) const =0
 
virtual double irf (const GEvent &event, const GPhoton &photon, const GObservation &obs) const =0
 
virtual double nroi (const GModelSky &model, const GEnergy &obsEng, const GTime &obsTime, const GObservation &obs) const =0
 
virtual GEbounds ebounds (const GEnergy &obsEng) const =0
 
virtual void read (const GXmlElement &xml)=0
 
virtual void write (GXmlElement &xml) const =0
 
virtual std::string print (const GChatter &chatter=NORMAL) const =0
 Print content of object. More...
 
- Public Member Functions inherited from GResponse
 GResponse (void)
 Void constructor. More...
 
 GResponse (const GResponse &rsp)
 Copy constructor. More...
 
virtual ~GResponse (void)
 Destructor. More...
 
virtual GResponseoperator= (const GResponse &rsp)
 Assignment operator. More...
 
virtual double convolve (const GModelSky &model, const GEvent &event, const GObservation &obs, const bool &grad=true) const
 Convolve sky model with the instrument response. More...
 
virtual GVector convolve (const GModelSky &model, const GObservation &obs, GMatrixSparse *gradients=NULL) const
 Convolve sky model with the instrument response. More...
 
virtual double irf_spatial (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response integrated over the spatial model. More...
 
virtual GVector irf_spatial (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response vector integrated over the spatial model. More...
 
virtual void remove_response_cache (const std::string &name)
 Remove response cache for model. 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 GCTAResponse &rsp)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
- Protected Member Functions inherited from GResponse
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GResponse &rsp)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
double eval_prob (const GModelSky &model, const GEvent &event, const GEnergy &srcEng, const GTime &srcTime, const GObservation &obs, const bool &grad) const
 Convolve sky model with the instrument response. More...
 
GVector eval_probs (const GModelSky &model, const GObservation &obs, GMatrixSparse *gradients=NULL) const
 Convolve sky model with the instrument response. More...
 
int size_edisp_vector (const GModelSky &model, const GObservation &obs, const bool &grad) const
 Return size of vector for energy dispersion computation. More...
 
GEbounds ebounds_model (const GModelSky &model) const
 Return true energy intervals for sky model. More...
 
virtual double irf_ptsrc (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response to point source. More...
 
virtual double irf_radial (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response to radial source. More...
 
virtual double irf_elliptical (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response to elliptical source. More...
 
virtual double irf_diffuse (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response to diffuse source. More...
 
virtual double irf_composite (const GEvent &event, const GSource &source, const GObservation &obs) const
 Return instrument response to composite source. More...
 
virtual GVector irf_ptsrc (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response to point source sky model. More...
 
virtual GVector irf_radial (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response to radial source sky model. More...
 
virtual GVector irf_elliptical (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response to ellipitical source sky model. More...
 
virtual GVector irf_diffuse (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response to diffuse source sky model. More...
 
virtual GVector irf_composite (const GModelSky &model, const GObservation &obs, GMatrix *gradients=NULL) const
 Return instrument response to composite source sky model. More...
 

Additional Inherited Members

- Protected Attributes inherited from GResponse
bool m_use_irf_cache
 Control usage of irf cache. More...
 
bool m_use_nroi_cache
 Control usage of nroi cache. More...
 
int m_irf_radial_iter_theta
 Radial model integration theta iterations. More...
 
int m_irf_radial_iter_phi
 Radial model integration phi iterations. More...
 
int m_irf_elliptical_iter_theta
 Elliptical model integration theta iterations. More...
 
int m_irf_elliptical_iter_phi
 Elliptical model integration phi iterations. More...
 
double m_irf_diffuse_resolution
 Angular resolution for diffuse model. More...
 
GResponseCache m_irf_cache
 
GResponseCache m_nroi_cache
 
GResponseVectorCache m_irf_vector_cache
 

Detailed Description

CTA instrument response function class.

This class defines the interface for the CTA response function. It provides an abstract base class to CTA response function classes.

Definition at line 55 of file GCTAResponse.hpp.

Constructor & Destructor Documentation

GCTAResponse::GCTAResponse ( void  )

Void constructor.

Constructs void CTA response.

Definition at line 62 of file GCTAResponse.cpp.

References init_members().

GCTAResponse::GCTAResponse ( const GCTAResponse rsp)

Copy constructor.

Parameters
[in]rspCTA response.

Constructs CTA response by making a deep copy of an existing object.

Definition at line 79 of file GCTAResponse.cpp.

References copy_members(), and init_members().

GCTAResponse::~GCTAResponse ( void  )
virtual

Destructor.

Destroys instance of CTA response object.

Definition at line 97 of file GCTAResponse.cpp.

References free_members().

Member Function Documentation

virtual bool GCTAResponse::apply_edisp ( void  ) const
pure virtual

Implemented in GCTAResponseCube, and GCTAResponseIrf.

virtual void GCTAResponse::apply_edisp ( const bool &  apply_edisp) const
pure virtual

Implemented in GCTAResponseCube, and GCTAResponseIrf.

virtual std::string GCTAResponse::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 GResponse.

Implemented in GCTAResponseCube, and GCTAResponseIrf.

virtual void GCTAResponse::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 GResponse.

Implemented in GCTAResponseCube, and GCTAResponseIrf.

virtual GCTAResponse* GCTAResponse::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 GResponse.

Implemented in GCTAResponseCube, and GCTAResponseIrf.

Referenced by GCTAOnOffObservation::copy_members(), GCTAObservation::copy_members(), GCTAObservation::response(), and GCTAOnOffObservation::response().

void GCTAResponse::copy_members ( const GCTAResponse rsp)
protected

Copy class members.

Parameters
[in]rspResponse to be copied

Definition at line 175 of file GCTAResponse.cpp.

Referenced by GCTAResponse(), and operator=().

virtual GEbounds GCTAResponse::ebounds ( const GEnergy obsEng) const
pure virtual

Implements GResponse.

Implemented in GCTAResponseCube, and GCTAResponseIrf.

void GCTAResponse::free_members ( void  )
protected

Delete class members.

Definition at line 185 of file GCTAResponse.cpp.

Referenced by GCTAResponseIrf::clear(), GCTAResponseCube::clear(), operator=(), and ~GCTAResponse().

void GCTAResponse::init_members ( void  )
protected

Initialise class members.

Definition at line 163 of file GCTAResponse.cpp.

Referenced by GCTAResponseIrf::clear(), GCTAResponseCube::clear(), GCTAResponse(), and operator=().

virtual double GCTAResponse::irf ( const GEvent event,
const GPhoton photon,
const GObservation obs 
) const
pure virtual

Implements GResponse.

Implemented in GCTAResponseCube, and GCTAResponseIrf.

virtual bool GCTAResponse::is_valid ( void  ) const
pure virtual
virtual double GCTAResponse::nroi ( const GModelSky model,
const GEnergy obsEng,
const GTime obsTime,
const GObservation obs 
) const
pure virtual

Implements GResponse.

Implemented in GCTAResponseCube, and GCTAResponseIrf.

GCTAResponse & GCTAResponse::operator= ( const GCTAResponse rsp)
virtual

Assignment operator.

Parameters
[in]rspCTA response.
Returns
CTA response.

Assigns CTA response object to another CTA response object. The assignment performs a deep copy of all information, hence the original object from which the assignment has been performed can be destroyed after this operation without any loss of information.

Definition at line 124 of file GCTAResponse.cpp.

References copy_members(), free_members(), init_members(), and GResponse::operator=().

Referenced by GCTAResponseIrf::operator=(), and GCTAResponseCube::operator=().

virtual std::string GCTAResponse::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 GResponse.

Implemented in GCTAResponseCube, and GCTAResponseIrf.

Referenced by GCTAObservation::print().

virtual void GCTAResponse::read ( const GXmlElement xml)
pure virtual

Implemented in GCTAResponseCube, and GCTAResponseIrf.

Referenced by GCTAObservation::read().

virtual bool GCTAResponse::use_edisp ( void  ) const
pure virtual

Implements GResponse.

Implemented in GCTAResponseCube, and GCTAResponseIrf.

virtual bool GCTAResponse::use_tdisp ( void  ) const
pure virtual

Implements GResponse.

Implemented in GCTAResponseCube, and GCTAResponseIrf.

virtual void GCTAResponse::write ( GXmlElement xml) const
pure virtual

Implemented in GCTAResponseCube, and GCTAResponseIrf.

Referenced by GCTAObservation::write().


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