9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/unit_test.hpp>
17 #include "Acts/MagneticField/SharedBFieldMap.hpp"
18 #include "Acts/MagneticField/concept/AnyFieldLookup.hpp"
29 #include "PropagationTestHelper.hpp"
32 namespace tt = boost::test_tools;
40 namespace IntegrationTest {
44 std::function<
size_t(std::array<size_t, 3> binsXYZ,
45 std::array<size_t, 3> nBinsXYZ)>
48 double BFieldUnit = 1.,
size_t nPoints = 100000,
bool firstOctant =
false) {
51 std::vector<double> xPos;
52 std::vector<double> yPos;
53 std::vector<double> zPos;
55 std::vector<Acts::Vector3>
bField;
57 xPos.reserve(nPoints);
58 yPos.reserve(nPoints);
59 zPos.reserve(nPoints);
60 bField.reserve(nPoints);
62 std::ifstream map_file(fieldMapFile.c_str(),
std::ios::in);
64 double x = 0.,
y = 0.,
z = 0.;
65 double bx = 0., by = 0., bz = 0.;
66 while (std::getline(map_file, line)) {
67 if (line.empty() || line[0] ==
'%' || line[0] ==
'#' ||
68 line.find_first_not_of(
' ') == std::string::npos)
71 std::istringstream
tmp(line);
72 tmp >> x >>
y >>
z >> bx >> by >> bz;
80 return fieldMapperXYZ(localToGlobalBin, xPos, yPos, zPos, bField,
lengthUnit,
81 BFieldUnit, firstOctant);
88 Concepts ::AnyFieldLookup<>
mapper;
93 [](std::array<size_t, 3> binsXYZ, std::array<size_t, 3> nBinsXYZ) {
94 return (binsXYZ.at(0) * (nBinsXYZ.at(1) * nBinsXYZ.at(2)) +
95 binsXYZ.at(1) * nBinsXYZ.at(2) + binsXYZ.at(2));
103 return std::make_shared<const InterpolatedBFieldMap>(
std::move(config));
123 #include "PropagationTestBase.hpp"