Example function object for computing power-law flux.
More...
#include <JPowerLawFlux.hh>
Example function object for computing power-law flux.
Definition at line 31 of file JPowerLawFlux.hh.
◆ clone_type
template<class JClonable_t , class JDerived_t >
◆ JPowerLawFlux() [1/2]
JAANET::JPowerLawFlux::JPowerLawFlux |
( |
| ) |
|
|
inline |
Default constructor.
Definition at line 38 of file JPowerLawFlux.hh.
38 :
41 {}
double spectralIndex
spectral index >= 0
double normalisation
normalisation [GeV * m^-2 * sr^-1 * s^-1]
◆ JPowerLawFlux() [2/2]
JAANET::JPowerLawFlux::JPowerLawFlux |
( |
const double | normalisation, |
|
|
const double | spectralIndex ) |
|
inline |
Constructor.
- Parameters
-
normalisation | normalisation [GeV * m^-2 * sr^-1 * s^-1] |
spectralIndex | spectral index |
Definition at line 50 of file JPowerLawFlux.hh.
◆ is_valid()
bool JAANET::JPowerLawFlux::is_valid |
( |
| ) |
const |
|
inlinefinaloverride |
Check whether this power-law flux is valid.
- Returns
- true if valid; else false
Definition at line 62 of file JPowerLawFlux.hh.
◆ getFactor()
double JAANET::JPowerLawFlux::getFactor |
( |
const Evt & | evt | ) |
const |
|
inlinefinaloverride |
Get flux of given event.
- Parameters
-
- Returns
- flux [GeV * m^-2 * sr^-1 * s^-1]
Definition at line 74 of file JPowerLawFlux.hh.
75 {
78
80
82 }
const Trk & get_primary(const Evt &evt)
Get primary.
T pow(const T &x, const double y)
Power .
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
◆ equals()
bool JAANET::JPowerLawFlux::equals |
( |
const JPowerLawFlux & | object | ) |
const |
|
inline |
Check if this flux is identical to the given flux.
- Parameters
-
object | power-law flux object |
- Returns
- true if this flux is identical to given flux; else flase
Definition at line 91 of file JPowerLawFlux.hh.
◆ getProperties() [1/2]
Get properties of this class.
- Parameters
-
eqpars | equation parameters |
Definition at line 103 of file JPowerLawFlux.hh.
104 {
105 return JPowerLawFluxHelper(*this, eqpars);
106 }
◆ getProperties() [2/2]
Get properties of this class.
- Parameters
-
eqpars | equation parameters |
Definition at line 114 of file JPowerLawFlux.hh.
115 {
116 return JPowerLawFluxHelper(*this, eqpars);
117 }
◆ read()
std::istream & JAANET::JPowerLawFlux::read |
( |
std::istream & | in | ) |
|
|
inlinefinaloverride |
Stream input.
- Parameters
-
- Returns
- input stream
Definition at line 126 of file JPowerLawFlux.hh.
127 {
129
130 streampos pos = in.tellg();
131
133
134 in.clear();
135 in.seekg(pos);
136
138
139 in >> properties;
140 }
141
142 check_validity();
143
144 return in;
145 }
Utility class to parse parameter values.
JProperties getProperties(const JEquationParameters &eqpars=JEvtWeightFactor::getEquationParameters()) override final
Get properties of this class.
◆ clone()
template<class JClonable_t , class JDerived_t >
|
inlineoverridevirtualinherited |
Get clone of this object.
- Returns
- pointer to newly created object
Reimplemented in JPHYSICS::JPD0Transformer_t< JArgument_t >, JPHYSICS::JPDFTransformer< 2, JArgument_t >, JPHYSICS::JPDFTransformer< 3, JArgument_t >, JPHYSICS::JPDFTransformer< 4, JArgument_t >, JPHYSICS::JPDFTransformer< 5, JArgument_t >, JPHYSICS::JPDFTransformer_t< JArgument_t >, JPHYSICS::JPDGTransformer_t< JArgument_t >, and JTOOLS::JMultiMapTransformer< N, JArgument_t >::JMultiMapDefaultTransformer.
Definition at line 69 of file JClonable.hh.
70 {
71 return new JDerived_t(static_cast<const JDerived_t&>(*this));
72 }
◆ normalisation
double JAANET::JPowerLawFlux::normalisation |
|
private |
◆ spectralIndex
double JAANET::JPowerLawFlux::spectralIndex |
|
private |
The documentation for this struct was generated from the following file: