File indexing completed on 2025-01-18 09:13:04
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <boost/test/unit_test.hpp>
0010
0011 #include <ActsExamples/Alignment/AlignmentAlgorithm.hpp>
0012
0013 BOOST_AUTO_TEST_CASE(Single_sensitive_Test) {
0014 Acts::GeometryIdentifier geoId;
0015 geoId.setSensitive(1);
0016 ActsExamples::AlignmentGroup aGroup("test", {geoId});
0017 BOOST_CHECK(aGroup.has(geoId));
0018
0019 Acts::GeometryIdentifier badId;
0020 badId.setSensitive(2);
0021 BOOST_CHECK(!aGroup.has(badId));
0022 }
0023
0024 BOOST_AUTO_TEST_CASE(Single_layer_Test) {
0025 Acts::GeometryIdentifier geoId;
0026 geoId.setLayer(1);
0027 ActsExamples::AlignmentGroup aGroup("test", {geoId});
0028 BOOST_CHECK(aGroup.has(geoId));
0029
0030 Acts::GeometryIdentifier badId;
0031 badId.setLayer(2);
0032 BOOST_CHECK(!aGroup.has(badId));
0033 }
0034
0035 BOOST_AUTO_TEST_CASE(Single_volume_Test) {
0036 Acts::GeometryIdentifier geoId;
0037 geoId.setVolume(1);
0038 ActsExamples::AlignmentGroup aGroup("test", {geoId});
0039 BOOST_CHECK(aGroup.has(geoId));
0040
0041 Acts::GeometryIdentifier badId;
0042 badId.setVolume(2);
0043 BOOST_CHECK(!aGroup.has(badId));
0044 }
0045
0046 BOOST_AUTO_TEST_CASE(Hierarchy_test) {
0047 Acts::GeometryIdentifier geoId;
0048 geoId.setVolume(1);
0049 ActsExamples::AlignmentGroup aGroup("test", {geoId});
0050
0051 Acts::GeometryIdentifier geoId2;
0052 geoId2.setVolume(1);
0053 geoId2.setLayer(2);
0054 BOOST_CHECK(aGroup.has(geoId2));
0055
0056 Acts::GeometryIdentifier geoId3;
0057 geoId3.setVolume(1);
0058 geoId3.setLayer(3);
0059 BOOST_CHECK(aGroup.has(geoId3));
0060 }
0061
0062 BOOST_AUTO_TEST_CASE(Hierarchy_test_2) {
0063 Acts::GeometryIdentifier geoId;
0064 geoId.setVolume(1);
0065 geoId.setLayer(1);
0066 ActsExamples::AlignmentGroup aGroup("test", {geoId});
0067
0068 Acts::GeometryIdentifier badId;
0069 badId.setVolume(1);
0070 BOOST_CHECK(!aGroup.has(badId));
0071 }
0072
0073 BOOST_AUTO_TEST_CASE(Multiple_test) {
0074 Acts::GeometryIdentifier geoId1;
0075 geoId1.setVolume(1);
0076 geoId1.setLayer(1);
0077 Acts::GeometryIdentifier geoId2;
0078 geoId2.setVolume(2);
0079 geoId2.setLayer(2);
0080 Acts::GeometryIdentifier geoId3;
0081 geoId3.setVolume(3);
0082 geoId3.setLayer(3);
0083 Acts::GeometryIdentifier geoId4;
0084 geoId4.setVolume(4);
0085 geoId4.setLayer(4);
0086
0087 ActsExamples::AlignmentGroup aGroup("test", {geoId1, geoId2, geoId3});
0088
0089 BOOST_CHECK(aGroup.has(geoId1));
0090 BOOST_CHECK(aGroup.has(geoId2));
0091 BOOST_CHECK(aGroup.has(geoId3));
0092 BOOST_CHECK(!aGroup.has(geoId4));
0093 }