9 #include <boost/test/data/test_case.hpp>
10 #include <boost/test/unit_test.hpp>
26 using namespace Acts::UnitLiterals;
31 namespace tt = boost::test_tools;
34 namespace IntegrationTest {
36 const double L = 5.8_m;
37 const double R = (2.56 + 2.46) * 0.5 * 0.5_m;
44 std::ofstream ostr(
"solenoidmap.csv");
45 ostr <<
"i;j;r;z;B_r;B_z" << std::endl;
49 double zMin = 2 * (-
L / 2.);
50 double zMax = 2 * (
L / 2.);
52 std::cout <<
"rMin = " << rMin << std::endl;
53 std::cout <<
"rMax = " << rMax << std::endl;
54 std::cout <<
"zMin = " << zMin << std::endl;
55 std::cout <<
"zMax = " << zMax << std::endl;
62 Acts::detail::EquidistantAxis>;
63 const Grid_t& grid = mapper.getGrid();
64 using index_t = Grid_t::index_t;
65 using point_t = Grid_t::point_t;
68 for (
size_t i = 0; i <=
nBinsR + 1; i++) {
69 for (
size_t j = 0; j <=
nBinsZ + 1; j++) {
71 index_t index({i, j});
72 if (i == 0 || j == 0 || i ==
nBinsR + 1 || j ==
nBinsZ + 1) {
75 point_t lowerLeft = grid.lowerLeftBinEdge(index);
76 Vector2D B = grid.atLocalBins(index);
77 ostr << i <<
";" << j <<
";" << lowerLeft[0] <<
";" << lowerLeft[1];
78 ostr <<
";" << B[0] <<
";" << B[1] << std::endl;
84 return BField_t(std::move(cfg));
92 m_ofstr <<
"x;y;z;B_x;B_y;B_z;Bm_x;Bm_y;Bm_z" << std::endl;
102 solenoid_interpolated_bfield_comparison,
103 bdata::random((bdata::seed = 1,
bdata::engine = std::mt19937(),
104 bdata::distribution = std::uniform_real_distribution<>(
105 1.5 * (-
L / 2.), 1.5 *
L / 2.))) ^
106 bdata::random((bdata::seed = 2,
bdata::engine = std::mt19937(),
107 bdata::distribution =
108 std::uniform_real_distribution<>(0,
R * 1.5))) ^
109 bdata::random((bdata::seed = 3,
bdata::engine = std::mt19937(),
110 bdata::distribution =
111 std::uniform_real_distribution<>(-
M_PI,
M_PI))) ^
115 if (index % 1000 == 0) {
116 std::cout << index << std::endl;
131 ofstr << pos.x() <<
";" << pos.y() <<
";" << pos.z() <<
";";
132 ofstr << B.x() <<
";" << B.y() <<
";" << B.z() <<
";";
133 ofstr << Bm.x() <<
";" << Bm.y() <<
";" << Bm.z() << std::endl;