GammaLib  2.1.0.dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GModelSpectralBins Class Reference

Spectral bins model class. More...

#include <GModelSpectralBins.hpp>

Inheritance diagram for GModelSpectralBins:
GModelSpectral GBase

Public Member Functions

 GModelSpectralBins (void)
 Void constructor. More...
 
 GModelSpectralBins (const GModelSpectral &model, const GEbounds &ebounds, const double &index=-2.0)
 Spectral model constructor. More...
 
 GModelSpectralBins (const GXmlElement &xml)
 XML constructor. More...
 
 GModelSpectralBins (const GModelSpectralBins &model)
 Copy constructor. More...
 
virtual ~GModelSpectralBins (void)
 Destructor. More...
 
virtual GModelSpectralBinsoperator= (const GModelSpectralBins &model)
 Assignment operator. More...
 
virtual void clear (void)
 Clear spectral bins model. More...
 
virtual GModelSpectralBinsclone (void) const
 Clone spectral bins model. More...
 
virtual std::string classname (void) const
 Return class name. More...
 
virtual std::string type (void) const
 Return model type. More...
 
virtual double eval (const GEnergy &srcEng, const GTime &srcTime=GTime(), const bool &gradients=false) const
 Evaluate function. More...
 
virtual double flux (const GEnergy &emin, const GEnergy &emax) const
 Returns model photon flux between emin, emax More...
 
virtual double eflux (const GEnergy &emin, const GEnergy &emax) const
 Returns model energy flux between emin, emax More...
 
virtual GEnergy mc (const GEnergy &emin, const GEnergy &emax, const GTime &time, GRan &ran) const
 Returns MC energy between [emin, emax]. More...
 
virtual void read (const GXmlElement &xml)
 Read model from XML element. More...
 
virtual void write (GXmlElement &xml) const
 Write model into XML element. More...
 
virtual std::string print (const GChatter &chatter=NORMAL) const
 Print bin function information. More...
 
int bins (void) const
 Return number of bins. More...
 
void append (const GEnergy &emin, const GEnergy &emax, const double &intensity)
 Append bin. More...
 
void insert (const int &index, const GEnergy &emin, const GEnergy &emax, const double &intensity)
 Insert bin. More...
 
void remove (const int &index)
 Remove bin. More...
 
void reserve (const int &num)
 Reserve space for bins. More...
 
void extend (const GModelSpectralBins &bins)
 Append bins from bin function. More...
 
double index (void) const
 Return spectral power law index. More...
 
void index (const double &index)
 Set spectral power law index. More...
 
GEnergy emin (const int &index) const
 Return lower energy limit of bin. More...
 
GEnergy emax (const int &index) const
 Return upper energy limit of bin. More...
 
void emin (const int &index, const GEnergy &emin)
 Set lower energy limit of bin. More...
 
void emax (const int &index, const GEnergy &emax)
 Set upper energy limit of bin. More...
 
double intensity (const int &index) const
 Return bin intensity. More...
 
void intensity (const int &index, const double &intensity)
 Set bin intensity. More...
 
double error (const int &index) const
 Return intensity error of bin. More...
 
- Public Member Functions inherited from GModelSpectral
 GModelSpectral (void)
 Void constructor. More...
 
 GModelSpectral (const GModelSpectral &model)
 Copy constructor. More...
 
virtual ~GModelSpectral (void)
 Destructor. More...
 
virtual GModelSpectraloperator= (const GModelSpectral &model)
 Assignment operator. More...
 
virtual GModelParoperator[] (const int &index)
 Returns model parameter. More...
 
virtual const GModelParoperator[] (const int &index) const
 Returns model parameter (const version) More...
 
virtual GModelParoperator[] (const std::string &name)
 Returns reference to model parameter. More...
 
virtual const GModelParoperator[] (const std::string &name) const
 Returns reference to model parameter (const version) More...
 
GModelParat (const int &index)
 Returns model parameter. More...
 
const GModelParat (const int &index) const
 Returns model parameter (const version) More...
 
bool has_par (const std::string &name) const
 Checks if parameter name exists. More...
 
int size (void) const
 Return number of parameters. More...
 
void autoscale (void)
 Autoscale parameters. 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 GModelSpectralBins &model)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
int bin_index (const GEnergy &energy) const
 Return bin index for energy. More...
 
void update_pars (void)
 Update parameter mapping. More...
 
void set_cache (void) const
 Set cache. More...
 
void mc_update (const GEnergy &emin, const GEnergy &emax) const
 Set MC pre-computation cache. More...
 
- Protected Member Functions inherited from GModelSpectral
void init_members (void)
 Initialise class members. More...
 
void copy_members (const GModelSpectral &model)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 

Protected Attributes

GModelPar m_index
 Spectral index of all bins. More...
 
std::vector< GModelParm_emin
 Lower energy limits. More...
 
std::vector< GModelParm_emax
 Upper energy limits. More...
 
std::vector< GModelParm_values
 Bin values. More...
 
std::vector< double > m_epivot
 Power-law pivot energies in MeV. More...
 
GEnergy m_mc_emin
 Minimum energy. More...
 
GEnergy m_mc_emax
 Maximum energy. More...
 
std::vector< double > m_mc_cum
 Cumulative distribution. More...
 
std::vector< double > m_mc_min
 Lower boundary for MC. More...
 
std::vector< double > m_mc_max
 Upper boundary for MC. More...
 
std::vector< double > m_mc_exp
 Exponent for MC. More...
 
- Protected Attributes inherited from GModelSpectral
std::vector< GModelPar * > m_pars
 Parameter pointers. More...
 

Detailed Description

Spectral bins model class.

This class implements spectral bins that have a constant intensity within their boundaries. A spectral bin is defined by a lower and upper energy limit, with the lower limit included and the upper limit excluded from an energy bin.

Definition at line 54 of file GModelSpectralBins.hpp.

Constructor & Destructor Documentation

GModelSpectralBins::GModelSpectralBins ( void  )

Void constructor.

Constructs an empty spectral bin model.

Definition at line 81 of file GModelSpectralBins.cpp.

References init_members().

Referenced by clone().

GModelSpectralBins::GModelSpectralBins ( const GModelSpectral model,
const GEbounds ebounds,
const double &  index = -2.0 
)

Spectral model constructor.

Parameters
[in]modelSpectral model.
[in]eboundsEnergy boundaries.
[in]indexSpectral index.

Constructs a spectral bins model from any spectral model using the energy boundaries that are specified by ebounds. Within each spectral bin the intensity follows a power law with spectral index index.

Definition at line 102 of file GModelSpectralBins.cpp.

References append(), GEbounds::elogmean(), GEbounds::emax(), GEbounds::emin(), GModelSpectral::eval(), index(), init_members(), and GEbounds::size().

GModelSpectralBins::GModelSpectralBins ( const GXmlElement xml)
explicit

XML constructor.

Parameters
[in]xmlXML element.

Construct spectral bins model by extracting information from an XML element. See the read() method for more information about the expected structure of the XML element.

Definition at line 132 of file GModelSpectralBins.cpp.

References init_members(), and read().

GModelSpectralBins::GModelSpectralBins ( const GModelSpectralBins model)

Copy constructor.

Parameters
[in]modelSpectral bins model.

Definition at line 151 of file GModelSpectralBins.cpp.

References copy_members(), and init_members().

GModelSpectralBins::~GModelSpectralBins ( void  )
virtual

Destructor.

Definition at line 168 of file GModelSpectralBins.cpp.

References free_members().

Member Function Documentation

void GModelSpectralBins::append ( const GEnergy emin,
const GEnergy emax,
const double &  intensity 
)

Append bin.

Parameters
[in]eminLower energy limit.
[in]emaxUpper energy limit.
[in]intensityBin intensity.
Exceptions
GException::invalid_argumentLower energy limit is larger than upper energy limit.

Appends one bin to the bin function. By default the lower and upper energy limit of the bin is fixed while the intensity of the bin is free.

Definition at line 753 of file GModelSpectralBins.cpp.

References GOptimizerPar::fix(), GOptimizerPar::free(), G_APPEND, GOptimizerPar::has_grad(), m_emax, m_emin, m_values, GEnergy::MeV(), GOptimizerPar::name(), GEnergy::print(), set_cache(), GOptimizerPar::unit(), update_pars(), and GOptimizerPar::value().

Referenced by GModelSpectralBins().

int GModelSpectralBins::bin_index ( const GEnergy energy) const
protected

Return bin index for energy.

Parameters
[in]energyEnergy.
Returns
Bin index (-1 if energy bin was not found).

Definition at line 1337 of file GModelSpectralBins.cpp.

References bins(), m_emax, m_emin, and GEnergy::MeV().

Referenced by eval().

int GModelSpectralBins::bins ( void  ) const
inline

Return number of bins.

Returns
Number of bins.

Returns the number of bins in the bin function model.

Definition at line 174 of file GModelSpectralBins.hpp.

References m_values.

Referenced by bin_index(), eflux(), emax(), emin(), error(), extend(), flux(), insert(), intensity(), mc_update(), print(), read(), remove(), set_cache(), update_pars(), and write().

std::string GModelSpectralBins::classname ( void  ) const
inlinevirtual

Return class name.

Returns
String containing the class name ("GModelSpectralBins").

Implements GModelSpectral.

Definition at line 146 of file GModelSpectralBins.hpp.

void GModelSpectralBins::clear ( void  )
virtual

Clear spectral bins model.

Implements GModelSpectral.

Definition at line 223 of file GModelSpectralBins.cpp.

References GModelSpectral::free_members(), free_members(), GModelSpectral::init_members(), and init_members().

GModelSpectralBins * GModelSpectralBins::clone ( void  ) const
virtual

Clone spectral bins model.

Implements GModelSpectral.

Definition at line 241 of file GModelSpectralBins.cpp.

References GModelSpectralBins().

void GModelSpectralBins::copy_members ( const GModelSpectralBins model)
protected

Copy class members.

Parameters
[in]modelSpectral bin function.

Definition at line 1294 of file GModelSpectralBins.cpp.

References m_emax, m_emin, m_epivot, m_index, m_mc_cum, m_mc_emax, m_mc_emin, m_mc_exp, m_mc_max, m_mc_min, m_values, and update_pars().

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

double GModelSpectralBins::eflux ( const GEnergy emin,
const GEnergy emax 
) const
virtual

Returns model energy flux between emin, emax

Parameters
[in]eminMinimum photon energy.
[in]emaxMaximum photon energy.
Returns
Energy flux (erg/cm2/s).

Computes

\[ \int_{\tt emin}^{\tt emax} S_{\rm E}(E | t) E \, dE \]

where

  • [emin, emax] is an energy interval, and
  • \(S_{\rm E}(E | t)\) is the spectral model (ph/cm2/s/MeV).

Implements GModelSpectral.

Definition at line 415 of file GModelSpectralBins.cpp.

References bins(), m_emax, m_emin, m_epivot, m_index, m_values, GEnergy::MeV(), gammalib::MeV2erg, gammalib::plaw_energy_flux(), and GOptimizerPar::value().

GEnergy GModelSpectralBins::emax ( const int &  index) const

Return upper energy limit of bin.

Parameters
[in]indexBin index [0,...,bins()-1].
Returns
Upper energy limit of bin index.
Exceptions
GException::out_of_rangeIndex is out of range.

Returns the upper energy limit of bin index.

Definition at line 1053 of file GModelSpectralBins.cpp.

References bins(), G_EMAX_GET, m_emax, and GEnergy::MeV().

Referenced by mc_update(), read(), and write().

void GModelSpectralBins::emax ( const int &  index,
const GEnergy emax 
)

Set upper energy limit of bin.

Parameters
[in]indexBin index [0,...,bins()-1].
[in]emaxUpper energy limit of bin index.
Exceptions
GException::out_of_rangeIndex is out of range.

Sets the upper energy limit of bin index.

Definition at line 1113 of file GModelSpectralBins.cpp.

References bins(), G_EMAX_SET, index(), m_emax, GEnergy::MeV(), and set_cache().

GEnergy GModelSpectralBins::emin ( const int &  index) const

Return lower energy limit of bin.

Parameters
[in]indexBin index [0,...,bins()-1].
Returns
Lower energy limit of bin index.
Exceptions
GException::out_of_rangeIndex is out of range.

Returns the lower energy limit of bin index.

Definition at line 1024 of file GModelSpectralBins.cpp.

References bins(), G_EMIN_GET, m_emin, and GEnergy::MeV().

Referenced by mc_update(), read(), and write().

void GModelSpectralBins::emin ( const int &  index,
const GEnergy emin 
)

Set lower energy limit of bin.

Parameters
[in]indexBin index [0,...,bins()-1].
[in]eminLower energy limit of bin index.
Exceptions
GException::out_of_rangeIndex is out of range.

Sets the lower energy limit of bin index.

Definition at line 1082 of file GModelSpectralBins.cpp.

References bins(), G_EMIN_SET, index(), m_emin, GEnergy::MeV(), and set_cache().

double GModelSpectralBins::error ( const int &  index) const

Return intensity error of bin.

Parameters
[in]indexBin index [0,...,bins()-1].
Returns
Intensity error of bin index.
Exceptions
GException::out_of_rangeIndex is out of range.

Returns the intensity error of bin index.

Definition at line 1169 of file GModelSpectralBins.cpp.

References bins(), G_ERROR_GET, and m_values.

double GModelSpectralBins::eval ( const GEnergy srcEng,
const GTime srcTime = GTime(),
const bool &  gradients = false 
) const
virtual

Evaluate function.

Parameters
[in]srcEngTrue photon energy.
[in]srcTimeTrue photon arrival time.
[in]gradientsCompute gradients?
Returns
Model value (ph/cm2/s/MeV).
Todo:
Document method.

Implements GModelSpectral.

Definition at line 258 of file GModelSpectralBins.cpp.

References bin_index(), GOptimizerPar::factor_gradient(), index(), GOptimizerPar::is_free(), gammalib::is_infinite(), gammalib::is_notanumber(), log(), m_epivot, m_index, m_values, GEnergy::MeV(), pow(), GOptimizerPar::scale(), and GOptimizerPar::value().

void GModelSpectralBins::extend ( const GModelSpectralBins bins)

Append bins from bin function.

Parameters
[in]binsBin function.

Appends all bins from a bin function to current object.

Definition at line 949 of file GModelSpectralBins.cpp.

References bins(), m_emax, m_emin, m_values, reserve(), set_cache(), and update_pars().

double GModelSpectralBins::flux ( const GEnergy emin,
const GEnergy emax 
) const
virtual

Returns model photon flux between emin, emax

Parameters
[in]eminMinimum photon energy.
[in]emaxMaximum photon energy.
Returns
Photon flux (ph/cm2/s).

Computes

\[ \int_{\tt emin}^{\tt emax} S_{\rm E}(E | t) dE \]

where

  • [emin, emax] is an energy interval, and
  • \(S_{\rm E}(E | t)\) is the spectral model (ph/cm2/s/MeV).

Implements GModelSpectral.

Definition at line 342 of file GModelSpectralBins.cpp.

References bins(), m_emax, m_emin, m_epivot, m_index, m_values, GEnergy::MeV(), gammalib::plaw_photon_flux(), and GOptimizerPar::value().

Referenced by mc_update().

void GModelSpectralBins::free_members ( void  )
protected

Delete class members.

Definition at line 1324 of file GModelSpectralBins.cpp.

Referenced by clear(), operator=(), and ~GModelSpectralBins().

double GModelSpectralBins::index ( void  ) const

Return spectral power law index.

Returns
Spectrel power law index.

Returns the spectral power law index.

Definition at line 989 of file GModelSpectralBins.cpp.

References m_index, and GOptimizerPar::value().

Referenced by emax(), emin(), eval(), GModelSpectralBins(), insert(), intensity(), mc_update(), read(), remove(), and write().

void GModelSpectralBins::index ( const double &  index)

Set spectral power law index.

Parameters
[in]indexSpectrel power law index.

Set spectral power law index.

Definition at line 1003 of file GModelSpectralBins.cpp.

References m_index, and GOptimizerPar::value().

void GModelSpectralBins::insert ( const int &  index,
const GEnergy emin,
const GEnergy emax,
const double &  intensity 
)

Insert bin.

Parameters
[in]indexBin index [0,...,bins()-1].
[in]eminLower energy limit.
[in]emaxUpper energy limit.
[in]intensityBin intensity.
Exceptions
GException::out_of_rangeBin index is out of range.
GException::invalid_argumentLower energy limit is larger than upper energy limit.

Inserts a bin into the bin function before the bin with the specified index. By default the lower and upper energy limit of the bin is fixed while the intensity of the bin is free.

Definition at line 825 of file GModelSpectralBins.cpp.

References bins(), GOptimizerPar::fix(), GOptimizerPar::free(), G_INSERT, GOptimizerPar::has_grad(), index(), m_emax, m_emin, m_values, GEnergy::MeV(), GOptimizerPar::name(), GEnergy::print(), set_cache(), GOptimizerPar::unit(), update_pars(), and GOptimizerPar::value().

double GModelSpectralBins::intensity ( const int &  index) const

Return bin intensity.

Parameters
[in]indexBin index [0,...,bins()-1].
Returns
Intensity of bin index.
Exceptions
GException::out_of_rangeIndex is out of range.

Returns the intensity of bin index.

Definition at line 1144 of file GModelSpectralBins.cpp.

References bins(), G_INTENSITY_GET, and m_values.

Referenced by read(), and write().

void GModelSpectralBins::intensity ( const int &  index,
const double &  intensity 
)

Set bin intensity.

Parameters
[in]indexBin index [0,...,bins()-1].
[in]intensityIntensity of bin index.
Exceptions
GException::out_of_rangeIndex is out of range.

Set the intensity of bin index.

Definition at line 1194 of file GModelSpectralBins.cpp.

References bins(), G_INTENSITY_SET, index(), and m_values.

GEnergy GModelSpectralBins::mc ( const GEnergy emin,
const GEnergy emax,
const GTime time,
GRan ran 
) const
virtual

Returns MC energy between [emin, emax].

Parameters
[in]eminMinimum photon energy.
[in]emaxMaximum photon energy.
[in]timeTrue photon arrival time.
[in,out]ranRandom number generator.
Returns
Energy.
Exceptions
GException::invalid_return_valueNo valid Monte Carlo cache

Returns Monte Carlo energy by randomly drawing from bin function.

Implements GModelSpectral.

Definition at line 489 of file GModelSpectralBins.cpp.

References gammalib::check_energy_interval(), exp(), G_MC, log(), m_mc_cum, m_mc_exp, m_mc_max, m_mc_min, mc_update(), GEnergy::MeV(), GEnergy::print(), and GRan::uniform().

void GModelSpectralBins::mc_update ( const GEnergy emin,
const GEnergy emax 
) const
protected

Set MC pre-computation cache.

Parameters
[in]eminMinimum energy.
[in]emaxMaximum energy.

This method sets up an array of indices and the cumulative distribution function needed for MC simulations.

Definition at line 1440 of file GModelSpectralBins.cpp.

References abs(), bins(), emax(), emin(), flux(), index(), log(), m_emax, m_emin, m_epivot, m_index, m_mc_cum, m_mc_emax, m_mc_emin, m_mc_exp, m_mc_max, m_mc_min, m_values, GEnergy::MeV(), norm(), gammalib::plaw_photon_flux(), pow(), and GOptimizerPar::value().

Referenced by mc().

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

Assignment operator.

Parameters
[in]modelSpectral bins model.
Returns
Spectral bins model.

Definition at line 190 of file GModelSpectralBins.cpp.

References copy_members(), free_members(), init_members(), and GModelSpectral::operator=().

std::string GModelSpectralBins::print ( const GChatter chatter = NORMAL) const
virtual

Print bin function information.

Parameters
[in]chatterChattiness.
Returns
String containing bin function information.

Implements GModelSpectral.

Definition at line 1217 of file GModelSpectralBins.cpp.

References bins(), GModelSpectral::m_pars, gammalib::parformat(), SILENT, GModelSpectral::size(), and gammalib::str().

void GModelSpectralBins::read ( const GXmlElement xml)
virtual

Read model from XML element.

Parameters
[in]xmlXML element.
Exceptions
GException::invalid_valueLower energy limit larger than upper energy limit.

Reads the spectral information from an XML element. The format of the XML elements is

<spectrum type="BinFunction">
  <parameter name="Index"    ../>
  <bin>
    <parameter name="LowerLimit" ../>
    <parameter name="UpperLimit" ../>
    <parameter name="Intensity"  ../>
  </bin>
  ...
  <bin>
    <parameter name="LowerLimit" ../>
    <parameter name="UpperLimit" ../>
    <parameter name="Intensity"  ../>
  </bin>
</spectrum>
Todo:

Check that bins are ordered

Check that energy boundaries are not overlapping

Implements GModelSpectral.

Definition at line 575 of file GModelSpectralBins.cpp.

References bins(), GXmlNode::element(), GXmlNode::elements(), emax(), emin(), G_READ, index(), intensity(), m_emax, m_emin, m_index, m_values, GOptimizerPar::name(), GModelPar::read(), set_cache(), gammalib::str(), update_pars(), GOptimizerPar::value(), and gammalib::xml_get_par().

Referenced by GModelSpectralBins().

void GModelSpectralBins::remove ( const int &  index)

Remove bin.

Parameters
[in]indexBin index [0,...,bins()-1].
Exceptions
GException::out_of_rangeBin index is out of range.

Removes bin of specified index from the bin function.

Definition at line 898 of file GModelSpectralBins.cpp.

References bins(), G_REMOVE, index(), m_emax, m_emin, m_values, set_cache(), and update_pars().

void GModelSpectralBins::reserve ( const int &  num)

Reserve space for bins.

Parameters
[in]numNumber of reserved bins.

Reserves space for num bins.

Definition at line 930 of file GModelSpectralBins.cpp.

References m_emax, m_emin, and m_values.

Referenced by extend().

void GModelSpectralBins::set_cache ( void  ) const
protected

Set cache.

Sets the computation cache. The method computes for the time being the pivot energies for all bins in MeV.

Definition at line 1415 of file GModelSpectralBins.cpp.

References bins(), m_emax, m_emin, m_epivot, and sqrt().

Referenced by append(), emax(), emin(), extend(), insert(), read(), and remove().

std::string GModelSpectralBins::type ( void  ) const
inlinevirtual

Return model type.

Returns
"BinFunction".

Returns the type of the spectral bin function model.

Implements GModelSpectral.

Definition at line 160 of file GModelSpectralBins.hpp.

Referenced by write().

void GModelSpectralBins::update_pars ( void  )
protected

Update parameter mapping.

Sets the parameter pointers in the m_pars array, enabling iterating over all model parameters. This method needs to be called after changing the number of bins in the spectral model. The method needs not to be called after value update.

Definition at line 1366 of file GModelSpectralBins.cpp.

References bins(), m_emax, m_emin, m_index, GModelSpectral::m_pars, m_values, and gammalib::str().

Referenced by append(), copy_members(), extend(), init_members(), insert(), read(), and remove().

void GModelSpectralBins::write ( GXmlElement xml) const
virtual

Write model into XML element.

Parameters
[in]xmlXML element into which model information is written.
Exceptions
GException::invalid_valueExisting XML element is not of required type Invalid number of model parameters or bins found in XML element.

Writes the spectral information into an XML element. The format of the XML element is

<spectrum type="BinFunction">
  <parameter name="Index"    ../>
  <bin>
    <parameter name="LowerLimit" ../>
    <parameter name="UpperLimit" ../>
    <parameter name="Intensity"  ../>
  </bin>
  ...
  <bin>
    <parameter name="LowerLimit" ../>
    <parameter name="UpperLimit" ../>
    <parameter name="Intensity"  ../>
  </bin>
</spectrum>

Implements GModelSpectral.

Definition at line 667 of file GModelSpectralBins.cpp.

References GXmlNode::append(), bins(), GXmlNode::element(), GXmlNode::elements(), emax(), emin(), G_WRITE, index(), intensity(), m_emax, m_emin, m_index, m_values, GOptimizerPar::name(), gammalib::str(), type(), GModelPar::write(), gammalib::xml_check_type(), and gammalib::xml_need_par().

Member Data Documentation

std::vector<GModelPar> GModelSpectralBins::m_emax
protected
std::vector<GModelPar> GModelSpectralBins::m_emin
protected
std::vector<double> GModelSpectralBins::m_epivot
mutableprotected

Power-law pivot energies in MeV.

Definition at line 128 of file GModelSpectralBins.hpp.

Referenced by copy_members(), eflux(), eval(), flux(), init_members(), mc_update(), and set_cache().

GModelPar GModelSpectralBins::m_index
protected

Spectral index of all bins.

Definition at line 122 of file GModelSpectralBins.hpp.

Referenced by copy_members(), eflux(), eval(), flux(), index(), init_members(), mc_update(), read(), update_pars(), and write().

std::vector<double> GModelSpectralBins::m_mc_cum
mutableprotected

Cumulative distribution.

Definition at line 133 of file GModelSpectralBins.hpp.

Referenced by copy_members(), init_members(), mc(), and mc_update().

GEnergy GModelSpectralBins::m_mc_emax
mutableprotected

Maximum energy.

Definition at line 132 of file GModelSpectralBins.hpp.

Referenced by copy_members(), init_members(), and mc_update().

GEnergy GModelSpectralBins::m_mc_emin
mutableprotected

Minimum energy.

Definition at line 131 of file GModelSpectralBins.hpp.

Referenced by copy_members(), init_members(), and mc_update().

std::vector<double> GModelSpectralBins::m_mc_exp
mutableprotected

Exponent for MC.

Definition at line 136 of file GModelSpectralBins.hpp.

Referenced by copy_members(), init_members(), mc(), and mc_update().

std::vector<double> GModelSpectralBins::m_mc_max
mutableprotected

Upper boundary for MC.

Definition at line 135 of file GModelSpectralBins.hpp.

Referenced by copy_members(), init_members(), mc(), and mc_update().

std::vector<double> GModelSpectralBins::m_mc_min
mutableprotected

Lower boundary for MC.

Definition at line 134 of file GModelSpectralBins.hpp.

Referenced by copy_members(), init_members(), mc(), and mc_update().

std::vector<GModelPar> GModelSpectralBins::m_values
protected

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