7 std::istringstream iss(line);
8 std::vector<std::string> tokens;
12 if (elem.size() != 0) {
13 tokens.push_back(elem);
17 if (tokens.size() != 6) {
18 EXCEPTION_RAISE(
"TokenNum",
19 "Wrong number of tokens in LHE event information record.");
75 std::istringstream iss(line);
76 std::vector<std::string> tokens;
80 if (elem.size() != 0) {
81 tokens.push_back(elem);
85 if (tokens.size() != 4 && tokens.size() != 5) {
86 EXCEPTION_RAISE(
"TokenNum",
87 "Wrong number of tokens or format in LHE event vertex "
88 "information record.");
90 vtx_[0] = atof(tokens[1].c_str());
91 vtx_[1] = atof(tokens[2].c_str());
92 vtx_[2] = atof(tokens[3].c_str());
93 if (tokens.size() > 4) {
94 vtxt_ = atof(tokens[4].c_str());
Class defining an LHE event with a list of particles and information from the header block.
double getEventWeight() const
Get the event weight (XWGTUP).
LHEEvent(std::string &data)
Class constructor.
double vtx_[3]
Vertex location.
int getProcessID() const
Get the ID of the physics process (IDRUP).
void addParticle(std::unique_ptr< LHEParticle > particle)
Add a particle to the event.
double getCouplingQed() const
Get the value of the QED coupling (AQEDUP).
int num_particles_
Number of particles.
double getVertexTime() const
Get the vertex time.
void setVertex(double x_, double y_, double z_)
Set the vertex location (careful to match units as expected!)
double getCouplingQcd() const
Get the value of the QCD coupling (AQCDUP).
double event_weight_
The event weight.
double getScaleQ() const
Get the scale Q of parton distributions (SCALUP).
double coupling_qcd_
QCD coupling value.
int getNumParticles() const
Get the number of particles (NUP) in the event.
const double * getVertex() const
Get the vertex location (careful to match units as expected!)
std::vector< std::unique_ptr< LHEParticle > > particles_
The list of particles.
const std::vector< std::unique_ptr< LHEParticle > > & getParticles() const
Get the list of particles in the event.
double scale_q_
Scale Q of parton distributions.
int process_id_
The physics process ID.
double coupling_qed_
QED coupling value.
Dynamically loadable photonuclear models either from SimCore or external libraries implementing this ...