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