From d5b763af275d279add283fd90f57d359e08a5466 Mon Sep 17 00:00:00 2001 From: Matthew Leary Harris <44590310+Matthewharri@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:21:51 +0200 Subject: [PATCH] move converison constant into function --- Plugins/GeoModel/src/GeoModelMaterialConverter.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Plugins/GeoModel/src/GeoModelMaterialConverter.cpp b/Plugins/GeoModel/src/GeoModelMaterialConverter.cpp index 6df13079a72..e60dbca87ed 100644 --- a/Plugins/GeoModel/src/GeoModelMaterialConverter.cpp +++ b/Plugins/GeoModel/src/GeoModelMaterialConverter.cpp @@ -12,14 +12,13 @@ #include "GeoModelKernel/GeoMaterial.h" #include "GeoModelKernel/Units.h" -namespace { -constexpr double s_densityCnvFactor = 1. / GeoModelKernelUnits::gram; -} + Acts::Material Acts::GeoModel::geoMaterialConverter(const GeoMaterial* gm, bool useMolarDensity) { + constexpr double densityCnvFactor = 1. / GeoModelKernelUnits::gram; double x0 = gm->getRadLength(); double l0 = gm->getIntLength(); - double density = gm->getDensity() * s_densityCnvFactor; + double density = gm->getDensity() * densityCnvFactor; double A = 0.; double Z = 0.; // Get number elements