17 std::istringstream iss(line);
18 std::vector<std::string> tokens;
22 if (elem.size() != 0) {
23 tokens.push_back(elem);
27 if (tokens.size() != 13) {
28 std::cerr <<
"ERROR: Bad particle record in LHE file ..." <<
std::endl;
30 G4Exception(
"LHEParticle::LHEParticle",
"LHEParticleError", FatalException,
"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());
88 stream <<
"LHEParticle { " <<
"IDUP: " <<
getIDUP() <<
", ISTUP: " <<
getISTUP() <<
", MOTHUP[0]: " <<
getMOTHUP(0) <<
", MOTHUP[1]: " <<
getMOTHUP(1) <<
", ICOLUP[0]: " <<
getICOLUP(0) <<
", ICOLUP[1]: " <<
getICOLUP(1) <<
", PUP[0]: " <<
getPUP(0) <<
", PUP[1]: " <<
getPUP(1) <<
", PUP[2]: " <<
getPUP(2) <<
", PUP[3]: " <<
getPUP(3) <<
", PUP[4]: " <<
getPUP(4) <<
", VTIMUP: " <<
getVTIMUP() <<
", SPINUP: " <<
getSPINUP() <<
" }" <<
std::endl;
92 particle.
print(stream);
Single particle record in an LHE event.
LHEParticle * mothers_[2]
LHEParticle(std::string &data)
LHEParticle * getMother(int) const
void print(std::ostream &stream) const
void setMother(int i, LHEParticle *particle)
std::ostream & operator<<(std::ostream &stream, const LHEParticle &particle)