27 #ifndef GMODELSPECTRALSUPEREXPPLAW_HPP
28 #define GMODELSPECTRALSUPEREXPPLAW_HPP
73 const std::string&
pivot,
75 const std::string&
index2);
80 const double& index2);
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 index1(
void)
const;
113 void index1(
const double& index1);
114 double index2(
void)
const;
115 void index2(
const double& index2);
133 const double& index1,
136 const double& index2) :
142 double eval(
const double& eng);
155 const double& index1,
158 const double& index2) :
164 double eval(
const double& eng);
207 return (
"GModelSpectralSuperExpPlaw");
void free_members(void)
Delete class members.
GModelPar m_index2
Index of cutoff.
double norm(const GVector &vector)
Computes vector norm.
double eval(const double &eng)
Kernel for energy flux integration.
GModelPar m_ecut
Exponential cut off energy.
Energy value class definition.
virtual void clear(void)
Clear exponentially cut off power law model.
Abstract spectral model base class.
void update_mc_cache(const GEnergy &emin, const GEnergy &emax) const
Update Monte Carlo pre computation cache.
double m_mc_emax
Maximum energy.
double m_last_exponent
last pow(E/Ecut,index2) value
GEnergy pivot(void) const
Return pivot energy.
virtual double flux(const GEnergy &emin, const GEnergy &emax) const
Returns model photon flux between emin, emax
double m_last_index2
Last index2 parameter.
void update_eval_cache(const GEnergy &energy) const
Update eval precomputation cache.
double m_last_e_norm
Last E/Epivot value.
virtual std::string type(void) const
Return model type.
double m_mc_pow_ewidth
Power of energy width.
Random number generator class.
virtual double eval(const GEnergy &srcEng, const GTime &srcTime=GTime(), const bool &gradients=false) const
Evaluate function.
double MeV(void) const
Return energy in MeV.
void init_members(void)
Initialise class members.
GEnergy cutoff(void) const
Return exponential cut-off energy.
void copy_members(const GModelSpectralSuperExpPlaw &model)
Copy class members.
virtual void read(const GXmlElement &xml)
Read model from XML element.
Model parameter class interface definition.
virtual GModelSpectralSuperExpPlaw * clone(void) const
Clone super exponentially cut off power law model.
virtual ~GModelSpectralSuperExpPlaw(void)
Destructor.
GEnergy m_last_energy
Last energy value.
flux_kernel(const double &norm, const double &index1, const double &pivot, const double &ecut, const double &index2)
std::string m_type
Model type.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print model information.
virtual void write(GXmlElement &xml) const
Write model into XML element.
double m_mc_pow_emin
Power of minimum energy.
Single parameter function abstract base class definition.
GModelPar m_norm
Normalization factor.
double m_last_pivot
Last pivot parameter.
double m_mc_emin
Minimum energy.
double prefactor(void) const
Return pre factor.
double eval(const double &eng)
Kernel for photon flux integration.
GModelSpectralSuperExpPlaw(void)
Void constructor.
double m_inv_pivot
1 / Pivot energy
double m_inv_pivot
1 / Pivot energy
GModelPar m_pivot
Pivot energy.
Abstract spectral model base class interface definition.
virtual std::string classname(void) const
Return class name.
double m_inv_ecut
1 / Cut off energy
double m_norm
Normalization.
double value(void) const
Return parameter value.
Single parameter function abstract base class.
virtual GModelSpectralSuperExpPlaw & operator=(const GModelSpectralSuperExpPlaw &model)
Assignment operator.
virtual double eflux(const GEnergy &emin, const GEnergy &emax) const
Returns model energy flux between emin, emax
double m_last_e_cut
Last E/Ecut value.
double m_last_ecut
Last energy cut-off parameter.
Super exponential cut off power law spectral class.
double m_norm
Normalization.
double m_last_power
Last power value.
double m_inv_ecut
1 / Cut off energy
virtual GEnergy mc(const GEnergy &emin, const GEnergy &emax, const GTime &time, GRan &ran) const
Returns MC energy between [emin, emax].
double m_mc_exponent
Exponent (index+1)
GModelPar m_index1
Spectral index.
double index2(void) const
Return cut off index.
double m_last_index1
Last index1 parameter.
double index1(void) const
Return power law index.
eflux_kernel(const double &norm, const double &index1, const double &pivot, const double &ecut, const double &index2)
Class that handles energies in a unit independent way.