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<Acts::Vector3D> vectPos1;
88 vectPos1.push_back(pos1);
89 std::vector<Acts::Vector3D> vectPos2;
90 vectPos2.push_back(pos2);
91 std::vector<Acts::Vector3D> vectPos3;
92 vectPos3.push_back(pos3);
94 std::vector<std::pair<MaterialSlab, std::vector<Vector3D>>> matRecord;
103 matRecord.push_back(std::make_pair(matprop1, vectPos1));
104 matRecord.push_back(std::make_pair(matprop2, vectPos2));
120 std::function<Acts::Vector2D(Acts::Vector3D)> transfoGlobalToLocal;
133 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[0], bd[0].bins());
134 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[1], bd[1].bins());
136 BOOST_CHECK_EQUAL(Grid.
minPosition()[0], bd[0].min);
137 BOOST_CHECK_EQUAL(Grid.
minPosition()[1], bd[1].min);
140 bd[0].max + std::fabs(bd[0].
max - bd[0].
min) / (bd[0].bins() - 1);
142 bd[1].max + std::fabs(bd[1].
max - bd[1].min) / (bd[1].bins() - 1);
156 for (
int i = 0; i < 2; i++) {
169 std::vector<Acts::Vector3D> vectPos1;
170 vectPos1.push_back(pos1);
171 std::vector<Acts::Vector3D> vectPos2;
172 vectPos2.push_back(pos2);
173 std::vector<Acts::Vector3D> vectPos3;
174 vectPos3.push_back(pos3);
176 std::vector<std::pair<MaterialSlab, std::vector<Vector3D>>> matRecord;
185 matRecord.push_back(std::make_pair(matprop1, vectPos1));
186 matRecord.push_back(std::make_pair(matprop2, vectPos2));
202 std::function<Acts::Vector3D(Acts::Vector3D)> transfoGlobalToLocal;
208 BOOST_CHECK_EQUAL(pos, transfoGlobalToLocal(pos));
213 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[0], bd[0].bins());
214 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[1], bd[1].bins());
215 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[2], bd[2].bins());
217 BOOST_CHECK_EQUAL(Grid.
minPosition()[0], bd[0].min);
218 BOOST_CHECK_EQUAL(Grid.
minPosition()[1], bd[1].min);
219 BOOST_CHECK_EQUAL(Grid.
minPosition()[2], bd[2].min);
222 bd[0].max + std::fabs(bd[0].
max - bd[0].
min) / (bd[0].bins() - 1);
224 bd[1].max + std::fabs(bd[1].
max - bd[1].min) / (bd[1].bins() - 1);
226 bd[2].max + std::fabs(bd[2].
max - bd[2].min) / (bd[2].bins() - 1);
241 for (
int i = 0; i < 3; i++) {
253 std::vector<Acts::Vector3D> vectPos1;
254 vectPos1.push_back(pos1);
255 std::vector<Acts::Vector3D> vectPos2;
256 vectPos2.push_back(pos2);
257 std::vector<Acts::Vector3D> vectPos3;
258 vectPos3.push_back(pos3);
260 std::vector<std::pair<MaterialSlab, std::vector<Vector3D>>> matRecord;
269 matRecord.push_back(std::make_pair(matprop1, vectPos1));
270 matRecord.push_back(std::make_pair(matprop2, vectPos2));
286 std::function<Acts::Vector3D(Acts::Vector3D)> transfoGlobalToLocal;
300 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[0], bd[0].bins());
301 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[1], bd[1].bins());
302 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[2], bd[2].bins());
304 BOOST_CHECK_EQUAL(Grid.
minPosition()[0], bd[0].min);
305 BOOST_CHECK_EQUAL(Grid.
minPosition()[1], bd[1].min);
306 BOOST_CHECK_EQUAL(Grid.
minPosition()[2], bd[2].min);
309 bd[0].max + std::fabs(bd[0].
max - bd[0].
min) / (bd[0].bins() - 1);
311 bd[1].max + std::fabs(bd[1].
max - bd[1].min) / (bd[1].bins() - 1);
313 bd[2].max + std::fabs(bd[2].
max - bd[2].min) / (bd[2].bins() - 1);
328 for (
int i = 0; i < 3; i++) {
341 std::vector<Acts::Vector3D> vectPos1;
342 vectPos1.push_back(pos1);
343 std::vector<Acts::Vector3D> vectPos2;
344 vectPos2.push_back(pos2);
345 std::vector<Acts::Vector3D> vectPos3;
346 vectPos3.push_back(pos3);
348 std::vector<std::pair<MaterialSlab, std::vector<Vector3D>>> matRecord;
357 matRecord.push_back(std::make_pair(matprop1, vectPos1));
358 matRecord.push_back(std::make_pair(matprop2, vectPos2));