GammaLib
2.1.0.dev
|
Smoothly broken power law spectral model class. More...
#include <GModelSpectralSmoothBrokenPlaw.hpp>
Classes | |
class | eflux_kern |
class | flux_kern |
Public Member Functions | |
GModelSpectralSmoothBrokenPlaw (void) | |
Void constructor. More... | |
GModelSpectralSmoothBrokenPlaw (const std::string &type, const std::string &prefactor, const std::string &index1, const std::string &pivot, const std::string &index2, const std::string &breakenergy, const std::string &beta) | |
Model type and parameter name constructor. More... | |
GModelSpectralSmoothBrokenPlaw (const double &prefactor, const double &index1, const GEnergy &pivot, const double &index2, const GEnergy &breakenergy, const double &beta) | |
Parameter constructor. More... | |
GModelSpectralSmoothBrokenPlaw (const GXmlElement &xml) | |
XML constructor. More... | |
GModelSpectralSmoothBrokenPlaw (const GModelSpectralSmoothBrokenPlaw &model) | |
Copy constructor. More... | |
virtual | ~GModelSpectralSmoothBrokenPlaw (void) |
Destructor. More... | |
virtual GModelSpectralSmoothBrokenPlaw & | operator= (const GModelSpectralSmoothBrokenPlaw &model) |
Assignment operator. More... | |
virtual void | clear (void) |
Clear smoothly broken power law model. More... | |
virtual GModelSpectralSmoothBrokenPlaw * | clone (void) const |
Clone smoothly broken power law 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 Monte Carlo 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 smooth broken powerlaw information. More... | |
void | type (const std::string &type) |
Set model type. More... | |
double | prefactor (void) const |
Return pre factor. More... | |
double | index1 (void) const |
Return smoothly broken power law index1. More... | |
double | index2 (void) const |
Return smoothly broken power law index2. More... | |
GEnergy | pivot (void) const |
Return pivot energy. More... | |
GEnergy | breakenergy (void) const |
Return breakenergy energy. More... | |
double | beta (void) const |
Returns break smoothness parameter beta. More... | |
void | prefactor (const double &prefactor) |
Set pre factor. More... | |
void | index1 (const double &index1) |
Set smoothly broken power law index1. More... | |
void | index2 (const double &index2) |
Set smoothly broken power law index2. More... | |
void | pivot (const GEnergy &pivot) |
Set pivot energy. More... | |
void | breakenergy (const GEnergy &breakenergy) |
Set breakenergy energy. More... | |
void | beta (const double &beta) |
Set break smoothness. 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 GModelSpectral & | operator= (const GModelSpectral &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 reference to model parameter. More... | |
virtual const GModelPar & | operator[] (const std::string &name) const |
Returns reference to model parameter (const version) 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... | |
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 GModelSpectralSmoothBrokenPlaw &model) |
Copy class members. More... | |
void | free_members (void) |
Delete class members. More... | |
void | update_eval_cache (const GEnergy &energy) const |
Update eval precomputation cache. More... | |
void | update_mc_cache (void) const |
Update Monte Carlo 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 | |
std::string | m_type |
Model type. More... | |
GModelPar | m_norm |
Normalization factor. More... | |
GModelPar | m_index1 |
Spectral index1. More... | |
GModelPar | m_index2 |
Spectral index2. More... | |
GModelPar | m_pivot |
Pivot energy. More... | |
GModelPar | m_breakenergy |
Energy of spectral break. More... | |
GModelPar | m_beta |
Break smoothness. More... | |
GEnergy | m_last_energy |
Last energy value. More... | |
double | m_last_index1 |
Last index1 parameter. More... | |
double | m_last_index2 |
Last index2 parameter. More... | |
double | m_last_pivot |
Last pivot parameter. More... | |
double | m_last_breakenergy |
Last breakenergy parameter. More... | |
double | m_last_beta |
Last beta parameter. More... | |
double | m_last_epivot_norm |
Last E/Epivot value. More... | |
double | m_last_ebreak_norm |
Last E/Ebreakenergy value. More... | |
double | m_last_log_epivot_norm |
Last ln(E/Epivot) value. More... | |
double | m_last_log_ebreak_norm |
Last ln(E/Ebreakenergy) value. More... | |
double | m_last_epivot_pow |
Last pow(E/Epivot,index1) value. More... | |
double | m_last_ebreak_pow |
Last pow(E/Ebreakenergy,(index1-index2)/beta) More... | |
double | m_mc_prefactor |
Last pre factor. More... | |
double | m_mc_index1 |
Last first index. More... | |
double | m_mc_index2 |
Last second index. More... | |
double | m_mc_pivot |
Last pivot energy. More... | |
double | m_mc_breakenergy |
Last break energy. More... | |
GModelSpectralBrokenPlaw | m_mc_brokenplaw |
Broken power plaw. More... | |
Protected Attributes inherited from GModelSpectral | |
std::vector< GModelPar * > | m_pars |
Parameter pointers. More... | |
Smoothly broken power law spectral model class.
This class implements a smoothly broken power law spectrum. The model is defined by
\[ S_{\rm E}(E | t) = k_0 \left( \frac{E}{E_0} \right)^{\gamma_1} \left[ 1 + \left( \frac{E}{E_b} \right)^{\frac{\gamma_1 - \gamma_2}{\beta}} \right]^{-\beta} \]
where
Notes:
Definition at line 75 of file GModelSpectralSmoothBrokenPlaw.hpp.
GModelSpectralSmoothBrokenPlaw::GModelSpectralSmoothBrokenPlaw | ( | void | ) |
Void constructor.
Definition at line 82 of file GModelSpectralSmoothBrokenPlaw.cpp.
References init_members().
Referenced by clone().
GModelSpectralSmoothBrokenPlaw::GModelSpectralSmoothBrokenPlaw | ( | const std::string & | type, |
const std::string & | prefactor, | ||
const std::string & | index1, | ||
const std::string & | pivot, | ||
const std::string & | index2, | ||
const std::string & | breakenergy, | ||
const std::string & | beta | ||
) |
Model type and parameter name constructor.
[in] | type | Model type. |
[in] | prefactor | Name of prefactor parameter. |
[in] | index1 | Name of index1 parameter. |
[in] | pivot | Name of pivot parameter. |
[in] | index2 | Name of index2 parameter. |
[in] | breakenergy | Name of breakenergy parameter. |
[in] | beta | Name of beta parameter. |
Definition at line 104 of file GModelSpectralSmoothBrokenPlaw.cpp.
References init_members(), m_beta, m_breakenergy, m_index1, m_index2, m_norm, m_pivot, m_type, GOptimizerPar::name(), and type().
GModelSpectralSmoothBrokenPlaw::GModelSpectralSmoothBrokenPlaw | ( | const double & | prefactor, |
const double & | index1, | ||
const GEnergy & | pivot, | ||
const double & | index2, | ||
const GEnergy & | breakenergy, | ||
const double & | beta | ||
) |
Parameter constructor.
[in] | prefactor | Smoothly broken power law pre factor (ph/cm2/s/MeV). |
[in] | index1 | Smoothly broken power law index1. |
[in] | pivot | Smoothly broken power law pivot energy |
[in] | index2 | Smoothly broken power law index1. |
[in] | breakenergy | Break energy. |
[in] | beta | Break smoothness parameter |
Constructs a smoothly broken power law using the model parameters power law prefactor
(ph/cm2/s/MeV), spectral index1
, pivot
energy, spectral index2
, breakenergy
of spectral break, and smoothness parameter beta
.
Definition at line 151 of file GModelSpectralSmoothBrokenPlaw.cpp.
References GModelSpectral::autoscale(), init_members(), m_beta, m_breakenergy, m_index1, m_index2, m_norm, m_pivot, GEnergy::MeV(), and GOptimizerPar::value().
|
explicit |
XML constructor.
[in] | xml | XML element containing position information. |
Constructs a smoothly broken power law spectral 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 188 of file GModelSpectralSmoothBrokenPlaw.cpp.
References init_members(), and read().
GModelSpectralSmoothBrokenPlaw::GModelSpectralSmoothBrokenPlaw | ( | const GModelSpectralSmoothBrokenPlaw & | model | ) |
Copy constructor.
[in] | model | Smoothly broken power law model. |
Definition at line 207 of file GModelSpectralSmoothBrokenPlaw.cpp.
References copy_members(), and init_members().
|
virtual |
Destructor.
Definition at line 225 of file GModelSpectralSmoothBrokenPlaw.cpp.
References free_members().
|
inline |
Returns break smoothness parameter beta.
Returns the break smoothness parameter 'beta'.
Definition at line 428 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_beta, and GOptimizerPar::value().
Referenced by eflux(), flux(), read(), update_eval_cache(), and write().
|
inline |
Set break smoothness.
[in] | beta | break smoothness parameter. |
Sets the beta break smoothness parameter.
Definition at line 442 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_beta, and GOptimizerPar::value().
|
inline |
Return breakenergy energy.
Returns the breakenergy energy.
Definition at line 397 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_breakenergy, GEnergy::MeV(), and GOptimizerPar::value().
Referenced by eflux(), flux(), read(), update_eval_cache(), update_mc_cache(), and write().
|
inline |
Set breakenergy energy.
[in] | breakenergy | break energy. |
Sets the "breakenergy" energy.
Definition at line 413 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_breakenergy, GEnergy::MeV(), and GOptimizerPar::value().
|
inlinevirtual |
Return class name.
Implements GModelSpectral.
Definition at line 236 of file GModelSpectralSmoothBrokenPlaw.hpp.
|
virtual |
Clear smoothly broken power law model.
Implements GModelSpectral.
Definition at line 281 of file GModelSpectralSmoothBrokenPlaw.cpp.
References GModelSpectral::free_members(), free_members(), GModelSpectral::init_members(), and init_members().
|
virtual |
Clone smoothly broken power law model.
Implements GModelSpectral.
Definition at line 301 of file GModelSpectralSmoothBrokenPlaw.cpp.
References GModelSpectralSmoothBrokenPlaw().
|
protected |
Copy class members.
[in] | model | Smooth broken power law. |
Definition at line 824 of file GModelSpectralSmoothBrokenPlaw.cpp.
References m_beta, m_breakenergy, m_index1, m_index2, m_last_beta, m_last_breakenergy, m_last_ebreak_norm, m_last_ebreak_pow, m_last_energy, m_last_epivot_norm, m_last_epivot_pow, m_last_index1, m_last_index2, m_last_log_ebreak_norm, m_last_log_epivot_norm, m_last_pivot, m_mc_breakenergy, m_mc_brokenplaw, m_mc_index1, m_mc_index2, m_mc_pivot, m_mc_prefactor, m_norm, GModelSpectral::m_pars, m_pivot, and m_type.
Referenced by GModelSpectralSmoothBrokenPlaw(), and operator=().
|
virtual |
Returns model energy flux between emin, emax
[in] | emin | Minimum photon energy. |
[in] | emax | Maximum photon energy. |
Computes
\[ \int_{\tt emin}^{\tt emax} S_{\rm E}(E | t) E \, dE \]
where
emin
, emax
] is an energy interval, andImplements GModelSpectral.
Definition at line 531 of file GModelSpectralSmoothBrokenPlaw.cpp.
References beta(), breakenergy(), GIntegral::eps(), index1(), index2(), GEnergy::MeV(), gammalib::MeV2erg, pivot(), prefactor(), and GIntegral::romberg().
|
virtual |
Evaluate function.
[in] | srcEng | True photon energy. |
[in] | srcTime | True photon arrival time. |
[in] | gradients | Compute gradients? |
Evaluates
\[ S_{\rm E}(E | t) = k_0 \left( \frac{E}{E_0} \right)^{\gamma_1} \left[ 1 + \left( \frac{E}{E_b} \right)^{\frac{\gamma_1 - \gamma_2}{\beta}} \right]^{-\beta} \]
where:
If the gradients
flag is true the method will also compute the partial derivatives of the model with respect to the parameters using
\[ \frac{\delta S_{\rm E}(E | t)}{\delta k_0} = \frac{S_{\rm E}(E | t)}{k_0} \]
\[ \frac{\delta S_{\rm E}(E | t)}{\delta \gamma_1} = S_{\rm E}(E | t) \left[ \ln\left( \frac{E}{E_0} \right) - \frac{\left(\frac{E}{E_b}\right)^{\frac{\gamma_1 - \gamma_2}{\beta}} \ln\left( \frac{E}{E_b} \right)} {\left(\frac{E}{E_b}\right)^{\frac{\gamma_1 - \gamma_2}{\beta}} + 1}\right] \]
\[ \frac{\delta S_{\rm E}(E | t)}{\delta \gamma_2} = S_{\rm E}(E | t) \frac{\left(\frac{E}{E_b}\right)^{\frac{\gamma_1 - \gamma_2}{\beta}} \ln\left( \frac{E}{E_b} \right)} {\left(\frac{E}{E_b}\right)^{\frac{\gamma_1 - \gamma_2}{\beta}} + 1} \]
\[ \frac{\delta S_{\rm E}(E | t)}{\delta E_0} = S_{\rm E}(E | t) \frac{\gamma_1}{E_0} \]
\[ \frac{\delta S_{\rm E}(E | t)}{\delta E_b} = S_{\rm E}(E | t) \frac{\left(\gamma_1 - \gamma_2 \right) \left( \frac{E}{E_b} \right)^{\frac{\gamma_1 - \gamma_2}{\beta}}} {E_b \left(1 + \left(\frac{E}{E_b}\right)^{\frac{\gamma_1 - \gamma_2}{\beta}} \right)} \]
\[ \frac{\delta S_{\rm E}(E | t)}{\delta \beta} = S_{\rm E}(E | t) \left[ \frac{ \left( \frac{E}{E_b} \right)^{\frac{\gamma_1 - \gamma_2}{\beta}} \ln \left( \left( \frac{E}{E_b}\right)^{ \frac{\gamma_1 - \gamma_2}{\beta}} \right)} {1 + \left(\frac{E}{E_b}\right)^{\frac{\gamma_1 - \gamma_2}{\beta}}} - \ln \left( 1 + \left(\frac{E}{E_b}\right)^{\frac{\gamma_1 - \gamma_2}{\beta}} \right) \right] \]
Implements GModelSpectral.
Definition at line 380 of file GModelSpectralSmoothBrokenPlaw.cpp.
References GOptimizerPar::factor_gradient(), GOptimizerPar::factor_value(), GOptimizerPar::is_free(), gammalib::is_infinite(), gammalib::is_notanumber(), log(), m_beta, m_breakenergy, m_index1, m_index2, m_last_beta, m_last_ebreak_norm, m_last_ebreak_pow, m_last_epivot_norm, m_last_epivot_pow, m_last_index1, m_last_index2, m_last_log_ebreak_norm, m_last_log_epivot_norm, m_norm, m_pivot, pow(), GOptimizerPar::scale(), update_eval_cache(), and GOptimizerPar::value().
Referenced by mc().
|
virtual |
Returns model photon flux between emin, emax
[in] | emin | Minimum photon energy. |
[in] | emax | Maximum photon energy. |
Computes
\[ \int_{\tt emin}^{\tt emax} S_{\rm E}(E | t) dE \]
where
emin
, emax
] is an energy interval, andImplements GModelSpectral.
Definition at line 484 of file GModelSpectralSmoothBrokenPlaw.cpp.
References beta(), breakenergy(), GIntegral::eps(), index1(), index2(), GEnergy::MeV(), pivot(), prefactor(), and GIntegral::romberg().
|
protected |
Delete class members.
Definition at line 874 of file GModelSpectralSmoothBrokenPlaw.cpp.
Referenced by clear(), operator=(), and ~GModelSpectralSmoothBrokenPlaw().
|
inline |
Return smoothly broken power law index1.
Returns the power law index1.
Definition at line 308 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_index1, and GOptimizerPar::value().
Referenced by eflux(), flux(), read(), update_eval_cache(), update_mc_cache(), and write().
|
inline |
Set smoothly broken power law index1.
[in] | index1 | Power law index1. |
Sets the power law index1.
Definition at line 322 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_index1, and GOptimizerPar::value().
|
inline |
Return smoothly broken power law index2.
Returns the power law index2.
Definition at line 337 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_index2, and GOptimizerPar::value().
Referenced by eflux(), flux(), read(), update_eval_cache(), update_mc_cache(), and write().
|
inline |
Set smoothly broken power law index2.
[in] | index2 | Power law index2. |
Sets the power law index2.
Definition at line 351 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_index2, and GOptimizerPar::value().
|
protected |
Initialise class members.
Definition at line 717 of file GModelSpectralSmoothBrokenPlaw.cpp.
References GEnergy::clear(), GOptimizerPar::clear(), GOptimizerPar::fix(), GOptimizerPar::free(), GOptimizerPar::gradient(), GOptimizerPar::has_grad(), m_beta, m_breakenergy, m_index1, m_index2, m_last_beta, m_last_breakenergy, m_last_ebreak_norm, m_last_ebreak_pow, m_last_energy, m_last_epivot_norm, m_last_epivot_pow, m_last_index1, m_last_index2, m_last_log_ebreak_norm, m_last_log_epivot_norm, m_last_pivot, m_mc_breakenergy, m_mc_brokenplaw, m_mc_index1, m_mc_index2, m_mc_pivot, m_mc_prefactor, m_norm, GModelSpectral::m_pars, m_pivot, m_type, GOptimizerPar::min(), GOptimizerPar::name(), GOptimizerPar::range(), GOptimizerPar::scale(), GOptimizerPar::unit(), and GOptimizerPar::value().
Referenced by clear(), GModelSpectralSmoothBrokenPlaw(), and operator=().
|
virtual |
Returns Monte Carlo energy between [emin, emax].
[in] | emin | Minimum photon energy. |
[in] | emax | Maximum photon energy. |
[in] | time | True photon arrival time. |
[in,out] | ran | Random number generator. |
Returns Monte Carlo energy by randomly drawing from a smoothly broken power law.
Implements GModelSpectral.
Definition at line 575 of file GModelSpectralSmoothBrokenPlaw.cpp.
References gammalib::check_energy_interval(), GModelSpectralBrokenPlaw::eval(), eval(), G_MC, m_mc_brokenplaw, GModelSpectralBrokenPlaw::mc(), GRan::uniform(), and update_mc_cache().
|
virtual |
Assignment operator.
[in] | model | Smoothly broken power law model. |
Definition at line 247 of file GModelSpectralSmoothBrokenPlaw.cpp.
References copy_members(), free_members(), init_members(), and GModelSpectral::operator=().
|
inline |
Return pivot energy.
Returns the smoothly broken power law scale energy.
Definition at line 366 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_pivot, GEnergy::MeV(), and GOptimizerPar::value().
Referenced by eflux(), flux(), read(), update_eval_cache(), update_mc_cache(), and write().
|
inline |
Set pivot energy.
[in] | pivot | Smoothly broken power law pivot energy. |
Sets the smoothly broken power law pivot energy.
Definition at line 382 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_pivot, GEnergy::MeV(), and GOptimizerPar::value().
|
inline |
Return pre factor.
Returns the pre factor.
Definition at line 279 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_norm, and GOptimizerPar::value().
Referenced by eflux(), flux(), read(), and update_mc_cache().
|
inline |
Set pre factor.
[in] | prefactor | Pre factor (ph/cm2/s/MeV). |
Sets the pre factor.
Definition at line 293 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_norm, and GOptimizerPar::value().
|
virtual |
Print smooth broken powerlaw information.
[in] | chatter | Chattiness. |
Implements GModelSpectral.
Definition at line 683 of file GModelSpectralSmoothBrokenPlaw.cpp.
References GModelSpectral::m_pars, gammalib::parformat(), SILENT, GModelSpectral::size(), and gammalib::str().
|
virtual |
Read model from XML element.
[in] | xml | XML element. |
Reads the spectral information from an XML element.
Implements GModelSpectral.
Definition at line 618 of file GModelSpectralSmoothBrokenPlaw.cpp.
References beta(), breakenergy(), G_READ, index1(), index2(), m_beta, m_breakenergy, m_index1, m_index2, m_norm, m_pivot, GOptimizerPar::name(), pivot(), prefactor(), GModelPar::read(), gammalib::xml_check_parnum(), and gammalib::xml_get_par().
Referenced by GModelSpectralSmoothBrokenPlaw().
|
inlinevirtual |
Return model type.
Returns the type of the spectral smoothly broken power law model.
Implements GModelSpectral.
Definition at line 250 of file GModelSpectralSmoothBrokenPlaw.hpp.
References m_type.
Referenced by GModelSpectralSmoothBrokenPlaw(), type(), and write().
|
inline |
Set model type.
[in] | type | Model type. |
Set the type of the spectral smoothly broken power law model.
Definition at line 264 of file GModelSpectralSmoothBrokenPlaw.hpp.
|
protected |
Update eval precomputation cache.
[in] | energy | Energy. |
Updates the precomputation cache for eval() the method.
Definition at line 888 of file GModelSpectralSmoothBrokenPlaw.cpp.
References beta(), breakenergy(), index1(), index2(), log(), m_beta, m_index1, m_index2, m_last_beta, m_last_breakenergy, m_last_ebreak_norm, m_last_ebreak_pow, m_last_energy, m_last_epivot_norm, m_last_epivot_pow, m_last_index1, m_last_index2, m_last_log_ebreak_norm, m_last_log_epivot_norm, m_last_pivot, GEnergy::MeV(), pivot(), pow(), and GOptimizerPar::value().
Referenced by eval().
|
protected |
Update Monte Carlo pre computation cache.
Updates the precomputation cache for Monte Carlo simulations.
Definition at line 937 of file GModelSpectralSmoothBrokenPlaw.cpp.
References breakenergy(), index1(), index2(), m_mc_breakenergy, m_mc_brokenplaw, m_mc_index1, m_mc_index2, m_mc_pivot, m_mc_prefactor, GEnergy::MeV(), pivot(), pow(), and prefactor().
Referenced by mc().
|
virtual |
Write model into XML element.
[in] | xml | XML element. |
Writes the spectral information into an XML element.
Implements GModelSpectral.
Definition at line 651 of file GModelSpectralSmoothBrokenPlaw.cpp.
References beta(), breakenergy(), G_WRITE, index1(), index2(), m_beta, m_breakenergy, m_index1, m_index2, m_norm, m_pivot, GOptimizerPar::name(), norm(), pivot(), type(), GModelPar::write(), gammalib::xml_check_type(), and gammalib::xml_need_par().
|
protected |
Break smoothness.
Definition at line 204 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by beta(), copy_members(), eval(), GModelSpectralSmoothBrokenPlaw(), init_members(), read(), update_eval_cache(), and write().
|
protected |
Energy of spectral break.
Definition at line 203 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by breakenergy(), copy_members(), eval(), GModelSpectralSmoothBrokenPlaw(), init_members(), read(), and write().
|
protected |
Spectral index1.
Definition at line 200 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), GModelSpectralSmoothBrokenPlaw(), index1(), init_members(), read(), update_eval_cache(), and write().
|
protected |
Spectral index2.
Definition at line 201 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), GModelSpectralSmoothBrokenPlaw(), index2(), init_members(), read(), update_eval_cache(), and write().
|
mutableprotected |
Last beta parameter.
Definition at line 212 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), init_members(), and update_eval_cache().
|
mutableprotected |
Last breakenergy parameter.
Definition at line 211 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), init_members(), and update_eval_cache().
|
mutableprotected |
Last E/Ebreakenergy value.
Definition at line 214 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), init_members(), and update_eval_cache().
|
mutableprotected |
Last pow(E/Ebreakenergy,(index1-index2)/beta)
Definition at line 218 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), init_members(), and update_eval_cache().
|
mutableprotected |
Last energy value.
Definition at line 207 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), init_members(), and update_eval_cache().
|
mutableprotected |
Last E/Epivot value.
Definition at line 213 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), init_members(), and update_eval_cache().
|
mutableprotected |
Last pow(E/Epivot,index1) value.
Definition at line 217 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), init_members(), and update_eval_cache().
|
mutableprotected |
Last index1 parameter.
Definition at line 208 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), init_members(), and update_eval_cache().
|
mutableprotected |
Last index2 parameter.
Definition at line 209 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), init_members(), and update_eval_cache().
|
mutableprotected |
Last ln(E/Ebreakenergy) value.
Definition at line 216 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), init_members(), and update_eval_cache().
|
mutableprotected |
Last ln(E/Epivot) value.
Definition at line 215 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), init_members(), and update_eval_cache().
|
mutableprotected |
Last pivot parameter.
Definition at line 210 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), init_members(), and update_eval_cache().
|
mutableprotected |
Last break energy.
Definition at line 225 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), init_members(), and update_mc_cache().
|
mutableprotected |
Broken power plaw.
Definition at line 226 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), init_members(), mc(), and update_mc_cache().
|
mutableprotected |
Last first index.
Definition at line 222 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), init_members(), and update_mc_cache().
|
mutableprotected |
Last second index.
Definition at line 223 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), init_members(), and update_mc_cache().
|
mutableprotected |
Last pivot energy.
Definition at line 224 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), init_members(), and update_mc_cache().
|
mutableprotected |
Last pre factor.
Definition at line 221 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), init_members(), and update_mc_cache().
|
protected |
Normalization factor.
Definition at line 199 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), GModelSpectralSmoothBrokenPlaw(), init_members(), prefactor(), read(), and write().
|
protected |
Pivot energy.
Definition at line 202 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), eval(), GModelSpectralSmoothBrokenPlaw(), init_members(), pivot(), read(), and write().
|
protected |
Model type.
Definition at line 198 of file GModelSpectralSmoothBrokenPlaw.hpp.
Referenced by copy_members(), GModelSpectralSmoothBrokenPlaw(), init_members(), and type().