From b49958396f84f6bf30a4d73e8fa32e7e416aa2c7 Mon Sep 17 00:00:00 2001 From: Andre Sailer <andre.philippe.sailer@cern.ch> Date: Thu, 21 Jan 2016 09:14:20 +0000 Subject: [PATCH] BoostInteraction: Use particle mass from input file instead of particle table Fixes crash when unknown particles (e.g. PDG 94) exist in the MCHistory Should only be a problem if the MCGenerator does not write proper information --- DDG4/src/Geant4InputHandling.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DDG4/src/Geant4InputHandling.cpp b/DDG4/src/Geant4InputHandling.cpp index 3f7bd611a..9c4a358b9 100644 --- a/DDG4/src/Geant4InputHandling.cpp +++ b/DDG4/src/Geant4InputHandling.cpp @@ -269,7 +269,7 @@ int DD4hep::Simulation::boostInteraction(const Geant4Action* caller, double y = p->vsx; double z = p->vsz; - double m = p.definition()->GetPDGMass(); + double m = p->mass; double e2 = SQR(p->psx)+SQR(p->psy)+SQR(p->psz)+SQR(m); double px = betagamma * std::sqrt(e2) + gamma * p->psx; double py = p->psy; -- GitLab