Skip to content

Commit

Permalink
replace cuboid with trapezoid bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitra97 committed Nov 9, 2023
1 parent 81df0d5 commit ca410ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Core/src/Detector/MultiWireStructureBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ Acts::Experimental::MultiWireStructureBuilder::MultiWireStructureBuilder(
Acts::Experimental::DetectorComponent
Acts::Experimental::MultiWireStructureBuilder::construct(
const Acts::GeometryContext& gctx) {
if (mCfg.mlBounds.size() != 3u) {
if (mCfg.mlBounds.size() != 4u) {
throw std::invalid_argument(
"MultiWireStructureBuilder: Invalid dimension for bounds.");
"MultiWireStructureBuilder: Invalid dimension for bounds. Trapezoid Volume Bounds are supported.");
}

// Configure the external structure builder for the internal structure
Acts::Experimental::VolumeStructureBuilder::Config vsConfig;
vsConfig.boundsType = Acts::VolumeBounds::eCuboid;
vsConfig.boundsType = Acts::VolumeBounds::eTrapezoid;
vsConfig.transform = mCfg.transform;
vsConfig.boundValues = mCfg.mlBounds;
vsConfig.auxiliary = "Construct External Structure";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE(Multi_Wire_Structure_Builder_StrawSurfacesCreation) {
}
}

std::vector<ActsScalar> vBounds = {0.5 * nSurfacesX * 2 * radius,
std::vector<ActsScalar> vBounds = {0.5*nSurfacesX * 2 * radius, 0.5 * nSurfacesX * 2 * radius,
0.5 * nSurfacesY * 2 * radius, halfZ};

MultiWireStructureBuilder::Config mlCfg;
Expand Down
6 changes: 3 additions & 3 deletions Tests/UnitTests/Core/Navigation/MultiWireNavigationTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ using namespace Acts;
using namespace Acts::Experimental;
using namespace Acts::detail;


GeometryContext tContext;

BOOST_AUTO_TEST_SUITE(Experimental)
Expand Down Expand Up @@ -71,7 +70,7 @@ BOOST_AUTO_TEST_CASE(Navigation_in_Indexed_Surfaces) {
pos.y() = ipos.y() + 2 * (i + 1) * radius;
}

std::vector<ActsScalar> vBounds = {0.5 * nSurfacesX * 2 * radius,
std::vector<ActsScalar> vBounds = {0.5 * nSurfacesX * 2 * radius, 0.5 * nSurfacesX * 2 * radius,
0.5 * nSurfacesY * 2 * radius, halfZ};

MultiWireStructureBuilder::Config mlCfg;
Expand All @@ -90,10 +89,11 @@ BOOST_AUTO_TEST_CASE(Navigation_in_Indexed_Surfaces) {

Acts::Experimental::NavigationState nState;
nState.position = Acts::Vector3(0., -60., 0.);
nState.direction = Acts::Vector3(-1., 1., 0.);
nState.direction = Acts::Vector3(0., 1., 0.);

nState.currentVolume = volumes.front().get();
nState.currentVolume->updateNavigationState(tContext, nState);
std::cout<<nState.surfaceCandidates.size()<<std::endl;

// check the surface candidates after update (12 surfaces + 6 portals)
BOOST_CHECK(nState.surfaceCandidates.size() == 18u);
Expand Down

0 comments on commit ca410ae

Please sign in to comment.