1#ifndef __JAANET__JEVTWEIGHTGENHEN__
2#define __JAANET__JEVTWEIGHTGENHEN__
36 public JClonable<JEvtWeight, JEvtWeightGenhen>
78 const char*
const getName() const override final
95 const double Nevents = header.genvol.numberOfEvents;
97 setNormalisation(1.0 / Nevents / (60*60*24*365));
101 THROW(
JValueOutOfRange,
"JEvtWeightGenhen::configure(): Provided header is inconsistent with Genhen.");
146 THROW(
JIndexOutOfRange,
"JEvtWeightGenhen::getWeight(): Empty " << (evt.w.size() < 3 ?
"w2-" :
"w3-") <<
"weight.");
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Exception for accessing an index in a collection that is outside of its range.
Exception for null pointer operation.
Exception for accessing a value in a collection that is outside of its range.
Extensions to Evt data format.
bool is_genhen(const JHead &header)
Check for generator.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
void configure(const pointer_type &p)
Configure event-weight factor.
JEvtWeightFactor & getFactor() const
Get reference to event-weight factor.
Implementation of event weighting for Genhen data.
void configure(const JHead &header) override final
Weight normalisation configuration.
const char *const getName() const override final
Get name.
double getWeight(const Evt &evt) const override final
Get weight of given event.
JEvtWeightGenhen()
Default Constructor.
JEvtWeightGenhen(const JHead &header)
Constructor.
JEvtWeightGenhen(const JHead &header, const JFlux &flux)
Constructor.
bool check(const JHead &header) const override final
Check whether header is consistent with this event weighter.
Helper class for flux function.
Low-level interface for retrieving the flux corresponding to a given event.
Template class for object cloning.
static const int WEIGHTLIST_DIFFERENTIAL_EVENT_RATE
Event rate per unit of flux (c.f. taglist document) [GeV m2 sr].
static const int WEIGHTLIST_RESCALED_EVENT_RATE
Rescaled event rate [s-1].
static const int WEIGHTLIST_EVENT_RATE
Event rate [s-1].