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