GammaLib
2.0.0
|
CTA event atom class. More...
#include <GCTAEventAtom.hpp>
Public Member Functions | |
GCTAEventAtom (void) | |
Void constructor. More... | |
GCTAEventAtom (const GCTAInstDir &dir, const GEnergy &energy, const GTime &time) | |
Event constructor. More... | |
GCTAEventAtom (const GCTAEventAtom &atom) | |
Copy constructor. More... | |
virtual | ~GCTAEventAtom (void) |
Destructor. More... | |
GCTAEventAtom & | operator= (const GCTAEventAtom &atom) |
Assignment operator. More... | |
void | clear (void) |
Clear event atom. More... | |
GCTAEventAtom * | clone (void) const |
Clone event atom. More... | |
std::string | classname (void) const |
Return class name. More... | |
const GCTAInstDir & | dir (void) const |
Return instrument direction. More... | |
const GEnergy & | energy (void) const |
Return energy. More... | |
const GTime & | time (void) const |
Return time. More... | |
void | dir (const GCTAInstDir &dir) |
Set instrument direction. More... | |
void | energy (const GEnergy &energy) |
Set energy. More... | |
void | time (const GTime &time) |
Set time. More... | |
std::string | print (const GChatter &chatter=NORMAL) const |
Print event information. More... | |
const int & | index (void) const |
Return event index in list. More... | |
const unsigned long & | event_id (void) const |
Return event identifier. More... | |
const int & | mc_id (void) const |
Return Monte Carlo identifier. More... | |
const float & | phase (void) const |
Return event phase. More... | |
void | index (const int &index) |
Set event index. More... | |
void | event_id (const unsigned long &id) |
Set event identifier. More... | |
void | mc_id (const int &id) |
Set Monte Carlo identifier. More... | |
void | phase (const float &phase) |
Set event phase. More... | |
Public Member Functions inherited from GEventAtom | |
GEventAtom (void) | |
Void constructor. More... | |
GEventAtom (const GEventAtom &atom) | |
Copy constructor. More... | |
virtual | ~GEventAtom (void) |
Destructor. More... | |
virtual GEventAtom & | operator= (const GEventAtom &atom) |
Assignment operator. More... | |
virtual double | size (void) const |
Return size of an event atom. More... | |
virtual double | counts (void) const |
Return number of counts in event atom. More... | |
virtual double | error (void) const |
Return error in number of counts in event atom. More... | |
bool | is_atom (void) const |
Signal if event is an atom. More... | |
bool | is_bin (void) const |
Signal if event is a bin. More... | |
Public Member Functions inherited from GEvent | |
GEvent (void) | |
Void constructor. More... | |
GEvent (const GEvent &event) | |
Copy constructor. More... | |
virtual | ~GEvent (void) |
Destructor. More... | |
virtual GEvent & | operator= (const GEvent &event) |
Assignment operator. More... | |
Public Member Functions inherited from GBase | |
virtual | ~GBase (void) |
Destructor. More... | |
Protected Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GCTAEventAtom &atom) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Protected Member Functions inherited from GEventAtom | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GEventAtom &atom) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Protected Member Functions inherited from GEvent | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GEvent &event) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Protected Attributes | |
int | m_index |
Index in list. More... | |
GCTAInstDir | m_dir |
Event direction. More... | |
GEnergy | m_energy |
Event energy. More... | |
GTime | m_time |
Event time. More... | |
unsigned long | m_event_id |
Event identifier. More... | |
int | m_mc_id |
Monte Carlo identifier. More... | |
float | m_phase |
Optional phase. More... | |
Friends | |
class | GCTAEventList |
CTA event atom class.
This class implements a CTA event atom. It collects all the relevant event information needed for CTA unbinned analysis.
Definition at line 46 of file GCTAEventAtom.hpp.
GCTAEventAtom::GCTAEventAtom | ( | void | ) |
Void constructor.
Definition at line 54 of file GCTAEventAtom.cpp.
References init_members().
Referenced by clone().
GCTAEventAtom::GCTAEventAtom | ( | const GCTAInstDir & | dir, |
const GEnergy & | energy, | ||
const GTime & | time | ||
) |
Event constructor.
[in] | dir | Event instrument direction. |
[in] | energy | Event energy. |
[in] | time | Event time. |
Definition at line 71 of file GCTAEventAtom.cpp.
References dir(), energy(), init_members(), m_dir, m_energy, m_time, and time().
GCTAEventAtom::GCTAEventAtom | ( | const GCTAEventAtom & | atom | ) |
Copy constructor.
[in] | atom | Event atom. |
Definition at line 93 of file GCTAEventAtom.cpp.
References copy_members(), and init_members().
|
virtual |
|
inlinevirtual |
Return class name.
Implements GEventAtom.
Definition at line 106 of file GCTAEventAtom.hpp.
|
virtual |
Clear event atom.
Implements GEventAtom.
Definition at line 164 of file GCTAEventAtom.cpp.
References free_members(), GEventAtom::free_members(), GEvent::free_members(), init_members(), GEventAtom::init_members(), and GEvent::init_members().
|
virtual |
Clone event atom.
Implements GEventAtom.
Definition at line 186 of file GCTAEventAtom.cpp.
References GCTAEventAtom().
|
protected |
Copy class members.
[in] | atom | Event atom. |
Definition at line 248 of file GCTAEventAtom.cpp.
References m_dir, m_energy, m_event_id, m_index, m_mc_id, m_phase, and m_time.
Referenced by GCTAEventAtom(), and operator=().
|
inlinevirtual |
Return instrument direction.
Implements GEventAtom.
Definition at line 118 of file GCTAEventAtom.hpp.
References m_dir.
Referenced by dir(), GCTAEventAtom(), GCTAModelIrfBackground::mc(), GCTAModelAeffBackground::mc(), GCTAModelRadialAcceptance::mc(), GCTAModelBackground::mc(), GCTAResponseIrf::mc(), and GCTAOnOffObservation::set().
|
inline |
Set instrument direction.
[in] | dir | Instrument direction. |
Definition at line 154 of file GCTAEventAtom.hpp.
|
inlinevirtual |
Return energy.
Implements GEventAtom.
Definition at line 130 of file GCTAEventAtom.hpp.
References m_energy.
Referenced by energy(), GCTAEventAtom(), and GCTAOnOffObservation::set().
|
inline |
|
inline |
Return event identifier.
Definition at line 207 of file GCTAEventAtom.hpp.
References m_event_id.
|
inline |
Set event identifier.
[in] | id | Event identifier. |
Definition at line 256 of file GCTAEventAtom.hpp.
References m_event_id.
|
protected |
Delete class members.
Definition at line 267 of file GCTAEventAtom.cpp.
Referenced by clear(), operator=(), and ~GCTAEventAtom().
|
inline |
Return event index in list.
Returns the index of the event in case it is part of a list.
Definition at line 195 of file GCTAEventAtom.hpp.
References m_index.
Referenced by index().
|
inline |
|
protected |
Initialise class members.
Definition at line 227 of file GCTAEventAtom.cpp.
References GCTAInstDir::clear(), GEnergy::clear(), GTime::clear(), m_dir, m_energy, m_event_id, m_index, m_mc_id, m_phase, and m_time.
Referenced by clear(), GCTAEventAtom(), and operator=().
|
inline |
Return Monte Carlo identifier.
Definition at line 219 of file GCTAEventAtom.hpp.
References m_mc_id.
|
inline |
Set Monte Carlo identifier.
[in] | id | Monte Carlo identifier. |
Definition at line 269 of file GCTAEventAtom.hpp.
References m_mc_id.
GCTAEventAtom & GCTAEventAtom::operator= | ( | const GCTAEventAtom & | atom | ) |
Assignment operator.
[in] | atom | Event atom. |
Definition at line 131 of file GCTAEventAtom.cpp.
References copy_members(), free_members(), init_members(), and GEventAtom::operator=().
|
inline |
Return event phase.
Definition at line 231 of file GCTAEventAtom.hpp.
References m_phase.
Referenced by phase().
|
inline |
Print event information.
[in] | chatter | Chattiness (defaults to NORMAL). |
Implements GEventAtom.
Definition at line 198 of file GCTAEventAtom.cpp.
References m_dir, m_energy, m_time, GCTAInstDir::print(), GEnergy::print(), GTime::print(), and SILENT.
|
inlinevirtual |
Return time.
Implements GEventAtom.
Definition at line 142 of file GCTAEventAtom.hpp.
References m_time.
Referenced by GCTAEventAtom(), and time().
|
inline |
|
friend |
Definition at line 49 of file GCTAEventAtom.hpp.
|
protected |
Event direction.
Definition at line 91 of file GCTAEventAtom.hpp.
Referenced by copy_members(), dir(), GCTAEventAtom(), init_members(), print(), and GCTAEventList::read_events().
|
protected |
Event energy.
Definition at line 92 of file GCTAEventAtom.hpp.
Referenced by copy_members(), energy(), GCTAEventAtom(), init_members(), and print().
|
protected |
Event identifier.
Definition at line 94 of file GCTAEventAtom.hpp.
Referenced by copy_members(), event_id(), and init_members().
|
protected |
Index in list.
Definition at line 90 of file GCTAEventAtom.hpp.
Referenced by copy_members(), index(), and init_members().
|
protected |
Monte Carlo identifier.
Definition at line 95 of file GCTAEventAtom.hpp.
Referenced by copy_members(), init_members(), and mc_id().
|
protected |
Optional phase.
Definition at line 96 of file GCTAEventAtom.hpp.
Referenced by copy_members(), init_members(), and phase().
|
protected |
Event time.
Definition at line 93 of file GCTAEventAtom.hpp.
Referenced by copy_members(), GCTAEventAtom(), init_members(), print(), and time().