GammaLib 2.0.0
Loading...
Searching...
No Matches
GCTASupport.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GCTASupport.hpp - CTA support functions *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2011-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 GCTASupport.hpp
23 * @brief Definition of support function used by CTA classes
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef GCTASUPPORT_HPP
28#define GCTASUPPORT_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include <string>
32#include <vector>
33#include "GFunction.hpp"
34#include "GEnergy.hpp"
35#include "GTime.hpp"
36
37/* __ Namespaces _________________________________________________________ */
38
39/* __ Constants __________________________________________________________ */
40
41/* __ Forward declarations _______________________________________________ */
42class GFits;
43class GFitsHDU;
44class GCTARoi;
45class GEbounds;
46class GPhases;
47class GObservation;
48class GResponse;
49class GEvent;
50class GCTAObservation;
51class GCTAPointing;
52class GCTAResponse;
53class GCTAResponseIrf;
55class GCTAAeff;
56class GCTABackground;
57class GCTAEventList;
58class GCTAEventCube;
59class GCTAInstDir;
60class GModelData;
61class GModelSpectral;
62class GModelTemporal;
63
64/* __ Prototypes _________________________________________________________ */
65namespace gammalib {
66
67 // General support functions
68 GCTARoi read_ds_roi(const GFitsHDU& hdu);
70 GPhases read_ds_phase(const GFitsHDU& hdu);
71 std::string read_ds_gti_extname(const GFitsHDU& hdu);
72 std::string gadf_hduclas4(const GFits& fits,
73 const std::string& hduclas4);
74 int iter_rho(const double& rho_max,
75 const double& resolution,
76 const int& iter_min,
77 const int& iter_max);
78 int iter_phi(const double& rho,
79 const double& resolution,
80 const int& iter_min,
81 const int& iter_max);
82
83 // CTA support functions
84 const GCTAObservation& cta_obs(const std::string& origin,
85 const GObservation& obs);
86 const GCTAPointing& cta_pnt(const std::string& origin,
87 const GObservation& obs);
88 const GCTAResponse* cta_rsp(const std::string& origin,
89 const GResponse& rsp);
90 const GCTAResponseIrf& cta_rsp_irf(const std::string& origin,
91 const GObservation& obs);
92 const GCTAResponseCube& cta_rsp_cube(const std::string& origin,
93 const GObservation& obs);
94 const GCTAAeff& cta_rsp_aeff(const std::string& origin,
95 const GObservation& obs);
96 const GCTABackground& cta_rsp_bkg(const std::string& origin,
97 const GObservation& obs);
98 const GCTAEventList& cta_event_list(const std::string& origin,
99 const GObservation& obs);
100 const GCTAEventCube& cta_event_cube(const std::string& origin,
101 const GObservation& obs);
102 const GCTAInstDir& cta_dir(const std::string& origin,
103 const GEvent& event);
104 const GModelSpectral* cta_model_spectral(const GModelData& model);
105 const GModelTemporal* cta_model_temporal(const GModelData& model);
106
107}
108
109#endif /* GCTASUPPORT_HPP */
Energy value class definition.
Single parameter function abstract base class definition.
Time class interface definition.
Abstract base class for the CTA effective area.
Definition GCTAAeff.hpp:54
Abstract base class for the CTA background model.
CTA event bin container class.
CTA event list class.
CTA instrument direction class.
CTA observation class.
CTA pointing class.
CTA cube-style response function class.
CTA instrument response function class.
CTA instrument response function class.
Interface for the CTA region of interest class.
Definition GCTARoi.hpp:49
Energy boundaries container class.
Definition GEbounds.hpp:60
Abstract interface for the event classes.
Definition GEvent.hpp:71
Abstract FITS extension base class.
Definition GFitsHDU.hpp:51
FITS file class.
Definition GFits.hpp:63
Abstract data model class.
Abstract spectral model base class.
Abstract temporal model base class.
Abstract observation base class.
Phase Intervals class.
Definition GPhases.hpp:42
Abstract instrument response base class.
Definition GResponse.hpp:77
const GCTAObservation & cta_obs(const std::string &origin, const GObservation &obs)
Retrieve CTA observation from generic observation.
std::string read_ds_gti_extname(const GFitsHDU &hdu)
Return Good Time Intervals extension name from data sub-space keywords.
const GCTAPointing & cta_pnt(const std::string &origin, const GObservation &obs)
Retrieve CTA pointing from generic observation.
const GCTAInstDir & cta_dir(const std::string &origin, const GEvent &event)
Retrieve CTA instrument direction from generic event.
const GCTABackground & cta_rsp_bkg(const std::string &origin, const GObservation &obs)
Retrieve CTA background response from generic observation.
GCTARoi read_ds_roi(const GFitsHDU &hdu)
Extract ROI from data sub-space keywords.
const GCTAEventList & cta_event_list(const std::string &origin, const GObservation &obs)
Retrieve CTA event list from generic observation.
int iter_phi(const double &rho, const double &resolution, const int &iter_min, const int &iter_max)
Determine number of azimuthal Romberg iterations.
double resolution(const GModelSpatial *model)
Determine resolution of spatial model.
const GCTAResponse * cta_rsp(const std::string &origin, const GResponse &rsp)
Retrieve CTA response from generic observation.
const GModelSpectral * cta_model_spectral(const GModelData &model)
Retrieve spectral component from CTA background model.
std::string gadf_hduclas4(const GFits &fits, const std::string &hduclas4)
Return extension name for GADF response table of given HDU class 4.
const GCTAResponseIrf & cta_rsp_irf(const std::string &origin, const GObservation &obs)
Retrieve CTA IRF response from generic observation.
GEbounds read_ds_ebounds(const GFitsHDU &hdu)
Read energy boundary data sub-space keywords.
const GCTAAeff & cta_rsp_aeff(const std::string &origin, const GObservation &obs)
Retrieve CTA effective area response from generic observation.
int iter_rho(const double &rho_max, const double &resolution, const int &iter_min, const int &iter_max)
Determine number of radial Romberg iterations.
GPhases read_ds_phase(const GFitsHDU &hdu)
Read phase boundary data sub-space keywords.
const GCTAEventCube & cta_event_cube(const std::string &origin, const GObservation &obs)
Retrieve CTA event cube from generic observation.
const GCTAResponseCube & cta_rsp_cube(const std::string &origin, const GObservation &obs)
Retrieve CTA cube response from generic observation.
const GModelTemporal * cta_model_temporal(const GModelData &model)
Retrieve temporal component from CTA background model.