12 std::istringstream iss(line);
13 std::vector<std::string> tokens;
17 if (elem.size() != 0) {
18 tokens.push_back(elem);
22 if (tokens.size() != 13) {
23 EXCEPTION_RAISE(
"TokenNum",
24 "Wrong number of tokens in LHE particle record.");
27 pdg_id_ = atof(tokens[0].c_str());
28 status_ = atoi(tokens[1].c_str());
29 mother_[0] = atoi(tokens[2].c_str());
30 mother_[1] = atoi(tokens[3].c_str());
31 color_[0] = atoi(tokens[4].c_str());
32 color_[1] = atoi(tokens[5].c_str());
39 spin_ = atof(tokens[12].c_str());
Class defining a single particle record in an LHE event.
Single particle record in an LHE event.
int getColor(int) const
Get the particle color (ICOLUP) by index_.
int getMother(int) const
Get a mother particle index (MOTHUP) by index_.
double getSpin() const
Get the particle's spin (SPINUP).
LHEParticle(std::string &data)
Class constructor.
void setMother(int i, LHEParticle *particle)
Set a mother particle by index_.
LHEParticle * mothers_[2]
The mother particles.
void print() const
Print particle information to an output stream.
double getLifetime() const
Get the proper lifetime (VTIMUP).
LHEParticle * getMotherParticle(int) const
Get a mother particle by index_.
double getMomentum(int) const
Get a momentum component (PUP) by index_.
int getStatus() const
Get the status code (ISTUP).
int mother_[2]
The mother particle indices.