GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GCTAEventAtom Class Reference

CTA event atom class. More...

#include <GCTAEventAtom.hpp>

Inheritance diagram for GCTAEventAtom:
GEventAtom GEvent GBase

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...
 
GCTAEventAtomoperator= (const GCTAEventAtom &atom)
 Assignment operator. More...
 
void clear (void)
 Clear event atom. More...
 
GCTAEventAtomclone (void) const
 Clone event atom. More...
 
std::string classname (void) const
 Return class name. More...
 
const GCTAInstDirdir (void) const
 Return instrument direction. More...
 
const GEnergyenergy (void) const
 Return energy. More...
 
const GTimetime (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 GEventAtomoperator= (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 GEventoperator= (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
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Parameters
[in]dirEvent instrument direction.
[in]energyEvent energy.
[in]timeEvent 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.

Parameters
[in]atomEvent atom.

Definition at line 93 of file GCTAEventAtom.cpp.

References copy_members(), and init_members().

GCTAEventAtom::~GCTAEventAtom ( void  )
virtual

Destructor.

Definition at line 109 of file GCTAEventAtom.cpp.

References free_members().

Member Function Documentation

std::string GCTAEventAtom::classname ( void  ) const
inlinevirtual

Return class name.

Returns
String containing the class name ("GCTAEventAtom").

Implements GEventAtom.

Definition at line 106 of file GCTAEventAtom.hpp.

void GCTAEventAtom::clear ( void  )
virtual
GCTAEventAtom * GCTAEventAtom::clone ( void  ) const
virtual

Clone event atom.

Returns
Pointer to deep copy of event atom.

Implements GEventAtom.

Definition at line 186 of file GCTAEventAtom.cpp.

References GCTAEventAtom().

void GCTAEventAtom::copy_members ( const GCTAEventAtom atom)
protected

Copy class members.

Parameters
[in]atomEvent 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=().

const GCTAInstDir & GCTAEventAtom::dir ( void  ) const
inlinevirtual

Return instrument direction.

Returns
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().

void GCTAEventAtom::dir ( const GCTAInstDir dir)
inline

Set instrument direction.

Parameters
[in]dirInstrument direction.

Definition at line 154 of file GCTAEventAtom.hpp.

References dir(), and m_dir.

const GEnergy & GCTAEventAtom::energy ( void  ) const
inlinevirtual

Return energy.

Returns
Energy.

Implements GEventAtom.

Definition at line 130 of file GCTAEventAtom.hpp.

References m_energy.

Referenced by energy(), GCTAEventAtom(), and GCTAOnOffObservation::set().

void GCTAEventAtom::energy ( const GEnergy energy)
inline

Set energy.

Parameters
[in]energyEnergy.

Definition at line 167 of file GCTAEventAtom.hpp.

References energy(), and m_energy.

const unsigned long & GCTAEventAtom::event_id ( void  ) const
inline

Return event identifier.

Returns
Event identifier.

Definition at line 207 of file GCTAEventAtom.hpp.

References m_event_id.

void GCTAEventAtom::event_id ( const unsigned long &  id)
inline

Set event identifier.

Parameters
[in]idEvent identifier.

Definition at line 256 of file GCTAEventAtom.hpp.

References m_event_id.

void GCTAEventAtom::free_members ( void  )
protected

Delete class members.

Definition at line 267 of file GCTAEventAtom.cpp.

Referenced by clear(), operator=(), and ~GCTAEventAtom().

const int & GCTAEventAtom::index ( void  ) const
inline

Return event index in list.

Returns
Index.

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().

void GCTAEventAtom::index ( const int &  index)
inline

Set event index.

Parameters
[in]indexEvent index.

Definition at line 243 of file GCTAEventAtom.hpp.

References index(), and m_index.

void GCTAEventAtom::init_members ( void  )
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=().

const int & GCTAEventAtom::mc_id ( void  ) const
inline

Return Monte Carlo identifier.

Returns
Monte Carlo identifier.

Definition at line 219 of file GCTAEventAtom.hpp.

References m_mc_id.

void GCTAEventAtom::mc_id ( const int &  id)
inline

Set Monte Carlo identifier.

Parameters
[in]idMonte Carlo identifier.

Definition at line 269 of file GCTAEventAtom.hpp.

References m_mc_id.

GCTAEventAtom & GCTAEventAtom::operator= ( const GCTAEventAtom atom)

Assignment operator.

Parameters
[in]atomEvent atom.
Returns
Event atom.

Definition at line 131 of file GCTAEventAtom.cpp.

References copy_members(), free_members(), init_members(), and GEventAtom::operator=().

const float & GCTAEventAtom::phase ( void  ) const
inline

Return event phase.

Returns
Event phase.

Definition at line 231 of file GCTAEventAtom.hpp.

References m_phase.

Referenced by phase().

void GCTAEventAtom::phase ( const float &  phase)
inline

Set event phase.

Parameters
[in]phaseEvent phase.

Definition at line 282 of file GCTAEventAtom.hpp.

References m_phase, and phase().

std::string GCTAEventAtom::print ( const GChatter chatter = NORMAL) const
virtual

Print event information.

Parameters
[in]chatterChattiness (defaults to NORMAL).
Returns
String containing event information.

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.

const GTime & GCTAEventAtom::time ( void  ) const
inlinevirtual

Return time.

Returns
Time.

Implements GEventAtom.

Definition at line 142 of file GCTAEventAtom.hpp.

References m_time.

Referenced by GCTAEventAtom(), and time().

void GCTAEventAtom::time ( const GTime time)
inline

Set time.

Parameters
[in]timeTime.

Definition at line 180 of file GCTAEventAtom.hpp.

References m_time, and time().

Friends And Related Function Documentation

friend class GCTAEventList
friend

Definition at line 49 of file GCTAEventAtom.hpp.

Member Data Documentation

GCTAInstDir GCTAEventAtom::m_dir
protected

Event direction.

Definition at line 91 of file GCTAEventAtom.hpp.

Referenced by copy_members(), dir(), GCTAEventAtom(), init_members(), print(), and GCTAEventList::read_events().

GEnergy GCTAEventAtom::m_energy
protected

Event energy.

Definition at line 92 of file GCTAEventAtom.hpp.

Referenced by copy_members(), energy(), GCTAEventAtom(), init_members(), and print().

unsigned long GCTAEventAtom::m_event_id
protected

Event identifier.

Definition at line 94 of file GCTAEventAtom.hpp.

Referenced by copy_members(), event_id(), and init_members().

int GCTAEventAtom::m_index
protected

Index in list.

Definition at line 90 of file GCTAEventAtom.hpp.

Referenced by copy_members(), index(), and init_members().

int GCTAEventAtom::m_mc_id
protected

Monte Carlo identifier.

Definition at line 95 of file GCTAEventAtom.hpp.

Referenced by copy_members(), init_members(), and mc_id().

float GCTAEventAtom::m_phase
protected

Optional phase.

Definition at line 96 of file GCTAEventAtom.hpp.

Referenced by copy_members(), init_members(), and phase().

GTime GCTAEventAtom::m_time
protected

Event time.

Definition at line 93 of file GCTAEventAtom.hpp.

Referenced by copy_members(), GCTAEventAtom(), init_members(), print(), and time().


The documentation for this class was generated from the following files: