27 #ifndef GMODELSPECTRALEXPINVPLAW_HPP
28 #define GMODELSPECTRALEXPINVPLAW_HPP
70 const std::string&
index,
71 const std::string&
pivot,
72 const std::string& lambda);
76 const double& lambda);
89 virtual void clear(
void);
91 virtual std::string
classname(
void)
const;
92 virtual std::string
type(
void)
const;
95 const bool& gradients =
false)
const;
109 void type(
const std::string& type);
112 double index(
void)
const;
113 void index(
const double& index);
135 const double& lambda) :
140 double eval(
const double& eng);
154 const double& lambda) :
159 double eval(
const double& eng);
198 return (
"GModelSpectralExpInvPlaw");
double norm(const GVector &vector)
Computes vector norm.
double inverse_cutoff(void) const
Return exponential cut-off parameter.
Energy value class definition.
double m_norm
Normalization.
Abstract spectral model base class.
virtual void write(GXmlElement &xml) const
Write model into XML element.
virtual GModelSpectralExpInvPlaw * clone(void) const
Clone exponentially cut off power law model.
virtual std::string classname(void) const
Return class name.
void update_eval_cache(const GEnergy &energy) const
Update eval precomputation cache.
double m_last_power
Last power value.
virtual void read(const GXmlElement &xml)
Read model from XML element.
double m_mc_pow_emin
Power of minimum energy.
Random number generator class.
double MeV(void) const
Return energy in MeV.
GEnergy m_last_energy
Last energy value.
double m_last_e_norm
Last E/Epivot value.
double m_norm
Normalization.
virtual double flux(const GEnergy &emin, const GEnergy &emax) const
Returns model photon flux between emin, emax
std::string m_type
Model type.
GModelPar m_index
Spectral index.
Exponential cut off power law spectral class.
double m_mc_pow_ewidth
Power of energy width.
virtual double eflux(const GEnergy &emin, const GEnergy &emax) const
Returns model energy flux between emin, emax
Model parameter class interface definition.
double m_inv_pivot
1 / Pivot energy
GEnergy cutoff(void) const
Return cut-off energy.
void init_members(void)
Initialise class members.
double m_mc_exponent
Exponent (index+1)
GModelPar m_lambda
Cut-off parameter.
Single parameter function abstract base class definition.
double m_last_pivot
Last pivot parameter.
virtual double eval(const GEnergy &srcEng, const GTime &srcTime=GTime(), const bool &gradients=false) const
Evaluate function.
double m_mc_emax
Maximum energy.
virtual void clear(void)
Clear exponentially cut off power law model.
GModelPar m_pivot
Pivot energy.
virtual std::string type(void) const
Return model type.
double index(void) const
Return power law index.
double m_inv_pivot
1 / Pivot energy
Abstract spectral model base class interface definition.
GModelSpectralExpInvPlaw(void)
Void constructor.
void update_mc_cache(const GEnergy &emin, const GEnergy &emax) const
Update Monte Carlo pre computation cache.
GModelPar m_norm
Normalization factor.
double value(void) const
Return parameter value.
Single parameter function abstract base class.
double m_last_lambda
Last cut-off parameter.
virtual ~GModelSpectralExpInvPlaw(void)
Destructor.
virtual GModelSpectralExpInvPlaw & operator=(const GModelSpectralExpInvPlaw &model)
Assignment operator.
eflux_kernel(const double &norm, const double &index, const double &pivot, const double &lambda)
double m_lambda
Cut-off parameter.
double m_last_index
Last index parameter.
double m_lambda
Cut-off parameter.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print model information.
void free_members(void)
Delete class members.
double eval(const double &eng)
Kernel for energy flux integration.
double m_last_e_lambda
Last E*lambda value.
double m_mc_emin
Minimum energy.
virtual GEnergy mc(const GEnergy &emin, const GEnergy &emax, const GTime &time, GRan &ran) const
Returns MC energy between [emin, emax].
GEnergy pivot(void) const
Return pivot energy.
double eval(const double &eng)
Kernel for photon flux integration.
void copy_members(const GModelSpectralExpInvPlaw &model)
Copy class members.
Class that handles energies in a unit independent way.
double prefactor(void) const
Return pre factor.
flux_kernel(const double &norm, const double &index, const double &pivot, const double &lambda)