GammaLib
2.0.0
|
Abstract diffuse spatial model base class. More...
#include <GModelSpatialDiffuse.hpp>
Public Member Functions | |
GModelSpatialDiffuse (void) | |
Void constructor. More... | |
GModelSpatialDiffuse (const GModelSpatialDiffuse &model) | |
Copy constructor. More... | |
virtual | ~GModelSpatialDiffuse (void) |
Destructor. More... | |
virtual GModelSpatialDiffuse & | operator= (const GModelSpatialDiffuse &model) |
Assignment operator. More... | |
virtual void | clear (void)=0 |
Clear object. More... | |
virtual GModelSpatialDiffuse * | clone (void) const =0 |
Clones object. More... | |
virtual std::string | classname (void) const =0 |
Return class name. More... | |
virtual double | eval (const GPhoton &photon, const bool &gradients=false) const =0 |
virtual GSkyDir | mc (const GEnergy &energy, const GTime &time, GRan &ran) const =0 |
virtual double | mc_norm (const GSkyDir &dir, const double &radius) const =0 |
virtual bool | contains (const GSkyDir &dir, const double &margin=0.0) const =0 |
virtual void | read (const GXmlElement &xml)=0 |
virtual void | write (GXmlElement &xml) const =0 |
virtual std::string | print (const GChatter &chatter=NORMAL) const =0 |
Print content of object. More... | |
virtual GClassCode | code (void) const |
Return class code. More... | |
Public Member Functions inherited from GModelSpatial | |
GModelSpatial (void) | |
Void constructor. More... | |
GModelSpatial (const GModelSpatial &model) | |
Copy constructor. More... | |
virtual | ~GModelSpatial (void) |
Destructor. More... | |
virtual GModelSpatial & | operator= (const GModelSpatial &model) |
Assignment operator. More... | |
virtual GModelPar & | operator[] (const int &index) |
Returns model parameter. More... | |
virtual const GModelPar & | operator[] (const int &index) const |
Returns model parameter (const version) More... | |
virtual GModelPar & | operator[] (const std::string &name) |
Returns model parameter. More... | |
virtual const GModelPar & | operator[] (const std::string &name) const |
Returns model parameter (const version) More... | |
virtual double | flux (const GSkyRegion ®ion, const GEnergy &srcEng=GEnergy(), const GTime &srcTime=GTime()) const |
Returns model flux integrated in circular sky region. More... | |
std::string | type (void) const |
Return model type. More... | |
void | type (const std::string &type) |
Set model type. More... | |
GModelPar & | at (const int &index) |
Returns model parameter. More... | |
const GModelPar & | at (const int &index) const |
Returns model parameter (const version) More... | |
bool | has_par (const std::string &name) const |
Checks if parameter name exists. More... | |
bool | has_free_pars (void) const |
Checks if the spatial model has free parameters. More... | |
int | size (void) const |
Return number of parameters. More... | |
void | autoscale (void) |
Autoscale parameters. More... | |
const GSkyRegion * | region (void) const |
Return boundary sky region. More... | |
Public Member Functions inherited from GBase | |
virtual | ~GBase (void) |
Destructor. More... | |
Protected Member Functions | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GModelSpatialDiffuse &model) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
virtual void | set_region (void) const =0 |
Protected Member Functions inherited from GModelSpatial | |
void | init_members (void) |
Initialise class members. More... | |
void | copy_members (const GModelSpatial &model) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
Additional Inherited Members | |
Protected Attributes inherited from GModelSpatial | |
std::string | m_type |
Spatial model type. More... | |
GSkyRegionCircle | m_region |
Bounding circle. More... | |
std::vector< GModelPar * > | m_pars |
Parameter pointers. More... | |
Abstract diffuse spatial model base class.
This class defines the interface for a diffuse model as spatial component of the factorized source model.
Definition at line 52 of file GModelSpatialDiffuse.hpp.
GModelSpatialDiffuse::GModelSpatialDiffuse | ( | void | ) |
Void constructor.
Definition at line 52 of file GModelSpatialDiffuse.cpp.
References init_members().
GModelSpatialDiffuse::GModelSpatialDiffuse | ( | const GModelSpatialDiffuse & | model | ) |
Copy constructor.
[in] | model | Diffuse spatial model. |
Definition at line 67 of file GModelSpatialDiffuse.cpp.
References copy_members(), and init_members().
|
virtual |
|
pure virtual |
Return class name.
Returns the class name for non-abstract classes in a human readable way.
Implements GModelSpatial.
Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.
|
pure virtual |
Clear object.
Sets the object to a clean initial state. After calling the method the object will be in the same state as it were if an empty instance of the object would have been created.
Implements GModelSpatial.
Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.
|
pure virtual |
Clones object.
Creates a deep copy of the object and returns a pointer to the object.
Implements GModelSpatial.
Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.
|
inlinevirtual |
Return class code.
Returns the code GModelSpatialDiffuse of the class.
Implements GModelSpatial.
Definition at line 99 of file GModelSpatialDiffuse.hpp.
References GMODEL_SPATIAL_DIFFUSE.
|
pure virtual |
Implements GModelSpatial.
Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.
Referenced by GCTAResponseCube::irf_diffuse().
|
protected |
Copy class members.
[in] | model | Diffuse spatial model. |
Definition at line 158 of file GModelSpatialDiffuse.cpp.
Referenced by GModelSpatialDiffuse(), and operator=().
|
pure virtual |
Implements GModelSpatial.
Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.
Referenced by GResponse::irf_diffuse().
|
protected |
Delete class members.
Definition at line 168 of file GModelSpatialDiffuse.cpp.
Referenced by GModelSpatialDiffuseConst::clear(), GModelSpatialDiffuseMap::clear(), GModelSpatialDiffuseCube::clear(), operator=(), and ~GModelSpatialDiffuse().
|
protected |
Initialise class members.
Definition at line 146 of file GModelSpatialDiffuse.cpp.
Referenced by GModelSpatialDiffuseConst::clear(), GModelSpatialDiffuseMap::clear(), GModelSpatialDiffuseCube::clear(), GModelSpatialDiffuse(), and operator=().
|
pure virtual |
Implements GModelSpatial.
Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.
|
pure virtual |
Implements GModelSpatial.
Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.
|
virtual |
Assignment operator.
[in] | model | Diffuse spatial model. |
Definition at line 106 of file GModelSpatialDiffuse.cpp.
References copy_members(), free_members(), init_members(), and GModelSpatial::operator=().
Referenced by GModelSpatialDiffuseConst::operator=(), GModelSpatialDiffuseMap::operator=(), and GModelSpatialDiffuseCube::operator=().
|
pure virtual |
Print content of object.
[in] | chatter | Chattiness (defaults to NORMAL). |
Formats the content in a standard way and puts this content in a C++ string that is returned.
Implements GModelSpatial.
Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.
|
pure virtual |
Implements GModelSpatial.
Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.
|
protectedpure virtual |
Implements GModelSpatial.
Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.
|
pure virtual |
Implements GModelSpatial.
Implemented in GModelSpatialDiffuseCube, GModelSpatialDiffuseMap, and GModelSpatialDiffuseConst.