Skip to content

Commit

Permalink
Merge pull request #25 from tmadlener/rm-explicit-types
Browse files Browse the repository at this point in the history
Remove a few explicit types and use auto
  • Loading branch information
kjvbrt authored Dec 11, 2023
2 parents a88e2b7 + 0e22f39 commit 6875653
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions k4Gen/src/components/EDMToHepMCConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ StatusCode EDMToHepMCConverter::execute() {

auto particles = m_genphandle.get();
// ownership of event given to data service at the end of execute
HepMC3::GenEvent* event = new HepMC3::GenEvent;
auto* event = new HepMC3::GenEvent;
event->set_units(HepMC3::Units::GEV, HepMC3::Units::MM);


for (auto p : *(particles)) {
if (p.getGeneratorStatus() == 1) { // only final state particles
edm4hep::Vector3f mom = p.getMomentum();
GenParticle* pHepMC =
const auto& mom = p.getMomentum();
auto* pHepMC =
new GenParticle(HepMC3::FourVector(mom.x, mom.y, mom.z, p.getMass()),
p.getPDG(),
p.getGeneratorStatus()); // hepmc status code for final state particle

edm4hep::Vector3d pos = p.getVertex();
HepMC3::GenVertex* v =
const auto& pos = p.getVertex();
auto* v =
new HepMC3::GenVertex(HepMC3::FourVector(pos.x,
pos.y,
pos.z,
Expand Down

0 comments on commit 6875653

Please sign in to comment.