From 58fa8c0b16458b645a3edfd8469fddd87d8d8689 Mon Sep 17 00:00:00 2001
From: Andre Sailer <andre.philippe.sailer@cern.ch>
Date: Tue, 23 Apr 2024 08:54:21 +0200
Subject: [PATCH] Geant4GFlashShowerModel: remove wrong unit conversions from
 particleBound properties

---
 DDG4/plugins/Geant4GFlashShowerModel.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/DDG4/plugins/Geant4GFlashShowerModel.cpp b/DDG4/plugins/Geant4GFlashShowerModel.cpp
index 711be5109..8b7ea1a29 100644
--- a/DDG4/plugins/Geant4GFlashShowerModel.cpp
+++ b/DDG4/plugins/Geant4GFlashShowerModel.cpp
@@ -231,19 +231,19 @@ void Geant4GFlashShowerModel::constructSensitives(Geant4DetectorConstructionCont
 
   for(const auto& prop : this->m_eMin)    {
     G4ParticleDefinition* def = this->getParticleDefinition(prop.first);
-    double val = dd4hep::_toDouble(prop.second) * dd4hep::GeV/CLHEP::GeV;
+    double val = dd4hep::_toDouble(prop.second) / CLHEP::GeV;
     this->m_particleBounds->SetMinEneToParametrise(*def, val);
     this->info("SetMinEneToParametrise [%-16s] = %8.4f GeV", prop.first.c_str(), val);
   }
   for(const auto& prop : this->m_eMax)    {
     G4ParticleDefinition* def = this->getParticleDefinition(prop.first);
-    double val = dd4hep::_toDouble(prop.second) * dd4hep::GeV/CLHEP::GeV;
+    double val = dd4hep::_toDouble(prop.second) / CLHEP::GeV;
     this->m_particleBounds->SetMaxEneToParametrise(*def, val);
     this->info("SetMaxEneToParametrise [%-16s] = %8.4f GeV", prop.first.c_str(), val);
   }
   for(const auto& prop : this->m_eKill)    {
     G4ParticleDefinition* def = this->getParticleDefinition(prop.first);
-    double val = dd4hep::_toDouble(prop.second) * dd4hep::GeV/CLHEP::GeV;
+    double val = dd4hep::_toDouble(prop.second) / CLHEP::GeV;
     this->m_particleBounds->SetEneToKill(*def, val);
     this->info("SetEneToKill           [%-16s] = %8.4f GeV", prop.first.c_str(), val);
   }
-- 
GitLab