9 #include <boost/test/unit_test.hpp>
39 std::function<Acts::Vector2D(Acts::Vector3D)> transfoGlobalToLocal;
46 BOOST_CHECK_EQUAL(pos_2d, transfoGlobalToLocal(pos));
54 BOOST_CHECK_EQUAL(Grid.
minPosition()[0], bd[0].min);
55 BOOST_CHECK_EQUAL(Grid.
minPosition()[1], bd[1].min);
58 bd[0].max + std::fabs(bd[0].
max - bd[0].
min) / (bd[0].bins() - 1);
60 bd[1].max + std::fabs(bd[1].
max - bd[1].min) / (bd[1].bins() - 1);
74 for (
int i = 0; i < 2; i++) {
87 std::vector<std::pair<MaterialProperties, Vector3D>> matRecord;
96 matRecord.push_back(std::make_pair(matprop1, pos1));
97 matRecord.push_back(std::make_pair(matprop2, pos2));
115 std::function<Acts::Vector2D(Acts::Vector3D)> transfoGlobalToLocal;
128 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[0], bd[0].bins());
129 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[1], bd[1].bins());
131 BOOST_CHECK_EQUAL(Grid.
minPosition()[0], bd[0].min);
132 BOOST_CHECK_EQUAL(Grid.
minPosition()[1], bd[1].min);
135 bd[0].max + std::fabs(bd[0].
max - bd[0].
min) / (bd[0].bins() - 1);
137 bd[1].max + std::fabs(bd[1].
max - bd[1].min) / (bd[1].bins() - 1);
151 for (
int i = 0; i < 2; i++) {
165 std::vector<std::pair<MaterialProperties, Vector3D>> matRecord;
174 matRecord.push_back(std::make_pair(matprop1, pos1));
175 matRecord.push_back(std::make_pair(matprop2, pos2));
193 std::function<Acts::Vector3D(Acts::Vector3D)> transfoGlobalToLocal;
199 BOOST_CHECK_EQUAL(pos, transfoGlobalToLocal(pos));
204 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[0], bd[0].bins());
205 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[1], bd[1].bins());
206 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[2], bd[2].bins());
208 BOOST_CHECK_EQUAL(Grid.
minPosition()[0], bd[0].min);
209 BOOST_CHECK_EQUAL(Grid.
minPosition()[1], bd[1].min);
210 BOOST_CHECK_EQUAL(Grid.
minPosition()[2], bd[2].min);
213 bd[0].max + std::fabs(bd[0].
max - bd[0].
min) / (bd[0].bins() - 1);
215 bd[1].max + std::fabs(bd[1].
max - bd[1].min) / (bd[1].bins() - 1);
217 bd[2].max + std::fabs(bd[2].
max - bd[2].min) / (bd[2].bins() - 1);
232 for (
int i = 0; i < 3; i++) {
245 std::vector<std::pair<MaterialProperties, Vector3D>> matRecord;
254 matRecord.push_back(std::make_pair(matprop1, pos1));
255 matRecord.push_back(std::make_pair(matprop2, pos2));
273 std::function<Acts::Vector3D(Acts::Vector3D)> transfoGlobalToLocal;
287 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[0], bd[0].bins());
288 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[1], bd[1].bins());
289 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[2], bd[2].bins());
291 BOOST_CHECK_EQUAL(Grid.
minPosition()[0], bd[0].min);
292 BOOST_CHECK_EQUAL(Grid.
minPosition()[1], bd[1].min);
293 BOOST_CHECK_EQUAL(Grid.
minPosition()[2], bd[2].min);
296 bd[0].max + std::fabs(bd[0].
max - bd[0].
min) / (bd[0].bins() - 1);
298 bd[1].max + std::fabs(bd[1].
max - bd[1].min) / (bd[1].bins() - 1);
300 bd[2].max + std::fabs(bd[2].
max - bd[2].min) / (bd[2].bins() - 1);
315 for (
int i = 0; i < 3; i++) {
329 std::vector<std::pair<MaterialProperties, Vector3D>> matRecord;
338 matRecord.push_back(std::make_pair(matprop1, pos1));
339 matRecord.push_back(std::make_pair(matprop2, pos2));