27 #ifndef GCTABACKGROUND3D_HPP
28 #define GCTABACKGROUND3D_HPP
65 const double& dety)
const;
92 const bool& clobber =
false)
const;
100 int index(
const int& idetx,
const int& idety,
const int& iebin)
const;
103 double solid_angle(
const double& detx1,
const double& dety1,
104 const double& detx2,
const double& dety2,
105 const double& detx3,
const double& dety3)
const;
106 double rate(
const int& iebin,
const double& detx,
const double& dety)
const;
141 return (
"GCTABackground3D");
CTA background model base class definition.
double m_dety_max
DETY maximum (radians)
GCTABackground3D & operator=(const GCTABackground3D &bgd)
Assignment operator.
GFilename m_filename
Name of background response file.
void init_mc_max_rate(void) const
Initialise array of maximum background rate.
double m_dety_min
DETY minimum (radians)
int m_num_dety
Number of DETY bins.
int m_num[3]
Array of number of bins.
const GModelSpectralNodes & spectrum(void) const
Get response cube spectrum.
const GCTAResponseTable & table(void) const
Return response table.
std::vector< double > m_mc_max
Maximum background rate.
void write(GFitsBinTable &table) const
Write background into FITS table.
const std::string extname_cta_background3d
GEnergies m_energy
Vector of energies.
Random number generator class.
Spectral nodes model class definition.
double solid_angle(const double &detx1, const double &dety1, const double &detx2, const double &dety2, const double &detx3, const double &dety3) const
Compute solid angle of pixel wedge.
int m_inx_detx
DETX index.
void clear(void)
Clear background.
Spectral nodes model class.
void copy_members(const GCTABackground3D &bgd)
Copy class members.
double m_detx_max
DETX maximum (radians)
CTA response table class definition.
int m_num_energy
Number of energy bins.
void init_members(void)
Initialise class members.
void save(const GFilename &filename, const bool &clobber=false) const
Save background into FITS file.
void free_members(void)
Delete class members.
int m_num_detx
Number of DETX bins.
void set_members(void)
Set members from background table.
Energy container class definition.
GCTAInstDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const
Returns MC instrument direction.
int index(const int &idetx, const int &idety, const int &iebin) const
Return background rate bin index.
double m_logE_min
Log10(E/TeV) minimum.
void init_mc_cache(void) const
Initialise Monte Carlo cache.
Abstract interface for FITS table.
bool is_valid(void) const
Return validity of background model.
GCTAResponseTable m_background
Background response table.
void load(const GFilename &filename)
Load background from FITS file.
int m_inx_dety
DETY index.
virtual double operator()(const double &logE, const double &detx, const double &dety) const
Return background rate in units of events MeV s sr .
double m_logE_max
Log10(E/TeV) maximum.
GModelSpectralNodes m_mc_spectrum
Response cube spectrum.
int nodes(void) const
Return number of nodes.
int m_inx_energy
Energy index.
GCTABackground3D(void)
Void constructor.
Abstract base class for the CTA background model.
std::string print(const GChatter &chatter=NORMAL) const
Print background information.
CTA response table class.
CTA instrument direction class.
double rate(const int &iebin, const double &detx, const double &dety) const
Return background rate for a given energy bin and DETX-DETY value (events/s/MeV/sr) ...
const int & axes(void) const
Return number of axes of the tables.
double rate_ebin(const GCTAInstDir &dir, const GEnergy &emin, const GEnergy &emax) const
Returns background rate integrated over energy interval in units of events s sr .
GFilename filename(void) const
Return filename.
Filename class interface definition.
virtual ~GCTABackground3D(void)
Destructor.
int m_inx_bgd
Background index.
void read(const GFitsTable &table)
Read background from FITS table.
Class that handles energies in a unit independent way.
std::string classname(void) const
Return class name.
GCTABackground3D * clone(void) const
Clone background.
double m_detx_min
DETX minimum (radians)