GammaLib 2.0.0
Loading...
Searching...
No Matches
GCTAModelRadial Class Referenceabstract

Abstract radial acceptance model class. More...

#include <GCTAModelRadial.hpp>

Inheritance diagram for GCTAModelRadial:
GCTAModelSpatial GBase GCTAModelRadialGauss GCTAModelRadialPolynom GCTAModelRadialProfile

Public Member Functions

 GCTAModelRadial (void)
 Void constructor.
 
 GCTAModelRadial (const GCTAModelRadial &model)
 Copy constructor.
 
virtual ~GCTAModelRadial (void)
 Destructor.
 
virtual GCTAModelRadialoperator= (const GCTAModelRadial &model)
 Assignment operator.
 
virtual double eval (const GCTAInstDir &dir, const GEnergy &energy, const GTime &time, const bool &gradients=false) const
 Evaluate function.
 
virtual GCTAInstDir mc (const GEnergy &energy, const GTime &time, const GCTAObservation &obs, GRan &ran) const
 Returns MC instrument direction.
 
virtual void clear (void)=0
 Clear object.
 
virtual GCTAModelRadialclone (void) const =0
 Clones object.
 
virtual std::string classname (void) const =0
 Return class name.
 
virtual std::string type (void) const =0
 
virtual double omega (void) const =0
 
virtual double mc_max_value (const GCTAObservation &obs) 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.
 
virtual double eval (const double &offset, const bool &gradients=false) const =0
 
virtual GCTAInstDir mc (GRan &ran) const =0
 
- Public Member Functions inherited from GCTAModelSpatial
 GCTAModelSpatial (void)
 Void constructor.
 
 GCTAModelSpatial (const GCTAModelSpatial &model)
 Copy constructor.
 
virtual ~GCTAModelSpatial (void)
 Destructor.
 
virtual GCTAModelSpatialoperator= (const GCTAModelSpatial &model)
 Assignment operator.
 
virtual GModelParoperator[] (const int &index)
 Returns model parameter.
 
virtual const GModelParoperator[] (const int &index) const
 Returns model parameter (const version)
 
virtual GModelParoperator[] (const std::string &name)
 Returns reference to model parameter.
 
virtual const GModelParoperator[] (const std::string &name) const
 Returns reference to model parameter (const version)
 
int size (void) const
 Return number of model parameters.
 
virtual double npred (const GEnergy &energy, const GTime &time, const GObservation &obs) const
 Return integral of spatial model component.
 
- Public Member Functions inherited from GBase
virtual ~GBase (void)
 Destructor.
 

Protected Member Functions

void init_members (void)
 Initialise class members.
 
void copy_members (const GCTAModelRadial &model)
 Copy class members.
 
void free_members (void)
 Delete class members.
 
- Protected Member Functions inherited from GCTAModelSpatial
void init_members (void)
 Initialise class members.
 
void copy_members (const GCTAModelSpatial &model)
 Copy class members.
 
void free_members (void)
 Delete class members.
 

Additional Inherited Members

- Protected Attributes inherited from GCTAModelSpatial
std::vector< GModelPar * > m_pars
 Parameter pointers.
 

Detailed Description

Abstract radial acceptance model class.

This class implements the radial component of the CTA radial acceptance model.

Definition at line 50 of file GCTAModelRadial.hpp.

Constructor & Destructor Documentation

◆ GCTAModelRadial() [1/2]

GCTAModelRadial::GCTAModelRadial ( void )

Void constructor.

Definition at line 55 of file GCTAModelRadial.cpp.

References init_members().

◆ GCTAModelRadial() [2/2]

GCTAModelRadial::GCTAModelRadial ( const GCTAModelRadial & model)

Copy constructor.

Parameters
[in]modelRadial background model.

Definition at line 70 of file GCTAModelRadial.cpp.

References copy_members(), and init_members().

◆ ~GCTAModelRadial()

GCTAModelRadial::~GCTAModelRadial ( void )
virtual

Destructor.

Definition at line 86 of file GCTAModelRadial.cpp.

References free_members().

Member Function Documentation

◆ classname()

virtual std::string GCTAModelRadial::classname ( void ) const
pure virtual

Return class name.

Returns
String containing the class name.

Returns the class name for non-abstract classes in a human readable way.

Implements GCTAModelSpatial.

Implemented in GCTAModelRadialGauss, GCTAModelRadialPolynom, and GCTAModelRadialProfile.

◆ clear()

virtual void GCTAModelRadial::clear ( void )
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 GCTAModelSpatial.

Implemented in GCTAModelRadialGauss, GCTAModelRadialPolynom, and GCTAModelRadialProfile.

◆ clone()

virtual GCTAModelRadial * GCTAModelRadial::clone ( void ) const
pure virtual

◆ copy_members()

void GCTAModelRadial::copy_members ( const GCTAModelRadial & model)
protected

Copy class members.

Parameters
[in]modelRadial acceptance model.

Definition at line 216 of file GCTAModelRadial.cpp.

Referenced by GCTAModelRadial(), and operator=().

◆ eval() [1/2]

virtual double GCTAModelRadial::eval ( const double & offset,
const bool & gradients = false ) const
pure virtual

◆ eval() [2/2]

double GCTAModelRadial::eval ( const GCTAInstDir & dir,
const GEnergy & energy,
const GTime & time,
const bool & gradients = false ) const
virtual

Evaluate function.

Parameters
[in]dirEvent direction.
[in]energyEvent energy (not used).
[in]timeEvent time (not used).
[in]gradientsCompute gradients?
Returns
Function value

Evaluate radial model for a given event direction. The energy and time of the event are not used.

Implements GCTAModelSpatial.

Definition at line 146 of file GCTAModelRadial.cpp.

References eval(), gammalib::rad2deg, and GCTAInstDir::theta().

Referenced by eval(), GCTAModelRadialAcceptance::eval(), and GCTAModelRadialAcceptance::roi_kern::eval().

◆ free_members()

void GCTAModelRadial::free_members ( void )
protected

◆ init_members()

void GCTAModelRadial::init_members ( void )
protected

◆ mc() [1/2]

GCTAInstDir GCTAModelRadial::mc ( const GEnergy & energy,
const GTime & time,
const GCTAObservation & obs,
GRan & ran ) const
virtual

Returns MC instrument direction.

Parameters
[in]energyEvent energy (not used).
[in]timeEvent time (not used).
[in]obsCTA observation.
[in,out]ranRandom number generator.
Returns
Instrument direction

Return random instrument direction. The method sets the sky direction and the instrument coordinates of the instrument direction.

The energy and time of the event are not used.

Reimplemented from GCTAModelSpatial.

Definition at line 176 of file GCTAModelRadial.cpp.

References GCTAInstDir::dir(), mc(), and GCTAObservation::pointing().

Referenced by mc(), and GCTAModelRadialAcceptance::mc().

◆ mc() [2/2]

virtual GCTAInstDir GCTAModelRadial::mc ( GRan & ran) const
pure virtual

◆ mc_max_value()

virtual double GCTAModelRadial::mc_max_value ( const GCTAObservation & obs) const
pure virtual

◆ omega()

virtual double GCTAModelRadial::omega ( void ) const
pure virtual

◆ operator=()

GCTAModelRadial & GCTAModelRadial::operator= ( const GCTAModelRadial & model)
virtual

Assignment operator.

Parameters
[in]modelRadial background model.

Definition at line 107 of file GCTAModelRadial.cpp.

References copy_members(), free_members(), and init_members().

Referenced by GCTAModelRadialGauss::operator=(), GCTAModelRadialPolynom::operator=(), and GCTAModelRadialProfile::operator=().

◆ print()

virtual std::string GCTAModelRadial::print ( const GChatter & chatter = NORMAL) const
pure virtual

Print content of object.

Parameters
[in]chatterChattiness (defaults to NORMAL).
Returns
String containing the content of the object.

Formats the content in a standard way and puts this content in a C++ string that is returned.

Implements GCTAModelSpatial.

Implemented in GCTAModelRadialGauss, GCTAModelRadialPolynom, and GCTAModelRadialProfile.

◆ read()

virtual void GCTAModelRadial::read ( const GXmlElement & xml)
pure virtual

◆ type()

virtual std::string GCTAModelRadial::type ( void ) const
pure virtual

◆ write()

virtual void GCTAModelRadial::write ( GXmlElement & xml) const
pure virtual

The documentation for this class was generated from the following files: