1 #ifndef __JAANET__JPOWERLAWFLUX__
2 #define __JAANET__JPOWERLAWFLUX__
14 namespace JPP {
using namespace JAANET; }
41 normalisation(normalisation),
42 spectralIndex(spectralIndex)
65 THROW(JNullPointerException,
"JPowerLawFlux::operator(): No neutrino for event " << evt.
id <<
'.' << endl);
93 return in >>
object.normalisation
94 >>
object.spectralIndex;
110 out <<
FIXED(5,3) <<
object.normalisation <<
' '
111 <<
FIXED(5,3) <<
object.spectralIndex;
double normalisation
normalisation [GeV * m^-2 * sr^-1 * s^-1]
bool has_neutrino(const Evt &evt)
Test whether given event has an incoming neutrino.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Implementation of event-weight factor interface.
Auxiliary data structure for floating point format specification.
JEvtWeightFactorFunction< JFunction_t, JFlux > make_fluxFunction(const JFunction_t &flux)
Auxiliary method for creating an interface to a flux function.
double E
Energy [GeV] (either MC truth or reconstructed)
friend std::istream & operator>>(std::istream &in, JPowerLawFlux &object)
Stream input.
double spectralIndex
spectral index >= 0
bool equals(const JPowerLawFlux &object) const
Check if this flux is identical to the given flux.
friend std::ostream & operator<<(std::ostream &out, const JPowerLawFlux &object)
Write power-law parameters to output stream.
Template definition of auxiliary base class for comparison of data structures.
T pow(const T &x, const double y)
Power .
Example function object for computing power-law flux.
JEvtWeightFactorFunction< JPowerLawFlux, JFlux > make_powerLawFluxFunction(const double normalisation, const double spectralIndex)
Auxiliary method for creating an interface to a power-law flux function.
then fatal The output file must have the wildcard in the e g root fi eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
double operator()(const Evt &evt) const
Get flux of given event.
int id
offline event identifier
const Trk & get_neutrino(const Evt &evt)
Get incoming neutrino.
The Trk class represents a Monte Carlo (MC) particle as well as a reconstructed track/shower.
JPowerLawFlux()
Default constructor.
JPowerLawFlux(const double normalisation, const double spectralIndex)
Constructor.
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.