27#ifndef GCTABACKGROUNDPERFTABLE_HPP
28#define GCTABACKGROUNDPERFTABLE_HPP
59 const double& dety)
const;
82 const double&
sigma(
void)
const;
91 double rate(
const double& logE)
const;
98 double eval(
const double& x) {
100 double arg2 = arg * arg;
101 double f = std::exp(-0.5 * arg2);
102 return (f*std::sin(x));
129 return (
"GCTABackgroundPerfTable");
CTA background model base class definition.
Energy container class definition.
Filename class interface definition.
Single parameter function abstract base class definition.
Spectral nodes model class definition.
Node array class interface definition.
double eval(const double &x)
integrand(const double &sigma)
CTA performance table background class.
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 rate(const double &logE) const
Return background rate for a given energy (events/s/MeV/sr)
void copy_members(const GCTABackgroundPerfTable &bgd)
Copy class members.
GModelSpectralNodes m_mc_spectrum
Background spectrum.
void load(const GFilename &filename)
Load background from performance table.
std::vector< double > m_log_background
log(background rate)
GFilename filename(void) const
Return filename.
std::string classname(void) const
Return class name.
std::string print(const GChatter &chatter=NORMAL) const
Print background information.
void init_members(void)
Initialise class members.
virtual double operator()(const double &logE, const double &detx, const double &dety) const
Return background rate in units of events MeV s sr .
GCTABackgroundPerfTable & operator=(const GCTABackgroundPerfTable &bgd)
Assignment operator.
virtual ~GCTABackgroundPerfTable(void)
Destructor.
double m_sigma
Sigma for offset angle computation (0=none)
std::vector< double > m_background
Background rate.
GEnergies m_energy
Vector of energies.
void init_mc_cache(void) const
Initialise Monte Carlo cache.
GCTABackgroundPerfTable * clone(void) const
Clone background.
const GModelSpectralNodes & spectrum(void) const
Get response cube spectrum.
GCTABackgroundPerfTable(void)
Void constructor.
void clear(void)
Clear background.
GNodeArray m_log10_energy
log10(E) nodes for background interpolation
int size(void) const
Return number of node energies in response.
void free_members(void)
Delete class members.
GCTAInstDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const
Returns MC instrument direction.
double solidangle(void) const
Returns integral over radial model (in steradians)
const double & sigma(void) const
Return sigma for offset angle dependence.
GFilename m_filename
Name of background response file.
Abstract base class for the CTA background model.
CTA instrument direction class.
int size(void) const
Return number of energies in container.
Class that handles energies in a unit independent way.
Single parameter function abstract base class.
Spectral nodes model class.
int nodes(void) const
Return number of nodes.
Random number generator class.