GammaLib 2.0.0
Loading...
Searching...
No Matches
GLATLtCube.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GLATLtCube.hpp - Fermi/LAT livetime cube class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2010-2018 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 GLATLtCube.hpp
23 * @brief Fermi/LAT livetime cube class definition
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef GLATLTCUBE_HPP
28#define GLATLTCUBE_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include <string>
32#include "GBase.hpp"
33#include "GGti.hpp"
34#include "GLATLtCubeMap.hpp"
35
36/* __ Forward declarations _______________________________________________ */
37class GFilename;
38class GSkyDir;
39class GEnergy;
40class GLATAeff;
41class GLATPsf;
42
43/* __ Constants __________________________________________________________ */
44namespace gammalib {
45 const std::string extname_lat_exposure = "EXPOSURE";
46 const std::string extname_lat_wgtexposure = "WEIGHTED_EXPOSURE";
47 const std::string extname_lat_cthetabounds = "CTHETABOUNDS";
48}
49
50
51/***********************************************************************//**
52 * @class GLATLtCube
53 *
54 * @brief Interface for the Fermi LAT livetime cube
55 *
56 * The livetime cube holds the livetime as function and zenith and azimuth
57 * angles for a given observation. The azimuth dependence is optional.
58 ***************************************************************************/
59class GLATLtCube : public GBase {
60
61public:
62 // Constructors and destructors
63 GLATLtCube(void);
64 explicit GLATLtCube(const GFilename& filename);
65 GLATLtCube(const GLATLtCube& cube);
66 virtual ~GLATLtCube(void);
67
68 // Operators
69 GLATLtCube& operator= (const GLATLtCube& cube);
70 double operator()(const GSkyDir& dir, const GEnergy& energy,
71 _ltcube_ctheta fct) const;
72 double operator()(const GSkyDir& dir, const GEnergy& energy,
73 _ltcube_ctheta_phi fct) const;
74 double operator()(const GSkyDir& dir, const GEnergy& energy,
75 const GLATAeff& aeff) const;
76 double operator()(const GSkyDir& dir, const GEnergy& energy,
77 const double& offset, const GLATPsf& psf,
78 const GLATAeff& aeff) const;
79
80 // Methods
81 void clear(void);
82 GLATLtCube* clone(void) const;
83 std::string classname(void) const;
84 void load(const GFilename& filename);
85 void save(const GFilename& filename,
86 const bool& clobber = false) const;
87 void read(const GFits& file);
88 void write(GFits& file) const;
89 std::string print(const GChatter& chatter = NORMAL) const;
90
91private:
92 // Methods
93 void init_members(void);
94 void copy_members(const GLATLtCube& cube);
95 void free_members(void);
96
97 // Protected members
101};
102
103
104/***********************************************************************//**
105 * @brief Return class name
106 *
107 * @return String containing the class name ("GLATLtCube").
108 ***************************************************************************/
109inline
110std::string GLATLtCube::classname(void) const
111{
112 return ("GLATLtCube");
113}
114
115#endif /* GLATLTCUBE_HPP */
Definition of interface for all GammaLib classes.
Good time interval class interface definition.
Fermi LAT livetime cube map class definition.
double(* _ltcube_ctheta_phi)(const double &costheta, const double &phi)
double(* _ltcube_ctheta)(const double &costheta)
GChatter
Definition GTypemaps.hpp:33
@ NORMAL
Definition GTypemaps.hpp:36
Interface class for all GammaLib classes.
Definition GBase.hpp:52
Class that handles energies in a unit independent way.
Definition GEnergy.hpp:48
Filename class.
Definition GFilename.hpp:62
FITS file class.
Definition GFits.hpp:63
Good Time Interval class.
Definition GGti.hpp:62
Interface for the Fermi/LAT effective area.
Definition GLATAeff.hpp:59
Fermi LAT livetime cube map class.
Interface for the Fermi LAT livetime cube.
void copy_members(const GLATLtCube &cube)
Copy class members.
std::string classname(void) const
Return class name.
virtual ~GLATLtCube(void)
Destructor.
GLATLtCubeMap m_weighted_exposure
void read(const GFits &file)
Read livetime cube from FITS file.
GLATLtCube * clone(void) const
Clone livetime cube.
void save(const GFilename &filename, const bool &clobber=false) const
Save livetime cube into FITS file.
GLATLtCube & operator=(const GLATLtCube &cube)
Assignment operator.
void init_members(void)
Initialise class members.
std::string print(const GChatter &chatter=NORMAL) const
Print livetime cube information.
void clear(void)
Clear livetime cube.
void load(const GFilename &filename)
Load livetime cube from FITS file.
GLATLtCubeMap m_exposure
void write(GFits &file) const
Write livetime cube into FITS file.
void free_members(void)
Delete class members.
double operator()(const GSkyDir &dir, const GEnergy &energy, _ltcube_ctheta fct) const
Sum function multiplied by efficiency corrected livetime over zenith angle.
GLATLtCube(void)
Void constructor.
Interface for the Fermi LAT point spread function.
Definition GLATPsf.hpp:54
Sky direction class.
Definition GSkyDir.hpp:62
const std::string extname_lat_cthetabounds
const std::string extname_lat_wgtexposure
const std::string extname_lat_exposure