1 #ifndef __JAANET__JEVTWEIGHTCORSIKA__
2 #define __JAANET__JEVTWEIGHTCORSIKA__
25 namespace JPP {
using namespace JAANET; }
37 public JClonable<JEvtWeight, JEvtWeightCorsika>
80 this->norm =
object.norm;
103 THROW(
JValueOutOfRange,
"JEvtWeightCorsika::configure(): Provided header is inconsistent with Corsika.");
147 THROW(JNullPointerException,
"JEvtWeightCorsika::getWeight(): Unspecified flux function.");
149 THROW(
JIndexOutOfRange,
"JEvtWeightCorsika::getWeight(): Empty " << (evt.
w.size() < 3 ?
"w2-" :
"w3-") <<
"weight.");
void configure(const JHead &header) override
Weight configuration.
static const int WEIGHTLIST_RESCALED_EVENT_RATE
Rescaled event rate [s-1].
bool is_gseagen(const JHead &header)
Check for generator.
double numberOfEvents
Number of events.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
JEvtWeightCorsika(const JHead &header)
Constructor.
std::vector< double > w
MC: Weights w[0]=w1, w[1]=w2, w[2]=w3 (see e.g. Tag list or km3net-dataformat/definitions) ...
static const int WEIGHTLIST_EVENT_RATE
Event rate [s-1].
bool is_valid() const
Check validity of pointer.
JEvtWeightCorsika()
Default Constructor.
JEvtWeightCorsika(const JHead &header, const JFlux &flux)
Constructor.
double getWeight(const Evt &evt) const override
Get weight of given event.
static const int W2LIST_GSEAGEN_N_RETRIES
Number of extra chances given to each CORSIKA shower to hit the can.
double getFactor(const Evt &evt) const
Get weight-factor of given event.
bool check(const JHead &header) const override
Check whether header is consistent with this event weighter.
Template class for object cloning.
Helper class for event-weight factor.
void configure(const JEvtWeightFactor_t &factor)
Configure event-weight factor.
Low-level interface for retrieving the flux corresponding to a given event.
static const int WEIGHTLIST_DIFFERENTIAL_EVENT_RATE
Event rate per unit of flux (c.f. taglist document) [GeV m2 sr].
Implementation of event weighting for Corsika data.
Exception for accessing a value in a collection that is outside of its range.
Exception for accessing an index in a collection that is outside of its range.
std::vector< double > w2list
MC: factors that make up w[1]=w2 (see e.g. Tag list or km3net-dataformat/definitions) ...
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
JEvtWeightCorsika(const JEvtWeightCorsika &object)
Copy constructor.