|
GammaLib 2.2.0.dev
|
COSI region of interest class. More...
#include <GCOSRoi.hpp>
Public Member Functions | |
| GCOSRoi (void) | |
| Void constructor. | |
| GCOSRoi (const double &radius) | |
| Radius constructor. | |
| GCOSRoi (const GCOSRoi &roi) | |
| Copy constructor. | |
| virtual | ~GCOSRoi (void) |
| Destructor. | |
| GCOSRoi & | operator= (const GCOSRoi &roi) |
| Assignment operator. | |
| virtual void | clear (void) |
| Clear region of interest. | |
| virtual GCOSRoi * | clone (void) const |
| Clone region of interest. | |
| virtual std::string | classname (void) const |
| Return class name. | |
| virtual bool | contains (const GEvent &event) const |
| Check if region of interest contains an event. | |
| virtual std::string | print (const GChatter &chatter=NORMAL) const |
| Print region of interest information. | |
| const double & | radius (void) const |
| Returns region of interest radius. | |
| void | radius (const double &radius) |
| Set radius of region of interest. | |
Public Member Functions inherited from GRoi | |
| GRoi (void) | |
| Void constructor. | |
| GRoi (const GRoi &roi) | |
| Copy constructor. | |
| virtual | ~GRoi (void) |
| Destructor. | |
| virtual GRoi & | operator= (const GRoi &roi) |
| 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 GCOSRoi &roi) |
| Copy class members. | |
| void | free_members (void) |
| Delete class members. | |
Protected Member Functions inherited from GRoi | |
| void | init_members (void) |
| Initialise class members. | |
| void | copy_members (const GRoi &roi) |
| Copy class members. | |
| void | free_members (void) |
| Delete class members. | |
Protected Attributes | |
| double | m_radius |
| Region of interest radius. | |
COSI region of interest class.
The COSI region of interest class defines the event direction region that is used for unbinned data analysis. By definition, COSI is always doing an allsky analysis, hence the class simply sets the radius to 180 deg once the region is defined.
Definition at line 50 of file GCOSRoi.hpp.
| GCOSRoi::GCOSRoi | ( | void | ) |
Void constructor.
Definition at line 55 of file GCOSRoi.cpp.
References init_members().
Referenced by clone().
|
explicit |
Radius constructor.
| [in] | radius | Region of interest radius |
Definition at line 70 of file GCOSRoi.cpp.
References init_members(), and radius().
| GCOSRoi::GCOSRoi | ( | const GCOSRoi & | roi | ) |
Copy constructor.
| [in] | roi | COSI region of interest. |
Definition at line 88 of file GCOSRoi.cpp.
References copy_members(), and init_members().
|
virtual |
|
inlinevirtual |
Return class name.
Implements GRoi.
Definition at line 90 of file GCOSRoi.hpp.
|
virtual |
Clear region of interest.
Implements GRoi.
Definition at line 159 of file GCOSRoi.cpp.
References free_members(), GRoi::free_members(), init_members(), and GRoi::init_members().
Referenced by GCOSEventList::init_members().
|
virtual |
Clone region of interest.
Implements GRoi.
Definition at line 179 of file GCOSRoi.cpp.
References GCOSRoi().
|
virtual |
Check if region of interest contains an event.
This method checks whether an event is contained in the region of interest. As COSI regions of interest are always 180 deg an event is always contained in the region in case that a region of interest is defined (i.e. it has a radius of 180 deg).
If the instrument direction of the event is not of type GCOSInstDir then the method returns false.
Implements GRoi.
Definition at line 198 of file GCOSRoi.cpp.
References contains(), and m_radius.
Referenced by contains().
|
protected |
Copy class members.
| [in] | roi | COSI region of interest. |
Definition at line 303 of file GCOSRoi.cpp.
References m_radius.
Referenced by GCOSRoi(), and operator=().
|
protected |
Delete class members.
Definition at line 316 of file GCOSRoi.cpp.
Referenced by clear(), operator=(), and ~GCOSRoi().
|
protected |
Initialise class members.
Definition at line 288 of file GCOSRoi.cpp.
References m_radius.
Referenced by clear(), GCOSRoi(), GCOSRoi(), GCOSRoi(), and operator=().
Assignment operator.
| [in] | roi | COSI region of interest. |
Definition at line 126 of file GCOSRoi.cpp.
References copy_members(), free_members(), init_members(), and GRoi::operator=().
Print region of interest information.
| [in] | chatter | Chattiness. |
Implements GRoi.
Definition at line 257 of file GCOSRoi.cpp.
References m_radius, gammalib::parformat(), SILENT, and gammalib::str().
| void GCOSRoi::radius | ( | const double & | radius | ) |
Set radius of region of interest.
| [in] | radius | Region of interest radius (degrees). |
| GException::invalid_argument | ROI radius is not 0 or 180 degrees. |
Set the radius of the region of interest.
Definition at line 233 of file GCOSRoi.cpp.
References G_RADIUS, m_radius, radius(), and gammalib::str().
|
inline |
Returns region of interest radius.
Returns the radius of the region of interest in degrees.
Definition at line 104 of file GCOSRoi.hpp.
References m_radius.
Referenced by GCOSRoi(), radius(), GCOSEventList::read(), and GCOSEventList::write().
|
protected |
Region of interest radius.
Definition at line 80 of file GCOSRoi.hpp.
Referenced by contains(), copy_members(), init_members(), print(), radius(), and radius().