GammaLib 2.0.0
Loading...
Searching...
No Matches
GLATEventAtom.hpp
Go to the documentation of this file.
1/***************************************************************************
2 * GLATEventAtom.hpp - Fermi/LAT event atom class *
3 * ----------------------------------------------------------------------- *
4 * copyright (C) 2009-2014 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 GLATEventAtom.hpp
23 * @brief Fermi/LAT event atom class definition
24 * @author Juergen Knoedlseder
25 */
26
27#ifndef GLATEVENTATOM_HPP
28#define GLATEVENTATOM_HPP
29
30/* __ Includes ___________________________________________________________ */
31#include <iostream>
32#include "GEventAtom.hpp"
33#include "GEnergy.hpp"
34#include "GTime.hpp"
35#include "GLATInstDir.hpp"
36
37
38/***********************************************************************//**
39 * @class GLATEventAtom
40 *
41 * @brief Fermi/LAT event atom class
42 ***************************************************************************/
43class GLATEventAtom : public GEventAtom {
44
45 // Friend classes
46 friend class GLATEventList;
47
48public:
49 // Constructors and destructors
50 GLATEventAtom(void);
51 GLATEventAtom(const GLATEventAtom& atom);
52 virtual ~GLATEventAtom(void);
53
54 // Operators
56
57 // Implemented pure virtual base class methods
58 void clear(void);
59 GLATEventAtom* clone(void) const;
60 std::string classname(void) const;
61 const GLATInstDir& dir(void) const;
62 const GEnergy& energy(void) const;
63 const GTime& time(void) const;
64 std::string print(const GChatter& chatter = NORMAL) const;
65
66protected:
67 // Protected methods
68 void init_members(void);
69 void copy_members(const GLATEventAtom& atom);
70 void free_members(void);
71
72 // Protected members
73 GLATInstDir m_dir; //!< Event direction
74 GEnergy m_energy; //!< Event energy
75 GTime m_time; //!< Event time
76 float m_theta; //!< Zenith angle in instrument system
77 float m_phi; //!< Azimuth angle in instrument system
78 float m_zenith_angle; //!< Zenith angle in Earth system
79 float m_earth_azimuth_angle; //!< Azimuth angle in Earth system
80 long m_event_id; //!< ID number of original event
81 long m_run_id; //!< Run number of original event
82 short m_recon_version; //!< Version of event reconstruction software
83 short m_calib_version[3]; //!< Version of calibration tables for ACD, CAL
84 short m_event_class; //!< Event class: 0, 1, 2, ...
85 short m_conversion_type; //!< Type of conversion: 0=Front, 1=Back
86 double m_livetime; //!< Accumulated livetime since mission start
87 double* m_difrsp; //!< Diffuse response components
88 int m_num_difrsp; //!< Number of diffuse model components
89};
90
91
92/***********************************************************************//**
93 * @brief Return class name
94 *
95 * @return String containing the class name ("GLATEventAtom").
96 ***************************************************************************/
97inline
98std::string GLATEventAtom::classname(void) const
99{
100 return ("GLATEventAtom");
101}
102
103
104/***********************************************************************//**
105 * @brief Return event instrument direction
106 *
107 * @return Event instrument direction.
108 *
109 * Returns the reconstructed arrival direction of the photon on the sky.
110 ***************************************************************************/
111inline
113{
114 return m_dir;
115}
116
117
118/***********************************************************************//**
119 * @brief Return event energy
120 *
121 * @return Event energy.
122 *
123 * Returns the reconstructed energy of the photon on the sky.
124 ***************************************************************************/
125inline
127{
128 return m_energy;
129}
130
131
132/***********************************************************************//**
133 * @brief Return event time
134 *
135 * @return Event time.
136 *
137 * Returns the event triggering time.
138 ***************************************************************************/
139inline
140const GTime& GLATEventAtom::time(void) const
141{
142 return m_time;
143}
144
145#endif /* GLATEVENTATOM_HPP */
Energy value class definition.
Abstract event atom base class definition.
Fermi/LAT instrument direction class definition.
Time class interface definition.
GChatter
Definition GTypemaps.hpp:33
@ NORMAL
Definition GTypemaps.hpp:36
Class that handles energies in a unit independent way.
Definition GEnergy.hpp:48
Abstract interface for the event atom class.
Fermi/LAT event atom class.
void clear(void)
Clear event atom.
const GEnergy & energy(void) const
Return event energy.
GLATEventAtom & operator=(const GLATEventAtom &atom)
Assignment operator.
float m_phi
Azimuth angle in instrument system.
long m_event_id
ID number of original event.
short m_calib_version[3]
Version of calibration tables for ACD, CAL.
GLATEventAtom * clone(void) const
Clone event atom.
GLATInstDir m_dir
Event direction.
GLATEventAtom(void)
Void constructor.
double m_livetime
Accumulated livetime since mission start.
float m_theta
Zenith angle in instrument system.
double * m_difrsp
Diffuse response components.
float m_zenith_angle
Zenith angle in Earth system.
short m_conversion_type
Type of conversion: 0=Front, 1=Back.
std::string classname(void) const
Return class name.
virtual ~GLATEventAtom(void)
Destructor.
short m_recon_version
Version of event reconstruction software.
const GLATInstDir & dir(void) const
Return event instrument direction.
GEnergy m_energy
Event energy.
void copy_members(const GLATEventAtom &atom)
Copy class members.
void init_members(void)
Initialise class members.
long m_run_id
Run number of original event.
float m_earth_azimuth_angle
Azimuth angle in Earth system.
short m_event_class
Event class: 0, 1, 2, ...
int m_num_difrsp
Number of diffuse model components.
const GTime & time(void) const
Return event time.
std::string print(const GChatter &chatter=NORMAL) const
Print event information.
void free_members(void)
Delete class members.
GTime m_time
Event time.
Fermi/LAT event list class.
Fermi/LAT instrument direction class.
Time class.
Definition GTime.hpp:55