GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cta_psf_radial_kerns_delta Class Reference

Kernel for radial spatial model PSF delta angle integration. More...

#include <cta_helpers_response_stacked_vector.hpp>

Inheritance diagram for cta_psf_radial_kerns_delta:
GFunctions

Public Member Functions

 cta_psf_radial_kerns_delta (const GCTAResponseCube *rsp, const GModelSpatialRadial *model, const GSkyDir &obsDir, const GEnergies &srcEngs, const double &zeta, const double &theta_max, const int &iter, const bool &grad)
 Kernel constructor for PSF integration of radial model. More...
 
int size (void) const
 Return size of vector kernel for PSF integration of radial model. More...
 
GVector eval (const double &delta)
 Kernel for PSF integration of radial model. More...
 
- Public Member Functions inherited from GFunctions
 GFunctions (void)
 Void constructor. More...
 
 GFunctions (const GFunctions &functions)
 Copy constructor. More...
 
virtual ~GFunctions (void)
 Destructor. More...
 
GFunctionsoperator= (const GFunctions &functions)
 Assignment operator. More...
 

Protected Attributes

const GCTAResponseCubem_rsp
 Response cube. More...
 
const GModelSpatialRadialm_model
 Radial model. More...
 
GModelParm_par_lon
 Longitude parameter. More...
 
GModelParm_par_lat
 Latitude parameter. More...
 
bool m_par_cel
 Celestial or galactic coordinates. More...
 
GSkyDir m_obsDir
 Reconstructed event direction. More...
 
GEnergies m_srcEngs
 True photon energies. More...
 
double m_zeta
 Distance of model from Psf. More...
 
double m_cos_zeta
 Cosine of m_zeta. More...
 
double m_sin_zeta
 Sine of m_zeta. More...
 
double m_theta_max
 Maximum model radius. More...
 
double m_cos_theta_max
 Cosine of m_theta_max. More...
 
double m_dzeta_dalpha_0
 d(zeta)/d(alpha0) More...
 
double m_dzeta_dbeta_0
 d(zeta)/d(beta0) More...
 
double m_dphi_dalpha_0
 d(phi)/d(alpha0) More...
 
double m_dphi_dbeta_0
 d(phi)/d(beta0) More...
 
int m_iter
 Integration iterations. More...
 
bool m_grad
 Compute gradients. More...
 

Friends

class cta_psf_radial_kerns_phi
 

Additional Inherited Members

- Protected Member Functions inherited from GFunctions
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GFunctions &functions)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Detailed Description

Kernel for radial spatial model PSF delta angle integration.

This class provides the kernel for the radial spatial model integration of the delta angle of the PSF system.

Definition at line 50 of file cta_helpers_response_stacked_vector.hpp.

Constructor & Destructor Documentation

cta_psf_radial_kerns_delta::cta_psf_radial_kerns_delta ( const GCTAResponseCube rsp,
const GModelSpatialRadial model,
const GSkyDir obsDir,
const GEnergies srcEngs,
const double &  zeta,
const double &  theta_max,
const int &  iter,
const bool &  grad 
)

Kernel constructor for PSF integration of radial model.

Parameters
[in]rspPointer to CTA response cube.
[in]modelPointer to radial spatial model.
[in]obsDirObserved sky direction.
[in]srcEngsTrue energies.
[in]zetaAngular distance between event direction of model centre (radians).
[in]theta_maxMaximum model radius (radians).
[in]iterNumber of iterations for azimuth integration.
[in]gradCompute parameter gradients?

Definition at line 92 of file cta_helpers_response_stacked_vector.cpp.

References GSkyDir::b(), GModelSpatialRadial::coordsys(), cos(), GSkyDir::dec(), GModelSpatialRadial::dir(), GSkyDir::l(), m_cos_theta_max, m_cos_zeta, m_dphi_dalpha_0, m_dphi_dbeta_0, m_dzeta_dalpha_0, m_dzeta_dbeta_0, m_grad, m_iter, m_model, m_obsDir, m_par_cel, m_par_lat, m_par_lon, m_rsp, m_sin_zeta, m_srcEngs, m_theta_max, m_zeta, GSkyDir::ra(), sin(), and tan().

Member Function Documentation

GVector cta_psf_radial_kerns_delta::eval ( const double &  delta)
virtual

Kernel for PSF integration of radial model.

Parameters
[in]deltaPSF offset angle (radians).
Returns
Azimuthally integrated product between PSF and radial model values for all energies.

Computes the azimuthally integrated product of point spread function and the radial model intensity. As the PSF is azimuthally symmetric, it is not included in the azimuthally integration, but just multiplied on the azimuthally integrated model. The method returns thus

\[ {\rm PSF}(\delta) \times \int_0^{2\pi} {\rm M}(\delta, \phi) \sin \delta {\rm d}\phi \]

where \({\rm M}(\delta, \phi)\) is the radial model in the coordinate system of the point spread function, defined by the angle \(\delta\) between the true and the measured photon direction and the azimuth angle \(\phi\) around the measured photon direction.

Implements GFunctions.

Definition at line 203 of file cta_helpers_response_stacked_vector.cpp.

References cos(), GIntegral::fixed_iter(), GIntegrals::fixed_iter(), m_cos_theta_max, m_cos_zeta, m_grad, m_iter, m_model, m_obsDir, m_rsp, m_sin_zeta, m_srcEngs, m_theta_max, m_zeta, GCTAResponseCube::psf(), gammalib::roi_arclength(), GIntegral::romberg(), GIntegrals::romberg(), sin(), size(), GEnergies::size(), and GModelSpatial::size().

int cta_psf_radial_kerns_delta::size ( void  ) const
virtual

Return size of vector kernel for PSF integration of radial model.

Returns
Size of vector kernel.

The size of the vector kernel depends on whether gradient computation is requested or not. With gradient computation, the size is given by the product of the number of true energies and the number of model parameters plus one, without gradient computation the size is simply the number of true energies.

Implements GFunctions.

Definition at line 68 of file cta_helpers_response_stacked_vector.cpp.

References m_grad, m_model, m_srcEngs, GEnergies::size(), and GModelSpatial::size().

Referenced by eval().

Friends And Related Function Documentation

friend class cta_psf_radial_kerns_phi
friend

Definition at line 51 of file cta_helpers_response_stacked_vector.hpp.

Member Data Documentation

double cta_psf_radial_kerns_delta::m_cos_theta_max
protected

Cosine of m_theta_max.

Definition at line 75 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and eval().

double cta_psf_radial_kerns_delta::m_cos_zeta
protected

Cosine of m_zeta.

Definition at line 72 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and eval().

double cta_psf_radial_kerns_delta::m_dphi_dalpha_0
protected

d(phi)/d(alpha0)

Definition at line 78 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and cta_psf_radial_kerns_phi::eval().

double cta_psf_radial_kerns_delta::m_dphi_dbeta_0
protected

d(phi)/d(beta0)

Definition at line 79 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and cta_psf_radial_kerns_phi::eval().

double cta_psf_radial_kerns_delta::m_dzeta_dalpha_0
protected

d(zeta)/d(alpha0)

Definition at line 76 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and cta_psf_radial_kerns_phi::eval().

double cta_psf_radial_kerns_delta::m_dzeta_dbeta_0
protected

d(zeta)/d(beta0)

Definition at line 77 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and cta_psf_radial_kerns_phi::eval().

bool cta_psf_radial_kerns_delta::m_grad
protected

Compute gradients.

Definition at line 81 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), eval(), cta_psf_radial_kerns_phi::eval(), and size().

int cta_psf_radial_kerns_delta::m_iter
protected

Integration iterations.

Definition at line 80 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and eval().

const GModelSpatialRadial* cta_psf_radial_kerns_delta::m_model
protected
GSkyDir cta_psf_radial_kerns_delta::m_obsDir
protected

Reconstructed event direction.

Definition at line 69 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and eval().

bool cta_psf_radial_kerns_delta::m_par_cel
protected

Celestial or galactic coordinates.

Definition at line 68 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta().

GModelPar* cta_psf_radial_kerns_delta::m_par_lat
protected

Latitude parameter.

Definition at line 67 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and cta_psf_radial_kerns_phi::eval().

GModelPar* cta_psf_radial_kerns_delta::m_par_lon
protected

Longitude parameter.

Definition at line 66 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and cta_psf_radial_kerns_phi::eval().

const GCTAResponseCube* cta_psf_radial_kerns_delta::m_rsp
protected

Response cube.

Definition at line 64 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and eval().

double cta_psf_radial_kerns_delta::m_sin_zeta
protected

Sine of m_zeta.

Definition at line 73 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and eval().

GEnergies cta_psf_radial_kerns_delta::m_srcEngs
protected

True photon energies.

Definition at line 70 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), eval(), and size().

double cta_psf_radial_kerns_delta::m_theta_max
protected

Maximum model radius.

Definition at line 74 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), and eval().

double cta_psf_radial_kerns_delta::m_zeta
protected

Distance of model from Psf.

Definition at line 71 of file cta_helpers_response_stacked_vector.hpp.

Referenced by cta_psf_radial_kerns_delta(), eval(), and cta_psf_radial_kerns_phi::eval().


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