48 produces<HepMCProduct>(
"unsmeared");
66 std::cout <<
" FYI: MSTU(10)=1 is ENFORCED in Py6-PGuns, for technical reasons" << std::endl;
83 call_pyinit(
"NONE",
"",
"", 0.0);
95 for (
int iprt =
fPartIDs.size(); iprt < pyjets.n; iprt++)
97 int parent = pyjets.k[2][iprt];
102 parentPart->set_status(2);
104 HepMC::GenVertex* DecVtx =
new HepMC::GenVertex(
105 HepMC::FourVector(pyjets.v[0][iprt], pyjets.v[1][iprt], pyjets.v[2][iprt], pyjets.v[3][iprt]));
106 DecVtx->add_particle_in(parentPart);
110 HepMC::FourVector pmom(pyjets.p[0][iprt], pyjets.p[1][iprt], pyjets.p[2][iprt], pyjets.p[3][iprt]);
113 if (pyjets.k[0][iprt] >= 1 && pyjets.k[0][iprt] <= 10) {
115 }
else if (pyjets.k[0][iprt] >= 11 && pyjets.k[0][iprt] <= 20) {
117 }
else if (pyjets.k[0][iprt] >= 21 && pyjets.k[0][iprt] <= 30) {
119 }
else if (pyjets.k[0][iprt] >= 31 && pyjets.k[0][iprt] <= 100) {
120 dstatus = pyjets.k[0][iprt];
123 new HepMC::GenParticle(pmom, HepPID::translatePythiatoPDT(pyjets.k[1][iprt]), dstatus);
124 daughter->suggest_barcode(iprt + 1);
125 DecVtx->add_particle_out(daughter);
129 for (iprt1 = iprt + 1; iprt1 < pyjets.n; iprt1++)
131 if (pyjets.k[2][iprt1] !=
parent)
134 HepMC::FourVector pmomN(pyjets.p[0][iprt1], pyjets.p[1][iprt1], pyjets.p[2][iprt1], pyjets.p[3][iprt1]);
137 if (pyjets.k[0][iprt1] >= 1 && pyjets.k[0][iprt1] <= 10) {
139 }
else if (pyjets.k[0][iprt1] >= 11 && pyjets.k[0][iprt1] <= 20) {
141 }
else if (pyjets.k[0][iprt1] >= 21 && pyjets.k[0][iprt1] <= 30) {
143 }
else if (pyjets.k[0][iprt1] >= 31 && pyjets.k[0][iprt1] <= 100) {
144 dstatus = pyjets.k[0][iprt1];
147 new HepMC::GenParticle(pmomN, HepPID::translatePythiatoPDT(pyjets.k[1][iprt1]), dstatus);
148 daughterN->suggest_barcode(iprt1 + 1);
149 DecVtx->add_particle_out(daughterN);
155 fEvt->add_vertex(DecVtx);
167 fEvt->set_beam_particles(
nullptr,
nullptr);
188 std::unique_ptr<HepMCProduct> bare_product(
new HepMCProduct());
191 bare_product->addHepMCData(
fEvt);
203 int py6PID = HepPID::translatePDTtoPythia(
particleID);
205 int pythiaCode =
pycomp_(py6PID);
207 int has_antipart = pydat2.kchg[3 - 1][pythiaCode - 1];
209 int py6PID2 = has_antipart ? -1 * py6PID : py6PID;
210 double the = 2. * atan(
exp(
eta));
212 if (phi > 2. *
M_PI) {
213 phi = phi - 2. *
M_PI;
217 pyjets.p[4][ip - 1] = pyjets.p[4][ip - 2];
219 py1ent_(ip, py6PID2, ee, the, phi);
221 double px = pyjets.p[0][ip - 1];
222 double py = pyjets.p[1][ip - 1];
223 double pz = pyjets.p[2][ip - 1];
224 HepMC::FourVector ap(
px,
py, pz, ee);
226 APart->suggest_barcode(ip);