From 1364196f8521a13c70a880d2251a59be716ceba3 Mon Sep 17 00:00:00 2001 From: Norraphat Date: Wed, 2 Aug 2023 20:53:50 +0200 Subject: [PATCH] backport --- .../SimplifiedGeometryPropagator/plugins/Bremsstrahlung.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/FastSimulation/SimplifiedGeometryPropagator/plugins/Bremsstrahlung.cc b/FastSimulation/SimplifiedGeometryPropagator/plugins/Bremsstrahlung.cc index 95fa73483abf4..9536ba7f279a9 100644 --- a/FastSimulation/SimplifiedGeometryPropagator/plugins/Bremsstrahlung.cc +++ b/FastSimulation/SimplifiedGeometryPropagator/plugins/Bremsstrahlung.cc @@ -137,6 +137,7 @@ void fastsim::Bremsstrahlung::interact(fastsim::Particle& particle, // Needed to rotate photons to the lab frame double theta = particle.momentum().Theta(); double phi = particle.momentum().Phi(); + double m2dontchange = particle.momentum().mass() * particle.momentum().mass(); // Calculate energy of these photons and add them to the event for (unsigned int i = 0; i < nPhotons; ++i) { @@ -155,6 +156,10 @@ void fastsim::Bremsstrahlung::interact(fastsim::Particle& particle, // Update the original e+/- particle.momentum() -= photonMom; + particle.momentum().SetXYZT(particle.momentum().px(), + particle.momentum().py(), + particle.momentum().pz(), + sqrt(pow(particle.momentum().P(), 2) + m2dontchange)); } }