9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
42 #include <type_traits>
47 using namespace Acts::UnitLiterals;
54 using Linearizer = HelicalTrackLinearizer<Propagator>;
61 std::uniform_real_distribution<>
vXYDist(-0.1_mm, 0.1_mm);
63 std::uniform_real_distribution<>
vZDist(-20_mm, 20_mm);
65 std::uniform_real_distribution<>
d0Dist(-0.01_mm, 0.01_mm);
67 std::uniform_real_distribution<>
z0Dist(-0.2_mm, 0.2_mm);
69 std::uniform_real_distribution<>
pTDist(0.4_GeV, 10_GeV);
71 std::uniform_real_distribution<>
phiDist(-M_PI, M_PI);
73 std::uniform_real_distribution<>
thetaDist(1.0, M_PI - 1.0);
75 std::uniform_real_distribution<>
qDist(-1, 1);
77 std::uniform_real_distribution<>
resIPDist(0., 100_um);
79 std::uniform_real_distribution<>
resAngDist(0., 0.1);
81 std::uniform_real_distribution<>
resQoPDist(-0.01, 0.01);
91 unsigned int nTests = 10;
95 std::mt19937
gen(mySeed);
98 auto bField = std::make_shared<ConstantBField>(
Vector3{0.0, 0.0, 1_T});
104 auto propagator = std::make_shared<Propagator>(
stepper);
112 std::shared_ptr<PerigeeSurface> perigeeSurface =
113 Surface::makeShared<PerigeeSurface>(
Vector3(0., 0., 0.));
118 for (
unsigned int i = 0;
i < nTests; ++
i) {
120 std::cout <<
"Test " <<
i + 1 << std::endl;
123 double q =
qDist(gen) < 0 ? -1. : 1.;
132 std::cout <<
"Creating track parameters: " << paramVec << std::endl;
145 covMat << res_d0 * res_d0, 0., 0., 0., 0., 0., 0., res_z0 * res_z0, 0., 0.,
146 0., 0., 0., 0., res_ph * res_ph, 0., 0., 0., 0., 0., 0.,
147 res_th * res_th, 0., 0., 0., 0., 0., 0., res_qp * res_qp, 0., 0., 0.,
152 std::shared_ptr<PerigeeSurface> perigee =
153 Surface::makeShared<PerigeeSurface>(Vector3::Zero());
174 KalmanVertexUpdater::updateVertexWithTrack<BoundTrackParameters>(vtx,
178 std::cout <<
"Old vertex position: " << vtxPos << std::endl;
179 std::cout <<
"New vertex position: " << vtx.position() << std::endl;
182 double oldDistance = vtxPos.norm();
183 double newDistance = vtx.position().norm();
186 std::cout <<
"Old distance: " << oldDistance << std::endl;
187 std::cout <<
"New distance: " << newDistance << std::endl;
191 BOOST_CHECK(newDistance < oldDistance);
197 BOOST_CHECK(vtx.tracks().empty());