File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
test/k4FWCoreTest/src/components Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -39,14 +39,13 @@ struct ExampleFunctionalTransformer final
39
39
info () << " Transforming " << input.size () << " particles" << endmsg;
40
40
auto coll_out = edm4hep::MCParticleCollection ();
41
41
for (const auto & particle : input) {
42
- auto new_particle = edm4hep::MutableMCParticle ();
42
+ auto new_particle = coll_out. create ();
43
43
new_particle.setPDG (particle.getPDG () + m_offset);
44
44
new_particle.setGeneratorStatus (particle.getGeneratorStatus () + m_offset);
45
45
new_particle.setSimulatorStatus (particle.getSimulatorStatus () + m_offset);
46
46
new_particle.setCharge (particle.getCharge () + m_offset);
47
47
new_particle.setTime (particle.getTime () + m_offset);
48
48
new_particle.setMass (particle.getMass () + m_offset);
49
- coll_out->push_back (new_particle);
50
49
}
51
50
return coll_out;
52
51
}
You can’t perform that action at this time.
0 commit comments