GammaLib 2.2.0.dev
Loading...
Searching...
No Matches
GCOSInstDir Class Reference

COSI instrument direction class. More...

#include <GCOSInstDir.hpp>

Inheritance diagram for GCOSInstDir:
GInstDir GBase

Public Member Functions

 GCOSInstDir (void)
 Void constructor.
 
 GCOSInstDir (const GCOSInstDir &dir)
 Copy constructor.
 
 GCOSInstDir (const GSkyDir &dir, const GSkyDir &dir_local, const double &phi)
 Instrument direction constructor.
 
virtual ~GCOSInstDir (void)
 Destructor.
 
GCOSInstDiroperator= (const GCOSInstDir &dir)
 Assignment operator.
 
virtual void clear (void)
 Clear COSI instrument direction.
 
virtual GCOSInstDirclone (void) const
 Clone COSI instrument direction.
 
virtual std::string classname (void) const
 Return class name.
 
virtual u_int64_t hash (void) const
 Return COSI instrument direction hash value.
 
virtual std::string print (const GChatter &chatter=NORMAL) const
 Print COSI instrument direction information.
 
void dir (const GSkyDir &dir)
 Set event scatter direction in celestial coordinates.
 
const GSkyDirdir (void) const
 Return event scatter direction in celestial coordinates.
 
void dir_local (const GSkyDir &dir)
 Set event scatter direction in spacecraft coordinates.
 
const GSkyDirdir_local (void) const
 Return event scatter direction in spacecraft coordinates.
 
void phi (const double &phi)
 Set event Compton scatter angle.
 
const double & phi (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 GCOSInstDir &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 in celestial coordinates.
 
GSkyDir m_dir_local
 Observed scatter direction of event in local coordinates.
 
double m_phi
 Observed scatter angle of event (deg)
 

Detailed Description

COSI instrument direction class.

The COSI instrument direction defines the spatial information associated to an event.

Definition at line 52 of file GCOSInstDir.hpp.

Constructor & Destructor Documentation

◆ GCOSInstDir() [1/3]

GCOSInstDir::GCOSInstDir ( void )

Void constructor.

Creates an empty COSI instrument direction.

Definition at line 56 of file GCOSInstDir.cpp.

References init_members().

Referenced by clone().

◆ GCOSInstDir() [2/3]

GCOSInstDir::GCOSInstDir ( const GCOSInstDir & dir)

Copy constructor.

Parameters
[in]dirCOSI instrument direction.

Definition at line 71 of file GCOSInstDir.cpp.

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

◆ GCOSInstDir() [3/3]

GCOSInstDir::GCOSInstDir ( const GSkyDir & dir,
const GSkyDir & dir_local,
const double & phi )

Instrument direction constructor.

Parameters
[in]dirSky direction in celestial system.
[in]dir_localSky direction in spacecraft system.
[in]phiCompton scatter angle (deg).

Constructs a COSI instrument direction from a sky direction in the celestial and spacecraft systems and a phi value.

Definition at line 94 of file GCOSInstDir.cpp.

References dir(), dir_local(), init_members(), and phi().

◆ ~GCOSInstDir()

GCOSInstDir::~GCOSInstDir ( void )
virtual

Destructor.

Definition at line 114 of file GCOSInstDir.cpp.

References free_members().

Member Function Documentation

◆ classname()

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

Return class name.

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

Implements GInstDir.

Definition at line 98 of file GCOSInstDir.hpp.

◆ clear()

void GCOSInstDir::clear ( void )
virtual

Clear COSI instrument direction.

Clears COSI instrument direction by resetting all class members to an initial state. Any information that was present before will be lost.

Implements GInstDir.

Definition at line 172 of file GCOSInstDir.cpp.

References free_members(), GInstDir::free_members(), init_members(), and GInstDir::init_members().

Referenced by GCOSEventAtom::init_members(), GCOSEventBin::init_members(), and GCOSEventCube::init_members().

◆ clone()

GCOSInstDir * GCOSInstDir::clone ( void ) const
virtual

Clone COSI instrument direction.

Returns
Pointer to deep copy of COSI instrument direction.

Implements GInstDir.

Definition at line 192 of file GCOSInstDir.cpp.

References GCOSInstDir().

◆ copy_members()

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

Copy class members.

Parameters
[in]dirCOSI instrument direction.

Definition at line 281 of file GCOSInstDir.cpp.

References dir(), m_dir, m_dir_local, and m_phi.

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

◆ dir() [1/2]

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

Set event scatter direction in celestial coordinates.

Parameters
[in]dirEvent scatter direction in celestial coordinates.

Set the event scatter direction in celestial coordinates.

Definition at line 126 of file GCOSInstDir.hpp.

References dir(), and m_dir.

Referenced by GCOSEventBin::chi(), GCOSEventBin::dir(), GCOSEventBin::psi(), and GCOSEventCube::set_bin().

◆ dir() [2/2]

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

Return event scatter direction in celestial coordinates.

Returns
Event scatter direction in celestial coordinates.

Returns the event scatter direction in celestial coordinates.

Definition at line 112 of file GCOSInstDir.hpp.

References m_dir.

Referenced by copy_members(), dir(), dir_local(), GCOSInstDir(), GCOSInstDir(), and operator=().

◆ dir_local() [1/2]

void GCOSInstDir::dir_local ( const GSkyDir & dir)
inline

Set event scatter direction in spacecraft coordinates.

Parameters
[in]dirEvent scatter direction in spacecraft coordinates.

Set the event scatter direction in spacecraft coordinates.

Definition at line 155 of file GCOSInstDir.hpp.

References dir(), and m_dir_local.

◆ dir_local() [2/2]

const GSkyDir & GCOSInstDir::dir_local ( void ) const
inline

Return event scatter direction in spacecraft coordinates.

Returns
Event scatter direction in spacecraft coordinates.

Returns the event scatter direction in spacecraft coordinates.

Definition at line 141 of file GCOSInstDir.hpp.

References m_dir_local.

Referenced by GCOSInstDir().

◆ free_members()

void GCOSInstDir::free_members ( void )
protected

Delete class members.

Definition at line 296 of file GCOSInstDir.cpp.

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

◆ hash()

u_int64_t GCOSInstDir::hash ( void ) const
virtual

Return COSI instrument direction hash value.

Returns
Hash value.

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

Implements GInstDir.

Definition at line 205 of file GCOSInstDir.cpp.

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

Referenced by hash().

◆ init_members()

void GCOSInstDir::init_members ( void )
protected

Initialise class members.

Definition at line 264 of file GCOSInstDir.cpp.

References GSkyDir::clear(), m_dir, m_dir_local, and m_phi.

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

◆ operator=()

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

Assignment operator.

Parameters
[in]dirCOSI instrument direction.
Returns
COSI instrument direction.

Definition at line 136 of file GCOSInstDir.cpp.

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

◆ phi() [1/2]

void GCOSInstDir::phi ( const double & phi)
inline

Set event Compton scatter angle.

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

Set the event Compton scatter angle.

Definition at line 184 of file GCOSInstDir.hpp.

References m_phi, and phi().

Referenced by GCOSEventBin::dir(), GCOSEventBin::phi(), and GCOSEventCube::set_bin().

◆ phi() [2/2]

const double & GCOSInstDir::phi ( void ) const
inline

Return event Compton scatter angle.

Returns
Event Compton scatter angle (deg).

Returns the event Compton scatter angle.

Definition at line 170 of file GCOSInstDir.hpp.

References m_phi.

Referenced by GCOSInstDir(), and phi().

◆ print()

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

Print COSI instrument direction information.

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

Implements GInstDir.

Definition at line 229 of file GCOSInstDir.cpp.

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

Referenced by GCOSEventAtom::print().

Member Data Documentation

◆ m_dir

GSkyDir GCOSInstDir::m_dir
protected

Observed scatter direction of event in celestial coordinates.

Definition at line 86 of file GCOSInstDir.hpp.

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

◆ m_dir_local

GSkyDir GCOSInstDir::m_dir_local
protected

Observed scatter direction of event in local coordinates.

Definition at line 87 of file GCOSInstDir.hpp.

Referenced by copy_members(), dir_local(), dir_local(), init_members(), and print().

◆ m_phi

double GCOSInstDir::m_phi
protected

Observed scatter angle of event (deg)

Definition at line 88 of file GCOSInstDir.hpp.

Referenced by copy_members(), init_members(), phi(), phi(), and print().


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