GammaLib 2.0.0
Loading...
Searching...
No Matches
com_helpers_response_vector.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * COMPTEL helper classes for vector response *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2021 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 com_helpers_response_vector.hpp
23 * @brief Defintion of COMPTEL helper classes for vector response
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef COM_HELPERS_RESPONSE_VECTOR_HPP
28#define COM_HELPERS_RESPONSE_VECTOR_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include "GEnergy.hpp"
32#include "GTime.hpp"
33#include "GVector.hpp"
34#include "GMatrix.hpp"
35#include "GFunction.hpp"
36#include "GFunctions.hpp"
37#include "GModelSky.hpp"
39#include "GSkyMap.hpp"
40#include "GCOMResponse.hpp"
41#include "GCOMEventBin.hpp"
42
43/* __ Forward declarations _______________________________________________ */
44
45
46/***********************************************************************//**
47 * @class com_radial_kerns_rho
48 *
49 * @brief Kernel for rho angle integration of radial models
50 *
51 * This class provides the kernel for the rho angle integration of radial
52 * sky models.
53 ***************************************************************************/
55public:
56 com_radial_kerns_rho(const std::vector<double>& iaq,
57 const GModelSpatialRadial& model,
58 GVector& irfs,
59 const GCOMEventBin* bin,
60 const GMatrix& rot,
61 const GSkyMap& drx,
62 const double& phigeo_bin_size,
63 const int& phigeo_bins,
64 const int& phibar_bins,
65 const int& iter) :
66 m_iaq(iaq),
67 m_model(model),
68 m_irfs(irfs),
69 m_bin(bin),
70 m_rot(rot),
71 m_drx(drx),
72 m_phigeo_bin_size(phigeo_bin_size),
73 m_phigeo_bins(phigeo_bins),
74 m_phibar_bins(phibar_bins),
75 m_iter(iter) { }
76 int size(void) const { return m_irfs.size(); }
77 GVector eval(const double& phigeo);
78protected:
79 const std::vector<double>& m_iaq; //!< IAQ vector
80 const GModelSpatialRadial& m_model; //!< Radial spatial model
81 GVector& m_irfs; //!< IRF vector to update
82 const GCOMEventBin* m_bin; //!< Event bin
83 const GMatrix& m_rot; //!< Rotation matrix
84 const GSkyMap& m_drx; //!< DRX
85 const double& m_phigeo_bin_size; //!< Phigeo bin size
86 const int& m_phigeo_bins; //!< Number of phigeo bins
87 const int& m_phibar_bins; //!< Number of phibar bins
88 const int& m_iter; //!< Number of omega iterations
89};
90
91
92/***********************************************************************//**
93 * @class com_radial_kerns_omega
94 *
95 * @brief Kernel for azimuth angle integration of radial models
96 *
97 * This class provides the kernel for the azimuth angle integration of
98 * radial sky models.
99 ***************************************************************************/
101public:
102 com_radial_kerns_omega(const std::vector<double>& iaq,
103 GVector& irfs,
104 const GCOMEventBin* bin,
105 const GMatrix& rot,
106 const GSkyMap& drx,
107 const double& phigeo_bin_size,
108 const int& phigeo_bins,
109 const int& phibar_bins,
110 const double& sin_rho,
111 const double& cos_rho) :
112 m_iaq(iaq),
113 m_irfs(irfs),
114 m_bin(bin),
115 m_rot(rot),
116 m_drx(drx),
117 m_phigeo_bin_size(phigeo_bin_size),
118 m_phigeo_bins(phigeo_bins),
119 m_phibar_bins(phibar_bins),
120 m_sin_rho(sin_rho),
121 m_cos_rho(cos_rho) { }
122 int size(void) const { return m_irfs.size(); }
123 GVector eval(const double& omega);
124protected:
125 const std::vector<double>& m_iaq; //!< IAQ vector
126 GVector& m_irfs; //!< IRF vector to update
127 const GCOMEventBin* m_bin; //!< Event bin
128 const GMatrix& m_rot; //!< Rotation matrix
129 const GSkyMap& m_drx; //!< DRX
130 const double& m_phigeo_bin_size; //!< Phigeo bin size
131 const int& m_phigeo_bins; //!< Number of phigeo bins
132 const int& m_phibar_bins; //!< Number of phibar bins
133 const double& m_sin_rho; //!< Sine of Rho
134 const double& m_cos_rho; //!< Cosine of Rho
135};
136
137
138/***********************************************************************//**
139 * @class com_elliptical_kerns_rho
140 *
141 * @brief Kernel for rho angle integration of elliptical models
142 *
143 * This class provides the kernel for the rho angle integration of elliptical
144 * sky models.
145 ***************************************************************************/
147public:
148 com_elliptical_kerns_rho(const std::vector<double>& iaq,
149 const GModelSky& model,
150 GVector& irfs,
151 const GCOMEventBin* bin,
152 const GMatrix& rot,
153 const GSkyMap& drx,
154 const double& phigeo_bin_size,
155 const int& phigeo_bins,
156 const int& phibar_bins,
157 const int& iter) :
158 m_iaq(iaq),
159 m_model(model),
160 m_irfs(irfs),
161 m_bin(bin),
162 m_rot(rot),
163 m_drx(drx),
164 m_phigeo_bin_size(phigeo_bin_size),
165 m_phigeo_bins(phigeo_bins),
166 m_phibar_bins(phibar_bins),
167 m_iter(iter) { }
168 int size(void) const { return m_irfs.size(); }
169 GVector eval(const double& phigeo);
170protected:
171 const std::vector<double>& m_iaq; //!< IAQ vector
172 const GModelSky& m_model; //!< Sky model
173 GVector& m_irfs; //!< IRF vector to update
174 const GCOMEventBin* m_bin; //!< Event bin
175 const GMatrix& m_rot; //!< Rotation matrix
176 const GSkyMap& m_drx; //!< DRX
177 const double& m_phigeo_bin_size; //!< Phigeo bin size
178 const int& m_phigeo_bins; //!< Number of phigeo bins
179 const int& m_phibar_bins; //!< Number of phibar bins
180 const int& m_iter; //!< Number of omega iterations
181};
182
183
184/***********************************************************************//**
185 * @class com_elliptical_kerns_omega
186 *
187 * @brief Kernel for azimuth angle integration of elliptical models
188 *
189 * This class provides the kernel for the azimuth angle integration of
190 * elliptical sky models.
191 ***************************************************************************/
193public:
194 com_elliptical_kerns_omega(const std::vector<double>& iaq,
195 const GModelSky& model,
196 GVector& irfs,
197 const GCOMEventBin* bin,
198 const GMatrix& rot,
199 const GSkyMap& drx,
200 const double& phigeo_bin_size,
201 const int& phigeo_bins,
202 const int& phibar_bins,
203 const double& sin_rho,
204 const double& cos_rho) :
205 m_iaq(iaq),
206 m_model(model),
207 m_irfs(irfs),
208 m_bin(bin),
209 m_rot(rot),
210 m_drx(drx),
211 m_phigeo_bin_size(phigeo_bin_size),
212 m_phigeo_bins(phigeo_bins),
213 m_phibar_bins(phibar_bins),
214 m_sin_rho(sin_rho),
215 m_cos_rho(cos_rho) { }
216 int size(void) const { return m_irfs.size(); }
217 GVector eval(const double& omega);
218protected:
219 const std::vector<double>& m_iaq; //!< IAQ vector
220 const GModelSky& m_model; //!< Sky model
221 GVector& m_irfs; //!< IRF vector to update
222 const GCOMEventBin* m_bin; //!< Event bin
223 const GMatrix& m_rot; //!< Rotation matrix
224 const GSkyMap& m_drx; //!< DRX
225 const double& m_phigeo_bin_size; //!< Phigeo bin size
226 const int& m_phigeo_bins; //!< Number of phigeo bins
227 const int& m_phibar_bins; //!< Number of phibar bins
228 const double& m_sin_rho; //!< Sine of Rho
229 const double& m_cos_rho; //!< Cosine of Rho
230};
231
232#endif /* COM_HELPERS_RESPONSE_VECTOR_HPP */
COMPTEL event bin class interface definition.
COMPTEL instrument response function class interface definition.
Energy value class definition.
Single parameter function abstract base class definition.
Single parameter functions abstract base class definition.
Generic matrix class definition.
Sky model class interface definition.
Abstract radial spatial model base class interface definition.
Sky map class definition.
Time class interface definition.
Vector class interface definition.
COMPTEL event bin class.
Single parameter functions abstract base class.
Generic matrix class definition.
Definition GMatrix.hpp:79
Sky model class.
Abstract radial spatial model base class.
Sky map class.
Definition GSkyMap.hpp:89
Vector class.
Definition GVector.hpp:46
const int & size(void) const
Return size of vector.
Definition GVector.hpp:178
Kernel for azimuth angle integration of elliptical models.
const std::vector< double > & m_iaq
IAQ vector.
GVector eval(const double &omega)
Kernel for azimuthal integration of elliptical models.
const double & m_phigeo_bin_size
Phigeo bin size.
const int & m_phibar_bins
Number of phibar bins.
const GCOMEventBin * m_bin
Event bin.
GVector & m_irfs
IRF vector to update.
const double & m_cos_rho
Cosine of Rho.
const GMatrix & m_rot
Rotation matrix.
const int & m_phigeo_bins
Number of phigeo bins.
com_elliptical_kerns_omega(const std::vector< double > &iaq, const GModelSky &model, GVector &irfs, const GCOMEventBin *bin, const GMatrix &rot, const GSkyMap &drx, const double &phigeo_bin_size, const int &phigeo_bins, const int &phibar_bins, const double &sin_rho, const double &cos_rho)
Kernel for rho angle integration of elliptical models.
const GMatrix & m_rot
Rotation matrix.
GVector eval(const double &phigeo)
Kernel for radial integration of elliptical models.
com_elliptical_kerns_rho(const std::vector< double > &iaq, const GModelSky &model, GVector &irfs, const GCOMEventBin *bin, const GMatrix &rot, const GSkyMap &drx, const double &phigeo_bin_size, const int &phigeo_bins, const int &phibar_bins, const int &iter)
const double & m_phigeo_bin_size
Phigeo bin size.
const GModelSky & m_model
Sky model.
const int & m_phigeo_bins
Number of phigeo bins.
const GCOMEventBin * m_bin
Event bin.
GVector & m_irfs
IRF vector to update.
const int & m_phibar_bins
Number of phibar bins.
const int & m_iter
Number of omega iterations.
const std::vector< double > & m_iaq
IAQ vector.
Kernel for azimuth angle integration of radial models.
const int & m_phigeo_bins
Number of phigeo bins.
const double & m_sin_rho
Sine of Rho.
GVector & m_irfs
IRF vector to update.
GVector eval(const double &omega)
Kernel for azimuthal integration of radial models.
const double & m_phigeo_bin_size
Phigeo bin size.
const GMatrix & m_rot
Rotation matrix.
com_radial_kerns_omega(const std::vector< double > &iaq, GVector &irfs, const GCOMEventBin *bin, const GMatrix &rot, const GSkyMap &drx, const double &phigeo_bin_size, const int &phigeo_bins, const int &phibar_bins, const double &sin_rho, const double &cos_rho)
const int & m_phibar_bins
Number of phibar bins.
const std::vector< double > & m_iaq
IAQ vector.
const GCOMEventBin * m_bin
Event bin.
const double & m_cos_rho
Cosine of Rho.
Kernel for rho angle integration of radial models.
com_radial_kerns_rho(const std::vector< double > &iaq, const GModelSpatialRadial &model, GVector &irfs, const GCOMEventBin *bin, const GMatrix &rot, const GSkyMap &drx, const double &phigeo_bin_size, const int &phigeo_bins, const int &phibar_bins, const int &iter)
const int & m_iter
Number of omega iterations.
GVector & m_irfs
IRF vector to update.
GVector eval(const double &phigeo)
Kernel for radial integration of radial models.
const int & m_phigeo_bins
Number of phigeo bins.
const double & m_phigeo_bin_size
Phigeo bin size.
const std::vector< double > & m_iaq
IAQ vector.
const GCOMEventBin * m_bin
Event bin.
const GMatrix & m_rot
Rotation matrix.
const int & m_phibar_bins
Number of phibar bins.
const GModelSpatialRadial & m_model
Radial spatial model.