18 std::istringstream iss(line);
19 std::vector<std::string> tokens;
23 if (elem.size() != 0) {
24 tokens.push_back(elem);
28 if (tokens.size() != 13) {
29 EXCEPTION_RAISE(
"TokenNum",
30 "Wrong number of tokens in LHE particle record.");
33 idup_ = atof(tokens[0].c_str());
34 istup_ = atoi(tokens[1].c_str());
35 mothup_[0] = atoi(tokens[2].c_str());
36 mothup_[1] = atoi(tokens[3].c_str());
37 icolup_[0] = atoi(tokens[4].c_str());
38 icolup_[1] = atoi(tokens[5].c_str());
39 pup_[0] = atof(tokens[6].c_str());
40 pup_[1] = atof(tokens[7].c_str());
41 pup_[2] = atof(tokens[8].c_str());
42 pup_[3] = atof(tokens[9].c_str());
43 pup_[4] = atof(tokens[10].c_str());
44 vtimup_ = atof(tokens[11].c_str());
45 spinup_ = atof(tokens[12].c_str());
Class defining a single particle record in an LHE event.
Single particle record in an LHE event.
int getMOTHUP(int) const
Get a mother particle index (MOTHUP) by index.
double getPUP(int) const
Get a momentum component (PUP) by index.
LHEParticle(std::string &data)
Class constructor.
void setMother(int i, LHEParticle *particle)
Set a mother particle by index.
LHEParticle * mothers_[2]
The mother particles.
double getSPINUP() const
Get the particle's spin (SPINUP).
double getVTIMUP() const
Get the proper lifetime (VTIMUP).
int mothup_[2]
The mother particle indices.
void print(std::ostream &stream) const
Print particle information to an output stream.
int getISTUP() const
Get the status code (ISTUP).
LHEParticle * getMother(int) const
Get a mother particle by index.
int getICOLUP(int) const
Get the particle color (ICOLUP) by index.