Skip to content

Commit

Permalink
Switch to non-deprecated setter for newer EDM4hep versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener authored and andresailer committed Apr 22, 2024
1 parent 445ab1f commit 524436a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions DDG4/edm4hep/Geant4Output2EDM4hep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,11 @@ void Geant4Output2EDM4hep::saveCollection(OutputContext<G4Event>& /*ctxt*/, G4VH
sth.setEDep(hit->energyDeposit/CLHEP::GeV);
sth.setPathLength(hit->length/CLHEP::mm);
sth.setTime(hit->truth.time/CLHEP::ns);
#if EDM4HEP_BUILD_VERSION >= EDM4HEP_VERSION(0, 10, 99)
sth.setParticle(mcp);
#else
sth.setMCParticle(mcp);
#endif
sth.setPosition( {pos.x()/CLHEP::mm, pos.y()/CLHEP::mm, pos.z()/CLHEP::mm} );
sth.setMomentum( {float(mom.x()/CLHEP::GeV),float(mom.y()/CLHEP::GeV),float(mom.z()/CLHEP::GeV)} );
auto particleIt = pm->particles().find(trackID);
Expand Down

0 comments on commit 524436a

Please sign in to comment.