File indexing completed on 2025-01-18 09:12:42
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <boost/test/unit_test.hpp>
0010
0011 #include "Acts/Material/BinnedSurfaceMaterial.hpp"
0012 #include "Acts/Material/Material.hpp"
0013 #include "Acts/Material/MaterialSlab.hpp"
0014 #include "Acts/Utilities/BinUtility.hpp"
0015 #include "Acts/Utilities/BinningType.hpp"
0016
0017 #include <utility>
0018 #include <vector>
0019
0020 namespace Acts::Test {
0021
0022
0023 BOOST_AUTO_TEST_CASE(BinnedSurfaceMaterial_construction_test) {
0024 BinUtility xyBinning(2, -1., 1., open, AxisDirection::AxisX);
0025 xyBinning += BinUtility(3, -3., 3., open, AxisDirection::AxisY);
0026
0027
0028 MaterialSlab a00(Material::fromMolarDensity(1., 2., 3., 4., 5.), 6.);
0029 MaterialSlab a01(Material::fromMolarDensity(2., 3., 4., 5., 6.), 7.);
0030 MaterialSlab a02(Material::fromMolarDensity(3., 4., 5., 6., 7.), 8.);
0031 MaterialSlab a10(Material::fromMolarDensity(4., 5., 6., 7., 8.), 9.);
0032 MaterialSlab a11(Material::fromMolarDensity(5., 6., 7., 8., 9.), 10.);
0033 MaterialSlab a12(Material::fromMolarDensity(6., 7., 8., 9., 10.), 11.);
0034
0035
0036 std::vector<MaterialSlab> l0 = {a00, a10};
0037 std::vector<MaterialSlab> l1 = {a01, a11};
0038 std::vector<MaterialSlab> l2 = {a02, a12};
0039
0040
0041 std::vector<std::vector<MaterialSlab>> m = {std::move(l0), std::move(l1),
0042 std::move(l2)};
0043
0044
0045 BinnedSurfaceMaterial bsm(xyBinning, std::move(m));
0046
0047
0048 BinnedSurfaceMaterial bsmCopy(bsm);
0049
0050
0051 BinnedSurfaceMaterial bsmAssigned = bsm;
0052
0053
0054 BinnedSurfaceMaterial bsmMoved(std::move(bsmCopy));
0055
0056
0057 BinnedSurfaceMaterial bsmMoveAssigned(std::move(bsmAssigned));
0058 }
0059
0060 }