27#ifndef GMODELSPATIALDIFFUSEMAP_HPP
28#define GMODELSPATIALDIFFUSEMAP_HPP
58 const double&
value = 1.0,
61 const double&
value = 1.0,
70 virtual void clear(
void);
72 virtual std::string
classname(
void)
const;
74 const bool& gradients =
false)
const;
79 const double& radius)
const;
81 const double& margin = 0.0)
const;
92 double value(
void)
const;
133 return (
"GModelSpatialDiffuseMap");
Filename class interface definition.
Model parameter class interface definition.
Abstract diffuse spatial model base class interface definition.
Sky direction class interface definition.
Sky map class definition.
Circular sky region class interface definition.
XML element node class interface definition.
Class that handles energies in a unit independent way.
virtual void clear(void)
Clear spatial map model.
void load(const GFilename &filename)
Load skymap into the model class.
void init_members(void)
Initialise class members.
virtual double mc_norm(const GSkyDir &dir, const double &radius) const
Return normalization of diffuse map for Monte Carlo simulations.
virtual GModelSpatialDiffuseMap * clone(void) const
Clone spatial map model.
bool m_normalize
Normalize map (default: true)
virtual ~GModelSpatialDiffuseMap(void)
Destructor.
virtual double eval(const GPhoton &photon, const bool &gradients=false) const
Return intensity of sky map.
void prepare_map(void)
Prepare sky map after loading.
double m_mc_max
Map maximum for MC.
const GFilename & filename(void) const
Get file name.
virtual std::string classname(void) const
Return class name.
virtual bool contains(const GSkyDir &dir, const double &margin=0.0) const
Signals whether model contains sky direction.
bool normalize(void) const
Return normalization flag.
virtual double flux(const GSkyRegion ®ion, const GEnergy &srcEng=GEnergy(), const GTime &srcTime=GTime()) const
Returns diffuse map flux integrated in sky region.
bool m_has_normalize
XML has normalize attribute.
virtual GSkyDir mc(const GEnergy &energy, const GTime &time, GRan &ran) const
Returns MC sky direction.
virtual void read(const GXmlElement &xml)
Read model from XML element.
const GSkyMap & map(void) const
Get map.
const GSkyRegionCircle & mc_cone(void) const
Get Monte Carlo simulation cone.
double m_mc_norm
Map normalization.
virtual void set_region(void) const
Set boundary sky region.
double value(void) const
Get model value.
GFilename m_filename
Name of skymap.
virtual void write(GXmlElement &xml) const
Write model into XML element.
GModelSpatialDiffuseMap(void)
Void constructor.
GSkyRegionCircle m_mc_cone
MC cone.
void copy_members(const GModelSpatialDiffuseMap &model)
Copy class members.
virtual GModelSpatialDiffuseMap & operator=(const GModelSpatialDiffuseMap &model)
Assignment operator.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print map information.
double m_mc_one_minus_cosrad
1-cosine of radius
void free_members(void)
Delete class members.
Abstract diffuse spatial model base class.
std::string type(void) const
Return model type.
const GSkyRegion * region(void) const
Return boundary sky region.
double value(void) const
Return parameter value.
Class that handles photons.
Random number generator class.
Interface for the circular sky region class.
Abstract interface for the sky region class.