9 #include <boost/test/unit_test.hpp>
16 using namespace ActsFatras;
17 using namespace ActsExamples;
29 double activation = 1;
39 params.
values = {position.x(), position.y()};
40 params.
variances = {variance.x(), variance.y()};
46 auto testDigitizedParametersWithTwoClusters(
bool merge,
const Vector2 &firstHit,
55 bool commonCorner =
true;
57 ModuleClusters moduleClusters(binUtility, boundIndices, merge, nsigma,
60 moduleClusters.add(makeDigitizationParameters(firstHit, {1, 1}, binUtility),
62 moduleClusters.add(makeDigitizationParameters(secondHit, {1, 1}, binUtility),
65 return moduleClusters.digitizedParameters();
70 BOOST_AUTO_TEST_SUITE(DigitizationModuleClustersTests)
75 auto result = testDigitizedParametersWithTwoClusters(
true, {0, 0}, {0, 0});
76 BOOST_CHECK_EQUAL(result.size(), 1);
78 result = testDigitizedParametersWithTwoClusters(
false, {0, 0}, {0, 0});
79 BOOST_CHECK_EQUAL(result.size(), 2);
84 auto result = testDigitizedParametersWithTwoClusters(
true, {0, 0}, {5, 0});
85 BOOST_CHECK_EQUAL(result.size(), 2);
87 result = testDigitizedParametersWithTwoClusters(
false, {0, 0}, {5, 0});
88 BOOST_CHECK_EQUAL(result.size(), 2);
92 BOOST_AUTO_TEST_SUITE_END()