GammaLib
2.0.0
|
Kernel for Nroi offest angle integration of diffuse model. More...
#include <GCTAResponse_helpers.hpp>
Public Member Functions | |
cta_nroi_diffuse_kern_theta (const GCTAResponseIrf *rsp, const GCTAObservation *obs, const GModelSpatial *model, const GMatrix *rot, const GEnergy &srcEng, const GTime &srcTime, const GEnergy &obsEng, const GTime &obsTime, const int &iter) | |
double | eval (const double &theta) |
Kernel for Nroi offest angle integration of diffuse model. More... | |
Public Member Functions inherited from GFunction | |
GFunction (void) | |
Void constructor. More... | |
GFunction (const GFunction &function) | |
Copy constructor. More... | |
virtual | ~GFunction (void) |
Destructor. More... | |
GFunction & | operator= (const GFunction &function) |
Assignment operator. More... | |
Protected Attributes | |
const GCTAResponseIrf * | m_rsp |
CTA response. More... | |
const GCTAObservation * | m_obs |
CTA observation. More... | |
const GModelSpatial * | m_model |
Spatial model. More... | |
const GMatrix * | m_rot |
Rotation matrix. More... | |
GEnergy | m_srcEng |
True photon energy. More... | |
GTime | m_srcTime |
True photon arrival time. More... | |
GEnergy | m_obsEng |
Observed photon energy. More... | |
GTime | m_obsTime |
Observed photon arrival time. More... | |
int | m_iter |
Integration iterations. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from GFunction | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GFunction &function) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Kernel for Nroi offest angle integration of diffuse model.
This class implements the integration kernel \(K(\theta)\) for the integration
\[ \int_{0}^{\theta_{\rm max}} K(\theta | E, t) d\theta \]
of diffuse models. The eval() method computes
\[ K(\theta | E, t) = \sin \theta \times \int_{0}^{2\pi} S_{\rm p}(\theta, \phi | E, t) \, N_{\rm pred}(\theta, \phi) d\phi \]
where
Definition at line 932 of file GCTAResponse_helpers.hpp.
|
inline |
Definition at line 934 of file GCTAResponse_helpers.hpp.
|
virtual |
Kernel for Nroi offest angle integration of diffuse model.
[in] | theta | Offset angle with respect to ROI centre (radians). |
Computes
\[ K(\theta | E, t) = \sin \theta \times \int_{0}^{2\pi} S_{\rm p}(\theta, \phi | E, t) \, N_{\rm pred}(\theta, \phi) d\phi \]
This method integrates a diffuse model for a given offset angle with respect to the ROI centre over all azimuth angles (from 0 to 2pi). The integration is only performed for positive offset angles, otherwise 0 is returned.
Integration is done using the Romberg algorithm. The integration kernel is defined by the helper class cta_npred_diffuse_kern_phi.
Note that the integration precision was adjusted trading-off between computation time and computation precision. A value of 1e-4 was judged appropriate.
Implements GFunction.
Definition at line 1497 of file GCTAResponse_helpers.cpp.
References GIntegral::fixed_iter(), gammalib::is_infinite(), gammalib::is_notanumber(), m_iter, m_model, m_obs, m_obsEng, m_obsTime, m_rot, m_rsp, m_srcEng, m_srcTime, GIntegral::print(), gammalib::rad2deg, GIntegral::romberg(), sin(), and gammalib::twopi.
|
protected |
Integration iterations.
Definition at line 962 of file GCTAResponse_helpers.hpp.
Referenced by eval().
|
protected |
|
protected |
|
protected |
Observed photon energy.
Definition at line 960 of file GCTAResponse_helpers.hpp.
Referenced by eval().
|
protected |
Observed photon arrival time.
Definition at line 961 of file GCTAResponse_helpers.hpp.
Referenced by eval().
|
protected |
|
protected |
|
protected |
|
protected |
True photon arrival time.
Definition at line 959 of file GCTAResponse_helpers.hpp.
Referenced by eval().