GammaLib 2.1.0.dev
Loading...
Searching...
No Matches
spi_helpers_response_vector.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * SPI helper classes for vector response *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2024 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 spi_helpers_response_vector.hpp
23 * @brief Defintion of SPI helper classes for vector response
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef SPI_HELPERS_RESPONSE_VECTOR_HPP
28#define SPI_HELPERS_RESPONSE_VECTOR_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include "GFunctions.hpp"
32
33/* __ Forward declarations _______________________________________________ */
34class GSPIEventCube;
35class GSPIReponse;
37class GVector;
38class GMatrix;
39
40
41/***********************************************************************//**
42 * @class spi_radial_kerns_rho
43 *
44 * @brief Kernel for rho angle integration of radial models
45 *
46 * This class provides the kernel for the rho angle integration of radial
47 * sky models.
48 ***************************************************************************/
50public:
52 const GSPIResponse* rsp,
53 const GModelSpatialRadial* radial,
54 const int& ipt,
55 const double* livetimes,
56 const GMatrix& rot,
57 const int& iter,
58 GVector& irfs) :
59 m_cube(cube),
60 m_rsp(rsp),
61 m_radial(radial),
62 m_ipt(ipt),
63 m_livetimes(livetimes),
64 m_rot(rot),
65 m_iter(iter),
66 m_irfs(irfs) { }
67 int size(void) const { return m_irfs.size(); }
68 GVector eval(const double& omega);
69 protected:
70 const GSPIEventCube* m_cube; //!< Pointer to event cube
71 const GSPIResponse* m_rsp; //!< Pointer to response
72 const GModelSpatialRadial* m_radial; //!< Radial spatial model
73 const int& m_ipt; //!< Pointing index
74 const double* m_livetimes; //!< Livetime array
75 const GMatrix& m_rot; //!< Rotation matrix
76 const int& m_iter; //!< Number of azimuthal iterations
77 GVector& m_irfs; //!< IRF vector to update
78};
79
80
81/***********************************************************************//**
82 * @class spi_radial_kerns_omega
83 *
84 * @brief Kernel for azimuth angle integration of radial models
85 *
86 * This class provides the kernel for the azimuth angle integration of
87 * radial sky models.
88 ***************************************************************************/
90public:
92 const GSPIResponse* rsp,
93 const int& ipt,
94 const double* livetimes,
95 const GMatrix& rot,
96 const double& sin_rho,
97 const double& cos_rho,
98 GVector& irfs) :
99 m_cube(cube),
100 m_rsp(rsp),
101 m_ipt(ipt),
102 m_livetimes(livetimes),
103 m_rot(rot),
104 m_sin_rho(sin_rho),
105 m_cos_rho(cos_rho),
106 m_irfs(irfs) { }
107 int size(void) const { return m_irfs.size(); }
108 GVector eval(const double& omega);
109protected:
110 const GSPIEventCube* m_cube; //!< Pointer to event cube
111 const GSPIResponse* m_rsp; //!< Pointer to response
112 const int& m_ipt; //!< Pointing index
113 const double* m_livetimes; //!< Livetime array
114 const GMatrix& m_rot; //!< Rotation matrix
115 const double& m_sin_rho; //!< Sine of Rho
116 const double& m_cos_rho; //!< Cosine of Rho
117 GVector& m_irfs; //!< IRF vector to update
118};
119
120
121/***********************************************************************//**
122 * @class spi_elliptical_kerns_rho
123 *
124 * @brief Kernel for rho angle integration of elliptical models
125 *
126 * This class provides the kernel for the rho angle integration of elliptical
127 * sky models.
128 ***************************************************************************/
130public:
132 const GSPIResponse* rsp,
133 const GModelSpatialElliptical* elliptical,
134 const int& ipt,
135 const double* livetimes,
136 const GMatrix& rot,
137 const int& iter,
138 GVector& irfs) :
139 m_cube(cube),
140 m_rsp(rsp),
141 m_elliptical(elliptical),
142 m_ipt(ipt),
143 m_livetimes(livetimes),
144 m_rot(rot),
145 m_iter(iter),
146 m_irfs(irfs) { }
147 int size(void) const { return m_irfs.size(); }
148 GVector eval(const double& omega);
149 protected:
150 const GSPIEventCube* m_cube; //!< Pointer to event cube
151 const GSPIResponse* m_rsp; //!< Pointer to response
152 const GModelSpatialElliptical* m_elliptical; //!< Elliptical spatial model
153 const int& m_ipt; //!< Pointing index
154 const double* m_livetimes; //!< Livetime array
155 const GMatrix& m_rot; //!< Rotation matrix
156 const int& m_iter; //!< Number of azimuthal iterations
157 GVector& m_irfs; //!< IRF vector to update
158};
159
160
161/***********************************************************************//**
162 * @class spi_elliptical_kerns_omega
163 *
164 * @brief Kernel for azimuth angle integration of elliptical models
165 *
166 * This class provides the kernel for the azimuth angle integration of
167 * elliptical sky models.
168 ***************************************************************************/
170public:
172 const GSPIResponse* rsp,
173 const GModelSpatialElliptical* elliptical,
174 const int& ipt,
175 const double* livetimes,
176 const GMatrix& rot,
177 const double& rho,
178 const double& sin_rho,
179 const double& cos_rho,
180 GVector& irfs) :
181 m_cube(cube),
182 m_rsp(rsp),
183 m_elliptical(elliptical),
184 m_ipt(ipt),
185 m_livetimes(livetimes),
186 m_rot(rot),
187 m_rho(rho),
188 m_sin_rho(sin_rho),
189 m_cos_rho(cos_rho),
190 m_irfs(irfs) { }
191 int size(void) const { return m_irfs.size(); }
192 GVector eval(const double& omega);
193protected:
194 const GSPIEventCube* m_cube; //!< Pointer to event cube
195 const GSPIResponse* m_rsp; //!< Pointer to response
196 const GModelSpatialElliptical* m_elliptical; //!< Elliptical spatial model
197 const int& m_ipt; //!< Pointing index
198 const double* m_livetimes; //!< Livetime array
199 const GMatrix& m_rot; //!< Rotation matrix
200 const double& m_rho; //!< Rho
201 const double& m_sin_rho; //!< Sine of Rho
202 const double& m_cos_rho; //!< Cosine of Rho
203 GVector& m_irfs; //!< IRF vector to update
204};
205
206#endif /* SPI_HELPERS_RESPONSE_VECTOR_HPP */
Single parameter functions abstract base class definition.
Single parameter functions abstract base class.
Generic matrix class definition.
Definition GMatrix.hpp:79
Abstract elliptical spatial model base class.
Abstract radial spatial model base class.
INTEGRAL/SPI event bin container class.
INTEGRAL/SPI instrument response function class.
Vector class.
Definition GVector.hpp:46
const int & size(void) const
Return size of vector.
Definition GVector.hpp:180
Kernel for azimuth angle integration of elliptical models.
const double & m_cos_rho
Cosine of Rho.
const GModelSpatialElliptical * m_elliptical
Elliptical spatial model.
const GSPIResponse * m_rsp
Pointer to response.
const GMatrix & m_rot
Rotation matrix.
const GSPIEventCube * m_cube
Pointer to event cube.
spi_elliptical_kerns_omega(const GSPIEventCube *cube, const GSPIResponse *rsp, const GModelSpatialElliptical *elliptical, const int &ipt, const double *livetimes, const GMatrix &rot, const double &rho, const double &sin_rho, const double &cos_rho, GVector &irfs)
GVector & m_irfs
IRF vector to update.
const double * m_livetimes
Livetime array.
GVector eval(const double &omega)
Kernel for azimuthal integration of elliptical models.
Kernel for rho angle integration of elliptical models.
GVector & m_irfs
IRF vector to update.
const double * m_livetimes
Livetime array.
const GSPIEventCube * m_cube
Pointer to event cube.
GVector eval(const double &omega)
Kernel for radial integration of elliptical models.
const int & m_iter
Number of azimuthal iterations.
const GMatrix & m_rot
Rotation matrix.
const GModelSpatialElliptical * m_elliptical
Elliptical spatial model.
spi_elliptical_kerns_rho(const GSPIEventCube *cube, const GSPIResponse *rsp, const GModelSpatialElliptical *elliptical, const int &ipt, const double *livetimes, const GMatrix &rot, const int &iter, GVector &irfs)
const GSPIResponse * m_rsp
Pointer to response.
Kernel for azimuth angle integration of radial models.
const double & m_sin_rho
Sine of Rho.
GVector & m_irfs
IRF vector to update.
const double * m_livetimes
Livetime array.
const int & m_ipt
Pointing index.
const GMatrix & m_rot
Rotation matrix.
spi_radial_kerns_omega(const GSPIEventCube *cube, const GSPIResponse *rsp, const int &ipt, const double *livetimes, const GMatrix &rot, const double &sin_rho, const double &cos_rho, GVector &irfs)
const GSPIResponse * m_rsp
Pointer to response.
const GSPIEventCube * m_cube
Pointer to event cube.
GVector eval(const double &omega)
Kernel for azimuthal integration of radial models.
const double & m_cos_rho
Cosine of Rho.
Kernel for rho angle integration of radial models.
spi_radial_kerns_rho(const GSPIEventCube *cube, const GSPIResponse *rsp, const GModelSpatialRadial *radial, const int &ipt, const double *livetimes, const GMatrix &rot, const int &iter, GVector &irfs)
const int & m_ipt
Pointing index.
const int & m_iter
Number of azimuthal iterations.
const GSPIEventCube * m_cube
Pointer to event cube.
const double * m_livetimes
Livetime array.
GVector & m_irfs
IRF vector to update.
const GModelSpatialRadial * m_radial
Radial spatial model.
const GSPIResponse * m_rsp
Pointer to response.
GVector eval(const double &omega)
Kernel for radial integration of radial models.
const GMatrix & m_rot
Rotation matrix.