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

Protected Attributes

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

Detailed Description

Interface for the COMPTEL instrument direction class.

Definition at line 45 of file GCOMInstDir.hpp.

Constructor & Destructor Documentation

◆ GCOMInstDir() [1/3]

GCOMInstDir::GCOMInstDir ( void )

Void constructor.

Definition at line 54 of file GCOMInstDir.cpp.

References init_members().

Referenced by clone().

◆ GCOMInstDir() [2/3]

GCOMInstDir::GCOMInstDir ( const GCOMInstDir & dir)

Copy constructor.

Parameters
[in]dirInstrument direction.

Definition at line 69 of file GCOMInstDir.cpp.

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

◆ GCOMInstDir() [3/3]

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

Destructor.

Definition at line 108 of file GCOMInstDir.cpp.

References free_members().

Member Function Documentation

◆ classname()

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.

◆ clear()

void GCOMInstDir::clear ( void )
virtual

◆ clone()

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

◆ copy_members()

void GCOMInstDir::copy_members ( const GCOMInstDir & dir)
protected

Copy class members.

Parameters
[in]dirInstrument direction.

Definition at line 272 of file GCOMInstDir.cpp.

References dir(), m_dir, and m_phibar.

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

◆ dir() [1/2]

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

◆ dir() [2/2]

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 copy_members(), dir(), GCOMInstDir(), GCOMInstDir(), and operator=().

◆ free_members()

void GCOMInstDir::free_members ( void )
protected

Delete class members.

Definition at line 286 of file GCOMInstDir.cpp.

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

◆ hash()

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(), hash(), m_dir, m_phibar, and GSkyDir::ra().

Referenced by hash().

◆ init_members()

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(), GCOMInstDir(), GCOMInstDir(), and operator=().

◆ 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(), dir(), free_members(), init_members(), and GInstDir::operator=().

◆ phibar() [1/2]

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

◆ phibar() [2/2]

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

◆ print()

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

◆ m_dir

GSkyDir GCOMInstDir::m_dir
protected

Observed scatter direction of event.

Definition at line 77 of file GCOMInstDir.hpp.

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

◆ m_phibar

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(), phibar(), and print().


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