226 HepMC::HEPEVT_Wrapper::zero_everything();
230 std::vector<int> Py8PartonIdx;
231 Py8PartonIdx.clear();
232 std::vector<int> HEPEVTPartonIdx;
233 HEPEVTPartonIdx.clear();
239 int Py8PartonCounter = 0;
240 int HEPEVTPartonCounter = 0;
244 for (
int iprt = 1; iprt <
event.size(); iprt++) {
250 Py8PartonCounter = iprt;
256 for (
int iprt = 2; iprt < hepeup.
NUP; iprt++) {
258 HepMC::HEPEVT_Wrapper::set_id(
index, hepeup.
IDUP[iprt]);
259 HepMC::HEPEVT_Wrapper::set_status(
index, 2);
260 HepMC::HEPEVT_Wrapper::set_momentum(
261 index, hepeup.
PUP[iprt][0], hepeup.
PUP[iprt][1], hepeup.
PUP[iprt][2], hepeup.
PUP[iprt][4]);
262 HepMC::HEPEVT_Wrapper::set_mass(
index, hepeup.
PUP[iprt][4]);
264 HepMC::HEPEVT_Wrapper::set_parents(
index, 0, 0);
265 HepMC::HEPEVT_Wrapper::set_children(
index, 0, 0);
266 if (hepeup.
MOTHUP[iprt].first > 2 &&
267 hepeup.
MOTHUP[iprt].second > 2)
269 HEPEVTPartonCounter++;
272 Py8PartonIdx.push_back(Py8PartonCounter);
274 HEPEVTPartonIdx.push_back(HEPEVTPartonCounter);
275 HEPEVTPartonCounter++;
278 HepMC::HEPEVT_Wrapper::set_number_entries(
index);
283 for (
int iprt = 1; iprt < workEvent.size(); iprt++)
288 if (
part.status() < 51)
291 HepMC::HEPEVT_Wrapper::set_id(
index,
part.id());
294 HepMC::HEPEVT_Wrapper::set_status(
index, 1);
296 HepMC::HEPEVT_Wrapper::set_mass(
index,
part.m());
298 HepMC::HEPEVT_Wrapper::set_parents(
index, 0, 0);
300 HepMC::HEPEVT_Wrapper::set_children(
index, 0, 0);
309 for (
int idx = 0;
idx < (
int)Py8PartonIdx.size();
idx++) {
310 if (parentId == Py8PartonIdx[
idx]) {
311 int idx1 = HEPEVTPartonIdx[
idx];
312 HepMC::HEPEVT_Wrapper::set_parents(
index, idx1 + 1, idx1 + 1);
318 HepMC::HEPEVT_Wrapper::set_number_entries(
index);