From bad0dac6cd4a9f5265bb99fde7e4ffae141deb37 Mon Sep 17 00:00:00 2001 From: Frank Gaede <frank.gaede@desy.de> Date: Thu, 3 Dec 2020 18:57:15 +0100 Subject: [PATCH] fix treatment of units in Geant4Output2EDM4hep --- DDG4/edm4hep/Geant4Output2EDM4hep.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DDG4/edm4hep/Geant4Output2EDM4hep.cpp b/DDG4/edm4hep/Geant4Output2EDM4hep.cpp index 0eab1aa9d..ca33873cc 100644 --- a/DDG4/edm4hep/Geant4Output2EDM4hep.cpp +++ b/DDG4/edm4hep/Geant4Output2EDM4hep.cpp @@ -26,7 +26,6 @@ #include "G4Threading.hh" #include "G4AutoLock.hh" #include <G4Version.hh> -#include <G4SystemOfUnits.hh> // edm4hep include files #include "edm4hep/EventHeaderCollection.h" @@ -502,7 +501,7 @@ void Geant4Output2EDM4hep::saveCollection(OutputContext<G4Event>& /*ctxt*/, G4VH float(hit->position.x()/CLHEP::mm), float(hit->position.y()/CLHEP::mm), float(hit->position.z()/CLHEP::mm)}); - sch.setEnergy( hit->energyDeposit ); + sch.setEnergy( hit->energyDeposit/CLHEP::GeV ); // now add the individual step contributions for(Geant4HitData::Contributions::const_iterator ci=hit->truth.begin(); -- GitLab