Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove a few explicit types and use auto #25

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading