38#define G_DIR_GET "GCTAEventBin::dir()"
39#define G_ENERGY "GCTAEventBin::energy()"
40#define G_TIME "GCTAEventBin::time()"
41#define G_COUNTS_GET "GCTAEventBin::counts()"
42#define G_SOLIDANGLE "GCTAEventBin::solidangle()"
43#define G_EWIDTH "GCTAEventBin::ewidth()"
44#define G_ONTIME "GCTAEventBin::ontime()"
45#define G_WEIGHT "GCTAEventBin::weight()"
46#define G_DIR_SET "GCTAEventBin::dir(GCTAInstDir&)"
47#define G_ENERGY_SET "GCTAEventBin::energy(GEnergy&)"
48#define G_TIME_SET "GCTAEventBin::time(GTime&)"
49#define G_COUNTS_SET "GCTAEventBin::counts(double&)"
50#define G_SOLIDANGLE_SET "GCTAEventBin::solidangle(double&)"
51#define G_EWIDTH_SET "GCTAEventBin::ewidth(GEnergy&)"
52#define G_ONTIME_SET "GCTAEventBin::ontime(double&)"
53#define G_WEIGHT_SET "GCTAEventBin::weight(double&)"
220 std::string msg =
"Invalid instrument direction pointer encountered. "
221 "Please set up the event bin correctly.";
244 std::string msg =
"Invalid energy pointer encountered. Please set up "
245 "the event bin correctly.";
268 std::string msg =
"Invalid time pointer encountered. Please set up "
269 "the event bin correctly.";
292 std::string msg =
"Invalid counts pointer encountered. Please set up "
293 "the event bin correctly.";
339 std::string msg =
"Invalid solid angle pointer encountered. Please "
340 "set up the event bin correctly.";
372 double e_min = 0.5 * (-
ewidth + std::sqrt(arg));
397 std::string msg =
"Invalid energy width pointer encountered. Please "
398 "set up the event bin correctly.";
421 std::string msg =
"Invalid ontime pointer encountered. Please set up "
422 "the event bin correctly.";
445 std::string msg =
"Invalid weight pointer encountered. Please set up "
446 "the event bin correctly.";
469 std::string msg =
"No memory available to hold instrument direction.";
495 std::string msg =
"No memory available to hold energy.";
521 std::string msg =
"No memory available to hold time.";
547 std::string msg =
"No memory available to hold counts.";
573 std::string msg =
"No memory available to hold solid angle.";
599 std::string msg =
"No memory available to hold energy width.";
625 std::string msg =
"No memory available to hold ontime.";
651 std::string msg =
"No memory available to hold weight.";
CTA event bin class interface definition.
Exception handler interface definition.
GVector sqrt(const GVector &vector)
Computes square root of vector elements.
GCTAEventBin class interface definition.
int m_ieng
Index of energy layer.
double * m_weight
Pointer to weight of bin.
double * m_solidangle
Pointer to solid angle of pixel (sr)
virtual std::string print(const GChatter &chatter=NORMAL) const
Print event information.
virtual double counts(void) const
Return number of counts in event bin.
virtual GCTAEventBin * clone(void) const
Clone event bin.
virtual double size(void) const
Return size of event bin.
GEnergy * m_energy
Pointer to bin energy.
double * m_counts
Pointer to number of counts.
const double & weight(void) const
Return weight of event bin.
const GEnergy & ewidth(void) const
Return energy width of event bin.
virtual GCTAEventBin & operator=(const GCTAEventBin &bin)
Assignment operator.
GEnergy * m_ewidth
Pointer to energy width of bin.
void copy_members(const GCTAEventBin &bin)
Copy class members.
virtual ~GCTAEventBin(void)
Destructor.
GTime * m_time
Pointer to bin time.
virtual const GTime & time(void) const
Return time of event bin.
GCTAEventBin(void)
Void constructor.
virtual const GCTAInstDir & dir(void) const
Return instrument direction of event bin.
void free_members(void)
Delete class members.
virtual double error(void) const
Return error in number of counts.
const double & ontime(void) const
Return ontime of event bin.
virtual const GEnergy & energy(void) const
Return energy of event bin.
int m_ipix
Index in spatial map.
void init_members(void)
Initialise class members.
GCTAInstDir * m_dir
Pointer to bin direction.
double * m_ontime
Pointer to ontime of bin (seconds)
const double & solidangle(void) const
Return solid angle of event bin.
virtual void clear(void)
Clear eventbin.
GEnergy emin(void) const
Return minimum energy of event bin.
bool m_alloc
Signals proper memory allocation.
CTA instrument direction class.
virtual void clear(void)
Clear CTA instrument direction.
Class that handles energies in a unit independent way.
double MeV(void) const
Return energy in MeV.
void clear(void)
Clear instance.
Abstract interface for the event bin class.
void free_members(void)
Delete class members.
virtual GEventBin & operator=(const GEventBin &bin)
Assignment operator.
void init_members(void)
Initialise class members.
void free_members(void)
Delete class members.
void init_members(void)
Initialise class members.
void clear(void)
Clear time.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.