27#ifndef GMODELSPATIALCOMPOSITE_HPP
28#define GMODELSPATIALCOMPOSITE_HPP
61 virtual void clear(
void);
63 virtual std::string
classname(
void)
const;
66 const bool& gradients =
false)
const;
71 const double& radius)
const;
73 const double& margin = 0.0)
const;
86 const std::string& name =
"",
90 double scale(
const int& index)
const;
116 return (
"GModelSpatialComposite");
146 const double& radius)
const
Model parameter class interface definition.
Abstract spatial model base class interface definition.
Sky direction class interface definition.
Circular sky region class interface definition.
@ GMODEL_SPATIAL_COMPOSITE
XML element node class interface definition.
Class that handles energies in a unit independent way.
void free_members(void)
Delete class members.
std::vector< std::string > m_names
Component names.
virtual void clear(void)
Clear spatial composite model.
std::vector< GModelSpatial * > m_components
Components.
virtual double flux(const GSkyRegion ®ion, const GEnergy &srcEng=GEnergy(), const GTime &srcTime=GTime()) const
Returns flux integrated in sky region.
void copy_members(const GModelSpatialComposite &model)
Copy class members.
const GModelSpatial * component(const int &index) const
Returns pointer to spatial component element.
void append(const GModelSpatial &component, const std::string &name="", const GModelPar &par=GModelPar("", 1.0))
Append spatial component.
virtual GModelSpatialComposite * clone(void) const
Clone spatial composite model.
virtual std::string classname(void) const
Return class name.
virtual GSkyDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const
Returns MC sky direction.
virtual void read(const GXmlElement &xml)
Read model from XML element.
int components(void) const
Return number of model components.
virtual double eval(const GPhoton &photon, const bool &gradients=false) const
Evaluate function.
virtual void set_region(void) const
Set boundary sky region.
std::vector< GModelPar * > m_scales
Component scales.
virtual GClassCode code(void) const
Return class code.
void init_members(void)
Initialise class members.
double sum_of_scales(void) const
Returns sum of all model scales.
double scale(const int &index) const
Returns scale of spatial component.
virtual ~GModelSpatialComposite(void)
Destructor.
GModelSpatialComposite(void)
Void constructor.
virtual bool contains(const GSkyDir &dir, const double &margin=0.0) const
Checks where model contains specified sky direction.
virtual void write(GXmlElement &xml) const
Write model into XML element.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print composite spatial model information.
virtual GModelSpatialComposite & operator=(const GModelSpatialComposite &model)
Assignment operator.
virtual double mc_norm(const GSkyDir &dir, const double &radius) const
Return normalization of composite source for Monte Carlo simulations.
Abstract spatial model base class.
std::string type(void) const
Return model type.
const GSkyRegion * region(void) const
Return boundary sky region.
Class that handles photons.
Random number generator class.
Abstract interface for the sky region class.