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.";
371 double arg = ewidth * ewidth + 4.0 * energy *
energy;
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.";
GEnergy emin(void) const
Return minimum energy of event bin.
double * m_ontime
Pointer to ontime of bin (seconds)
virtual ~GCTAEventBin(void)
Destructor.
double * m_counts
Pointer to number of counts.
virtual const GCTAInstDir & dir(void) const
Return instrument direction of event bin.
const double & weight(void) const
Return weight of event bin.
GCTAEventBin class interface definition.
Abstract interface for the event bin class.
int m_ipix
Index in spatial map.
CTA event bin class interface definition.
GCTAEventBin(void)
Void constructor.
void clear(void)
Clear time.
double MeV(void) const
Return energy in MeV.
virtual const GEnergy & energy(void) const
Return energy of event bin.
int m_ieng
Index of energy layer.
GCTAInstDir * m_dir
Pointer to bin direction.
virtual double size(void) const
Return size of event bin.
virtual GCTAEventBin * clone(void) const
Clone event bin.
GTime * m_time
Pointer to bin time.
GVector sqrt(const GVector &vector)
Computes square root of vector elements.
const GEnergy & ewidth(void) const
Return energy width of event bin.
const double & ontime(void) const
Return ontime of event bin.
virtual const GTime & time(void) const
Return time of event bin.
void free_members(void)
Delete class members.
void init_members(void)
Initialise class members.
void init_members(void)
Initialise class members.
bool m_alloc
Signals proper memory allocation.
void free_members(void)
Delete class members.
virtual void clear(void)
Clear eventbin.
double * m_weight
Pointer to weight of bin.
virtual void clear(void)
Clear CTA instrument direction.
virtual GCTAEventBin & operator=(const GCTAEventBin &bin)
Assignment operator.
void free_members(void)
Delete class members.
Exception handler interface definition.
double * m_solidangle
Pointer to solid angle of pixel (sr)
GEnergy * m_ewidth
Pointer to energy width of bin.
CTA instrument direction class.
virtual GEventBin & operator=(const GEventBin &bin)
Assignment operator.
GEnergy * m_energy
Pointer to bin energy.
const double & solidangle(void) const
Return solid angle of event bin.
void copy_members(const GCTAEventBin &bin)
Copy class members.
void init_members(void)
Initialise class members.
virtual double counts(void) const
Return number of counts in event bin.
void clear(void)
Clear instance.
virtual double error(void) const
Return error in number of counts.
Class that handles energies in a unit independent way.
std::string str(const unsigned short int &value)
Convert unsigned short integer value into string.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print event information.