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

COMPTEL region of interest class. More...

#include <GCOMRoi.hpp>

Inheritance diagram for GCOMRoi:
GRoi GBase

Public Member Functions

 GCOMRoi (void)
 Void constructor. More...
 
 GCOMRoi (const GCOMRoi &roi)
 Copy constructor. More...
 
 GCOMRoi (const GCOMInstDir &centre, const double &radius, const double &phibar_min, const double &phibar_max)
 Region of interest constructor. More...
 
virtual ~GCOMRoi (void)
 Destructor. More...
 
GCOMRoioperator= (const GCOMRoi &roi)
 Assignment operator. More...
 
virtual void clear (void)
 Clear region of interest. More...
 
virtual GCOMRoiclone (void) const
 Clone region of interest. More...
 
virtual std::string classname (void) const
 Return class name. More...
 
virtual bool contains (const GEvent &event) const
 Check if region of interest contains an event. More...
 
virtual std::string print (const GChatter &chatter=NORMAL) const
 Print region of interest information. More...
 
const GCOMInstDircentre (void) const
 Return centre of region of interest. More...
 
void centre (const GCOMInstDir &centre)
 Set centre of region of interest. More...
 
const double & radius (void) const
 Return radius of region of interest. More...
 
void radius (const double &radius)
 Set radius of region of interest. More...
 
const double & phibar_min (void) const
 Return minimum Phibar of region of interest. More...
 
void phibar_min (const double &phibar_min)
 Set minimum Phibar of region of interest. More...
 
const double & phibar_max (void) const
 Return maximum Phibar of region of interest. More...
 
void phibar_max (const double &phibar_max)
 Set maximum Phibar of region of interest. More...
 
- Public Member Functions inherited from GRoi
 GRoi (void)
 Void constructor. More...
 
 GRoi (const GRoi &roi)
 Copy constructor. More...
 
virtual ~GRoi (void)
 Destructor. More...
 
virtual GRoioperator= (const GRoi &roi)
 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 GCOMRoi &roi)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
- Protected Member Functions inherited from GRoi
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GRoi &roi)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Protected Attributes

GCOMInstDir m_centre
 Centre of RoI in instrument coordinates. More...
 
double m_radius
 Radius of region of interest. More...
 
double m_phibar_min
 Minimum Phibar of region of interest. More...
 
double m_phibar_max
 Minimum Phibar of region of interest. More...
 

Detailed Description

COMPTEL region of interest class.

The COMPTEL region of interest class defines the event direction region that is used for unbinned data analysis.

Definition at line 44 of file GCOMRoi.hpp.

Constructor & Destructor Documentation

GCOMRoi::GCOMRoi ( void  )

Void constructor.

Definition at line 54 of file GCOMRoi.cpp.

References init_members().

Referenced by clone().

GCOMRoi::GCOMRoi ( const GCOMRoi roi)

Copy constructor.

Parameters
[in]roiCOMPTEL region of interest.

Definition at line 69 of file GCOMRoi.cpp.

References copy_members(), and init_members().

GCOMRoi::GCOMRoi ( const GCOMInstDir centre,
const double &  radius,
const double &  phibar_min,
const double &  phibar_max 
)

Region of interest constructor.

Parameters
[in]centreInstrument direction centre.
[in]radiusInstrument direction radius.
[in]phibar_minPhibar minimum (deg).
[in]phibar_maxPhibar maximum (deg).

Definition at line 90 of file GCOMRoi.cpp.

References centre(), init_members(), phibar_max(), phibar_min(), and radius().

GCOMRoi::~GCOMRoi ( void  )
virtual

Destructor.

Definition at line 111 of file GCOMRoi.cpp.

References free_members().

Member Function Documentation

const GCOMInstDir & GCOMRoi::centre ( void  ) const
inline

Return centre of region of interest.

Returns
Centre of region of interest centre.

Returns the instrument direction of the centre of the region of interest.

Definition at line 108 of file GCOMRoi.hpp.

References m_centre.

Referenced by centre(), and GCOMRoi().

void GCOMRoi::centre ( const GCOMInstDir centre)
inline

Set centre of region of interest.

Parameters
[in]centreInstrument direction.

Set the instrument direction of the centre of the region of interest.

Definition at line 122 of file GCOMRoi.hpp.

References centre(), and m_centre.

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

Return class name.

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

Implements GRoi.

Definition at line 94 of file GCOMRoi.hpp.

void GCOMRoi::clear ( void  )
virtual

Clear region of interest.

Implements GRoi.

Definition at line 166 of file GCOMRoi.cpp.

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

Referenced by GCOMEventList::init_members().

GCOMRoi * GCOMRoi::clone ( void  ) const
virtual

Clone region of interest.

Returns
Pointer to deep copy of COMPTEL region of interest.

Implements GRoi.

Definition at line 186 of file GCOMRoi.cpp.

References GCOMRoi().

bool GCOMRoi::contains ( const GEvent event) const
virtual

Check if region of interest contains an event.

Returns
True if region of interest contains event, false otherwise.

Implements GRoi.

Definition at line 197 of file GCOMRoi.cpp.

References GCOMInstDir::dir(), m_centre, m_phibar_max, m_phibar_min, m_radius, and GCOMInstDir::phibar().

void GCOMRoi::copy_members ( const GCOMRoi roi)
protected

Copy class members.

Parameters
[in]roiCOMPTEL region of interest.

Definition at line 282 of file GCOMRoi.cpp.

References m_centre, m_phibar_max, m_phibar_min, and m_radius.

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

void GCOMRoi::free_members ( void  )
protected

Delete class members.

Definition at line 298 of file GCOMRoi.cpp.

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

void GCOMRoi::init_members ( void  )
protected

Initialise class members.

Definition at line 264 of file GCOMRoi.cpp.

References GCOMInstDir::clear(), m_centre, m_phibar_max, m_phibar_min, and m_radius.

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

GCOMRoi & GCOMRoi::operator= ( const GCOMRoi roi)

Assignment operator.

Parameters
[in]roiCOMPTEL region of interest.
Returns
COMPTEL region of interest.

Definition at line 133 of file GCOMRoi.cpp.

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

const double & GCOMRoi::phibar_max ( void  ) const
inline

Return maximum Phibar of region of interest.

Returns
Maximum Phibar of region of interest (deg).

Returns the maximum Phibar of region of interest.

Definition at line 195 of file GCOMRoi.hpp.

References m_phibar_max.

Referenced by GCOMRoi(), and phibar_max().

void GCOMRoi::phibar_max ( const double &  phibar_max)
inline

Set maximum Phibar of region of interest.

Parameters
[in]phibar_maxMaximum Phibar of region of interest (deg).

Set the maximum Phibar of region of interest.

Definition at line 209 of file GCOMRoi.hpp.

References m_phibar_max, and phibar_max().

const double & GCOMRoi::phibar_min ( void  ) const
inline

Return minimum Phibar of region of interest.

Returns
Minimum Phibar of region of interest (deg).

Returns the minimum Phibar of region of interest.

Definition at line 166 of file GCOMRoi.hpp.

References m_phibar_min.

Referenced by GCOMRoi(), and phibar_min().

void GCOMRoi::phibar_min ( const double &  phibar_min)
inline

Set minimum Phibar of region of interest.

Parameters
[in]phibar_minMinimum Phibar of region of interest (deg).

Set the minimum Phibar of region of interest.

Definition at line 180 of file GCOMRoi.hpp.

References m_phibar_min, and phibar_min().

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

Print region of interest information.

Parameters
[in]chatterChattiness.
Returns
String containing region of interest information.
Todo:
Implement method.

Implements GRoi.

Definition at line 228 of file GCOMRoi.cpp.

References m_centre, m_phibar_max, m_phibar_min, m_radius, gammalib::parformat(), GCOMInstDir::print(), SILENT, and gammalib::str().

const double & GCOMRoi::radius ( void  ) const
inline

Return radius of region of interest.

Returns
Radius of region of interest (deg).

Returns the radius of the region of interest.

Definition at line 137 of file GCOMRoi.hpp.

References m_radius.

Referenced by GCOMRoi(), and radius().

void GCOMRoi::radius ( const double &  radius)
inline

Set radius of region of interest.

Parameters
[in]radiusRadius of region of interest (deg).

Set the radius of the region of interest.

Definition at line 151 of file GCOMRoi.hpp.

References m_radius, and radius().

Member Data Documentation

GCOMInstDir GCOMRoi::m_centre
protected

Centre of RoI in instrument coordinates.

Definition at line 81 of file GCOMRoi.hpp.

Referenced by centre(), contains(), copy_members(), init_members(), and print().

double GCOMRoi::m_phibar_max
protected

Minimum Phibar of region of interest.

Definition at line 84 of file GCOMRoi.hpp.

Referenced by contains(), copy_members(), init_members(), phibar_max(), and print().

double GCOMRoi::m_phibar_min
protected

Minimum Phibar of region of interest.

Definition at line 83 of file GCOMRoi.hpp.

Referenced by contains(), copy_members(), init_members(), phibar_min(), and print().

double GCOMRoi::m_radius
protected

Radius of region of interest.

Definition at line 82 of file GCOMRoi.hpp.

Referenced by contains(), copy_members(), init_members(), print(), and radius().


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