From c92cdedaef63e65e70af3b2eef0b7eda47621206 Mon Sep 17 00:00:00 2001 From: Amperiadou Dimitra <63058524+dimitra97@users.noreply.github.com> Date: Mon, 25 Sep 2023 12:04:10 +0200 Subject: [PATCH] refactor: Multiwirebuilder fix (#2450) This PR corrects the multi wire builder which in the previous version It could only create the multi wire volumes with transform (0,0,0). Now the probability of providing a transform and bounds is introduced. --- Core/include/Acts/Detector/MultiWireStructureBuilder.hpp | 3 +++ Core/src/Detector/MultiWireStructureBuilder.cpp | 9 ++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Core/include/Acts/Detector/MultiWireStructureBuilder.hpp b/Core/include/Acts/Detector/MultiWireStructureBuilder.hpp index e413d0d019e..e58ce69290c 100644 --- a/Core/include/Acts/Detector/MultiWireStructureBuilder.hpp +++ b/Core/include/Acts/Detector/MultiWireStructureBuilder.hpp @@ -35,6 +35,9 @@ class MultiWireStructureBuilder { /// The surfaces of the Multi Wire std::vector> mlSurfaces = {}; + /// The transform of the Multi Wire + Transform3 transform = Transform3::Identity(); + /// The bounds of the multi-wire volume std::vector mlBounds = {}; diff --git a/Core/src/Detector/MultiWireStructureBuilder.cpp b/Core/src/Detector/MultiWireStructureBuilder.cpp index 19e656191b3..b07349f933c 100644 --- a/Core/src/Detector/MultiWireStructureBuilder.cpp +++ b/Core/src/Detector/MultiWireStructureBuilder.cpp @@ -124,13 +124,8 @@ Acts::Experimental::MultiWireStructureBuilder::construct( // Configure the external structure builder for the internal structure Acts::Experimental::VolumeStructureBuilder::Config vsConfig; vsConfig.boundsType = Acts::VolumeBounds::eCuboid; - - Acts::Extent cuboidExtent; - cuboidExtent.set(Acts::binX, -mCfg.mlBounds[0], mCfg.mlBounds[0]); - cuboidExtent.set(Acts::binY, -mCfg.mlBounds[1], mCfg.mlBounds[1]); - cuboidExtent.set(Acts::binZ, -mCfg.mlBounds[2], mCfg.mlBounds[2]); - - vsConfig.extent = cuboidExtent; + vsConfig.transform = mCfg.transform; + vsConfig.boundValues = mCfg.mlBounds; vsConfig.auxiliary = "Construct External Structure"; // Configure the internal structure builder for the internal structure