GammaLib  1.7.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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  ***************************************************************************/
43 class GLATEventAtom : public GEventAtom {
44 
45  // Friend classes
46  friend class GLATEventList;
47 
48 public:
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 
66 protected:
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  ***************************************************************************/
97 inline
98 std::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  ***************************************************************************/
111 inline
112 const GLATInstDir& GLATEventAtom::dir(void) const
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  ***************************************************************************/
125 inline
126 const GEnergy& GLATEventAtom::energy(void) const
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  ***************************************************************************/
139 inline
140 const GTime& GLATEventAtom::time(void) const
141 {
142  return m_time;
143 }
144 
145 #endif /* GLATEVENTATOM_HPP */
Energy value class definition.
short m_conversion_type
Type of conversion: 0=Front, 1=Back.
GLATInstDir m_dir
Event direction.
short m_calib_version[3]
Version of calibration tables for ACD, CAL.
void copy_members(const GLATEventAtom &atom)
Copy class members.
Fermi/LAT instrument direction class.
Definition: GLATInstDir.hpp:48
float m_theta
Zenith angle in instrument system.
std::string print(const GChatter &chatter=NORMAL) const
Print event information.
long m_run_id
Run number of original event.
double * m_difrsp
Diffuse response components.
Time class.
Definition: GTime.hpp:54
virtual ~GLATEventAtom(void)
Destructor.
void free_members(void)
Delete class members.
GLATEventAtom * clone(void) const
Clone event atom.
long m_event_id
ID number of original event.
const GEnergy & energy(void) const
Return event energy.
float m_zenith_angle
Zenith angle in Earth system.
const GLATInstDir & dir(void) const
Return event instrument direction.
short m_event_class
Event class: 0, 1, 2, ...
GLATEventAtom(void)
Void constructor.
int m_num_difrsp
Number of diffuse model components.
GTime m_time
Event time.
Abstract event atom base class definition.
GChatter
Definition: GTypemaps.hpp:33
void init_members(void)
Initialise class members.
void clear(void)
Clear event atom.
GEnergy m_energy
Event energy.
Fermi/LAT event list class.
short m_recon_version
Version of event reconstruction software.
std::string classname(void) const
Return class name.
Fermi/LAT instrument direction class definition.
double m_livetime
Accumulated livetime since mission start.
float m_phi
Azimuth angle in instrument system.
const GTime & time(void) const
Return event time.
Time class interface definition.
float m_earth_azimuth_angle
Azimuth angle in Earth system.
GLATEventAtom & operator=(const GLATEventAtom &atom)
Assignment operator.
Fermi/LAT event atom class.
Class that handles energies in a unit independent way.
Definition: GEnergy.hpp:48
Abstract interface for the event atom class.
Definition: GEventAtom.hpp:62