9#include <generators/modules/LHEInputModule.h>
11#include <framework/logging/Logger.h>
12#include <framework/datastore/DataStore.h>
13#include <framework/datastore/StoreArray.h>
26 setDescription(
"LHE file input. This module loads an event record from LHE format and store the content into the MCParticle collection. LHE format is a standard event record format to contain an event record in a Monte Carlo-independent format.");
32 "Boolean to indicate whether the event numbers from input file should be used.",
false);
36 addParam(
"useWeights",
m_useWeights,
"Set to 'true' to if generator weights should be propagated.",
false);
37 addParam(
"nInitialParticles",
m_nInitial,
"Number of MCParticles at the beginning of the events that should be flagged c_Initial.",
40 "Number of MCParticles at the beginning of the events that should be flagged c_IsVirtual.", 0);
41 addParam(
"wrongSignPz",
m_wrongSignPz,
"Boolean to signal that directions of HER and LER were switched",
true);
48 B2FATAL(
"The exp. and run numbers are not properly initialized: please set the 'expNum' and 'runNum' parameters of the LHEInput module.");
51 B2INFO(
"LHEInput acts as input module for this process. This means the exp., run and event numbers will be set by this module.");
57 B2FATAL(
"Invalid list of input files, no entries found.");
66 }
catch (runtime_error& e) {
99 }
catch (LHEReader::LHEEmptyEventError&) {
100 B2DEBUG(100,
"Reached end of LHE file.");
101 m_lhe.closeCurrentInputFile();
108 }
catch (runtime_error& e) {
113 B2DEBUG(100,
"Reached end of all LHE files.");
115 }
catch (runtime_error& e) {
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
@ c_checkCyclic
Check for cyclic dependencies.
@ c_setDecayInfo
Set decay time and vertex.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_Input
This module is an input module (reads data).
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
Accessor to arrays stored in the data store.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.