27#ifndef GMODELSPECTRALPLAWENERGYFLUX_HPP
28#define GMODELSPECTRALPLAWENERGYFLUX_HPP
79 const std::string&
eflux,
80 const std::string&
index,
81 const std::string&
emin,
82 const std::string&
emax);
95 virtual void clear(
void);
97 virtual std::string
classname(
void)
const;
98 virtual std::string
type(
void)
const;
101 const bool& gradients =
false)
const;
116 double eflux(
void)
const;
118 double index(
void)
const;
162 return (
"GModelSpectralPlawEnergyFlux");
Energy value class definition.
Model parameter class interface definition.
Abstract spectral model base class interface definition.
Class that handles energies in a unit independent way.
double MeV(void) const
Return energy in MeV.
Energy flux normalized power law spectral model class.
GModelSpectralPlawEnergyFlux(void)
Void constructor.
std::string m_type
Model type.
virtual std::string print(const GChatter &chatter=NORMAL) const
Print power law information.
double m_log_emax
Log(emax)
virtual GModelSpectralPlawEnergyFlux * clone(void) const
Clone power law model.
GModelPar m_index
Spectral index.
GEnergy m_last_energy
Last source energy.
virtual void write(GXmlElement &xml) const
Write model into XML element.
virtual std::string type(void) const
Return model type.
virtual ~GModelSpectralPlawEnergyFlux(void)
Destructor.
double m_power
Power-law factor.
void free_members(void)
Delete class members.
double eflux(void) const
Return energy flux.
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].
void update(const GEnergy &srcEng) const
Update precomputed values.
double m_log_emin
Log(emin)
void copy_members(const GModelSpectralPlawEnergyFlux &model)
Copy class members.
double m_pow_emin
emin^(index+1)
GModelPar m_eflux
Energy flux (erg/cm2/s)
GEnergy emax(void) const
Return maximum energy.
GEnergy emin(void) const
Return minimum energy.
GModelPar m_emin
Lower energy limit (MeV)
double m_last_index
Last spectral index (MeV)
GEnergy m_last_emax
Last upper energy limit.
double index(void) const
Return power law index.
void init_members(void)
Initialise class members.
virtual std::string classname(void) const
Return class name.
GEnergy m_last_emin
Last lower energy limit.
virtual void clear(void)
Clear power law model.
GModelPar m_emax
Upper energy limit (MeV)
double m_norm
Power-law normalization (for pivot energy 1 MeV)
double m_pow_emax
emax^(index+1)
double m_g_norm
Power-law normalization gradient.
virtual GModelSpectralPlawEnergyFlux & operator=(const GModelSpectralPlawEnergyFlux &model)
Assignment operator.
virtual double eval(const GEnergy &srcEng, const GTime &srcTime=GTime(), const bool &gradients=false) const
Evaluate function.
virtual double flux(const GEnergy &emin, const GEnergy &emax) const
Returns model photon flux between [emin, emax] (units: ph/cm2/s)
Abstract spectral model base class.
double value(void) const
Return parameter value.
Random number generator class.