Skip to content

Commit

Permalink
move converison constant into function
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthewharri authored Aug 19, 2024
1 parent f457684 commit d5b763a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Plugins/GeoModel/src/GeoModelMaterialConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d5b763a

Please sign in to comment.