GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 _______________________________________________ */
42 class GFits;
43 class GFitsHDU;
44 class GCTARoi;
45 class GEbounds;
46 class GPhases;
47 class GObservation;
48 class GResponse;
49 class GEvent;
50 class GCTAObservation;
51 class GCTAPointing;
52 class GCTAResponse;
53 class GCTAResponseIrf;
54 class GCTAResponseCube;
55 class GCTAAeff;
56 class GCTABackground;
57 class GCTAEventList;
58 class GCTAEventCube;
59 class GCTAInstDir;
60 class GModelData;
61 class GModelSpectral;
62 class GModelTemporal;
63 
64 /* __ Prototypes _________________________________________________________ */
65 namespace gammalib {
66 
67  // General support functions
68  GCTARoi read_ds_roi(const GFitsHDU& hdu);
69  GEbounds read_ds_ebounds(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 */
GCTARoi read_ds_roi(const GFitsHDU &hdu)
Extract ROI from data sub-space keywords.
Definition: GCTASupport.cpp:92
std::string read_ds_gti_extname(const GFitsHDU &hdu)
Return Good Time Intervals extension name from data sub-space keywords.
const GCTAInstDir & cta_dir(const std::string &origin, const GEvent &event)
Retrieve CTA instrument direction from generic event.
Energy value class definition.
Abstract spectral model base class.
Abstract temporal model base class.
Abstract FITS extension base class.
Definition: GFitsHDU.hpp:51
CTA cube-style response function class.
const GCTAPointing & cta_pnt(const std::string &origin, const GObservation &obs)
Retrieve CTA pointing from generic observation.
Abstract interface for the event classes.
Definition: GEvent.hpp:71
CTA event list class.
const GCTAEventCube & cta_event_cube(const std::string &origin, const GObservation &obs)
Retrieve CTA event cube from generic observation.
Interface for the CTA region of interest class.
Definition: GCTARoi.hpp:49
const GCTAResponseCube & cta_rsp_cube(const std::string &origin, const GObservation &obs)
Retrieve CTA cube response from generic observation.
FITS file class.
Definition: GFits.hpp:63
GPhases read_ds_phase(const GFitsHDU &hdu)
Read phase boundary data sub-space keywords.
const GModelTemporal * cta_model_temporal(const GModelData &model)
Retrieve temporal component from CTA background model.
const GCTABackground & cta_rsp_bkg(const std::string &origin, const GObservation &obs)
Retrieve CTA background response from generic observation.
CTA event bin container class.
Energy boundaries container class.
Definition: GEbounds.hpp:60
Single parameter function abstract base class definition.
const GCTAResponse * cta_rsp(const std::string &origin, const GResponse &rsp)
Retrieve CTA response from generic observation.
CTA pointing class.
Abstract data model class.
Definition: GModelData.hpp:55
const GCTAEventList & cta_event_list(const std::string &origin, const GObservation &obs)
Retrieve CTA event list from generic observation.
const GModelSpectral * cta_model_spectral(const GModelData &model)
Retrieve spectral component from CTA background model.
double resolution(const GModelSpatial *model)
Determine resolution of spatial model.
const GCTAObservation & cta_obs(const std::string &origin, const GObservation &obs)
Retrieve CTA observation from generic observation.
Abstract observation base class.
std::string gadf_hduclas4(const GFits &fits, const std::string &hduclas4)
Return extension name for GADF response table of given HDU class 4.
CTA instrument response function class.
CTA instrument response function class.
Abstract base class for the CTA effective area.
Definition: GCTAAeff.hpp:54
int iter_phi(const double &rho, const double &resolution, const int &iter_min, const int &iter_max)
Determine number of azimuthal Romberg iterations.
Abstract base class for the CTA background model.
Phase Intervals class.
Definition: GPhases.hpp:42
CTA instrument direction class.
Definition: GCTAInstDir.hpp:63
CTA observation class.
Abstract instrument response base class.
Definition: GResponse.hpp:77
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.
Time class interface definition.
const GCTAResponseIrf & cta_rsp_irf(const std::string &origin, const GObservation &obs)
Retrieve CTA IRF response from generic observation.