28 #ifndef GMODELSPATIALELLIPTICALGENERALGAUSS_HPP
29 #define GMODELSPATIALELLIPTICALGENERALGAUSS_HPP
65 const std::string&
coordsys =
"CEL");
74 virtual void clear(
void);
76 virtual std::string
classname(
void)
const;
77 virtual double eval(
const double& theta,
78 const double& posangle,
81 const bool& gradients =
false)
const;
86 const double& margin = 0.0)
const;
93 double ridx(
void)
const;
94 void ridx(
const double& ridx);
137 return (
"GModelSpatialEllipticalGeneralGauss");
Abstract elliptical spatial model base class.
virtual void clear(void)
Clear generalised elliptical Gaussian model.
double m_major2
square of major axis
virtual void read(const GXmlElement &xml)
Read model from XML element.
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_major_rad
Major axis in radians.
virtual GSkyDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const
Returns MC sky direction.
double m_term1
Help term 1.
const GSkyDir & dir(void) const
Return position of elliptical spatial model.
double m_inv_ridx
Spatial profile index.
Random number generator class.
double m_norm
Normalization.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print information.
double m_term3
Help term 3.
GModelSpatialEllipticalGeneralGauss(void)
Void constructor.
double m_last_posangle
Last position angle.
virtual void set_region(void) const
Set boundary sky region.
double m_last_major
Last semi-major axis.
double m_term2
Help term 2.
Model parameter class interface definition.
Class that handles photons.
Abstract interface for the sky region class.
virtual std::string classname(void) const
Return class name.
GModelPar m_ridx
Reciprocal of exponent of the radial profile.
void init_members(void)
Initialise class members.
double m_minor2
square of minor axis
virtual double theta_max(void) const
Return maximum model radius (in radians)
virtual ~GModelSpatialEllipticalGeneralGauss(void)
Destructor.
virtual GModelSpatialEllipticalGeneralGauss & operator=(const GModelSpatialEllipticalGeneralGauss &model)
Assignment operator.
std::string coordsys(void) const
Return coordinate system.
double m_minor_rad
Minor axis in radians.
Abstract elliptical spatial model base class interface definition.
double m_last_ridx
Last reciprocal radial index.
void update(void) const
Update precomputation cache.
void copy_members(const GModelSpatialEllipticalGeneralGauss &model)
Copy class members.
double ridx(void) const
Return reciprocal of the elliptical profile index.
double posangle(void) const
Return Position Angle of model.
double value(void) const
Return parameter value.
double m_sin2pos
sine of twice the position angle
double m_cospos2
squared cosine of position angle
double m_last_minor
Last semi-minor axis.
virtual bool contains(const GSkyDir &dir, const double &margin=0.0) const
Checks whether model contains specified sky direction.
void free_members(void)
Delete class members.
double m_sinpos2
squared sine of position angle
virtual GModelSpatialEllipticalGeneralGauss * clone(void) const
Clone generalised elliptical Gaussian model.
virtual void write(GXmlElement &xml) const
Write model into XML element.
Class that handles energies in a unit independent way.