27#ifndef GCTAMODELIRFBACKGROUND_HPP
28#define GCTAMODELIRFBACKGROUND_HPP
61 virtual void clear(
void);
63 virtual std::string
classname(
void)
const;
64 virtual std::string
type(
void)
const;
68 const bool& gradients =
false)
const;
104 double eval(
const double& theta);
118 const double& theta) :
123 double eval(
const double& phi);
151 return (
"GCTAModelIrfBackground");
165 return (
"CTAIrfBackground");
CTA background model base class definition.
CTA event list class interface definition.
Single parameter function abstract base class definition.
Abstract data model base class interface definition.
Abstract spectral model base class interface definition.
Abstract temporal model base class interface definition.
Abstract base class for the CTA background model.
CTA instrument direction class.
double m_theta
Offset angle (radians)
double eval(const double &phi)
Kernel for azimuth angle integration of background model.
double m_logE
Log10 of energy.
GCTAInstDir m_roi_centre
RoI centre.
const GCTABackground * m_bgd
Pointer to background.
npred_roi_kern_phi(const GCTABackground *bgd, const double &logE, const GCTAInstDir &roi_centre, const double &theta)
npred_roi_kern_theta(const GCTABackground *bgd, const double &logE, const GCTAInstDir &roi_centre, const int &iter)
double eval(const double &theta)
Kernel for offset angle integration of background model.
const GCTABackground * m_bgd
Pointer to background.
int m_iter
Romberg iterations.
GCTAInstDir m_roi_centre
RoI centre.
double m_logE
Log10 of energy.
CTA IRF background model 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 .
GModelTemporal * xml_temporal(const GXmlElement &temporal) const
Return pointer to temporal model from XML element.
virtual std::string type(void) const
Return data model type.
virtual bool is_constant(void) const
Signals if sky model is temporally constant.
virtual double npred(const GEnergy &obsEng, const GTime &obsTime, const GObservation &obs) const
Return spatially integrated background rate in units of events MeV s .
virtual void write(GXmlElement &xml) const
Write CTA instrument background model into XML element.
GCTAModelIrfBackground & operator=(const GCTAModelIrfBackground &bgd)
Assignment operator.
GModelTemporal * temporal(void) const
Return temporal model component.
std::vector< GTime > m_npred_times
Model time.
GModelTemporal * m_temporal
Temporal model.
std::vector< double > m_npred_values
Model values.
GModelSpectral * m_spectral
Spectral model.
GCTAModelIrfBackground(void)
Void constructor.
void set_pointers(void)
Set pointers.
GModelSpectral * xml_spectral(const GXmlElement &spectral) const
Return pointer to spectral model from XML element.
void free_members(void)
Delete class members.
virtual std::string classname(void) const
Return class name.
bool valid_model(void) const
Verifies if model has all components.
virtual GCTAEventList * mc(const GObservation &obs, GRan &ran) const
Return simulated list of events.
GModelSpectral * spectral(void) const
Return spectral model component.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print CTA instrument background model information.
void init_members(void)
Initialise class members.
virtual void clear(void)
Clear CTA instrument background model.
virtual ~GCTAModelIrfBackground(void)
Destructor.
virtual void read(const GXmlElement &xml)
Read CTA instrument background model from XML element.
std::vector< GEnergy > m_npred_energies
Model energy.
std::vector< std::string > m_npred_names
Model names.
virtual GCTAModelIrfBackground * clone(void) const
Clone CTA instrument background model.
void copy_members(const GCTAModelIrfBackground &bgd)
Copy class members.
Class that handles energies in a unit independent way.
Abstract interface for the event classes.
Single parameter function abstract base class.
Abstract data model class.
Abstract spectral model base class.
Abstract temporal model base class.
virtual std::string type(void) const =0
Abstract observation base class.
Random number generator class.