5#include "Framework/Exception/Exception.h"
11 std::istringstream iss(line);
12 std::vector<std::string> tokens;
16 if (elem.size() != 0) {
17 tokens.push_back(elem);
21 if (tokens.size() != 6) {
22 EXCEPTION_RAISE(
"TokenNum",
23 "Wrong number of tokens in LHE event information record.");
79 std::istringstream iss(line);
80 std::vector<std::string> tokens;
84 if (elem.size() != 0) {
85 tokens.push_back(elem);
89 if (tokens.size() != 4 && tokens.size() != 5) {
90 EXCEPTION_RAISE(
"TokenNum",
91 "Wrong number of tokens or format in LHE event vertex "
92 "information record.");
94 vtx_[0] = atof(tokens[1].c_str());
95 vtx_[1] = atof(tokens[2].c_str());
96 vtx_[2] = atof(tokens[3].c_str());
97 if (tokens.size() > 4) {
98 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 ...