9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/output_test_stream.hpp>
11 #include <boost/test/unit_test.hpp>
29 using namespace Acts::UnitLiterals;
35 using Propagator = Propagator<EigenStepper<ConstantBField>>;
47 std::uniform_real_distribution<>
d0Dist(-0.01
_mm, 0.01
_mm);
49 std::uniform_real_distribution<>
z0Dist(-0.2
_mm, 0.2
_mm);
57 std::uniform_real_distribution<>
qDist(-1, 1);
61 std::uniform_real_distribution<>
resAngDist(0., 0.1);
63 std::uniform_real_distribution<>
resQoPDist(-0.01, 0.01);
69 unsigned int nTests = 50;
71 for (
unsigned int iTest = 0; iTest < nTests; ++iTest) {
73 unsigned int nTracks = 30;
77 std::mt19937 gen(mySeed);
86 auto propagator = std::make_shared<Propagator>(
stepper);
92 std::shared_ptr<PerigeeSurface> perigeeSurface =
93 Surface::makeShared<PerigeeSurface>(
Vector3D(0., 0., 0.));
101 double d0_v = sqrt(x * x + y * y);
105 std::vector<BoundParameters> tracks;
109 for (
unsigned int iTrack = 0; iTrack < nTracks; iTrack++) {
111 double q =
qDist(gen) < 0 ? -1. : 1.;
115 double z0track = z0_v +
z0Dist(gen);
129 covMat << resD0 * resD0, 0., 0., 0., 0., 0., 0., resZ0 * resZ0, 0., 0.,
130 0., 0., 0., 0., resPh * resPh, 0., 0., 0., 0., 0., 0., resTh * resTh,
131 0., 0., 0., 0., 0., 0., resQp * resQp, 0., 0., 0., 0., 0., 0., 1.;
137 std::vector<const BoundParameters*> tracksPtr;
138 for (
const auto& trk : tracks) {
139 tracksPtr.push_back(&trk);
144 static_assert(VertexFinderConcept<VertexFinder>,
145 "Vertex finder does not fulfill vertex finder concept.");
151 IPEstimator ipEstimator(ipEstimatorCfg);
160 auto res = finder.find(tracksPtr, vertexingOptions);
162 BOOST_CHECK(res.ok());
165 std::cout << res.error().message() << std::endl;
169 BOOST_CHECK(!(*res).empty());
170 Vector3D result = (*res).back().position();
192 unsigned int nTests = 50;
194 for (
unsigned int iTest = 0; iTest < nTests; ++iTest) {
196 unsigned int nTracks = 30;
200 std::mt19937 gen(mySeed);
209 auto propagator = std::make_shared<Propagator>(
stepper);
214 std::shared_ptr<PerigeeSurface> perigeeSurface =
215 Surface::makeShared<PerigeeSurface>(
Vector3D(0., 0., 0.));
223 double d0_v = sqrt(x * x + y * y);
227 std::vector<InputTrack> tracks;
231 for (
unsigned int iTrack = 0; iTrack < nTracks; iTrack++) {
233 double q =
qDist(gen) < 0 ? -1. : 1.;
237 double z0track = z0_v +
z0Dist(gen);
251 covMat << resD0 * resD0, 0., 0., 0., 0., 0., 0., resZ0 * resZ0, 0., 0.,
252 0., 0., 0., 0., resPh * resPh, 0., 0., 0., 0., 0., 0., resTh * resTh,
253 0., 0., 0., 0., 0., 0., resQp * resQp, 0., 0., 0., 0., 0., 0., 1.;
256 paramVec, perigeeSurface)));
259 std::vector<const InputTrack*> tracksPtr;
260 for (
const auto& trk : tracks) {
261 tracksPtr.push_back(&trk);
266 static_assert(VertexFinderConcept<VertexFinder>,
267 "Vertex finder does not fulfill vertex finder concept.");
273 IPEstimator ipEstimator(ipEstimatorCfg);
279 std::function<BoundParameters(InputTrack)> extractParameters =
280 [](
InputTrack params) {
return params.parameters(); };
286 auto res = finder.find(tracksPtr, vertexingOptions);
288 BOOST_CHECK(res.ok());
291 std::cout << res.error().message() << std::endl;
295 BOOST_CHECK(!(*res).empty());
296 Vector3D result = (*res).back().position();