Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:12:42

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #include <boost/test/unit_test.hpp>
0010 
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Geometry/VolumeBounds.hpp"
0013 
0014 namespace Acts::Test {
0015 
0016 BOOST_AUTO_TEST_SUITE(Volumes)
0017 
0018 BOOST_AUTO_TEST_CASE(VolumeBoundsTest) {
0019   // Tests if the planes are correctly oriented
0020   // s_planeXY
0021   // s_planeYZ
0022   // s_planeZX
0023 
0024   Vector3 xaxis(1., 0., 0.);
0025   Vector3 yaxis(0., 1., 0.);
0026   Vector3 zaxis(0., 0., 1.);
0027 
0028   auto rotXY = s_planeXY.rotation();
0029   BOOST_CHECK(rotXY.col(0).isApprox(xaxis));
0030   BOOST_CHECK(rotXY.col(1).isApprox(yaxis));
0031   BOOST_CHECK(rotXY.col(2).isApprox(zaxis));
0032 
0033   auto rotYZ = s_planeYZ.rotation();
0034   BOOST_CHECK(rotYZ.col(0).isApprox(yaxis));
0035   BOOST_CHECK(rotYZ.col(1).isApprox(zaxis));
0036   BOOST_CHECK(rotYZ.col(2).isApprox(xaxis));
0037 
0038   auto rotZX = s_planeZX.rotation();
0039   BOOST_CHECK(rotZX.col(0).isApprox(zaxis));
0040   BOOST_CHECK(rotZX.col(1).isApprox(xaxis));
0041   BOOST_CHECK(rotZX.col(2).isApprox(yaxis));
0042 }
0043 
0044 BOOST_AUTO_TEST_SUITE_END()
0045 
0046 }  // namespace Acts::Test