Skip to content

Commit 8ecd3ed

Browse files
committed
Fix residualDecay code
1 parent 56fe406 commit 8ecd3ed

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

GeneratorInterface/Pythia8Interface/plugins/Pythia8HepMC3Hadronizer.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,12 +1041,11 @@ bool Pythia8HepMC3Hadronizer::residualDecay() {
10411041
p->production_vertex()->position().t()));
10421042
prod_vtx0->add_particle_in(p);
10431043
(event3().get())->add_vertex(prod_vtx0);
1044-
HepMC3::GenParticle *pnew;
10451044
Pythia8::Event pyev = fDecayer->event;
10461045
double momFac = 1.;
10471046
for (int i = 2; i < pyev.size(); ++i) {
10481047
// Fill the particle.
1049-
pnew = new HepMC3::GenParticle(
1048+
HepMC3::GenParticlePtr pnew = make_shared<HepMC3::GenParticle>(
10501049
HepMC3::FourVector(
10511050
momFac * pyev[i].px(), momFac * pyev[i].py(), momFac * pyev[i].pz(), momFac * pyev[i].e()),
10521051
pyev[i].id(),

0 commit comments

Comments
 (0)