1 #ifndef __JAANET__JEVTWEIGHTGSEAGEN__
2 #define __JAANET__JEVTWEIGHTGSEAGEN__
36 public JClonable<JEvtWeight, JEvtWeightGSeaGen>
78 const char*
const getName() const override final
95 const double Nevents = header.genvol.numberOfEvents;
96 const double dt = (header.tgen.numberOfSeconds > 0.0 ?
97 header.tgen.numberOfSeconds : 1.0);
99 setNormalisation(1.0 / Nevents / dt);
103 THROW(
JValueOutOfRange,
"JEvtWeightGSeaGen::configure(): Provided header is inconsistent with GSeaGen.");
148 THROW(
JIndexOutOfRange,
"JEvtWeightGSeaGen::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_gseagen(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 GSeaGen data.
JEvtWeightGSeaGen()
Default Constructor.
JEvtWeightGSeaGen(const JHead &header)
Constructor.
const char *const getName() const override final
Get name.
double getWeight(const Evt &evt) const override final
Get weight of given event.
void configure(const JHead &header) override final
Weight normalisation configuration.
bool check(const JHead &header) const override final
Check whether header is consistent with this event weighter.
JEvtWeightGSeaGen(const JHead &header, const JFlux &flux)
Constructor.
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].