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() != 13) {
18 EXCEPTION_RAISE(
"TokenNum",
19 "Wrong number of tokens in LHE particle record.");
22 pdg_id_ = atof(tokens[0].c_str());
23 status_ = atoi(tokens[1].c_str());
24 mother_[0] = atoi(tokens[2].c_str());
25 mother_[1] = atoi(tokens[3].c_str());
26 color_[0] = atoi(tokens[4].c_str());
27 color_[1] = atoi(tokens[5].c_str());
34 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.