GammaLib 2.0.0
Loading...
Searching...
No Matches
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.
 
 GCTAEventAtom (const GCTAInstDir &dir, const GEnergy &energy, const GTime &time)
 Event constructor.
 
 GCTAEventAtom (const GCTAEventAtom &atom)
 Copy constructor.
 
virtual ~GCTAEventAtom (void)
 Destructor.
 
GCTAEventAtomoperator= (const GCTAEventAtom &atom)
 Assignment operator.
 
void clear (void)
 Clear event atom.
 
GCTAEventAtomclone (void) const
 Clone event atom.
 
std::string classname (void) const
 Return class name.
 
const GCTAInstDirdir (void) const
 Return instrument direction.
 
const GEnergyenergy (void) const
 Return energy.
 
const GTimetime (void) const
 Return time.
 
void dir (const GCTAInstDir &dir)
 Set instrument direction.
 
void energy (const GEnergy &energy)
 Set energy.
 
void time (const GTime &time)
 Set time.
 
std::string print (const GChatter &chatter=NORMAL) const
 Print event information.
 
const int & index (void) const
 Return event index in list.
 
const unsigned long & event_id (void) const
 Return event identifier.
 
const int & mc_id (void) const
 Return Monte Carlo identifier.
 
const float & phase (void) const
 Return event phase.
 
void index (const int &index)
 Set event index.
 
void event_id (const unsigned long &id)
 Set event identifier.
 
void mc_id (const int &id)
 Set Monte Carlo identifier.
 
void phase (const float &phase)
 Set event phase.
 
- Public Member Functions inherited from GEventAtom
 GEventAtom (void)
 Void constructor.
 
 GEventAtom (const GEventAtom &atom)
 Copy constructor.
 
virtual ~GEventAtom (void)
 Destructor.
 
virtual GEventAtomoperator= (const GEventAtom &atom)
 Assignment operator.
 
virtual double size (void) const
 Return size of an event atom.
 
virtual double counts (void) const
 Return number of counts in event atom.
 
virtual double error (void) const
 Return error in number of counts in event atom.
 
bool is_atom (void) const
 Signal if event is an atom.
 
bool is_bin (void) const
 Signal if event is a bin.
 
- Public Member Functions inherited from GEvent
 GEvent (void)
 Void constructor.
 
 GEvent (const GEvent &event)
 Copy constructor.
 
virtual ~GEvent (void)
 Destructor.
 
virtual GEventoperator= (const GEvent &event)
 Assignment operator.
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor.
 

Protected Member Functions

void init_members (void)
 Initialise class members.
 
void copy_members (const GCTAEventAtom &atom)
 Copy class members.
 
void free_members (void)
 Delete class members.
 
- Protected Member Functions inherited from GEventAtom
void init_members (void)
 Initialise class members.
 
void copy_members (const GEventAtom &atom)
 Copy class members.
 
void free_members (void)
 Delete class members.
 
- Protected Member Functions inherited from GEvent
void init_members (void)
 Initialise class members.
 
void copy_members (const GEvent &event)
 Copy class members.
 
void free_members (void)
 Delete class members.
 

Protected Attributes

int m_index
 Index in list.
 
GCTAInstDir m_dir
 Event direction.
 
GEnergy m_energy
 Event energy.
 
GTime m_time
 Event time.
 
unsigned long m_event_id
 Event identifier.
 
int m_mc_id
 Monte Carlo identifier.
 
float m_phase
 Optional phase.
 

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() [1/3]

GCTAEventAtom::GCTAEventAtom ( void )

Void constructor.

Definition at line 54 of file GCTAEventAtom.cpp.

References init_members().

Referenced by clone().

◆ GCTAEventAtom() [2/3]

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() [3/3]

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::~GCTAEventAtom ( void )
virtual

Destructor.

Definition at line 109 of file GCTAEventAtom.cpp.

References free_members().

Member Function Documentation

◆ classname()

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.

◆ clear()

void GCTAEventAtom::clear ( void )
virtual

◆ clone()

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

◆ copy_members()

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

◆ dir() [1/2]

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.

◆ dir() [2/2]

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(), GCTAModelAeffBackground::mc(), GCTAModelBackground::mc(), GCTAModelIrfBackground::mc(), GCTAModelRadialAcceptance::mc(), GCTAResponseIrf::mc(), and GCTAOnOffObservation::set().

◆ energy() [1/2]

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.

◆ energy() [2/2]

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

◆ event_id() [1/2]

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.

◆ event_id() [2/2]

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.

◆ free_members()

void GCTAEventAtom::free_members ( void )
protected

Delete class members.

Definition at line 267 of file GCTAEventAtom.cpp.

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

◆ index() [1/2]

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.

◆ index() [2/2]

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

◆ init_members()

void GCTAEventAtom::init_members ( void )
protected

◆ mc_id() [1/2]

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.

◆ mc_id() [2/2]

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.

◆ operator=()

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

◆ phase() [1/2]

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

◆ phase() [2/2]

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

◆ print()

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.

◆ time() [1/2]

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

◆ time() [2/2]

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

Friends And Related Symbol Documentation

◆ GCTAEventList

friend class GCTAEventList
friend

Definition at line 49 of file GCTAEventAtom.hpp.

Member Data Documentation

◆ m_dir

GCTAInstDir GCTAEventAtom::m_dir
protected

Event direction.

Definition at line 91 of file GCTAEventAtom.hpp.

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

◆ m_energy

GEnergy GCTAEventAtom::m_energy
protected

Event energy.

Definition at line 92 of file GCTAEventAtom.hpp.

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

◆ m_event_id

unsigned long GCTAEventAtom::m_event_id
protected

Event identifier.

Definition at line 94 of file GCTAEventAtom.hpp.

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

◆ m_index

int GCTAEventAtom::m_index
protected

Index in list.

Definition at line 90 of file GCTAEventAtom.hpp.

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

◆ m_mc_id

int GCTAEventAtom::m_mc_id
protected

Monte Carlo identifier.

Definition at line 95 of file GCTAEventAtom.hpp.

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

◆ m_phase

float GCTAEventAtom::m_phase
protected

Optional phase.

Definition at line 96 of file GCTAEventAtom.hpp.

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

◆ m_time

GTime GCTAEventAtom::m_time
protected

Event time.

Definition at line 93 of file GCTAEventAtom.hpp.

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


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