9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
25 using namespace Acts::UnitLiterals;
31 using Propagator = Propagator<EigenStepper<ConstantBField>>;
32 using Linearizer = HelicalTrackLinearizer<Propagator>;
39 std::uniform_real_distribution<>
vXYDist(-0.1_mm, 0.1_mm);
41 std::uniform_real_distribution<>
vZDist(-20_mm, 20_mm);
43 std::uniform_real_distribution<>
d0Dist(-0.01_mm, 0.01_mm);
45 std::uniform_real_distribution<>
z0Dist(-0.2_mm, 0.2_mm);
47 std::uniform_real_distribution<>
pTDist(0.4_GeV, 10_GeV);
53 std::uniform_real_distribution<>
qDist(-1, 1);
55 std::uniform_real_distribution<>
resIPDist(0., 100_um);
57 std::uniform_real_distribution<>
resAngDist(0., 0.1);
59 std::uniform_real_distribution<>
resQoPDist(-0.01, 0.01);
69 unsigned int nTests = 10;
73 std::mt19937 gen(mySeed);
82 auto propagator = std::make_shared<Propagator>(
stepper);
90 std::shared_ptr<PerigeeSurface> perigeeSurface =
91 Surface::makeShared<PerigeeSurface>(
Vector3D(0., 0., 0.));
96 for (
unsigned int i = 0; i < nTests; ++i) {
98 std::cout <<
"Test " << i + 1 << std::endl;
101 double q =
qDist(gen) < 0 ? -1. : 1.;
110 std::cout <<
"Creating track parameters: " << paramVec << std::endl;
123 covMat << res_d0 * res_d0, 0., 0., 0., 0., 0., 0., res_z0 * res_z0, 0., 0.,
124 0., 0., 0., 0., res_ph * res_ph, 0., 0., 0., 0., 0., 0.,
125 res_th * res_th, 0., 0., 0., 0., 0., 0., res_qp * res_qp, 0., 0., 0.,
148 KalmanVertexUpdater::updateVertexWithTrack<BoundTrackParameters>(
vtx,
152 std::cout <<
"Old vertex position: " << vtxPos << std::endl;
153 std::cout <<
"New vertex position: " << vtx.position() << std::endl;
156 double oldDistance = vtxPos.norm();
157 double newDistance = vtx.position().norm();
160 std::cout <<
"Old distance: " << oldDistance << std::endl;
161 std::cout <<
"New distance: " << newDistance << std::endl;
165 BOOST_CHECK(newDistance < oldDistance);
171 BOOST_CHECK(vtx.tracks().size() == 0);