27 #ifndef GMODELSPATIAL_HPP
28 #define GMODELSPATIAL_HPP
91 virtual void clear(
void) = 0;
93 virtual std::string
classname(
void)
const = 0;
96 const bool& gradients =
false)
const = 0;
100 const double& radius)
const = 0;
102 const double& margin = 0.0)
const = 0;
113 std::string
type(
void)
const;
114 void type(
const std::string& type);
117 bool has_par(
const std::string& name)
const;
119 int size(
void)
const;
136 const GTime& srcTime,
137 const double distance,
138 const double cosdist,
139 const double sindist,
141 const double cosmodrad) :
151 double eval(
const double& rho);
171 const GTime& srcTime) :
177 double eval(
const double& omega);
262 return (
int)
m_pars.size();
double m_modrad
Model radius (rad)
virtual void read(const GXmlElement &xml)=0
virtual GSkyDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const =0
double m_dist
Distance model-region (rad)
Energy value class definition.
virtual double eval(const GPhoton &photon, const bool &gradients=false) const =0
Random number generator class definition.
XML element node class interface definition.
int size(void) const
Return number of parameters.
GModelSpatial(void)
Void constructor.
bool has_free_pars(void) const
Checks if the spatial model has free parameters.
Sky direction class interface definition.
virtual ~GModelSpatial(void)
Destructor.
Definition of interface for all GammaLib classes.
double eval(const double &omega)
Kernel for circular sky region azimuth angle integration.
virtual GModelSpatial & operator=(const GModelSpatial &model)
Assignment operator.
Random number generator class.
virtual GModelPar & operator[](const int &index)
Returns model parameter.
Interface for the circular sky region class.
virtual GClassCode code(void) const =0
GSkyRegionCircle m_region
Bounding circle.
void copy_members(const GModelSpatial &model)
Copy class members.
double m_sindist
Sin of distance model-region.
Model parameter class interface definition.
circle_int_kern_rho(const GModelSpatial *model, const GSkyRegionCircle *reg, const GEnergy &srcEng, const GTime &srcTime, const double distance, const double cosdist, const double sindist, const double modrad, const double cosmodrad)
Class that handles photons.
GTime m_srcTime
Photon time.
Abstract interface for the sky region class.
double eval(const double &rho)
Kernel for circular sky region radial integration.
Single parameter function abstract base class definition.
const GModelSpatial * m_model
Spatial model.
GTime m_srcTime
Photon time.
std::vector< GModelPar * > m_pars
Parameter pointers.
Interface class for all GammaLib classes.
virtual std::string print(const GChatter &chatter=NORMAL) const =0
Print content of object.
const GModelSpatial * m_model
Spatial model.
double m_cosmodrad
Cos of model radius.
double m_rho
Offset from center of the region.
const GSkyRegionCircle * m_reg
Integration region.
std::string type(void) const
Return model type.
virtual bool contains(const GSkyDir &dir, const double &margin=0.0) const =0
const GSkyRegion * region(void) const
Return boundary sky region.
void free_members(void)
Delete class members.
GEnergy m_srcEng
Photon energy.
std::string m_type
Spatial model type.
GModelPar & at(const int &index)
Returns model parameter.
bool has_par(const std::string &name) const
Checks if parameter name exists.
Single parameter function abstract base class.
virtual std::string classname(void) const =0
Return class name.
virtual double mc_norm(const GSkyDir &dir, const double &radius) const =0
virtual double flux(const GSkyRegion ®ion, const GEnergy &srcEng=GEnergy(), const GTime &srcTime=GTime()) const
Returns model flux integrated in circular sky region.
circle_int_kern_omega(const GModelSpatial *model, const GSkyRegionCircle *reg, const double &rho, const GEnergy &srcEng, const GTime &srcTime)
Abstract spatial model base class.
virtual void write(GXmlElement &xml) const =0
virtual void clear(void)=0
Clear object.
virtual void set_region(void) const =0
void init_members(void)
Initialise class members.
const GSkyRegionCircle * m_reg
Integration region.
GEnergy m_srcEng
Photon energy.
Integration class interface definition.
virtual GModelSpatial * clone(void) const =0
Clones object.
Time class interface definition.
Circular sky region class interface definition.
void autoscale(void)
Autoscale parameters.
double m_cosdist
Cos of distance model-region.
Class that handles energies in a unit independent way.