GammaLib  1.7.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 GCTAInstDir;
59 class GModelData;
60 class GModelSpectral;
61 class GModelTemporal;
62 
63 /* __ Prototypes _________________________________________________________ */
64 namespace gammalib {
65 
66  // General support functions
67  GCTARoi read_ds_roi(const GFitsHDU& hdu);
68  GEbounds read_ds_ebounds(const GFitsHDU& hdu);
69  GPhases read_ds_phase(const GFitsHDU& hdu);
70  std::string read_ds_gti_extname(const GFitsHDU& hdu);
71  std::string gadf_hduclas4(const GFits& fits,
72  const std::string& hduclas4);
73  int iter_rho(const double& rho_max,
74  const double& resolution,
75  const int& iter_min,
76  const int& iter_max);
77  int iter_phi(const double& rho,
78  const double& resolution,
79  const int& iter_min,
80  const int& iter_max);
81 
82  // CTA support functions
83  const GCTAObservation& cta_obs(const std::string& origin,
84  const GObservation& obs);
85  const GCTAPointing& cta_pnt(const std::string& origin,
86  const GObservation& obs);
87  const GCTAResponse* cta_rsp(const std::string& origin,
88  const GResponse& rsp);
89  const GCTAResponseIrf& cta_rsp_irf(const std::string& origin,
90  const GObservation& obs);
91  const GCTAResponseCube& cta_rsp_cube(const std::string& origin,
92  const GObservation& obs);
93  const GCTAAeff& cta_rsp_aeff(const std::string& origin,
94  const GObservation& obs);
95  const GCTABackground& cta_rsp_bkg(const std::string& origin,
96  const GObservation& obs);
97  const GCTAEventList& cta_event_list(const std::string& origin,
98  const GObservation& obs);
99  const GCTAInstDir& cta_dir(const std::string& origin,
100  const GEvent& event);
101  const GModelSpectral* cta_model_spectral(const GModelData& model);
102  const GModelTemporal* cta_model_temporal(const GModelData& model);
103 
104 }
105 
106 #endif /* GCTASUPPORT_HPP */
GCTARoi read_ds_roi(const GFitsHDU &hdu)
Extract ROI from data sub-space keywords.
Definition: GCTASupport.cpp:91
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.
Interface for the CTA region of interest class.
Definition: GCTARoi.hpp:48
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.
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:53
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:59
CTA observation class.
Abstract instrument response base class.
Definition: GResponse.hpp:67
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.