9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/tools/context.hpp>
11 #include <boost/test/unit_test.hpp>
33 #include <type_traits>
41 using namespace Acts::UnitLiterals;
42 using namespace Acts::Test;
51 std::default_random_engine
rng(31415);
65 BOOST_AUTO_TEST_SUITE(EventDataMultiTrajectory)
81 static_cast<void>(tsp);
83 static_cast<void>(ctsp);
93 BOOST_CHECK_EQUAL(ct.
size(), t.
size());
96 BOOST_CHECK_EQUAL(ctm.size(), ct.
size());
101 decltype(ctm.getTrackState(i0))>,
102 "Got mutable track state proxy");
104 ctm.getTrackState(i0);
105 static_cast<void>(ctsp);
123 ct.testApplyWithAbort();
128 ct.testAddTrackStateWithBitMask();
134 ct.testTrackStateProxyCrossTalk(
rng);
139 ct.testTrackStateReassignment(
rng);
145 ct.testTrackStateProxyStorage(
rng, nMeasurements);
150 ct.testTrackStateProxyAllocations(
rng);
155 ct.testTrackStateProxyGetMask();
160 ct.testTrackStateProxyCopy(
rng);
165 ct.testTrackStateProxyCopyDiffMTJ();
170 ct.testProxyAssignment();
175 ct.testCopyFromConst();
180 ct.testTrackStateProxyShare(
rng);
185 ct.testMultiTrajectoryExtraColumns();
190 ct.testMultiTrajectoryExtraColumnsRuntime();
195 using cat = axis::category<std::string>;
201 std::stringstream ss;
204 BOOST_CHECK(!
out.empty());
205 BOOST_CHECK(
out.find(
"total") != std::string::npos);
207 const auto&
h = stats.hist;
209 auto column_axis = axis::get<cat>(
h.axis(0));
210 auto type_axis = axis::get<axis::category<>>(
h.axis(1));
212 for (
int t = 0;
t < type_axis.size();
t++) {
213 for (
int c = 0;
c < column_axis.size();
c++) {
214 double v =
h.at(
c,
t);
215 BOOST_CHECK_EQUAL(v, 0.0);
220 auto ts = mt.getTrackState(mt.addTrackState());
221 fillTrackState<VectorMultiTrajectory>(pc, TrackStatePropMask::All, ts);
223 stats = mt.statistics();
225 for (
int t = 0;
t < type_axis.size();
t++) {
226 BOOST_TEST_CONTEXT((type_axis.bin(
t) == 1 ?
"meas" :
"other"))
227 for (
int c = 0;
c < column_axis.size();
c++) {
229 BOOST_TEST_CONTEXT(
"column: " << key) {
230 double v =
h.at(
c,
t);
232 BOOST_CHECK_NE(v, 0.0);
234 BOOST_CHECK_EQUAL(v, 0.0);
241 BOOST_AUTO_TEST_SUITE_END()