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.
51 :
54 {
55 check_validity();
56 }
◆ 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 64 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 76 of file JPowerLawFlux.hh.
77 {
80
82
84 }
const Trk & get_primary(const Evt &evt)
Auxiliary function to retrieve the primary track of an event.
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 93 of file JPowerLawFlux.hh.
◆ getProperties() [1/2]
Get properties of this class.
- Parameters
-
eqpars | equation parameters |
Definition at line 105 of file JPowerLawFlux.hh.
106 {
107 return JPowerLawFluxHelper(*this, eqpars);
108 }
◆ getProperties() [2/2]
Get properties of this class.
- Parameters
-
eqpars | equation parameters |
Definition at line 116 of file JPowerLawFlux.hh.
117 {
118 return JPowerLawFluxHelper(*this, eqpars);
119 }
◆ read()
std::istream & JAANET::JPowerLawFlux::read |
( |
std::istream & | in | ) |
|
|
inlinefinaloverride |
Stream input.
- Parameters
-
- Returns
- input stream
Definition at line 128 of file JPowerLawFlux.hh.
129 {
131
132 streampos pos = in.tellg();
133
135
136 in.clear();
137 in.seekg(pos);
138
140
141 in >> properties;
142 }
143
144 check_validity();
145
146 return in;
147 }
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: