Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-31 08:17:57

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 using namespace Acts;
0015 
0016 namespace ActsTests {
0017 
0018 BOOST_AUTO_TEST_SUITE(GeometrySuite)
0019 
0020 BOOST_AUTO_TEST_CASE(VolumeBoundsTest) {
0021   // Tests if the planes are correctly oriented
0022   // s_planeXY
0023   // s_planeYZ
0024   // s_planeZX
0025 
0026   Vector3 xaxis(1., 0., 0.);
0027   Vector3 yaxis(0., 1., 0.);
0028   Vector3 zaxis(0., 0., 1.);
0029 
0030   auto rotXY = s_planeXY.rotation();
0031   BOOST_CHECK(rotXY.col(0).isApprox(xaxis));
0032   BOOST_CHECK(rotXY.col(1).isApprox(yaxis));
0033   BOOST_CHECK(rotXY.col(2).isApprox(zaxis));
0034 
0035   auto rotYZ = s_planeYZ.rotation();
0036   BOOST_CHECK(rotYZ.col(0).isApprox(yaxis));
0037   BOOST_CHECK(rotYZ.col(1).isApprox(zaxis));
0038   BOOST_CHECK(rotYZ.col(2).isApprox(xaxis));
0039 
0040   auto rotZX = s_planeZX.rotation();
0041   BOOST_CHECK(rotZX.col(0).isApprox(zaxis));
0042   BOOST_CHECK(rotZX.col(1).isApprox(xaxis));
0043   BOOST_CHECK(rotZX.col(2).isApprox(yaxis));
0044 }
0045 
0046 BOOST_AUTO_TEST_SUITE_END()
0047 
0048 }  // namespace ActsTests