GammaLib  1.7.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GCTAResponse_helpers.hpp
Go to the documentation of this file.
1 /***************************************************************************
2  * GCTAResponse_helpers.hpp - CTA response helper classes *
3  * ----------------------------------------------------------------------- *
4  * copyright (C) 2012-2020 by Juergen Knoedlseder *
5  * ----------------------------------------------------------------------- *
6  * *
7  * This program is free software: you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation, either version 3 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19  * *
20  ***************************************************************************/
21 /**
22  * @file GCTAResponse_helpers.hpp
23  * @brief CTA response helper classes definition
24  * @author Juergen Knoedlseder
25  */
26 
27 #ifndef GCTARESPONSE_HELPERS_HPP
28 #define GCTARESPONSE_HELPERS_HPP
29 
30 /* __ Includes ___________________________________________________________ */
31 #include <cmath>
32 #include <vector>
33 #include <utility>
34 #include "GCTAResponseIrf.hpp"
35 #include "GCTAObservation.hpp"
36 #include "GMatrix.hpp"
37 #include "GEnergy.hpp"
38 #include "GTime.hpp"
39 #include "GModelSky.hpp"
40 #include "GModelSpatial.hpp"
41 #include "GModelSpatialRadial.hpp"
42 #include "GCTAResponseCube.hpp"
44 #include "GFunction.hpp"
45 
46 /* __ Type definitions ___________________________________________________ */
47 
48 /* __ Forward declaration ________________________________________________ */
49 
50 /* __ Typedefs ___________________________________________________________ */
51 typedef std::vector<std::pair<double,double> > cta_omega_intervals;
52 
53 /* __ Prototypes _________________________________________________________ */
54 namespace gammalib {
55  cta_omega_intervals limit_omega(const double& min,
56  const double& max,
57  const double& domega);
58  double resolution(const GModelSpatial* model);
59 }
60 
61 
62 /***********************************************************************//**
63  * @class cta_npsf_kern_rad_azsym
64  *
65  * @brief Integration kernel for npsf() method
66  *
67  * This class implements the integration kernel needed for the npsf() method.
68  * It performs an azimuthal integration of the Point Spread Function
69  * (PSF) for a given offset angle \f$delta\f$ using
70  *
71  * \f[
72  * K(\delta) = \int_{0}^{\phi} PSF(\delta) d\phi
73  * \f]
74  * (an offset angle of \f$\delta=0\f$ corresponds to the centre of the PSF).
75  ***************************************************************************/
77 public:
79  const double& roi,
80  const double& psf,
81  const double& logE,
82  const double& theta,
83  const double& phi,
84  const double& zenith,
85  const double& azimuth) :
86  m_rsp(rsp),
87  m_roi(roi),
88  m_cosroi(std::cos(roi)),
89  m_psf(psf),
90  m_cospsf(std::cos(psf)),
91  m_sinpsf(std::sin(psf)),
92  m_logE(logE),
93  m_theta(theta),
94  m_phi(phi),
95  m_zenith(zenith),
96  m_azimuth(azimuth) { }
97  double eval(const double& delta);
98 protected:
99  const GCTAResponseIrf* m_rsp; //!< CTA response function
100  double m_roi; //!< ROI radius in radians
101  double m_cosroi; //!< Cosine of ROI radius
102  double m_psf; //!< PSF-ROI centre distance in radians
103  double m_cospsf; //!< Cosine of PSF-ROI centre distance
104  double m_sinpsf; //!< Sine of PSF-ROI centre distance
105  double m_logE; //!< Log10 of true photon energy (E/TeV).
106  double m_theta; //!< Offset angle of source in camera system
107  double m_phi; //!< Azimuth angle of source in camera system
108  double m_zenith; //!< Zenith angle of source in Earth system
109  double m_azimuth; //!< Azimuth angle of source in Earth system
110 };
111 
112 
113 /***********************************************************************//**
114  * @class cta_nedisp_kern
115  *
116  * @brief Integration kernel for nedisp() method
117  *
118  * This class implements the integration kernel for the nedisp() method.
119  * The cta_nedisp_kern::eval method evaluates the energy dispersion for a
120  * given true photon energy as function of the reconstructed event energy.
121  ***************************************************************************/
122 class cta_nroi_kern : public GFunction {
123 public:
125  const GObservation* obs,
126  const GModelSky* model,
127  const GTime& srcTime,
128  const GEnergy& obsEng,
129  const GTime& obsTime) :
130  m_rsp(rsp),
131  m_obs(obs),
132  m_model(model),
133  m_srcTime(srcTime),
134  m_obsEng(obsEng),
135  m_obsTime(obsTime) {}
136  double eval(const double& etrue);
137 protected:
138  const GCTAResponseIrf* m_rsp; //!< CTA response function
139  const GObservation* m_obs; //!< Observation
140  const GModelSky* m_model; //!< Sky model
141  GTime m_srcTime; //!< True arrival time
142  GEnergy m_obsEng; //!< Measured energy
143  GTime m_obsTime; //!< Measured arrival time
144 };
145 
146 
147 /***********************************************************************//**
148  * @class cta_irf_radial_kern_rho
149  *
150  * @brief Kernel for radial model zenith angle integration of IRF
151  *
152  * This class implements the integration kernel \f$K(\rho)\f$ for the
153  * integration
154  *
155  * \f[
156  * \int_{\rho_{\rm min}}^{\rho_{\rm max}} K(\rho | E, t) d\rho
157  * \f]
158  *
159  * of radial spatial models. The eval() method computes
160  *
161  * \f[
162  * K(\rho | E, t) = \sin \rho \times S_{\rm p}(\rho | E, t) \times
163  * \int_{\omega_{\rm min}}^{\omega_{\rm max}}
164  * IRF(\rho, \omega) d\omega
165  * \f]
166  *
167  * where
168  * - \f$S_{\rm p}(\rho | E, t)\f$ is the radial model,
169  * - \f$IRF(\rho, \omega)\f$ is the IRF
170  * - \f$\rho\f$ is the distance from the model centre, and
171  * - \f$\omega\f$ is the azimuth angle is the position angle with respect to
172  * the connecting line between the model centre and the observed photon
173  * arrival direction.
174  ***************************************************************************/
176 public:
178  const GModelSpatialRadial* model,
179  const double& zenith,
180  const double& azimuth,
181  const GEnergy& srcEng,
182  const GTime& srcTime,
183  const GEnergy& obsEng,
184  const double& zeta,
185  const double& lambda,
186  const double& omega0,
187  const double& delta_max,
188  const int& iter) :
189  m_rsp(rsp),
190  m_model(model),
191  m_zenith(zenith),
192  m_azimuth(azimuth),
193  m_srcEng(srcEng),
194  m_srcTime(srcTime),
195  m_obsEng(obsEng),
196  m_zeta(zeta),
197  m_cos_zeta(std::cos(zeta)),
198  m_sin_zeta(std::sin(zeta)),
199  m_lambda(lambda),
200  m_cos_lambda(std::cos(lambda)),
201  m_sin_lambda(std::sin(lambda)),
202  m_omega0(omega0),
203  m_delta_max(delta_max),
204  m_cos_delta_max(std::cos(delta_max)),
205  m_iter(iter) { }
206  double eval(const double& rho);
207 protected:
208  const GCTAResponseIrf* m_rsp; //!< CTA response
209  const GModelSpatialRadial* m_model; //!< Radial spatial model
210  double m_zenith; //!< Zenith angle
211  double m_azimuth; //!< Azimuth angle
212  GEnergy m_srcEng; //!< True photon energy
213  GTime m_srcTime; //!< True photon time
214  GEnergy m_obsEng; //!< Measured event energy
215  double m_zeta; //!< Distance model centre - measured photon
216  double m_cos_zeta; //!< Cosine of zeta
217  double m_sin_zeta; //!< Sine of zeta
218  double m_lambda; //!< Distance model centre - pointing
219  double m_cos_lambda; //!< Cosine of lambda
220  double m_sin_lambda; //!< Sine of lambda
221  double m_omega0; //!< Azimuth of pointing in model system
222  double m_delta_max; //!< Maximum PSF radius
223  double m_cos_delta_max; //!< Cosine of maximum PSF radius
224  int m_iter; //!< Integration iterations
225 };
226 
227 
228 /***********************************************************************//**
229  * @class cta_irf_radial_kern_omega
230  *
231  * @brief Kernel for radial model azimuth angle IRF integration
232  *
233  * This class implements the computation of the IRF in the reference frame
234  * of the radial source model. It computes
235  *
236  * \f[
237  * IRF(\rho, \omega)
238  * \f]
239  *
240  * where
241  * - \f$\rho\f$ is the distance from the model centre, and
242  * - \f$\omega\f$ is the azimuth angle is the position angle with respect to
243  * the connecting line between the model centre and the observed photon
244  * arrival direction.
245  ***************************************************************************/
247 public:
249  const double& zenith,
250  const double& azimuth,
251  const GEnergy& srcEng,
252  const GEnergy& obsEng,
253  const double& zeta,
254  const double& lambda,
255  const double& omega0,
256  const double& rho,
257  const double& cos_psf,
258  const double& sin_psf,
259  const double& cos_ph,
260  const double& sin_ph) :
261  m_rsp(rsp),
262  m_zenith(zenith),
263  m_azimuth(azimuth),
264  m_srcEng(srcEng),
265  m_obsEng(obsEng),
266  m_zeta(zeta),
267  m_lambda(lambda),
268  m_omega0(omega0),
269  m_rho(rho),
270  m_cos_psf(cos_psf),
271  m_sin_psf(sin_psf),
272  m_cos_ph(cos_ph),
273  m_sin_ph(sin_ph) { }
274  double eval(const double& omega);
275 protected:
276  const GCTAResponseIrf* m_rsp; //!< CTA response
277  double m_zenith; //!< Zenith angle
278  double m_azimuth; //!< Azimuth angle
279  GEnergy m_srcEng; //!< True photon energy
280  GEnergy m_obsEng; //!< Measured event energy
281  double m_zeta; //!< Distance model centre - measured photon
282  double m_lambda; //!< Distance model centre - pointing
283  double m_omega0; //!< Azimuth of pointing in model system
284  double m_rho; //!< ...
285  double m_cos_psf; //!< Cosine term for PSF offset angle computation
286  double m_sin_psf; //!< Sine term for PSF offset angle computation
287  double m_cos_ph; //!< Cosine term for photon offset angle computation
288  double m_sin_ph; //!< Sine term for photon offset angle computation
289 };
290 
291 
292 /***********************************************************************//**
293  * @class cta_nroi_radial_kern_rho
294  *
295  * @brief Kernel for zenith angle Nroi integration of radial model
296  *
297  * This class implements the integration kernel \f$K(\rho)\f$ for the
298  * integration
299  *
300  * \f[
301  * \int_{\rho_{\rm min}}^{\rho_{\rm max}} K(\rho | E, t) d\rho
302  * \f]
303  *
304  * of radial spatial models. The eval() method computes
305  *
306  * \f[
307  * K(\rho | E, t) = \sin \rho \times S_{\rm p}(\rho | E, t) \times
308  * \int_{\omega_{\rm min}}^{\omega_{\rm max}}
309  * N_{\rm pred}(\rho,\omega) d\omega
310  * \f]
311  *
312  * where
313  * - \f$S_{\rm p}(\rho | E, t)\f$ is the radial model,
314  * - \f$N_{\rm pred}(\rho,\omega)\f$ is the data space integral of the
315  * Instrument Response Function for a point spread function over the
316  * Region Of Interest,
317  * - \f$\rho\f$ is the distance from the model centre, and
318  * - \f$\omega\f$ is the azimuth angle is the position angle with respect to
319  * the connecting line between the model centre and the observed photon
320  * arrival direction.
321  ***************************************************************************/
323 public:
325  const GCTAObservation* obs,
326  const GModelSpatialRadial* model,
327  const GMatrix* rot,
328  const GEnergy& srcEng,
329  const GTime& srcTime,
330  const GEnergy& obsEng,
331  const GTime& obsTime,
332  const double& dist,
333  const double& radius,
334  const double& omega0,
335  const int& iter) :
336  m_rsp(rsp),
337  m_obs(obs),
338  m_model(model),
339  m_rot(rot),
340  m_srcEng(srcEng),
341  m_srcTime(srcTime),
342  m_obsEng(obsEng),
343  m_obsTime(obsTime),
344  m_dist(dist),
345  m_cos_dist(std::cos(dist)),
346  m_sin_dist(std::sin(dist)),
347  m_radius(radius),
348  m_cos_radius(std::cos(radius)),
349  m_omega0(omega0),
350  m_iter(iter) { }
351  double eval(const double& rho);
352 protected:
353  const GCTAResponseIrf* m_rsp; //!< CTA response
354  const GCTAObservation* m_obs; //!< CTA observation
355  const GModelSpatialRadial* m_model; //!< Radial spatial model
356  const GMatrix* m_rot; //!< Rotation matrix
357  GEnergy m_srcEng; //!< True photon energy
358  GTime m_srcTime; //!< True photon arrival time
359  GEnergy m_obsEng; //!< Observed photon energy
360  GTime m_obsTime; //!< Observed photon arrival time
361  double m_dist; //!< Distance model-ROI centre
362  double m_cos_dist; //!< Cosine of distance model-ROI centre
363  double m_sin_dist; //!< Sine of distance model-ROI centre
364  double m_radius; //!< ROI+PSF radius
365  double m_cos_radius; //!< Cosine of ROI+PSF radius
366  double m_omega0; //!< Position angle of ROI
367  int m_iter; //!< Integration iterations
368 };
369 
370 
371 /***********************************************************************//**
372  * @class cta_roi_radial_kern_omega
373  *
374  * @brief Kernel for azimuth angle Nroi integration of radial model
375  *
376  * This class implements the computation of the data space integral of the
377  * Instrument Response Function for a point spread function over the Region
378  * Of Interest in the reference frame of the radial source model. It
379  * computes
380  *
381  * \f[
382  * N_{\rm pred}(\rho,\omega)
383  * \f]
384  *
385  * where
386  * - \f$\rho\f$ is the distance from the model centre, and
387  * - \f$\omega\f$ is the azimuth angle is the position angle with respect to
388  * the connecting line between the model centre and the observed photon
389  * arrival direction.
390  ***************************************************************************/
392 public:
394  const GCTAObservation* obs,
395  const GMatrix* rot,
396  const GEnergy& srcEng,
397  const GTime& srcTime,
398  const GEnergy& obsEng,
399  const GTime& obsTime,
400  double sin_rho,
401  double cos_rho) :
402  m_rsp(rsp),
403  m_obs(obs),
404  m_rot(rot),
405  m_srcEng(srcEng),
406  m_srcTime(srcTime),
407  m_obsEng(obsEng),
408  m_obsTime(obsTime),
409  m_cos_rho(cos_rho),
410  m_sin_rho(sin_rho) { }
411  double eval(const double& omega);
412 protected:
413  const GCTAResponseIrf* m_rsp; //!< CTA response
414  const GCTAObservation* m_obs; //!< CTA observation
415  const GMatrix* m_rot; //!< Rotation matrix
416  GEnergy m_srcEng; //!< True photon energy
417  GTime m_srcTime; //!< True photon arrival time
418  GEnergy m_obsEng; //!< Observed photon energy
419  GTime m_obsTime; //!< Observed photon arrival time
420  double m_cos_rho; //!< Cosine of offset angle
421  double m_sin_rho; //!< Sine of offset angle
422 };
423 
424 
425 /***********************************************************************//**
426  * @class cta_irf_elliptical_kern_rho
427  *
428  * @brief Kernel for elliptical model zenith angle integration of IRF
429  *
430  * This class implements the integration kernel \f$K(\rho)\f$ for the
431  * integration
432  *
433  * \f[
434  * \int_{\rho_{\rm min}}^{\rho_{\rm max}} K(\rho | E, t) d\rho
435  * \f]
436  *
437  * of elliptical spatial models. The eval() method computes
438  *
439  * \f[
440  * K(\rho | E, t) = \sin \rho \times
441  * \int_{\omega_{\rm min}}^{\omega_{\rm max}}
442  * S_{\rm p}(\rho, \omega | E, t) \, IRF(\rho, \omega)
443  * d\omega
444  * \f]
445  *
446  * where
447  * - \f$S_{\rm p}(\rho, \omega | E, t)\f$ is the elliptical model,
448  * - \f$IRF(\rho, \omega)\f$ is the IRF
449  * - \f$\rho\f$ is the distance from the model centre, and
450  * - \f$\omega\f$ is the azimuth angle is the position angle with respect to
451  * the connecting line between the model centre and the observed photon
452  * arrival direction.
453  ***************************************************************************/
455 public:
457  const GModelSpatialElliptical* model,
458  const double& semimajor,
459  const double& semiminor,
460  const double& posangle,
461  const double& zenith,
462  const double& azimuth,
463  const GEnergy& srcEng,
464  const GTime& srcTime,
465  const GEnergy& obsEng,
466  const double& rho_obs,
467  const double& posangle_obs,
468  const double& rho_pnt,
469  const double& omega_pnt,
470  const double& delta_max,
471  const int& iter) :
472  m_rsp(rsp),
473  m_model(model),
474  m_semimajor(semimajor),
475  m_semiminor(semiminor),
476  m_posangle(posangle),
477  m_zenith(zenith),
478  m_azimuth(azimuth),
479  m_srcEng(srcEng),
480  m_srcTime(srcTime),
481  m_obsEng(obsEng),
482  m_rho_obs(rho_obs),
483  m_cos_rho_obs(std::cos(rho_obs)),
484  m_sin_rho_obs(std::sin(rho_obs)),
485  m_posangle_obs(posangle_obs),
486  m_rho_pnt(rho_pnt),
487  m_cos_rho_pnt(std::cos(rho_pnt)),
488  m_sin_rho_pnt(std::sin(rho_pnt)),
489  m_omega_pnt(omega_pnt),
490  m_delta_max(delta_max),
491  m_cos_delta_max(std::cos(delta_max)),
492  m_iter(iter) { }
493  double eval(const double& rho);
494 public:
495  const GCTAResponseIrf* m_rsp; //!< CTA response
496  const GModelSpatialElliptical* m_model; //!< Elliptical model
497  double m_semimajor; //!< Ellipse boundary semimajor axis
498  double m_semiminor; //!< Ellipse boundary semiminor axis
499  double m_posangle; //!< Ellipse boundary position angle
500  double m_zenith; //!< Zenith angle
501  double m_azimuth; //!< Azimuth angle
502  GEnergy m_srcEng; //!< True photon energy
503  GTime m_srcTime; //!< True photon time
504  GEnergy m_obsEng; //!< Measured event energy
505  double m_rho_obs; //!< Distance of model centre from measured photon
506  double m_cos_rho_obs; //!< Cosine of m_rho_obs
507  double m_sin_rho_obs; //!< Sine of m_rho_obs
508  double m_posangle_obs; //!< Photon position angle measured from model centre
509  double m_rho_pnt; //!< Distance of model centre from pointing
510  double m_cos_rho_pnt; //!< Cosine of m_rho_pnt
511  double m_sin_rho_pnt; //!< Sine of m_rho_pnt
512  double m_omega_pnt; //!< Azimuth of pointing in model system
513  double m_delta_max; //!< Maximum PSF radius
514  double m_cos_delta_max; //!< Cosine of maximum PSF radius
515  int m_iter; //!< Integration iterations
516 };
517 
518 
519 /***********************************************************************//**
520  * @class cta_irf_elliptical_kern_omega
521  *
522  * @brief Kernel for ellitpical model azimuth angle IRF integration
523  *
524  * This class implements the computation of
525  *
526  * \f[
527  * S_{\rm p}(\rho, \omega | E, t) \, IRF(\rho, \omega)
528  * \f]
529  *
530  * where
531  * - \f$S_{\rm p}(\rho, \omega | E, t)\f$ is the elliptical model,
532  * - \f$IRF(\rho, \omega)\f$ is the IRF
533  * - \f$\rho\f$ is the distance from the model centre, and
534  * - \f$\omega\f$ is the azimuth angle is the position angle with respect to
535  * the connecting line between the model centre and the observed photon
536  * arrival direction.
537  ***************************************************************************/
539 public:
541  const GModelSpatialElliptical* model,
542  const double& zenith,
543  const double& azimuth,
544  const GEnergy& srcEng,
545  const GTime& srcTime,
546  const GEnergy& obsEng,
547  const double& posangle_obs,
548  const double& omega_pnt,
549  const double& rho,
550  const double& cos_psf,
551  const double& sin_psf,
552  const double& cos_ph,
553  const double& sin_ph) :
554  m_rsp(rsp),
555  m_model(model),
556  m_zenith(zenith),
557  m_azimuth(azimuth),
558  m_srcEng(srcEng),
559  m_srcTime(srcTime),
560  m_obsEng(obsEng),
561  m_posangle_obs(posangle_obs),
562  m_omega_pnt(omega_pnt),
563  m_rho(rho),
564  m_cos_psf(cos_psf),
565  m_sin_psf(sin_psf),
566  m_cos_ph(cos_ph),
567  m_sin_ph(sin_ph) { }
568  double eval(const double& omega);
569 public:
570  const GCTAResponseIrf* m_rsp; //!< CTA response
571  const GModelSpatialElliptical* m_model; //!< Spatial model
572  double m_zenith; //!< Zenith angle
573  double m_azimuth; //!< Azimuth angle
574  GEnergy m_srcEng; //!< True photon energy
575  GTime m_srcTime; //!< True photon time
576  GEnergy m_obsEng; //!< Measured event energy
577  double m_posangle_obs; //!< Measured photon position angle from model centre
578  double m_omega_pnt; //!< Azimuth of pointing in model system
579  double m_rho; //!< Model zenith angle
580  double m_cos_psf; //!< Cosine term for PSF offset angle computation
581  double m_sin_psf; //!< Sine term for PSF offset angle computation
582  double m_cos_ph; //!< Cosine term for photon offset angle computation
583  double m_sin_ph; //!< Sine term for photon offset angle computation
584 };
585 
586 
587 /***********************************************************************//**
588  * @class cta_nroi_elliptical_kern_rho
589  *
590  * @brief Kernel for zenith angle Nroi integration of elliptical model
591  *
592  * This class implements the integration kernel \f$K(\rho)\f$ for the
593  * integration
594  *
595  * \f[
596  * \int_{\rho_{\rm min}}^{\rho_{\rm max}} K(\rho | E, t) d\rho
597  * \f]
598  *
599  * of elliptical elliptical models. The eval() method computes
600  *
601  * \f[
602  * K(\rho | E, t) = \sin \rho \times
603  * \int_{\omega_{\rm min}}^{\omega_{\rm max}}
604  * S_{\rm p}(\rho,\omega | E, t) \,
605  * N_{\rm pred}(\rho,\omega) d\omega
606  * \f]
607  *
608  * where
609  * - \f$S_{\rm p}(\rho,\omega | E, t)\f$ is the elliptical model,
610  * - \f$N_{\rm pred}(\rho,\omega)\f$ is the data space integral of the
611  * Instrument Response Function for a point spread function over the
612  * Region Of Interest,
613  * - \f$\rho\f$ is the distance from the model centre, and
614  * - \f$\omega\f$ is the azimuth angle is the position angle with respect to
615  * the connecting line between the model centre and the observed photon
616  * arrival direction.
617  ***************************************************************************/
619 public:
621  const GCTAObservation* obs,
622  const GModelSpatialElliptical* model,
623  const GMatrix* rot,
624  const double& semimajor,
625  const double& semiminor,
626  const double& posangle,
627  const GEnergy& srcEng,
628  const GTime& srcTime,
629  const GEnergy& obsEng,
630  const GTime& obsTime,
631  const double& rho_roi,
632  const double& posangle_roi,
633  const double& radius_roi,
634  const int& iter) :
635  m_rsp(rsp),
636  m_obs(obs),
637  m_model(model),
638  m_rot(rot),
639  m_semimajor(semimajor),
640  m_semiminor(semiminor),
641  m_posangle(posangle),
642  m_srcEng(srcEng),
643  m_srcTime(srcTime),
644  m_obsEng(obsEng),
645  m_obsTime(obsTime),
646  m_rho_roi(rho_roi),
647  m_cos_rho_roi(std::cos(rho_roi)),
648  m_sin_rho_roi(std::sin(rho_roi)),
649  m_posangle_roi(posangle_roi),
650  m_radius_roi(radius_roi),
651  m_cos_radius_roi(std::cos(radius_roi)),
652  m_iter(iter) { }
653  double eval(const double& rho);
654 protected:
655  const GCTAResponseIrf* m_rsp; //!< CTA response
656  const GCTAObservation* m_obs; //!< CTA observation
657  const GModelSpatialElliptical* m_model; //!< Elliptical model
658  const GMatrix* m_rot; //!< Rotation matrix
659  double m_semimajor; //!< Ellipse boundary semimajor axis
660  double m_semiminor; //!< Ellipse boundary semiminor axis
661  double m_posangle; //!< Ellipse boundary position angle
662  GEnergy m_srcEng; //!< True photon energy
663  GTime m_srcTime; //!< True photon arrival time
664  GEnergy m_obsEng; //!< Observed photon energy
665  GTime m_obsTime; //!< Observed photon arrival time
666  double m_rho_roi; //!< Distance between model and ROI centre
667  double m_cos_rho_roi; //!< Cosine of m_rho_roi
668  double m_sin_rho_roi; //!< Sine of m_rho_roi
669  double m_posangle_roi; //!< Position angle of ROI
670  double m_radius_roi; //!< ROI+PSF radius
671  double m_cos_radius_roi; //!< Cosine of m_radius_roi
672  int m_iter; //!< Integration iterations
673 };
674 
675 
676 /***********************************************************************//**
677  * @class cta_nroi_elliptical_kern_omega
678  *
679  * @brief Kernel for azimuth angle Nroi integration of elliptical model
680  *
681  * This class implements the computation of
682  *
683  * \f[
684  * S_{\rm p}(\rho,\omega | E, t) \, N_{\rm pred}(\rho,\omega)
685  * \f]
686  *
687  * where
688  * - \f$S_{\rm p}(\rho,\omega | E, t)\f$ is the elliptical model,
689  * - \f$N_{\rm pred}(\rho,\omega)\f$ is the data space integral of the
690  * Instrument Response Function for a point spread function over the
691  * Region Of Interest in the reference frame of the elliptical source
692  * model
693  * - \f$\rho\f$ is the distance from the model centre, and
694  * - \f$\omega\f$ is the azimuth angle is the position angle with respect to
695  * the connecting line between the model centre and the observed photon
696  * arrival direction.
697  ***************************************************************************/
699 public:
701  const GCTAObservation* obs,
702  const GModelSpatialElliptical* model,
703  const GMatrix* rot,
704  const GEnergy& srcEng,
705  const GTime& srcTime,
706  const GEnergy& obsEng,
707  const GTime& obsTime,
708  const double& rho,
709  const double& sin_rho,
710  const double& cos_rho,
711  const double& posangle_roi) :
712  m_rsp(rsp),
713  m_obs(obs),
714  m_model(model),
715  m_rot(rot),
716  m_srcEng(srcEng),
717  m_srcTime(srcTime),
718  m_obsEng(obsEng),
719  m_obsTime(obsTime),
720  m_rho(rho),
721  m_sin_rho(sin_rho),
722  m_cos_rho(cos_rho),
723  m_posangle_roi(posangle_roi) { }
724  double eval(const double& omega);
725 protected:
726  const GCTAResponseIrf* m_rsp; //!< CTA response
727  const GCTAObservation* m_obs; //!< CTA observation
728  const GModelSpatialElliptical* m_model; //!< Elliptical model
729  const GMatrix* m_rot; //!< Rotation matrix
730  GEnergy m_srcEng; //!< True photon energy
731  GTime m_srcTime; //!< True photon arrival time
732  GEnergy m_obsEng; //!< Observed photon energy
733  GTime m_obsTime; //!< Observed photon arrival time
734  double m_rho;
735  double m_sin_rho; //!< Sine of offset angle
736  double m_cos_rho; //!< Cosine of offset angle
737  double m_posangle_roi; //!< Position angle of ROI
738 };
739 
740 
741 /***********************************************************************//**
742  * @class cta_irf_diffuse_kern_theta
743  *
744  * @brief Kernel for IRF offest angle integration of the diffuse source model
745  *
746  * This class implements the integration kernel \f$K(\theta)\f$ for the
747  * integration
748  *
749  * \f[
750  * \int_{0}^{\theta_{\rm max}} K(\theta | E, t) d\theta
751  * \f]
752  *
753  * of diffuse models. The eval() method computes
754  *
755  * \f[
756  * K(\theta | E, t) = \sin \theta \times PSF(\theta)
757  * \int_{0}^{2\pi}
758  * S_{\rm p}(\theta, \phi | E, t) \,
759  * Aeff(\theta, \phi) \,
760  * Edisp(\theta, \phi) d\phi
761  * \f]
762  *
763  * where
764  * - \f$S_{\rm p}(\theta, \phi | E, t)\f$ is the diffuse model,
765  * - \f$PSF(\theta)\f$ is the azimuthally symmetric Point Spread Function,
766  * - \f$Aeff(\theta, \phi)\f$ is the effective area,
767  * - \f$Edisp(\theta, \phi)\f$ is the energy dispersion,
768  * - \f$\theta\f$ is the distance from the PSF centre, and
769  * - \f$\phi\f$ is the azimuth angle.
770  ***************************************************************************/
772 public:
774  const GModelSpatial* model,
775  const GMatrix* rot,
776  const double& theta,
777  const double& phi,
778  const double& zenith,
779  const double& azimuth,
780  const GEnergy& srcEng,
781  const GTime& srcTime,
782  const double& srcLogEng,
783  const GEnergy& obsEng,
784  const double& eta,
785  const int& min_iter,
786  const int& max_iter,
787  const double& resolution) :
788  m_rsp(rsp),
789  m_model(model),
790  m_rot(rot),
791  m_theta(theta),
792  m_phi(phi),
793  m_zenith(zenith),
794  m_azimuth(azimuth),
795  m_srcEng(srcEng),
796  m_srcTime(srcTime),
797  m_srcLogEng(srcLogEng),
798  m_obsEng(obsEng),
799  m_sin_eta(std::sin(eta)),
800  m_cos_eta(std::cos(eta)),
801  m_min_iter(min_iter),
802  m_max_iter(max_iter),
803  m_resolution(resolution) { }
804  double eval(const double& theta);
805 protected:
806  const GCTAResponseIrf* m_rsp; //!< CTA response
807  const GModelSpatial* m_model; //!< Spatial model
808  const GMatrix* m_rot; //!< Rotation matrix
809  double m_theta; //!< Photon offset angle
810  double m_phi; //!< Photon azimuth angle
811  double m_zenith; //!< Pointing zenith angle
812  double m_azimuth; //!< Pointing azimuth angle
813  GEnergy m_srcEng; //!< True photon energy
814  GTime m_srcTime; //!< True photon arrival time
815  double m_srcLogEng; //!< True photon log energy
816  GEnergy m_obsEng; //!< Measured event energy
817  double m_sin_eta; //!< Sine of angular distance between
818  // observed photon direction and
819  // camera centre
820  double m_cos_eta; //!< Cosine of angular distance between
821  // observed photon direction and
822  // camera centre
823  int m_min_iter; // Minimum integration iterations
824  int m_max_iter; // Maximum integration iterations
825  double m_resolution; // Resolution of spatial model
826 };
827 
828 
829 /***********************************************************************//**
830  * @class cta_irf_diffuse_kern_phi
831  *
832  * @brief Kernel for IRF azimuth angle integration of the diffuse source model
833  *
834  * This class implements the computation of
835  *
836  * \f[
837  * S_{\rm p}(\theta, \phi | E, t) \,
838  * Aeff(\theta, \phi) \,
839  * Edisp(\theta, \phi)
840  * \f]
841  *
842  * where
843  * - \f$S_{\rm p}(\theta, \phi | E, t)\f$ is the diffuse model,
844  * - \f$Aeff(\theta, \phi)\f$ is the effective area,
845  * - \f$Edisp(\theta, \phi)\f$ is the energy dispersion,
846  * - \f$\theta\f$ is the distance from the PSF centre, and
847  * - \f$\phi\f$ is the azimuth angle.
848  ***************************************************************************/
850 public:
852  const GModelSpatial* model,
853  const GMatrix* rot,
854  const double& zenith,
855  const double& azimuth,
856  const GEnergy& srcEng,
857  const GTime& srcTime,
858  const double& srcLogEng,
859  const GEnergy& obsEng,
860  const double& sin_theta,
861  const double& cos_theta,
862  const double& sin_ph,
863  const double& cos_ph) :
864  m_rsp(rsp),
865  m_model(model),
866  m_rot(rot),
867  m_zenith(zenith),
868  m_azimuth(azimuth),
869  m_srcEng(srcEng),
870  m_srcTime(srcTime),
871  m_srcLogEng(srcLogEng),
872  m_obsEng(obsEng),
873  m_sin_theta(sin_theta),
874  m_cos_theta(cos_theta),
875  m_sin_ph(sin_ph),
876  m_cos_ph(cos_ph),
877  m_native(3),
878  m_photon() { }
879  double eval(const double& phi);
880 protected:
881  const GCTAResponseIrf* m_rsp; //!< CTA response
882  const GModelSpatial* m_model; //!< Spatial model
883  const GMatrix* m_rot; //!< Rotation matrix
884  double m_zenith; //!< Zenith angle
885  double m_azimuth; //!< Azimuth angle
886  GEnergy m_srcEng; //!< True photon energy
887  GTime m_srcTime; //!< True photon arrival time
888  double m_srcLogEng; //!< True photon log energy
889  GEnergy m_obsEng; //!< Measured event energy
890  double m_sin_theta; //!< Sine of offset angle
891  double m_cos_theta; //!< Cosine of offset angle
892  double m_sin_ph; //!< Sine term in angular distance equation
893  double m_cos_ph; //!< Cosine term in angular distance equation
894  GVector m_native; //!< Pre-allocate memory for native coordinates
895  GPhoton m_photon; //!< Pre-allocate memory for a photon object
896 };
897 
898 
899 /***********************************************************************//**
900  * @class cta_nroi_diffuse_kern_theta
901  *
902  * @brief Kernel for Nroi offest angle integration of diffuse model
903  *
904  * This class implements the integration kernel \f$K(\theta)\f$ for the
905  * integration
906  *
907  * \f[
908  * \int_{0}^{\theta_{\rm max}} K(\theta | E, t) d\theta
909  * \f]
910  *
911  * of diffuse models. The eval() method computes
912  *
913  * \f[
914  * K(\theta | E, t) = \sin \theta \times
915  * \int_{0}^{2\pi}
916  * S_{\rm p}(\theta, \phi | E, t) \,
917  * N_{\rm pred}(\theta, \phi) d\phi
918  * \f]
919  *
920  * where
921  * - \f$S_{\rm p}(\theta, \phi | E, t)\f$ is the diffuse model,
922  * - \f$N_{\rm pred}(\theta, \phi)\f$ is the data space integral of the
923  * Instrument Response Function for a point spread function over the
924  * Region Of Interest in the reference frame of the diffuse source
925  * model
926  * - \f$\theta\f$ is the distance from the ROI centre, and
927  * - \f$\phi\f$ is the azimuth angle.
928  ***************************************************************************/
930 public:
932  const GCTAObservation* obs,
933  const GModelSpatial* model,
934  const GMatrix* rot,
935  const GEnergy& srcEng,
936  const GTime& srcTime,
937  const GEnergy& obsEng,
938  const GTime& obsTime,
939  const int& iter) :
940  m_rsp(rsp),
941  m_obs(obs),
942  m_model(model),
943  m_rot(rot),
944  m_srcEng(srcEng),
945  m_srcTime(srcTime),
946  m_obsEng(obsEng),
947  m_obsTime(obsTime),
948  m_iter(iter) { }
949  double eval(const double& theta);
950 protected:
951  const GCTAResponseIrf* m_rsp; //!< CTA response
952  const GCTAObservation* m_obs; //!< CTA observation
953  const GModelSpatial* m_model; //!< Spatial model
954  const GMatrix* m_rot; //!< Rotation matrix
955  GEnergy m_srcEng; //!< True photon energy
956  GTime m_srcTime; //!< True photon arrival time
957  GEnergy m_obsEng; //!< Observed photon energy
958  GTime m_obsTime; //!< Observed photon arrival time
959  int m_iter; //!< Integration iterations
960 };
961 
962 
963 /***********************************************************************//**
964  * @class cta_nroi_diffuse_kern_phi
965  *
966  * @brief Kernel for Nroi azimuth angle integration of diffuse model
967  *
968  * This class implements the computation of
969  *
970  * \f[
971  * S_{\rm p}(\theta, \phi | E, t) \, N_{\rm pred}(\theta, \phi)
972  * \f]
973  *
974  * where
975  * - \f$S_{\rm p}(\theta, \phi | E, t)\f$ is the diffuse model,
976  * - \f$N_{\rm pred}(\theta, \phi)\f$ is the data space integral of the
977  * Instrument Response Function for a point spread function over the
978  * Region Of Interest in the reference frame of the diffuse source
979  * model
980  * - \f$\theta\f$ is the distance from the ROI centre, and
981  * - \f$\phi\f$ is the azimuth angle.
982  ***************************************************************************/
984 public:
986  const GCTAObservation* obs,
987  const GModelSpatial* model,
988  const GMatrix* rot,
989  const GEnergy& srcEng,
990  const GTime& srcTime,
991  const GEnergy& obsEng,
992  const GTime& obsTime,
993  const double& theta,
994  const double& sin_theta) :
995  m_rsp(rsp),
996  m_obs(obs),
997  m_model(model),
998  m_rot(rot),
999  m_srcEng(srcEng),
1000  m_srcTime(srcTime),
1001  m_obsEng(obsEng),
1002  m_obsTime(obsTime),
1003  m_theta(theta),
1004  m_cos_theta(std::cos(theta)),
1005  m_sin_theta(sin_theta) { }
1006  double eval(const double& phi);
1007 protected:
1008  const GCTAResponseIrf* m_rsp; //!< CTA response
1009  const GCTAObservation* m_obs; //!< CTA observation
1010  const GModelSpatial* m_model; //!< Spatial model
1011  const GMatrix* m_rot; //!< Rotation matrix
1012  GEnergy m_srcEng; //!< True photon energy
1013  GTime m_srcTime; //!< True photon arrival time
1014  GEnergy m_obsEng; //!< Observed photon energy
1015  GTime m_obsTime; //!< Observed photon arrival time
1016  double m_theta; //!< Offset angle (radians)
1017  double m_cos_theta; //!< Cosine of offset angle
1018  double m_sin_theta; //!< Sine of offset angle
1019 };
1020 
1021 
1022 /***********************************************************************//**
1023  * @class cta_irf_radial_kern_rho
1024  *
1025  * @brief Kernel for radial model zenith angle integration
1026  *
1027  * This class implements the integration kernel \f$K(\rho)\f$ for the
1028  * integration
1029  *
1030  * \f[
1031  * \int_{\rho_{\rm min}}^{\rho_{\rm max}} K(\rho | E, t) d\rho
1032  * \f]
1033  *
1034  * of radial spatial models. The eval() method computes
1035  *
1036  * \f[
1037  * K(\rho | E, t) = \sin \rho \times
1038  * S_{\rm p}(\rho | E, t) \times
1039  * \int_{\omega} PSF(\rho, \omega) d\omega
1040  * \f]
1041  *
1042  * where
1043  * \f$S_{\rm p}(\rho | E, t)\f$ is the radial model,
1044  * \f$PSF(\rho, \omega)\f$ is the point spread function,
1045  * \f$\rho\f$ is the distance from the model centre, and
1046  * \f$\omega\f$ is the position angle with respect to the connecting line
1047  * between the model centre and the observed photon arrival direction.
1048  ***************************************************************************/
1050 public:
1052  const GModelSpatialRadial* model,
1053  const GSkyDir& srcDir,
1054  const GEnergy& srcEng,
1055  const GTime& srcTime,
1056  const double& rho_obs,
1057  const double& delta_max,
1058  const int& iter) :
1059  m_rsp(rsp),
1060  m_model(model),
1061  m_srcDir(srcDir),
1062  m_srcEng(srcEng),
1063  m_srcTime(srcTime),
1064  m_rho_obs(rho_obs),
1065  m_cos_rho_obs(std::cos(rho_obs)),
1066  m_sin_rho_obs(std::sin(rho_obs)),
1067  m_delta_max(delta_max),
1068  m_cos_delta_max(std::cos(delta_max)),
1069  m_iter(iter) { }
1070  double eval(const double& rho);
1071 public:
1072  const GCTAResponseCube* m_rsp; //!< CTA response
1073  const GModelSpatialRadial* m_model; //!< Radial model
1074  GSkyDir m_srcDir; //!< True photon arrival direction
1075  GEnergy m_srcEng; //!< True photon energy
1076  GTime m_srcTime; //!< True photon time
1077  double m_rho_obs; //!< Distance of model centre from measured photon
1078  double m_cos_rho_obs; //!< Cosine of m_rho_obs
1079  double m_sin_rho_obs; //!< Sine of m_rho_obs
1080  double m_delta_max; //!< Maximum PSF radius
1081  double m_cos_delta_max; //!< Cosine of maximum PSF radius
1082  int m_iter; //!< Integration iterations
1083 };
1084 
1085 
1086 /***********************************************************************//**
1087  * @class cta_psf_radial_kern_omega
1088  *
1089  * @brief Kernel for radial model azimuth angle integration
1090  *
1091  * This class implements the computation of
1092  *
1093  * \f[
1094  * K(\omega | \rho, E, t) = PSF(\omega | \rho)
1095  * \f]
1096  *
1097  * where
1098  * \f$PSF(\omega | \rho)\f$ is the point spread function,
1099  * \f$\rho\f$ is the distance from the model centre, and
1100  * \f$\omega\f$ is the position angle with respect to the connecting line
1101  * between the model centre and the observed photon arrival direction.
1102  ***************************************************************************/
1104 public:
1106  const GModelSpatialRadial* model,
1107  const GSkyDir& srcDir,
1108  const GEnergy& srcEng,
1109  const GTime& srcTime,
1110  const double& cos_psf,
1111  const double& sin_psf) :
1112  m_rsp(rsp),
1113  m_model(model),
1114  m_srcDir(srcDir),
1115  m_srcEng(srcEng),
1116  m_srcTime(srcTime),
1117  m_cos_psf(cos_psf),
1118  m_sin_psf(sin_psf) { }
1119  double eval(const double& omega);
1120 public:
1121  const GCTAResponseCube* m_rsp; //!< CTA response
1122  const GModelSpatialRadial* m_model; //!< Radial model
1123  GSkyDir m_srcDir; //!< True photon sky direction
1124  GEnergy m_srcEng; //!< True photon energy
1125  GTime m_srcTime; //!< True photon time
1126  double m_cos_psf; //!< Cosine term for PSF offset angle computation
1127  double m_sin_psf; //!< Sine term for PSF offset angle computation
1128 };
1129 
1130 
1131 /***********************************************************************//**
1132  * @class cta_psf_radial_kern_delta
1133  *
1134  * @brief Kernel for Psf delta angle integration used for stacked analysis
1135  ***************************************************************************/
1137 public:
1139  const GModelSpatialRadial* model,
1140  const GSkyDir& srcDir,
1141  const GEnergy& srcEng,
1142  const GTime& srcTime,
1143  const double& delta_mod,
1144  const double& theta_max,
1145  const int& iter) :
1146  m_rsp(rsp),
1147  m_model(model),
1148  m_srcDir(srcDir),
1149  m_srcEng(srcEng),
1150  m_srcTime(srcTime),
1151  m_delta_mod(delta_mod),
1152  m_cos_delta_mod(std::cos(delta_mod)),
1153  m_sin_delta_mod(std::sin(delta_mod)),
1154  m_theta_max(theta_max),
1155  m_cos_theta_max(std::cos(theta_max)),
1156  m_iter(iter) { }
1157  double eval(const double& delta);
1158 protected:
1159  const GCTAResponseCube* m_rsp; //!< Response cube
1160  const GModelSpatialRadial* m_model; //!< Radial model
1161  GSkyDir m_srcDir; //!< True photon arrival direction
1162  GEnergy m_srcEng; //!< True photon energy
1163  GTime m_srcTime; //!< True photon arrival time
1164  double m_delta_mod; //!< Distance of model from Psf
1165  double m_cos_delta_mod; //!< Cosine of m_delta_mod
1166  double m_sin_delta_mod; //!< Sine of m_delta_mod
1167  double m_theta_max; //!< Maximum model radius
1168  double m_cos_theta_max; //!< Cosine of m_theta_max
1169  int m_iter; //!< Integration iterations
1170 };
1171 
1172 
1173 /***********************************************************************//**
1174  * @class cta_psf_radial_kern_phi
1175  *
1176  * @brief Kernel for Psf phi angle integration used for stacked analysis
1177  ***************************************************************************/
1179 public:
1181  const GEnergy& srcEng,
1182  const GTime& srcTime,
1183  const double& sin_fact,
1184  const double& cos_fact) :
1185  m_model(model),
1186  m_srcEng(srcEng),
1187  m_srcTime(srcTime),
1188  m_sin_fact(sin_fact),
1189  m_cos_fact(cos_fact) { }
1190  double eval(const double& phi);
1191 protected:
1192  const GModelSpatialRadial* m_model; //!< Radial model
1193  GEnergy m_srcEng; //!< True photon energy
1194  GTime m_srcTime; //!< True photon arrival time
1195  double m_sin_fact; //!< sin(delta)*sin(delta_mod)
1196  double m_cos_fact; //!< cos(delta)*cos(delta_mod)
1197 };
1198 
1199 
1200 /***********************************************************************//**
1201  * @class cta_irf_elliptical_kern_rho
1202  *
1203  * @brief Kernel for elliptical model zenith angle integration
1204  *
1205  * This class implements the integration kernel \f$K(\rho)\f$ for the
1206  * integration
1207  *
1208  * \f[
1209  * \int_{\rho_{\rm min}}^{\rho_{\rm max}} K(\rho | E, t) d\rho
1210  * \f]
1211  *
1212  * of elliptical spatial models. The eval() method computes
1213  *
1214  * \f[
1215  * K(\rho | E, t) = \sin \rho \times
1216  * \int_{\omega}
1217  * S_{\rm p}(\rho, \omega | E, t) \, PSF(\rho, \omega)
1218  * d\omega
1219  * \f]
1220  *
1221  * where
1222  * \f$S_{\rm p}(\rho, \omega | E, t)\f$ is the elliptical model,
1223  * \f$PSF(\rho, \omega)\f$ is the point spread function,
1224  * \f$\rho\f$ is the distance from the model centre, and
1225  * \f$\omega\f$ is the position angle with respect to the connecting line
1226  * between the model centre and the observed photon arrival direction.
1227  ***************************************************************************/
1229 public:
1231  const GModelSpatialElliptical* model,
1232  const double& semimajor,
1233  const double& semiminor,
1234  const double& posangle,
1235  const GSkyDir& srcDir,
1236  const GEnergy& srcEng,
1237  const GTime& srcTime,
1238  const double& rho_obs,
1239  const double& posangle_obs,
1240  const double& delta_max,
1241  const int& iter) :
1242  m_rsp(rsp),
1243  m_model(model),
1244  m_semimajor(semimajor),
1245  m_semiminor(semiminor),
1246  m_posangle(posangle),
1247  m_srcDir(srcDir),
1248  m_srcEng(srcEng),
1249  m_srcTime(srcTime),
1250  m_rho_obs(rho_obs),
1251  m_cos_rho_obs(std::cos(rho_obs)),
1252  m_sin_rho_obs(std::sin(rho_obs)),
1253  m_posangle_obs(posangle_obs),
1254  m_delta_max(delta_max),
1255  m_cos_delta_max(std::cos(delta_max)),
1256  m_iter(iter) { }
1257  double eval(const double& rho);
1258 public:
1259  const GCTAResponseCube* m_rsp; //!< CTA response
1260  const GModelSpatialElliptical* m_model; //!< Elliptical model
1261  double m_semimajor; //!< Ellipse boundary semimajor axis
1262  double m_semiminor; //!< Ellipse boundary semiminor axis
1263  double m_posangle; //!< Ellipse boundary position angle
1264  GSkyDir m_srcDir; //!< True photon arrival direction
1265  GEnergy m_srcEng; //!< True photon energy
1266  GTime m_srcTime; //!< True photon time
1267  double m_rho_obs; //!< Distance of model centre from measured photon
1268  double m_cos_rho_obs; //!< Cosine of m_rho_obs
1269  double m_sin_rho_obs; //!< Sine of m_rho_obs
1270  double m_posangle_obs; //!< Photon position angle measured from model centre
1271  double m_delta_max; //!< Maximum PSF radius
1272  double m_cos_delta_max; //!< Cosine of maximum PSF radius
1273  int m_iter; //!< Integration iterations
1274 };
1275 
1276 
1277 /***********************************************************************//**
1278  * @class cta_irf_elliptical_kern_omega
1279  *
1280  * @brief Kernel for elliptical model azimuth angle integration
1281  *
1282  * This class implements the computation of
1283  *
1284  * \f[
1285  * S_{\rm p}(\omega | \rho, E, t) \, PSF(\omega | \rho)
1286  * \f]
1287  *
1288  * where
1289  * \f$S_{\rm p}(\omega | \rho, E, t)\f$ is the elliptical model,
1290  * \f$ PSF(\omega | \rho)\f$ is the point spread function,
1291  * \f$\rho\f$ is the distance from the model centre, and
1292  * \f$\omega\f$ is the position angle with respect to the connecting line
1293  * between the model centre and the observed photon arrival direction.
1294  ***************************************************************************/
1296 public:
1298  const GModelSpatialElliptical* model,
1299  const GSkyDir& srcDir,
1300  const GEnergy& srcEng,
1301  const GTime& srcTime,
1302  const double& posangle_obs,
1303  const double& rho,
1304  const double& cos_psf,
1305  const double& sin_psf) :
1306  m_rsp(rsp),
1307  m_model(model),
1308  m_srcDir(srcDir),
1309  m_srcEng(srcEng),
1310  m_srcTime(srcTime),
1311  m_posangle_obs(posangle_obs),
1312  m_rho(rho),
1313  m_cos_psf(cos_psf),
1314  m_sin_psf(sin_psf) { }
1315  double eval(const double& omega);
1316 public:
1317  const GCTAResponseCube* m_rsp; //!< CTA response
1318  const GModelSpatialElliptical* m_model; //!< Elliptical model
1319  GSkyDir m_srcDir; //!< True photon sky direction
1320  GEnergy m_srcEng; //!< True photon energy
1321  GTime m_srcTime; //!< True photon time
1322  double m_posangle_obs; //!< Measured photon position angle from model centre
1323  double m_rho; //!< Model zenith angle
1324  double m_cos_psf; //!< Cosine term for PSF offset angle computation
1325  double m_sin_psf; //!< Sine term for PSF offset angle computation
1326 };
1327 
1328 
1329 /***********************************************************************//**
1330  * @class cta_psf_diffuse_kern_delta
1331  *
1332  * @brief Kernel for Psf delta angle integration used for stacked analysis
1333  ***************************************************************************/
1335 public:
1337  const GModelSpatial* model,
1338  const GMatrix* rot,
1339  const GSkyDir& srcDir,
1340  const GEnergy& srcEng,
1341  const GTime& srcTime,
1342  const int& min_iter,
1343  const int& max_iter,
1344  const double& resolution) :
1345  m_rsp(rsp),
1346  m_model(model),
1347  m_rot(rot),
1348  m_srcDir(srcDir),
1349  m_srcEng(srcEng),
1350  m_srcTime(srcTime),
1351  m_min_iter(min_iter),
1352  m_max_iter(max_iter),
1353  m_resolution(resolution),
1354  m_psf_max(rsp->psf()(srcDir, 0.0, srcEng)) { }
1355  double eval(const double& delta);
1356 protected:
1357  const GCTAResponseCube* m_rsp; //!< Response cube
1358  const GModelSpatial* m_model; //!< Spatial model
1359  const GMatrix* m_rot; //!< Rotation matrix
1360  GSkyDir m_srcDir; //!< True photon arrival direction
1361  GEnergy m_srcEng; //!< True photon energy
1362  GTime m_srcTime; //!< True photon arrival time
1363  int m_min_iter; //!< Minimum number of Romberg iterations
1364  int m_max_iter; //!< Maximum number of Romberg iterations
1365  double m_resolution; //!< Spatial map resolution
1366  double m_psf_max; //!< Maximum PSF value
1367 };
1368 
1369 
1370 /***********************************************************************//**
1371  * @class cta_psf_diffuse_kern_phi
1372  *
1373  * @brief Kernel for Psf phi angle integration used for stacked analysis
1374  ***************************************************************************/
1376 public:
1378  const GMatrix* rot,
1379  const GEnergy& srcEng,
1380  const GTime& srcTime,
1381  const double& sin_delta,
1382  const double& cos_delta) :
1383  m_model(model),
1384  m_rot(rot),
1385  m_srcEng(srcEng),
1386  m_srcTime(srcTime),
1387  m_sin_delta(sin_delta),
1388  m_cos_delta(cos_delta) { }
1389  double eval(const double& phi);
1390 protected:
1391  const GModelSpatial* m_model; //!< Spatial model
1392  const GMatrix* m_rot; //!< Rotation matrix
1393  GEnergy m_srcEng; //!< True photon energy
1394  GTime m_srcTime; //!< True photon arrival time
1395  double m_sin_delta; //!< sin(delta)
1396  double m_cos_delta; //!< cos(delta)
1397 };
1398 
1399 #endif /* GCTARESPONSE_HELPERS_HPP */
cta_irf_radial_kern_omega(const GCTAResponseIrf *rsp, const double &zenith, const double &azimuth, const GEnergy &srcEng, const GEnergy &obsEng, const double &zeta, const double &lambda, const double &omega0, const double &rho, const double &cos_psf, const double &sin_psf, const double &cos_ph, const double &sin_ph)
double m_zeta
Distance model centre - measured photon.
const GCTAObservation * m_obs
CTA observation.
double m_cos_psf
Cosine term for PSF offset angle computation.
double eval(const double &rho)
Kernel for zenith angle Nroi integration or radial model.
std::vector< std::pair< double, double > > cta_omega_intervals
const GCTAResponseCube * m_rsp
CTA response.
double m_omega0
Position angle of ROI.
GEnergy m_srcEng
True photon energy.
GEnergy m_srcEng
True photon energy.
GEnergy m_srcEng
True photon energy.
GTime m_srcTime
True photon time.
Kernel for IRF offest angle integration of the diffuse source model.
GTime m_obsTime
Observed photon arrival time.
GEnergy m_srcEng
True photon energy.
double m_theta_max
Maximum model radius.
double m_cos_ph
Cosine term for photon offset angle computation.
CTA cube-style response function class definition.
double eval(const double &rho)
Kernel for zenith angle Nroi integration of elliptical model.
Energy value class definition.
Abstract elliptical spatial model base class.
Kernel for radial model azimuth angle IRF integration.
double m_sin_zeta
Sine of zeta.
double m_sin_rho
Sine of offset angle.
double m_cos_rho_obs
Cosine of m_rho_obs.
double m_posangle_roi
Position angle of ROI.
double m_rho_obs
Distance of model centre from measured photon.
double m_sin_rho
Sine of offset angle.
double m_cos_radius
Cosine of ROI+PSF radius.
double m_zenith
Zenith angle of source in Earth system.
const GModelSpatialElliptical * m_model
Elliptical model.
double m_cosroi
Cosine of ROI radius.
double m_delta_max
Maximum PSF radius.
const GModelSpatialElliptical * m_model
Elliptical model.
const GMatrix * m_rot
Rotation matrix.
double eval(const double &rho)
Kernel for elliptical model integration over model&#39;s zenith angle.
const GCTAResponseCube * m_rsp
CTA response.
cta_irf_radial_kern_rho(const GCTAResponseIrf *rsp, const GModelSpatialRadial *model, const double &zenith, const double &azimuth, const GEnergy &srcEng, const GTime &srcTime, const GEnergy &obsEng, const double &zeta, const double &lambda, const double &omega0, const double &delta_max, const int &iter)
const GModelSpatialElliptical * m_model
Elliptical model.
cta_psf_elliptical_kern_rho(const GCTAResponseCube *rsp, const GModelSpatialElliptical *model, const double &semimajor, const double &semiminor, const double &posangle, const GSkyDir &srcDir, const GEnergy &srcEng, const GTime &srcTime, const double &rho_obs, const double &posangle_obs, const double &delta_max, const int &iter)
GEnergy m_srcEng
True photon energy.
double m_theta
Photon offset angle.
GVector cos(const GVector &vector)
Computes cosine of vector elements.
Definition: GVector.cpp:1100
double eval(const double &theta)
Kernel for Nroi offest angle integration of diffuse model.
double m_radius_roi
ROI+PSF radius.
double m_sin_psf
Sine term for PSF offset angle computation.
Generic matrix class definition.
GEnergy m_obsEng
Observed photon energy.
cta_nroi_kern(const GCTAResponseIrf *rsp, const GObservation *obs, const GModelSky *model, const GTime &srcTime, const GEnergy &obsEng, const GTime &obsTime)
const GMatrix * m_rot
Rotation matrix.
Abstract radial spatial model base class interface definition.
const GCTAResponseIrf * m_rsp
CTA response.
double m_semiminor
Ellipse boundary semiminor axis.
double m_dist
Distance model-ROI centre.
double m_omega0
Azimuth of pointing in model system.
const GModelSpatial * m_model
Spatial model.
GTime m_srcTime
True photon arrival time.
double m_azimuth
Azimuth angle.
double m_sin_theta
Sine of offset angle.
CTA cube-style response function class.
cta_psf_diffuse_kern_phi(const GModelSpatial *model, const GMatrix *rot, const GEnergy &srcEng, const GTime &srcTime, const double &sin_delta, const double &cos_delta)
GVector m_native
Pre-allocate memory for native coordinates.
GTime m_obsTime
Measured arrival time.
double m_cos_psf
Cosine term for PSF offset angle computation.
const GMatrix * m_rot
Rotation matrix.
GEnergy m_srcEng
True photon energy.
const GModelSpatial * m_model
Spatial model.
CTA instrument response function class definition.
double m_delta_max
Maximum PSF radius.
double m_sin_rho_obs
Sine of m_rho_obs.
Kernel for zenith angle Nroi integration of elliptical model.
GPhoton m_photon
Pre-allocate memory for a photon object.
const GModelSpatialRadial * m_model
Radial model.
cta_npsf_kern_rad_azsym(const GCTAResponseIrf *rsp, const double &roi, const double &psf, const double &logE, const double &theta, const double &phi, const double &zenith, const double &azimuth)
cta_irf_elliptical_kern_rho(const GCTAResponseIrf *rsp, const GModelSpatialElliptical *model, const double &semimajor, const double &semiminor, const double &posangle, const double &zenith, const double &azimuth, const GEnergy &srcEng, const GTime &srcTime, const GEnergy &obsEng, const double &rho_obs, const double &posangle_obs, const double &rho_pnt, const double &omega_pnt, const double &delta_max, const int &iter)
Kernel for zenith angle Nroi integration of radial model.
GEnergy m_obsEng
Observed photon energy.
double m_logE
Log10 of true photon energy (E/TeV).
double m_cos_delta_max
Cosine of maximum PSF radius.
double m_cos_ph
Cosine term in angular distance equation.
GTime m_srcTime
True photon arrival time.
double eval(const double &delta)
Integration kernel for npsf() method.
const GCTAResponseIrf * m_rsp
CTA response.
GEnergy m_srcEng
True photon energy.
double m_lambda
Distance model centre - pointing.
cta_psf_elliptical_kern_omega(const GCTAResponseCube *rsp, const GModelSpatialElliptical *model, const GSkyDir &srcDir, const GEnergy &srcEng, const GTime &srcTime, const double &posangle_obs, const double &rho, const double &cos_psf, const double &sin_psf)
int m_iter
Integration iterations.
double m_cos_eta
Cosine of angular distance between.
const GModelSpatialElliptical * m_model
Spatial model.
GEnergy m_obsEng
Observed photon energy.
GEnergy m_obsEng
Measured energy.
Abstract spatial model base class interface definition.
cta_psf_radial_kern_phi(const GModelSpatialRadial *model, const GEnergy &srcEng, const GTime &srcTime, const double &sin_fact, const double &cos_fact)
const GCTAResponseIrf * m_rsp
CTA response.
double m_zenith
Zenith angle.
cta_nroi_radial_kern_rho(const GCTAResponseIrf *rsp, const GCTAObservation *obs, const GModelSpatialRadial *model, const GMatrix *rot, const GEnergy &srcEng, const GTime &srcTime, const GEnergy &obsEng, const GTime &obsTime, const double &dist, const double &radius, const double &omega0, const int &iter)
int m_iter
Integration iterations.
GTime m_srcTime
True photon arrival time.
double m_resolution
Spatial map resolution.
int m_max_iter
Maximum number of Romberg iterations.
cta_psf_radial_kern_rho(const GCTAResponseCube *rsp, const GModelSpatialRadial *model, const GSkyDir &srcDir, const GEnergy &srcEng, const GTime &srcTime, const double &rho_obs, const double &delta_max, const int &iter)
Time class.
Definition: GTime.hpp:54
GEnergy m_obsEng
Measured event energy.
GTime m_srcTime
True photon arrival time.
cta_irf_elliptical_kern_omega(const GCTAResponseIrf *rsp, const GModelSpatialElliptical *model, const double &zenith, const double &azimuth, const GEnergy &srcEng, const GTime &srcTime, const GEnergy &obsEng, const double &posangle_obs, const double &omega_pnt, const double &rho, const double &cos_psf, const double &sin_psf, const double &cos_ph, const double &sin_ph)
double m_sin_lambda
Sine of lambda.
double m_psf_max
Maximum PSF value.
double eval(const double &omega)
Kernel for radial model integration over azimuth angle.
const GModelSpatialElliptical * m_model
Elliptical model.
double m_lambda
Distance model centre - pointing.
int m_iter
Integration iterations.
double eval(const double &rho)
Kernel for radial model integration over zenith angle.
GTime m_srcTime
True photon arrival time.
double m_phi
Azimuth angle of source in camera system.
const GModelSpatialRadial * m_model
Radial spatial model.
double m_zenith
Pointing zenith angle.
const GMatrix * m_rot
Rotation matrix.
double min(const GVector &vector)
Computes minimum vector element.
Definition: GVector.cpp:843
cta_nroi_radial_kern_omega(const GCTAResponseIrf *rsp, const GCTAObservation *obs, const GMatrix *rot, const GEnergy &srcEng, const GTime &srcTime, const GEnergy &obsEng, const GTime &obsTime, double sin_rho, double cos_rho)
Kernel for ellitpical model azimuth angle IRF integration.
double m_posangle
Ellipse boundary position angle.
double m_psf
PSF-ROI centre distance in radians.
const GCTAResponseIrf * m_rsp
CTA response.
const GCTAResponseIrf * m_rsp
CTA response.
const GMatrix * m_rot
Rotation matrix.
cta_irf_diffuse_kern_phi(const GCTAResponseIrf *rsp, const GModelSpatial *model, const GMatrix *rot, const double &zenith, const double &azimuth, const GEnergy &srcEng, const GTime &srcTime, const double &srcLogEng, const GEnergy &obsEng, const double &sin_theta, const double &cos_theta, const double &sin_ph, const double &cos_ph)
GTime m_srcTime
True photon time.
cta_nroi_elliptical_kern_omega(const GCTAResponseIrf *rsp, const GCTAObservation *obs, const GModelSpatialElliptical *model, const GMatrix *rot, const GEnergy &srcEng, const GTime &srcTime, const GEnergy &obsEng, const GTime &obsTime, const double &rho, const double &sin_rho, const double &cos_rho, const double &posangle_roi)
GTime m_obsTime
Observed photon arrival time.
GSkyDir m_srcDir
True photon arrival direction.
const GCTAResponseIrf * m_rsp
CTA response.
GSkyDir m_srcDir
True photon sky direction.
GEnergy m_srcEng
True photon energy.
GSkyDir m_srcDir
True photon arrival direction.
double m_cos_zeta
Cosine of zeta.
double m_sin_delta_mod
Sine of m_delta_mod.
double m_cos_delta_mod
Cosine of m_delta_mod.
Class that handles photons.
Definition: GPhoton.hpp:47
const GCTAObservation * m_obs
CTA observation.
GSkyDir m_srcDir
True photon arrival direction.
GTime m_obsTime
Observed photon arrival time.
double eval(const double &etrue)
Integration kernel for GCTAResponseIrf::nroi method.
double eval(const double &theta)
Kernel for IRF offest angle integration of the diffuse source model.
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 m_radius
ROI+PSF radius.
double eval(const double &omega)
Kernel for radial model azimuth angle IRF integration.
double m_cos_lambda
Cosine of lambda.
cta_nroi_elliptical_kern_rho(const GCTAResponseIrf *rsp, const GCTAObservation *obs, const GModelSpatialElliptical *model, const GMatrix *rot, const double &semimajor, const double &semiminor, const double &posangle, const GEnergy &srcEng, const GTime &srcTime, const GEnergy &obsEng, const GTime &obsTime, const double &rho_roi, const double &posangle_roi, const double &radius_roi, const int &iter)
double m_zeta
Distance model centre - measured photon.
const GCTAObservation * m_obs
CTA observation.
const GMatrix * m_rot
Rotation matrix.
double eval(const double &omega)
Kernel for azimuth angle Nroi integration of radial model.
double m_cos_dist
Cosine of distance model-ROI centre.
GEnergy m_srcEng
True photon energy.
GSkyDir m_srcDir
True photon sky direction.
double m_sin_ph
Sine term in angular distance equation.
double m_cos_rho_obs
Cosine of m_rho_obs.
const GCTAResponseIrf * m_rsp
CTA response function.
double m_posangle_obs
Photon position angle measured from model centre.
GEnergy m_srcEng
True photon energy.
Kernel for Psf phi angle integration used for stacked analysis.
Single parameter function abstract base class definition.
cta_nroi_diffuse_kern_phi(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 double &theta, const double &sin_theta)
double m_rho_roi
Distance between model and ROI centre.
GTime m_srcTime
True photon arrival time.
double m_delta_max
Maximum PSF radius.
GTime m_srcTime
True photon arrival time.
const GModelSpatial * m_model
Spatial model.
cta_psf_radial_kern_delta(const GCTAResponseCube *rsp, const GModelSpatialRadial *model, const GSkyDir &srcDir, const GEnergy &srcEng, const GTime &srcTime, const double &delta_mod, const double &theta_max, const int &iter)
GTime m_srcTime
True photon time.
int m_iter
Integration iterations.
double m_sin_eta
Sine of angular distance between.
const GCTAObservation * m_obs
CTA observation.
double m_cos_rho_roi
Cosine of m_rho_roi.
Kernel for Psf delta angle integration used for stacked analysis.
double m_sin_ph
Sine term for photon offset angle computation.
const GModelSpatial * m_model
Spatial model.
double eval(const double &omega)
Kernel for elliptical model integration over model&#39;s azimuth angle.
double m_azimuth
Azimuth angle.
double m_posangle_obs
Measured photon position angle from model centre.
double eval(const double &rho)
Kernel for radial model zenith angle integration of Irf.
const GModelSpatialRadial * m_model
Radial model.
const GCTAResponseCube * m_rsp
Response cube.
double eval(const double &phi)
Kernel for map integration of spatial model.
const GCTAResponseIrf * m_rsp
CTA response.
double m_posangle_obs
Photon position angle measured from model centre.
Kernel for Nroi offest angle integration of diffuse model.
double m_sin_psf
Sine term for PSF offset angle computation.
Kernel for IRF azimuth angle integration of the diffuse source model.
GEnergy m_srcEng
True photon energy.
GEnergy m_obsEng
Observed photon energy.
double m_posangle
Ellipse boundary position angle.
double m_cos_theta
Cosine of offset angle.
GTime m_srcTime
True photon time.
double m_srcLogEng
True photon log energy.
double m_theta
Offset angle (radians)
double m_sin_ph
Sine term for photon offset angle computation.
double m_cos_rho
Cosine of offset angle.
GEnergy m_obsEng
Measured event energy.
double m_sin_rho_roi
Sine of m_rho_roi.
double m_semimajor
Ellipse boundary semimajor axis.
double m_cos_rho_pnt
Cosine of m_rho_pnt.
double m_omega_pnt
Azimuth of pointing in model system.
const GMatrix * m_rot
Rotation matrix.
double resolution(const GModelSpatial *model)
Determine resolution of spatial model.
double m_cos_fact
cos(delta)*cos(delta_mod)
double m_roi
ROI radius in radians.
const GModelSpatialElliptical * m_model
Elliptical model.
double m_cos_psf
Cosine term for PSF offset angle computation.
double m_sin_fact
sin(delta)*sin(delta_mod)
double m_srcLogEng
True photon log energy.
cta_irf_diffuse_kern_theta(const GCTAResponseIrf *rsp, const GModelSpatial *model, const GMatrix *rot, const double &theta, const double &phi, const double &zenith, const double &azimuth, const GEnergy &srcEng, const GTime &srcTime, const double &srcLogEng, const GEnergy &obsEng, const double &eta, const int &min_iter, const int &max_iter, const double &resolution)
Abstract observation base class.
const GModelSpatialRadial * m_model
Radial spatial model.
GSkyDir m_srcDir
True photon arrival direction.
cta_psf_radial_kern_omega(const GCTAResponseCube *rsp, const GModelSpatialRadial *model, const GSkyDir &srcDir, const GEnergy &srcEng, const GTime &srcTime, const double &cos_psf, const double &sin_psf)
GEnergy m_srcEng
True photon energy.
double m_sin_rho_pnt
Sine of m_rho_pnt.
GTime m_srcTime
True arrival time.
GEnergy m_srcEng
True photon energy.
double m_cos_delta_max
Cosine of maximum PSF radius.
double m_cospsf
Cosine of PSF-ROI centre distance.
CTA observation class interface definition.
double max(const GVector &vector)
Computes maximum vector element.
Definition: GVector.cpp:872
GTime m_srcTime
True photon arrival time.
double m_posangle_roi
Position angle of ROI.
double m_cos_theta
Cosine of offset angle.
const GCTAResponseIrf * m_rsp
CTA response function.
double eval(const double &phi)
Kernel for azimuthal radial model integration.
GEnergy m_obsEng
Measured event energy.
double eval(const double &omega)
Kernel for elliptical model integration over azimuth angle.
GEnergy m_obsEng
Observed photon energy.
double eval(const double &rho)
Kernel for elliptical model integration over zenith angle.
const GCTAResponseIrf * m_rsp
CTA response.
GEnergy m_srcEng
True photon energy.
CTA instrument response function class.
int m_iter
Integration iterations.
Kernel for Psf delta angle integration used for stacked analysis.
Abstract elliptical spatial model base class interface definition.
double m_phi
Photon azimuth angle.
const GCTAObservation * m_obs
CTA observation.
double m_rho_obs
Distance of model centre from measured photon.
const GCTAResponseCube * m_rsp
Response cube.
const GCTAResponseIrf * m_rsp
CTA response.
const GMatrix * m_rot
Rotation matrix.
double m_sin_dist
Sine of distance model-ROI centre.
cta_omega_intervals limit_omega(const double &min, const double &max, const double &domega)
Limit omega interval.
double m_sin_psf
Sine term for PSF offset angle computation.
double eval(const double &delta)
Kernel for PSF integration of radial model.
GEnergy m_srcEng
True photon energy.
GEnergy m_srcEng
True photon energy.
double m_posangle_obs
Measured photon position angle from model centre.
double eval(const double &omega)
Kernel for azimuth angle Nroi integration of elliptical model.
Kernel for elliptical model zenith angle integration of IRF.
GTime m_srcTime
True photon arrival time.
double m_rho_obs
Distance of model centre from measured photon.
double eval(const double &phi)
Kernel for Nroi azimuth angle integration of diffuse model.
Sky model class interface definition.
double m_cos_theta_max
Cosine of m_theta_max.
Sky model class.
Definition: GModelSky.hpp:120
double m_sin_rho_obs
Sine of m_rho_obs.
GEnergy m_srcEng
True photon energy.
GEnergy m_obsEng
Observed photon energy.
const GModelSpatialRadial * m_model
Radial model.
double eval(const double &delta)
Kernel for PSF integration of spatial model.
double m_cos_rho
Cosine of offset angle.
const GMatrix * m_rot
Rotation matrix.
const GModelSpatial * m_model
Spatial model.
double eval(const double &phi)
Kernel for IRF azimuth angle integration of the diffuse source model.
double m_cos_rho_obs
Cosine of m_rho_obs.
const GObservation * m_obs
Observation.
GEnergy m_srcEng
True photon energy.
double m_semimajor
Ellipse boundary semimajor axis.
GEnergy m_obsEng
Measured event energy.
Single parameter function abstract base class.
Definition: GFunction.hpp:44
double m_cos_delta_max
Cosine of maximum PSF radius.
double m_semiminor
Ellipse boundary semiminor axis.
double m_azimuth
Azimuth angle of source in Earth system.
double m_azimuth
Azimuth angle.
double m_rho
Model zenith angle.
double m_posangle
Ellipse boundary position angle.
double m_cos_radius_roi
Cosine of m_radius_roi.
cta_psf_diffuse_kern_delta(const GCTAResponseCube *rsp, const GModelSpatial *model, const GMatrix *rot, const GSkyDir &srcDir, const GEnergy &srcEng, const GTime &srcTime, const int &min_iter, const int &max_iter, const double &resolution)
double m_theta
Offset angle of source in camera system.
GVector sin(const GVector &vector)
Computes sine of vector elements.
Definition: GVector.cpp:1226
double m_sin_psf
Sine term for PSF offset angle computation.
double m_sin_rho_obs
Sine of m_rho_obs.
const GModelSpatialRadial * m_model
Radial model.
double m_cos_ph
Cosine term for photon offset angle computation.
int m_iter
Integration iterations.
Kernel for radial model zenith angle integration of IRF.
GTime m_obsTime
Observed photon arrival time.
Abstract spatial model base class.
double m_rho
Model zenith angle.
const GCTAResponseIrf * m_rsp
CTA response.
GTime m_obsTime
Observed photon arrival time.
const GModelSky * m_model
Sky model.
Abstract radial spatial model base class.
GTime m_srcTime
True photon time.
GTime m_srcTime
True photon arrival time.
const GMatrix * m_rot
Rotation matrix.
Generic matrix class definition.
Definition: GMatrix.hpp:79
Vector class.
Definition: GVector.hpp:46
double m_sin_theta
Sine of offset angle.
double m_sinpsf
Sine of PSF-ROI centre distance.
const GCTAResponseIrf * m_rsp
CTA response.
GEnergy m_srcEng
True photon energy.
double m_rho_pnt
Distance of model centre from pointing.
CTA observation class.
Integration kernel for npsf() method.
double m_delta_mod
Distance of model from Psf.
double m_cos_delta_max
Cosine of maximum PSF radius.
const GCTAResponseIrf * m_rsp
CTA response.
Kernel for azimuth angle Nroi integration of elliptical model.
const GCTAResponseCube * m_rsp
CTA response.
double m_delta_max
Maximum PSF radius.
double m_omega0
Azimuth of pointing in model system.
Sky direction class.
Definition: GSkyDir.hpp:62
GTime m_obsTime
Observed photon arrival time.
int m_iter
Integration iterations.
const GCTAObservation * m_obs
CTA observation.
Kernel for Nroi azimuth angle integration of diffuse model.
GEnergy m_srcEng
True photon energy.
double m_azimuth
Pointing azimuth angle.
int m_iter
Integration iterations.
Time class interface definition.
GTime m_srcTime
True photon arrival time.
GEnergy m_obsEng
Measured event energy.
GTime m_srcTime
True photon arrival time.
Kernel for Psf phi angle integration used for stacked analysis.
const GModelSpatial * m_model
Spatial model.
const GCTAResponseCube * m_rsp
CTA response.
int m_min_iter
Minimum number of Romberg iterations.
double m_semimajor
Ellipse boundary semimajor axis.
double m_omega_pnt
Azimuth of pointing in model system.
GEnergy m_obsEng
Measured event energy.
double m_cos_psf
Cosine term for PSF offset angle computation.
Class that handles energies in a unit independent way.
Definition: GEnergy.hpp:48
Kernel for radial model azimuth angle integration.
double m_semiminor
Ellipse boundary semiminor axis.