9 #include <boost/test/unit_test.hpp>
24 namespace tt = boost::test_tools;
31 using namespace Acts::UnitLiterals;
32 double eps = std::numeric_limits<double>::epsilon();
39 double rotationAngle = 60_degree;
40 Vector3 xPos(cos(rotationAngle), 0., sin(rotationAngle));
42 Vector3 zPos(-sin(rotationAngle), 0., cos(rotationAngle));
43 rotation.col(0) = xPos;
44 rotation.col(1) = yPos;
45 rotation.col(2) = zPos;
54 Volume volume(transform, std::make_shared<const CuboidVolumeBounds>(bounds));
55 BOOST_CHECK_EQUAL(volume.
transform().matrix(), transform.matrix());
59 auto vBounds =
static_cast<const decltype(bounds)*
>(&volume.
volumeBounds());
60 BOOST_CHECK_EQUAL(*vBounds, bounds);
64 Vector3 shiftTranslation{-4_mm, -5_mm, -6_mm};
65 shift.translation() = shiftTranslation;
66 Volume volumeShift(volume, shift);
67 BOOST_CHECK_EQUAL(volumeShift.
center(),
69 BOOST_CHECK_EQUAL(volumeShift.
transform().rotation(),
74 BOOST_CHECK(!volume.
inside({10_mm, 2_mm, 3_mm}));
75 BOOST_CHECK(volume.inside({10_mm, 2_mm, 3_mm}, 2_mm));
79 BOOST_CHECK_EQUAL(volume.binningPosition(
gctx,
binX), volume.center());