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