9 #include <boost/test/unit_test.hpp>
24 using namespace Acts::UnitLiterals;
25 using namespace ActsFatras;
31 struct MockMakeChildren {
32 template <
typename generator_t>
33 std::array<ActsFatras::Particle, 4> operator()(
47 struct MockEverything {
48 bool operator()(
const Particle & )
const {
return true; }
64 std::vector<Particle> children;
69 BOOST_AUTO_TEST_SUITE(FatrasContinuousProcess)
76 BOOST_CHECK(not
process(f.generator, f.slab, f.parent, f.children));
77 BOOST_CHECK_EQUAL(f.children.size(), 4
u);
86 f.parent.setAbsoluteMomentum(20_GeV);
87 BOOST_CHECK(not
process(f.generator, f.slab, f.parent, f.children));
88 BOOST_CHECK_EQUAL(f.children.size(), 4
u);
90 f.parent.setAbsoluteMomentum(10_GeV);
91 BOOST_CHECK(not
process(f.generator, f.slab, f.parent, f.children));
92 BOOST_CHECK_EQUAL(f.children.size(), 8
u);
94 f.parent.setAbsoluteMomentum(2_GeV);
95 BOOST_CHECK(not
process(f.generator, f.slab, f.parent, f.children));
97 BOOST_CHECK_EQUAL(f.children.size(), 8
u);
108 f.parent.setAbsoluteMomentum(20_GeV);
109 BOOST_CHECK(not
process(f.generator, f.slab, f.parent, f.children));
110 BOOST_CHECK_EQUAL(f.children.size(), 4
u);
112 f.parent.setAbsoluteMomentum(10_GeV);
113 BOOST_CHECK(not
process(f.generator, f.slab, f.parent, f.children));
114 BOOST_CHECK_EQUAL(f.children.size(), 8
u);
116 f.parent.setAbsoluteMomentum(2_GeV);
117 BOOST_CHECK(
process(f.generator, f.slab, f.parent, f.children));
119 BOOST_CHECK_EQUAL(f.children.size(), 12
u);
131 BOOST_CHECK(not
process(f.generator, f.slab, f.parent, f.children));
132 BOOST_CHECK_EQUAL(f.children.size(), 0
u);
135 BOOST_CHECK(not
process(f.generator, f.slab, f.parent, f.children));
136 BOOST_CHECK_EQUAL(f.children.size(), 1
u);
139 BOOST_CHECK(not
process(f.generator, f.slab, f.parent, f.children));
140 BOOST_CHECK_EQUAL(f.children.size(), 4
u);
143 BOOST_CHECK(not
process(f.generator, f.slab, f.parent, f.children));
144 BOOST_CHECK_EQUAL(f.children.size(), 8
u);
147 BOOST_AUTO_TEST_SUITE_END()