9 #include <boost/test/unit_test.hpp>
23 using namespace Acts::Experimental;
28 BOOST_AUTO_TEST_SUITE(DetectorTests)
33 auto innerB = std::make_unique<CylinderVolumeBounds>(0., 20., 100);
34 auto innerV = DetectorVolumeFactory::construct(
38 auto middleLB = std::make_unique<CylinderVolumeBounds>(20., 60., 5);
39 auto middleLT = Transform3::Identity();
40 middleLT.pretranslate(
Vector3(0., 0., -95));
41 auto middleLV = DetectorVolumeFactory::construct(
45 auto middleDB = std::make_unique<CylinderVolumeBounds>(20., 40., 90);
46 auto middleDV = DetectorVolumeFactory::construct(
50 auto middleUB = std::make_unique<CylinderVolumeBounds>(40., 60., 90);
51 auto middleUV = DetectorVolumeFactory::construct(
55 auto middleRB = std::make_unique<CylinderVolumeBounds>(20., 60., 5);
56 auto middleRT = Transform3::Identity();
57 middleRT.pretranslate(
Vector3(0., 0., 95));
58 auto middleRV = DetectorVolumeFactory::construct(
62 auto outerB = std::make_unique<CylinderVolumeBounds>(60., 120., 100);
63 auto outerV = DetectorVolumeFactory::construct(
67 std::vector<std::shared_ptr<DetectorVolume>> rootVolumes = {
68 innerV, middleLV, middleDV, middleUV, middleRV, outerV};
75 auto detectorIndexed = Detector::makeShared(
"IndexedDetector", rootVolumes,
78 BOOST_CHECK(detectorIndexed->findDetectorVolume(
tContext, {10., 0., 0.}) ==
80 BOOST_CHECK(detectorIndexed->findDetectorVolume(
tContext, {25., 0., -93.}) ==
82 BOOST_CHECK(detectorIndexed->findDetectorVolume(
tContext, {35., 0., 0.}) ==
84 BOOST_CHECK(detectorIndexed->findDetectorVolume(
tContext, {55., 0., 0.}) ==
86 BOOST_CHECK(detectorIndexed->findDetectorVolume(
tContext, {40., 0., 92.}) ==
88 BOOST_CHECK(detectorIndexed->findDetectorVolume(
tContext, {65., 0., 0.}) ==
92 BOOST_AUTO_TEST_SUITE_END()