27 #ifndef GCTAMODELAEFFBACKGROUND_HPP
28 #define GCTAMODELAEFFBACKGROUND_HPP
63 virtual void clear(
void);
65 virtual std::string
classname(
void)
const;
66 virtual std::string
type(
void)
const;
70 const bool& gradients =
false)
const;
107 double eval(
const double& theta);
121 const double& theta) :
126 double eval(
const double& phi);
155 return (
"GCTAModelAeffBackground");
169 return (
"CTAAeffBackground");
void init_members(void)
Initialise class members.
CTA event list class interface definition.
double eval(const double &phi)
Kernel for azimuth angle integration of effective area background model.
GCTAInstDir m_roi_centre
RoI centre.
int m_iter
Romberg iterations.
Abstract spectral model base class.
virtual std::string classname(void) const
Return class name.
Abstract temporal model base class.
virtual double eval(const GEvent &event, const GObservation &obs, const bool &gradients=false) const
Return background rate in units of events MeV s sr .
virtual void read(const GXmlElement &xml)
Read CTA effective area background model from XML element.
GModelTemporal * xml_temporal(const GXmlElement &temporal) const
Return pointer to temporal model from XML element.
GModelTemporal * temporal(void) const
Return temporal model component.
Abstract interface for the event classes.
const GCTAAeff * m_aeff
Pointer to effectve area.
GModelSpectral * m_spectral
Spectral model.
Random number generator class.
virtual std::string type(void) const
Return data model type.
double eval(const double &theta)
Kernel for offset angle integration of effective area background model.
double m_theta
Offset angle (radians)
GCTAModelAeffBackground(void)
Void constructor.
GCTAInstDir m_roi_centre
RoI centre.
CTA effective area base class definition.
virtual GCTAModelAeffBackground * clone(void) const
Clone CTA effective area background model.
Abstract temporal model base class interface definition.
virtual GCTAEventList * mc(const GObservation &obs, GRan &ran) const
Return simulated list of events.
std::vector< double > m_npred_values
Model values.
Single parameter function abstract base class definition.
virtual void clear(void)
Clear CTA effective area background model.
virtual double npred(const GEnergy &obsEng, const GTime &obsTime, const GObservation &obs) const
Return spatially integrated background rate in units of events MeV s .
std::vector< GEnergy > m_npred_energies
Model energy.
Abstract data model base class interface definition.
Abstract data model class.
double m_logE
Log10 of energy.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print CTA effective area background model information.
std::vector< GTime > m_npred_times
Model time.
std::vector< std::string > m_npred_names
Model names.
void copy_members(const GCTAModelAeffBackground &bgd)
Copy class members.
Abstract observation base class.
Abstract base class for the CTA effective area.
Abstract spectral model base class interface definition.
virtual ~GCTAModelAeffBackground(void)
Destructor.
virtual std::string type(void) const =0
virtual bool is_constant(void) const
Signals if sky model is temporally constant.
GModelTemporal * m_temporal
Temporal model.
const GCTAAeff * m_aeff
Pointer to effective area.
GModelSpectral * spectral(void) const
Return spectral model component.
Single parameter function abstract base class.
void free_members(void)
Delete class members.
bool valid_model(void) const
Verifies if model has all components.
double aeff_integral(const GObservation &obs, const double &logE) const
Spatially integrate effective area for given energy.
GCTAModelAeffBackground & operator=(const GCTAModelAeffBackground &bgd)
Assignment operator.
virtual void write(GXmlElement &xml) const
Write CTA effective area background model into XML element.
npred_roi_kern_theta(const GCTAAeff *aeff, const double &logE, const GCTAInstDir &roi_centre, const int &iter)
GModelSpectral * xml_spectral(const GXmlElement &spectral) const
Return pointer to spectral model from XML element.
CTA instrument direction class.
npred_roi_kern_phi(const GCTAAeff *aeff, const double &logE, const GCTAInstDir &roi_centre, const double &theta)
int m_n_mc_energies
Energy sampling for MC spectrum.
double m_logE
Log10 of energy.
Class that handles energies in a unit independent way.
void set_pointers(void)
Set pointers.