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