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