Skip to content

Commit

Permalink
refactor: Multiwirebuilder fix (#2450)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dimitra97 authored Sep 25, 2023
1 parent ee6d693 commit c92cded
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 3 additions & 0 deletions Core/include/Acts/Detector/MultiWireStructureBuilder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class MultiWireStructureBuilder {
/// The surfaces of the Multi Wire
std::vector<std::shared_ptr<Acts::Surface>> mlSurfaces = {};

/// The transform of the Multi Wire
Transform3 transform = Transform3::Identity();

/// The bounds of the multi-wire volume
std::vector<ActsScalar> mlBounds = {};

Expand Down
9 changes: 2 additions & 7 deletions Core/src/Detector/MultiWireStructureBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c92cded

Please sign in to comment.