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;
39 std::normal_distribution<double>
xdist(1_mm, 0.1_mm);
41 std::normal_distribution<double>
ydist(-0.7_mm, 0.1_mm);
47 std::uniform_real_distribution<double>
pTDist(0.1_GeV, 100_GeV);
51 std::uniform_real_distribution<double>
etaDist(-4., 4.);
60 const int mainGridSize = 3000;
61 const int trkGridSize = 35;
67 std::shared_ptr<PerigeeSurface> perigeeSurface =
68 Surface::makeShared<PerigeeSurface>(pos0);
75 cfg.cacheGridStateForTrackRemoval =
false;
81 std::mt19937 gen(mySeed);
82 unsigned int nTracks = 200;
84 std::vector<BoundTrackParameters> trackVec;
85 trackVec.reserve(nTracks);
88 for (
unsigned int i = 0; i < nTracks; i++) {
110 std::vector<const BoundTrackParameters*> trackPtrVec;
111 for (
const auto& trk : trackVec) {
112 trackPtrVec.push_back(&trk);
115 auto res = finder.find(trackPtrVec, vertexingOptions, state);
117 std::cout << res.error().message() << std::endl;
121 BOOST_CHECK(!(*res).empty());
122 Vector3D result = (*res).back().position();
124 std::cout <<
"Vertex position result: " << result << std::endl;
133 const int mainGridSize = 3000;
134 const int trkGridSize = 35;
140 std::shared_ptr<PerigeeSurface> perigeeSurface =
141 Surface::makeShared<PerigeeSurface>(pos0);
151 densityConfig.useHighestSumZPosition =
true;
152 GridDensity density(densityConfig);
155 cfg.cacheGridStateForTrackRemoval =
true;
159 std::mt19937 gen(mySeed);
160 unsigned int nTracks = 200;
162 std::vector<BoundTrackParameters> trackVec;
163 trackVec.reserve(nTracks);
166 for (
unsigned int i = 0; i < nTracks; i++) {
181 std::vector<const BoundTrackParameters*> trackPtrVec;
182 for (
const auto& trk : trackVec) {
183 trackPtrVec.push_back(&trk);
188 auto res = finder.find(trackPtrVec, vertexingOptions, state);
190 std::cout << res.error().message() << std::endl;
193 BOOST_CHECK(!(*res).empty());
194 Vector3D result = (*res).back().position();
196 std::cout <<
"Vertex position after first fill: " << result << std::endl;
202 std::vector<const BoundTrackParameters*> removedTracks;
203 for (
const auto& trk : trackVec) {
204 if ((trkCount % 4) != 0) {
205 removedTracks.push_back(&trk);
210 state.tracksToRemove = removedTracks;
212 auto res2 = finder.find(trackPtrVec, vertexingOptions, state);
214 std::cout << res2.error().message() << std::endl;
217 BOOST_CHECK(!(*res2).empty());
218 Vector3D result = (*res2).back().position();
221 <<
"Vertex position after removing tracks near first density peak: "
222 << result << std::endl;
234 const int mainGridSize = 3000;
235 const int trkGridSize = 35;
241 std::shared_ptr<PerigeeSurface> perigeeSurface =
242 Surface::makeShared<PerigeeSurface>(pos0);
248 vertexingOptions.vertexConstraint = constraintVtx;
252 cfg.cacheGridStateForTrackRemoval =
false;
253 cfg.estimateSeedWidth =
true;
259 std::mt19937 gen(mySeed);
260 unsigned int nTracks = 20;
262 std::vector<BoundTrackParameters> trackVec;
263 trackVec.reserve(nTracks);
266 for (
unsigned int i = 0; i < nTracks; i++) {
279 std::vector<const BoundTrackParameters*> trackPtrVec;
280 for (
const auto& trk : trackVec) {
281 trackPtrVec.push_back(&trk);
284 auto res = finder.find(trackPtrVec, vertexingOptions, state);
286 std::cout << res.error().message() << std::endl;
290 BOOST_CHECK(!(*res).empty());
293 BOOST_CHECK(
cov(
eZ,
eZ) != 0.);
295 std::cout <<
"Estimated z-seed width: " <<
cov(
eZ,
eZ) << std::endl;