27 #ifndef GCTABACKGROUND2D_HPP
28 #define GCTABACKGROUND2D_HPP
65 const double& dety)
const;
92 const bool& clobber =
false)
const;
100 int index(
const int& itheta,
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& theta)
const;
137 return (
"GCTABackground2D");
CTA background model base class definition.
virtual ~GCTABackground2D(void)
Destructor.
int index(const int &itheta, const int &iebin) const
Return background rate bin index.
std::vector< double > m_mc_max
Maximum background rate.
double m_theta_min
THETA minimum (radians)
bool is_valid(void) const
Return validity of background model.
GCTABackground2D * clone(void) const
Clone background.
double m_logE_min
Log10(E/TeV) minimum.
int m_inx_energy
Energy axis index.
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 .
void copy_members(const GCTABackground2D &bgd)
Copy class members.
double m_logE_max
Log10(E/TeV) maximum.
int m_num_energy
Number of energy bins.
Random number generator class.
Spectral nodes model class definition.
const std::string extname_cta_background2d
virtual double operator()(const double &logE, const double &detx, const double &dety) const
Return background rate in units of events MeV s sr .
double rate(const int &iebin, const double &theta) const
Return background rate for a given energy bin and offset angle value (events/s/MeV/sr) ...
std::string print(const GChatter &chatter=NORMAL) const
Print background information.
GEnergies m_energy
Vector of energies.
GCTABackground2D & operator=(const GCTABackground2D &bgd)
Assignment operator.
Spectral nodes model class.
int m_inx_theta
THETA axis index.
void clear(void)
Clear background.
std::string classname(void) const
Return class name.
int m_num[2]
Array of number of bins.
double m_theta_max
THETA maximum (radians)
void init_mc_cache(void) const
Initialise Monte Carlo cache.
GFilename filename(void) const
Return filename.
CTA response table class definition.
void init_mc_max_rate(void) const
Initialise array of maximum background rate.
int m_num_theta
Number of THETA bins.
void write(GFitsBinTable &table) const
Write background into FITS table.
GCTAInstDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const
Returns MC instrument direction.
Energy container class definition.
void free_members(void)
Delete class members.
Abstract interface for FITS table.
const GCTAResponseTable & table(void) const
Return response table.
GModelSpectralNodes m_mc_spectrum
Response cube spectrum.
GCTAResponseTable m_background
Background response table.
void set_members(void)
Set members from background table.
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_bgd
Background index.
GCTABackground2D(void)
Void constructor.
int nodes(void) const
Return number of nodes.
Abstract base class for the CTA background model.
GFilename m_filename
Name of background response file.
CTA response table class.
CTA instrument direction class.
void init_members(void)
Initialise class members.
const int & axes(void) const
Return number of axes of the tables.
void load(const GFilename &filename)
Load background from FITS file.
const GModelSpectralNodes & spectrum(void) const
Get response cube spectrum.
void save(const GFilename &filename, const bool &clobber=false) const
Save background into FITS file.
Filename class interface definition.
Class that handles energies in a unit independent way.
void read(const GFitsTable &table)
Read background from FITS table.