1 #ifndef __JAANET__JEVTWEIGHTCORSIKA__
2 #define __JAANET__JEVTWEIGHTCORSIKA__
33 public JClonable<JEvtWeight, JEvtWeightCorsika>,
98 if (
check(header) && N > 0.0) {
104 THROW(
JValueOutOfRange,
"JEvtWeightCorsika::configure(): Provided header is inconsistent with Corsika.");
133 return W * evt.
w[1] *
getFactor(evt) / (1 + Nretries);
135 }
else if (evt.
w.size() > 2) {
137 return W * evt.
w[2] / (1 + Nretries);
144 THROW(
JIndexOutOfRange,
"JEvtWeightCorsika::getWeight(): Empty " << (evt.
w.size() < 3 ?
"w2-" :
"w3-") <<
"weight.");
void configure(const JHead &header) override
Weight configuration.
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.
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
std::vector< double > w
MC: Weights w[0]=w1, w[1]=w2, w[2]]=w3 (see e.g. Tag list)
JEvtWeightFactorHelper< JFlux > JFluxHelper_t
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.
Exception for null pointer operation.
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 JFlux &factor)
Configure event-weight factor.
Low-level interface for retrieving the flux corresponding to a given event.
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)
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
JEvtWeightCorsika(const JEvtWeightCorsika &object)
Copy constructor.