27#ifndef GMODELSPATIALELLIPTICALGAUSS_HPP
28#define GMODELSPATIALELLIPTICALGAUSS_HPP
64 const std::string&
coordsys =
"CEL");
73 virtual void clear(
void);
75 virtual std::string
classname(
void)
const;
76 virtual double eval(
const double& theta,
80 const bool& gradients =
false)
const;
85 const double& margin = 0.0)
const;
129 return (
"GModelSpatialEllipticalGauss");
Model parameter class interface definition.
Abstract elliptical spatial model base class interface definition.
Class that handles energies in a unit independent way.
virtual std::string classname(void) const
Return class name.
virtual void set_region(void) const
Set boundary sky region.
double m_minor_rad
Minor axis in radians.
virtual GModelSpatialEllipticalGauss * clone(void) const
Clone elliptical Gaussian model.
virtual double eval(const double &theta, const double &posangle, const GEnergy &energy, const GTime &time, const bool &gradients=false) const
Evaluate function (in units of sr^-1)
double m_last_posangle
Last position angle.
virtual void read(const GXmlElement &xml)
Read model from XML element.
double m_major_rad
Major axis in radians.
void copy_members(const GModelSpatialEllipticalGauss &model)
Copy class members.
double m_term3
Help term 3.
void free_members(void)
Delete class members.
double m_term1
Help term 1.
void init_members(void)
Initialise class members.
virtual GModelSpatialEllipticalGauss & operator=(const GModelSpatialEllipticalGauss &model)
Assignment operator.
virtual void write(GXmlElement &xml) const
Write model into XML element.
double m_term2
Help term 2.
virtual ~GModelSpatialEllipticalGauss(void)
Destructor.
double m_last_minor
Last semi-minor axis.
virtual void clear(void)
Clear elliptical Gaussian model.
double m_minor2
square of minor axis
double m_last_major
Last semi-major axis.
void update(void) const
Update precomputation cache.
virtual bool contains(const GSkyDir &dir, const double &margin=0.0) const
Checks whether model contains specified sky direction.
double m_major2
square of major axis
double m_norm
Normalization.
virtual double theta_max(void) const
Return maximum model radius (in radians)
virtual GSkyDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const
Returns MC sky direction.
GModelSpatialEllipticalGauss(void)
Void constructor.
double m_sin2pos
sine of twice the position angle
double m_cospos2
squared cosine of position angle
virtual std::string print(const GChatter &chatter=NORMAL) const
Print information.
double m_sinpos2
squared sine of position angle
Abstract elliptical spatial model base class.
double posangle(void) const
Return Position Angle of model.
const GSkyDir & dir(void) const
Return position of elliptical spatial model.
std::string coordsys(void) const
Return coordinate system.
std::string type(void) const
Return model type.
Class that handles photons.
Random number generator class.
Abstract interface for the sky region class.