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.
CTA response table class definition.
Energy container class definition.
Filename class interface definition.
Spectral nodes model class definition.
void init_members(void)
Initialise class members.
double m_dety_min
DETY minimum (radians)
double m_dety_max
DETY maximum (radians)
void init_mc_cache(void) const
Initialise Monte Carlo cache.
GCTABackground3D * clone(void) const
Clone background.
void free_members(void)
Delete class members.
void read(const GFitsTable &table)
Read background from FITS table.
void save(const GFilename &filename, const bool &clobber=false) const
Save background into FITS file.
const GModelSpectralNodes & spectrum(void) const
Get response cube spectrum.
GFilename m_filename
Name of background response file.
GFilename filename(void) const
Return filename.
const GCTAResponseTable & table(void) const
Return response table.
int m_num_detx
Number of DETX bins.
virtual ~GCTABackground3D(void)
Destructor.
int m_num_energy
Number of energy bins.
int m_num[3]
Array of number of bins.
GCTAResponseTable m_background
Background response table.
GCTABackground3D & operator=(const GCTABackground3D &bgd)
Assignment operator.
void load(const GFilename &filename)
Load background from FITS file.
std::string print(const GChatter &chatter=NORMAL) const
Print background information.
GCTAInstDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const
Returns MC instrument direction.
double m_logE_min
Log10(E/TeV) minimum.
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.
GEnergies m_energy
Vector of energies.
void write(GFitsBinTable &table) const
Write background into FITS table.
void copy_members(const GCTABackground3D &bgd)
Copy class members.
int m_inx_dety
DETY index.
int m_num_dety
Number of DETY bins.
GModelSpectralNodes m_mc_spectrum
Response cube spectrum.
int index(const int &idetx, const int &idety, const int &iebin) const
Return background rate bin index.
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)
GCTABackground3D(void)
Void constructor.
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 .
double m_logE_max
Log10(E/TeV) maximum.
int m_inx_energy
Energy index.
bool is_valid(void) const
Return validity of background model.
void init_mc_max_rate(void) const
Initialise array of maximum background rate.
std::string classname(void) const
Return class name.
void set_members(void)
Set members from background table.
std::vector< double > m_mc_max
Maximum background rate.
double m_detx_min
DETX minimum (radians)
double m_detx_max
DETX maximum (radians)
void clear(void)
Clear background.
int m_inx_bgd
Background index.
virtual double operator()(const double &logE, const double &detx, const double &dety) const
Return background rate in units of events MeV s sr .
Abstract base class for the CTA background model.
CTA instrument direction class.
CTA response table class.
const int & axes(void) const
Return number of axes of the tables.
Class that handles energies in a unit independent way.
Abstract interface for FITS table.
Spectral nodes model class.
int nodes(void) const
Return number of nodes.
Random number generator class.
const std::string extname_cta_background3d