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

Fermi/LAT region of interest class. More...

#include <GLATRoi.hpp>

Inheritance diagram for GLATRoi:
GRoi GBase

Public Member Functions

 GLATRoi (void)
 Void constructor. More...
 
 GLATRoi (const GLATInstDir &centre, const double &radius)
 Region of interest constructor. More...
 
 GLATRoi (const GLATRoi &roi)
 Copy constructor. More...
 
virtual ~GLATRoi (void)
 Destructor. More...
 
GLATRoioperator= (const GLATRoi &roi)
 Assignment operator. More...
 
virtual void clear (void)
 Clear region of interest. More...
 
virtual GLATRoiclone (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 GLATInstDircentre (void) const
 Returns region of interest centre. More...
 
const double & radius (void) const
 Returns radius of region of interest in degrees. More...
 
void centre (const GLATInstDir &centre)
 Set region of interest centre. More...
 
void radius (const double &radius)
 Set radius 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 GLATRoi &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

GLATInstDir m_centre
 Centre of ROI in instrument coordinates. More...
 
double m_radius
 Radius of ROI in degrees. More...
 

Detailed Description

Fermi/LAT region of interest class.

The Fermi/LAT region of interest class defines the region of photon arrival directions that is used for unbinned data analysis. A circular region on the sky has been implemented.

Definition at line 45 of file GLATRoi.hpp.

Constructor & Destructor Documentation

GLATRoi::GLATRoi ( void  )

Void constructor.

Definition at line 54 of file GLATRoi.cpp.

References init_members().

Referenced by clone().

GLATRoi::GLATRoi ( const GLATInstDir centre,
const double &  radius 
)

Region of interest constructor.

Parameters
[in]centreRegion of interest centre.
[in]radiusRadius of region of interest (degrees).

Definition at line 70 of file GLATRoi.cpp.

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

GLATRoi::GLATRoi ( const GLATRoi roi)

Copy constructor.

Parameters
[in]roiRegion of interest.

Definition at line 89 of file GLATRoi.cpp.

References copy_members(), and init_members().

GLATRoi::~GLATRoi ( void  )
virtual

Destructor.

Definition at line 105 of file GLATRoi.cpp.

References free_members().

Member Function Documentation

const GLATInstDir & GLATRoi::centre ( void  ) const
inline

Returns region of interest centre.

Returns
Region of interest centre instrument direction.

Returns the instrument direction of the region of interest centre.

Definition at line 102 of file GLATRoi.hpp.

References m_centre.

Referenced by centre(), and GLATRoi().

void GLATRoi::centre ( const GLATInstDir centre)
inline

Set region of interest centre.

Parameters
[in]centreRegion of interest centre instrument direction.

Set the instrument direction of the region of interest centre.

Definition at line 130 of file GLATRoi.hpp.

References centre(), and m_centre.

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

Return class name.

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

Implements GRoi.

Definition at line 88 of file GLATRoi.hpp.

void GLATRoi::clear ( void  )
virtual

Clear region of interest.

Implements GRoi.

Definition at line 160 of file GLATRoi.cpp.

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

Referenced by GLATEventList::init_members().

GLATRoi * GLATRoi::clone ( void  ) const
virtual

Clone region of interest.

Returns
Pointer to deep copy of region of interest

Implements GRoi.

Definition at line 180 of file GLATRoi.cpp.

References GLATRoi().

bool GLATRoi::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 191 of file GLATRoi.cpp.

References GLATInstDir::dir(), m_centre, and m_radius.

void GLATRoi::copy_members ( const GLATRoi roi)
protected

Copy class members.

Parameters
[in]roiRegion of interest from which members should be copied.

Definition at line 267 of file GLATRoi.cpp.

References m_centre, and m_radius.

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

void GLATRoi::free_members ( void  )
protected

Delete class members.

Definition at line 281 of file GLATRoi.cpp.

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

void GLATRoi::init_members ( void  )
protected

Initialise class members.

Definition at line 251 of file GLATRoi.cpp.

References GLATInstDir::clear(), m_centre, and m_radius.

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

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

Assignment operator.

Parameters
[in]roiRegion of interest.
Returns
Region of interest.

Definition at line 127 of file GLATRoi.cpp.

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

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

Print region of interest information.

Parameters
[in]chatterChattiness.
Returns
String containing region of interest information.

Implements GRoi.

Definition at line 218 of file GLATRoi.cpp.

References m_centre, m_radius, gammalib::parformat(), GLATInstDir::print(), SILENT, and gammalib::str().

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

Returns radius of region of interest in degrees.

Returns
Region of interest radius (degrees).

Returns the radius of the region of interest in degrees.

Definition at line 116 of file GLATRoi.hpp.

References m_radius.

Referenced by GLATRoi(), and radius().

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

Set radius of region of interest.

Parameters
[in]radiusRegion of interest radius (degrees).

Set the radius of the region of interest.

Definition at line 145 of file GLATRoi.hpp.

References m_radius, and radius().

Member Data Documentation

GLATInstDir GLATRoi::m_centre
protected

Centre of ROI in instrument coordinates.

Definition at line 77 of file GLATRoi.hpp.

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

double GLATRoi::m_radius
protected

Radius of ROI in degrees.

Definition at line 78 of file GLATRoi.hpp.

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


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