69 int main(
int argc,
char **argv)
93 formulaMap[
i->second] = formulae[
i->first];
107 catch(
const exception& error) {
108 FATAL(error.what() << endl);
125 FATAL(
"MC-header is incompatible with gSeaGen.");
133 const TString expression =
i->second.GetExpFormula();
135 if (!expression.IsNull() &&
i->second.IsValid() &&
i->second.GetNdim() <= JEvtWeightFactorGSeaGen::NUMBER_OF_VARIABLES) {
137 i->second.configure(fluxFunction);
141 }
else if (expression.IsNull()) {
147 FATAL(
"Invalid formula " << expression <<
" (number of dimensions must be < " <<
148 JEvtWeightFactorGSeaGen::NUMBER_OF_VARIABLES <<
"; see `JAANET::JEvtWeightFactorGSeaGen`).");
165 while (scanner.hasNext()) {
167 const Evt*
event = scanner.next();
171 const double weight = scanner.getWeight(*event);
176 if (!isfinite(weight)) {
178 WARNING(
"Non-finite reweighting factor " << weight <<
179 " for event " << scanner.getCounter() <<
"!");
197 WARNING(
"Event " << scanner.getCounter() <<
" is empty; skip.");
Utility class to parse command line options.
int main(int argc, char *argv[])
ROOT TTree parameter settings of various packages.
static const int WEIGHTLIST_RESCALED_EVENT_RATE
Rescaled event rate [s-1].
bool is_gseagen(const JHead &header)
Check for generator.
const JHead & getHeader() const
Get header.
Recording of objects on file according a format that follows from the file name extension.
Utility class to parse parameter values.
Implementation of event-weight factor interface.
Data structure for single set of oscillation parameters.
Simple data structure to support I/O of equations (see class JLANG::JEquation).
std::vector< double > w
MC: Weights w[0]=w1, w[1]=w2, w[2]=w3 (see e.g. Tag list or km3net-dataformat/definitions) ...
Empty structure for specification of parser element that is initialised (i.e. does not require input)...
void createUUID()
Create UUID if not already set.
Utility class to parse parameter values.
JEvtWeightFactorFunction< JFunction_t, JEvtWeightFactor_t > make_weightFactor(const JFunction_t &function)
Auxiliary method for creating an interface to an event-weight factor.
I/O formatting auxiliaries.
uuid_t header_uuid
UUID of header containing the event-weight information.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
General purpose messaging.
The Head class reflects the header of Monte-Carlo event files, which consists of keys (also referred ...
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Auxiliary base class for list of file names.
General purpose class for object reading from a list of file names.
Utility class to parse command line options.
Definition of particle types.
void copy(const Head &from, JHead &to)
Copy header from from to to.
static const int WEIGHTLIST_NORMALISATION
Event rate normalisation.
Template event-weighter-associated file scanner.
Auxiliary data structure for floating point format specification.
JEvtWeightFactorFunction< JAtmosphericNeutrinoFlux, JFlux > make_atmosphericNeutrinoFluxFunction(const string &oscProbTableFile, const JOscParameters &oscParameters)
Auxiliary method for creating an interface to an atmospheric neutrino flux function using an oscillat...
The Evt class respresent a Monte Carlo (MC) event as well as an offline event.
#define DEBUG(A)
Message macros.