Skip to content

Commit

Permalink
Adding endpoint vertex of MCParticle
Browse files Browse the repository at this point in the history
  • Loading branch information
kjvbrt committed Feb 20, 2024
1 parent ba03ab5 commit 0854134
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions k4Gen/src/components/HepMCToEDMConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ edm4hep::MutableMCParticle HepMCToEDMConverter::convert(std::shared_ptr<const He
edm_particle.setVertex( {float(pos.x()), float(pos.y()), float(pos.z())} );
}

auto endVtx = hepmcParticle->end_vertex();
if ( endVtx != nullptr ) {
auto& pos = endVtx->position();
edm_particle.setEndpoint( {pos.x(), pos.y(), pos.z()} );
}

return edm_particle;
}

Expand Down

0 comments on commit 0854134

Please sign in to comment.