9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
24 using namespace Acts::UnitLiterals;
57 std::shared_ptr<PerigeeSurface> perigeeSurface =
58 Surface::makeShared<PerigeeSurface>(pos0);
69 std::vector<const BoundParameters*> vec1 = {¶ms1a, ¶ms1b, ¶ms1c};
70 std::vector<const BoundParameters*>
vec2 = {¶ms1c, ¶ms1a, ¶ms1b};
72 auto res1 = finder.
find(vec1, vertexingOptions);
73 auto res2 = finder.
find(vec2, vertexingOptions);
76 std::cout << res1.error().message() << std::endl;
80 std::cout << res2.error().message() << std::endl;
83 if (res1.ok() and res2.ok()) {
84 BOOST_CHECK(!(*res1).empty());
85 BOOST_CHECK(!(*res2).empty());
86 Vector3D result1 = (*res1).back().position();
87 Vector3D result2 = (*res2).back().position();
88 BOOST_CHECK(result1 == result2);
107 double const expectedZResult = -13.013;
126 std::shared_ptr<PerigeeSurface> perigeeSurface =
127 Surface::makeShared<PerigeeSurface>(pos0);
138 std::vector<const BoundParameters*> vec1 = {¶ms1a, ¶ms1b, ¶ms1c};
140 auto res = finder.
find(vec1, vertexingOptions);
143 std::cout << res.error().message() << std::endl;
147 BOOST_CHECK(!(*res).empty());
148 Vector3D result = (*res).back().position();
150 BOOST_CHECK(result[
eX] == constraintPos[
eX]);
151 BOOST_CHECK(result[
eY] == constraintPos[
eY]);
158 std::normal_distribution<double>
xdist(1
_mm, 0.1
_mm);
160 std::normal_distribution<double>
ydist(-0.7
_mm, 0.1
_mm);
170 std::uniform_real_distribution<double>
etaDist(-4., 4.);
181 std::shared_ptr<PerigeeSurface> perigeeSurface =
182 Surface::makeShared<PerigeeSurface>(pos0);
190 std::mt19937 gen(mySeed);
191 unsigned int nTracks = 200;
193 std::vector<BoundParameters> trackVec;
194 trackVec.reserve(nTracks);
197 for (
unsigned int i = 0; i < nTracks; i++) {
212 Vector3D mom(pt * std::cos(phi), pt * std::sin(phi), pt * std::sinh(eta));
219 std::vector<const BoundParameters*> trackPtrVec;
220 for (
const auto& trk : trackVec) {
221 trackPtrVec.push_back(&trk);
224 auto res3 = finder.
find(trackPtrVec, vertexingOptions);
226 std::cout << res3.error().message() << std::endl;
230 BOOST_CHECK(!(*res3).empty());
231 Vector3D result = (*res3).back().position();
263 double const expectedZResult = -13.013;
277 std::function<BoundParameters(InputTrack)> extractParameters =
278 [](
InputTrack params) {
return params.parameters(); };
281 finder(extractParameters);
285 std::shared_ptr<PerigeeSurface> perigeeSurface =
286 Surface::makeShared<PerigeeSurface>(pos0);
297 std::vector<const InputTrack*> vec1 = {¶ms1a, ¶ms1b, ¶ms1c};
299 auto res = finder.
find(vec1, vertexingOptions);
302 std::cout << res.error().message() << std::endl;
306 BOOST_CHECK(!(*res).empty());
307 Vector3D result = (*res).back().position();
309 BOOST_CHECK(result[
eX] == constraintPos[
eX]);
310 BOOST_CHECK(result[
eY] == constraintPos[
eY]);