27#ifndef GMODELSPATIALRADIALSHELL_HPP
28#define GMODELSPATIALRADIALSHELL_HPP
73 const std::string&
coordsys =
"CEL");
82 virtual void clear(
void);
84 virtual std::string
classname(
void)
const;
85 virtual double eval(
const double& theta,
88 const bool& gradients =
false)
const;
93 const double& margin = 0.0)
const;
100 double radius(
void)
const;
101 double width(
void)
const;
111 static double f1(
double x);
112 static double f2(
double x);
138 return (
"GModelSpatialRadialShell");
Model parameter class interface definition.
Abstract radial spatial model base class interface definition.
Class that handles energies in a unit independent way.
double m_x_out
sin(m_theta_out)^2
double radius(void) const
Return shell radius.
void copy_members(const GModelSpatialRadialShell &model)
Copy class members.
virtual GModelSpatialRadialShell * clone(void) const
Clone radial shell model.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print information.
void free_members(void)
Delete class members.
double m_last_radius
Last shell radius (deg)
void update(void) const
Update precomputation cache.
virtual std::string classname(void) const
Return class name.
double m_last_width
Last shell width (deg)
virtual ~GModelSpatialRadialShell(void)
Destructor.
GModelPar m_width
Shell thickness (deg)
static double f1(double x)
Return function 1 value needed for precomputation.
double m_x_in
sin(m_theta_in)^2
void init_members(void)
Initialise class members.
virtual void set_region(void) const
Set boundary sky region.
GModelPar m_radius
Inner shell radius (deg)
virtual double eval(const double &theta, const GEnergy &energy, const GTime &time, const bool &gradients=false) const
Evaluate function (in units of sr^-1)
virtual void clear(void)
Clear radial shell model.
double m_norm
Shell normalization.
virtual GSkyDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const
Returns MC sky direction.
virtual double theta_max(void) const
Return maximum model radius (in radians)
double width(void) const
Return shell width.
double m_theta_in
Inner shell radius (rad)
virtual bool contains(const GSkyDir &dir, const double &margin=0.0) const
Checks where model contains specified sky direction.
virtual GModelSpatialRadialShell & operator=(const GModelSpatialRadialShell &model)
Assignment operator.
virtual void write(GXmlElement &xml) const
Write model into XML element.
GModelSpatialRadialShell(void)
Void constructor.
double m_theta_out
Outer shell radius (rad)
virtual void read(const GXmlElement &xml)
Read model from XML element.
static double f2(double x)
Return function 2 value needed for precomputation.
Abstract radial spatial model base class.
std::string coordsys(void) const
Return coordinate system.
const GSkyDir & dir(void) const
Return position of radial spatial model.
std::string type(void) const
Return model type.
double value(void) const
Return parameter value.
Class that handles photons.
Random number generator class.
Abstract interface for the sky region class.