From 52eea49966957728157f46bb9e2ab7a829f66df4 Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Thu, 4 Jul 2019 15:09:34 +0200 Subject: [PATCH] Prepare DD4hep for Geant4 units in TGeo; Start digitization package --- DDCore/src/MatrixHelpers.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/DDCore/src/MatrixHelpers.cpp b/DDCore/src/MatrixHelpers.cpp index 1a70ccac0..27a4121f4 100644 --- a/DDCore/src/MatrixHelpers.cpp +++ b/DDCore/src/MatrixHelpers.cpp @@ -24,9 +24,6 @@ // ROOT includes #include "TGeoMatrix.h" -using namespace dd4hep; - - TGeoIdentity* dd4hep::detail::matrix::_identity() { return gGeoIdentity; } @@ -108,7 +105,7 @@ TGeoHMatrix* dd4hep::detail::matrix::_transform(const Position& pos, const Rotat } /// Convert a TGeoMatrix object to a generic Transform3D \ingroup DD4HEP \ingroup DD4HEP_CORE -Transform3D dd4hep::detail::matrix::_transform(const TGeoMatrix* matrix) { +dd4hep::Transform3D dd4hep::detail::matrix::_transform(const TGeoMatrix* matrix) { const Double_t* t = matrix->GetTranslation(); if ( matrix->IsRotation() ) { const Double_t* r = matrix->GetRotationMatrix(); @@ -120,8 +117,9 @@ Transform3D dd4hep::detail::matrix::_transform(const TGeoMatrix* matrix) { 0e0,0e0,0e0,t[1]*MM_2_CM, 0e0,0e0,0e0,t[2]*MM_2_CM); } + // add another implementation that takes const reference -Transform3D dd4hep::detail::matrix::_transform(const TGeoMatrix& matrix) { +dd4hep::Transform3D dd4hep::detail::matrix::_transform(const TGeoMatrix& matrix) { const Double_t* t = matrix.GetTranslation(); if ( matrix.IsRotation() ) { const Double_t* r = matrix.GetRotationMatrix(); @@ -134,8 +132,8 @@ Transform3D dd4hep::detail::matrix::_transform(const TGeoMatrix& matrix) { 0e0,0e0,0e0,t[2]*MM_2_CM); } -dd4hep::XYZAngles dd4hep::detail::matrix::_xyzAngles(const TGeoMatrix* m) { - return m->IsRotation() ? _xyzAngles(m->GetRotationMatrix()) : XYZAngles(0,0,0); +dd4hep::XYZAngles dd4hep::detail::matrix::_xyzAngles(const TGeoMatrix* matrix) { + return matrix->IsRotation() ? _xyzAngles(matrix->GetRotationMatrix()) : XYZAngles(0,0,0); } dd4hep::XYZAngles dd4hep::detail::matrix::_xyzAngles(const double* r) { -- GitLab