GammaLib  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GCOMInstDir Class Reference

Interface for the COMPTEL instrument direction class. More...

#include <GCOMInstDir.hpp>

Inheritance diagram for GCOMInstDir:
GInstDir GBase

Public Member Functions

 GCOMInstDir (void)
 Void constructor. More...
 
 GCOMInstDir (const GCOMInstDir &dir)
 Copy constructor. More...
 
 GCOMInstDir (const GSkyDir &dir, const double &phibar)
 Instrument direction constructor. More...
 
virtual ~GCOMInstDir (void)
 Destructor. More...
 
GCOMInstDiroperator= (const GCOMInstDir &dir)
 Assignment operator. More...
 
virtual void clear (void)
 Clear instance. More...
 
virtual GCOMInstDirclone (void) const
 Clone instance. More...
 
virtual std::string classname (void) const
 Return class name. More...
 
virtual u_int64_t hash (void) const
 Return instrument direction hash value. More...
 
virtual std::string print (const GChatter &chatter=NORMAL) const
 Print instrument direction information. More...
 
void dir (const GSkyDir &dir)
 Set event scatter direction. More...
 
const GSkyDirdir (void) const
 Return event scatter direction. More...
 
void phibar (const double &phibar)
 Set event Compton scatter angle. More...
 
const double & phibar (void) const
 Return event Compton scatter angle. More...
 
- Public Member Functions inherited from GInstDir
 GInstDir (void)
 Void constructor. More...
 
 GInstDir (const GInstDir &dir)
 Copy constructor. More...
 
virtual ~GInstDir (void)
 Destructor. More...
 
virtual GInstDiroperator= (const GInstDir &dir)
 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 GCOMInstDir &dir)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
- Protected Member Functions inherited from GInstDir
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GInstDir &dir)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Protected Attributes

GSkyDir m_dir
 Observed scatter direction of event. More...
 
double m_phibar
 Observed scatter angle of event. More...
 

Detailed Description

Interface for the COMPTEL instrument direction class.

Definition at line 45 of file GCOMInstDir.hpp.

Constructor & Destructor Documentation

GCOMInstDir::GCOMInstDir ( void  )

Void constructor.

Definition at line 54 of file GCOMInstDir.cpp.

References init_members().

Referenced by clone().

GCOMInstDir::GCOMInstDir ( const GCOMInstDir dir)

Copy constructor.

Parameters
[in]dirInstrument direction.

Definition at line 69 of file GCOMInstDir.cpp.

References copy_members(), and init_members().

GCOMInstDir::GCOMInstDir ( const GSkyDir dir,
const double &  phibar 
)

Instrument direction constructor.

Parameters
[in]dirSky direction.
[in]phibarPhibar (deg).

Constructs a COMPTEL instrument direction from a sky direction and a phibar value.

Definition at line 91 of file GCOMInstDir.cpp.

References dir(), init_members(), and phibar().

GCOMInstDir::~GCOMInstDir ( void  )
virtual

Destructor.

Definition at line 108 of file GCOMInstDir.cpp.

References free_members().

Member Function Documentation

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

Return class name.

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

Implements GInstDir.

Definition at line 88 of file GCOMInstDir.hpp.

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

Clone instance.

Returns
Pointer to deep copy of instrument direction.

Implements GInstDir.

Definition at line 183 of file GCOMInstDir.cpp.

References GCOMInstDir().

void GCOMInstDir::copy_members ( const GCOMInstDir dir)
protected

Copy class members.

Parameters
[in]dirInstrument direction.

Definition at line 272 of file GCOMInstDir.cpp.

References m_dir, and m_phibar.

Referenced by GCOMInstDir(), and operator=().

void GCOMInstDir::dir ( const GSkyDir dir)
inline
const GSkyDir & GCOMInstDir::dir ( void  ) const
inline

Return event scatter direction.

Returns
Event scatter direction.

Returns the event scatter direction.

Definition at line 102 of file GCOMInstDir.hpp.

References m_dir.

Referenced by dir(), and GCOMInstDir().

void GCOMInstDir::free_members ( void  )
protected

Delete class members.

Definition at line 286 of file GCOMInstDir.cpp.

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

u_int64_t GCOMInstDir::hash ( void  ) const
virtual

Return instrument direction hash value.

Returns
Hash value.

Returns a hash value that can be used in the response cache.

Implements GInstDir.

Definition at line 196 of file GCOMInstDir.cpp.

References GSkyDir::dec(), m_dir, m_phibar, and GSkyDir::ra().

void GCOMInstDir::init_members ( void  )
protected

Initialise class members.

Definition at line 256 of file GCOMInstDir.cpp.

References GSkyDir::clear(), m_dir, and m_phibar.

Referenced by clear(), GCOMInstDir(), and operator=().

GCOMInstDir & GCOMInstDir::operator= ( const GCOMInstDir dir)

Assignment operator.

Parameters
[in]dirInstrument direction.
Returns
Instrument direction.

Definition at line 130 of file GCOMInstDir.cpp.

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

void GCOMInstDir::phibar ( const double &  phibar)
inline

Set event Compton scatter angle.

Parameters
[in]phibarEvent Compton scatter angle (deg).

Set the event Compton scatter angle.

Definition at line 145 of file GCOMInstDir.hpp.

References m_phibar, and phibar().

Referenced by GCOMRoi::contains(), GCOMModelDRBPhibarNodes::eval(), GCOMResponse::irf(), GCOMEventAtom::print(), GCOMEventList::read_events(), and GCOMEventCube::set_bin().

const double & GCOMInstDir::phibar ( void  ) const
inline

Return event Compton scatter angle.

Returns
Event Compton scatter angle (deg).

Returns the event Compton scatter angle.

Definition at line 131 of file GCOMInstDir.hpp.

References m_phibar.

Referenced by GCOMInstDir(), and phibar().

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

Print instrument direction information.

Parameters
[in]chatterChattiness.
Returns
String containing instrument direction information.

Implements GInstDir.

Definition at line 223 of file GCOMInstDir.cpp.

References m_dir, m_phibar, gammalib::parformat(), GSkyDir::print(), SILENT, and gammalib::str().

Referenced by GCOMRoi::print().

Member Data Documentation

GSkyDir GCOMInstDir::m_dir
protected

Observed scatter direction of event.

Definition at line 77 of file GCOMInstDir.hpp.

Referenced by copy_members(), dir(), hash(), init_members(), and print().

double GCOMInstDir::m_phibar
protected

Observed scatter angle of event.

Definition at line 78 of file GCOMInstDir.hpp.

Referenced by copy_members(), hash(), init_members(), phibar(), and print().


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