9 #include <boost/test/unit_test.hpp>
50 std::function<Acts::Vector2(Acts::Vector3)> transfoGlobalToLocal;
57 BOOST_CHECK_EQUAL(pos_2d, transfoGlobalToLocal(pos));
65 BOOST_CHECK_EQUAL(Grid.
minPosition()[0], bd[0].min);
66 BOOST_CHECK_EQUAL(Grid.
minPosition()[1], bd[1].min);
69 bd[0].max + std::fabs(bd[0].max - bd[0].
min) / (bd[0].bins() - 1);
71 bd[1].max + std::fabs(bd[1].max - bd[1].min) / (bd[1].bins() - 1);
85 for (
int i = 0;
i < 2;
i++) {
98 std::vector<Acts::Vector3> vectPos1;
99 vectPos1.push_back(pos1);
100 std::vector<Acts::Vector3> vectPos2;
101 vectPos2.push_back(pos2);
102 std::vector<Acts::Vector3> vectPos3;
103 vectPos3.push_back(pos3);
105 std::vector<std::pair<MaterialSlab, std::vector<Vector3>>> matRecord;
114 matRecord.push_back(std::make_pair(matprop1, vectPos1));
115 matRecord.push_back(std::make_pair(matprop2, vectPos2));
118 for (
const auto& rm : matRecord) {
120 for (
const auto&
point : rm.second) {
141 std::function<Acts::Vector2(Acts::Vector3)> transfoGlobalToLocal;
154 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[0], bd[0].bins());
155 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[1], bd[1].bins());
157 BOOST_CHECK_EQUAL(Grid.
minPosition()[0], bd[0].min);
158 BOOST_CHECK_EQUAL(Grid.
minPosition()[1], bd[1].min);
161 bd[0].max + std::fabs(bd[0].max - bd[0].
min) / (bd[0].bins() - 1);
163 bd[1].max + std::fabs(bd[1].max - bd[1].min) / (bd[1].bins() - 1);
177 for (
int i = 0;
i < 2;
i++) {
190 std::vector<Acts::Vector3> vectPos1;
191 vectPos1.push_back(pos1);
192 std::vector<Acts::Vector3> vectPos2;
193 vectPos2.push_back(pos2);
194 std::vector<Acts::Vector3> vectPos3;
195 vectPos3.push_back(pos3);
197 std::vector<std::pair<MaterialSlab, std::vector<Vector3>>> matRecord;
206 matRecord.push_back(std::make_pair(matprop1, vectPos1));
207 matRecord.push_back(std::make_pair(matprop2, vectPos2));
210 for (
const auto& rm : matRecord) {
212 for (
const auto&
point : rm.second) {
233 std::function<Acts::Vector3(Acts::Vector3)> transfoGlobalToLocal;
239 BOOST_CHECK_EQUAL(pos, transfoGlobalToLocal(pos));
244 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[0], bd[0].bins());
245 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[1], bd[1].bins());
246 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[2], bd[2].bins());
248 BOOST_CHECK_EQUAL(Grid.
minPosition()[0], bd[0].min);
249 BOOST_CHECK_EQUAL(Grid.
minPosition()[1], bd[1].min);
250 BOOST_CHECK_EQUAL(Grid.
minPosition()[2], bd[2].min);
253 bd[0].max + std::fabs(bd[0].max - bd[0].
min) / (bd[0].bins() - 1);
255 bd[1].max + std::fabs(bd[1].max - bd[1].min) / (bd[1].bins() - 1);
257 bd[2].max + std::fabs(bd[2].max - bd[2].min) / (bd[2].bins() - 1);
272 for (
int i = 0;
i < 3;
i++) {
284 std::vector<Acts::Vector3> vectPos1;
285 vectPos1.push_back(pos1);
286 std::vector<Acts::Vector3> vectPos2;
287 vectPos2.push_back(pos2);
288 std::vector<Acts::Vector3> vectPos3;
289 vectPos3.push_back(pos3);
291 std::vector<std::pair<MaterialSlab, std::vector<Vector3>>> matRecord;
300 matRecord.push_back(std::make_pair(matprop1, vectPos1));
301 matRecord.push_back(std::make_pair(matprop2, vectPos2));
304 for (
const auto& rm : matRecord) {
306 for (
const auto&
point : rm.second) {
327 std::function<Acts::Vector3(Acts::Vector3)> transfoGlobalToLocal;
341 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[0], bd[0].bins());
342 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[1], bd[1].bins());
343 BOOST_CHECK_EQUAL(Grid.
numLocalBins()[2], bd[2].bins());
345 BOOST_CHECK_EQUAL(Grid.
minPosition()[0], bd[0].min);
346 BOOST_CHECK_EQUAL(Grid.
minPosition()[1], bd[1].min);
347 BOOST_CHECK_EQUAL(Grid.
minPosition()[2], bd[2].min);
350 bd[0].max + std::fabs(bd[0].max - bd[0].
min) / (bd[0].bins() - 1);
352 bd[1].max + std::fabs(bd[1].max - bd[1].min) / (bd[1].bins() - 1);
354 bd[2].max + std::fabs(bd[2].max - bd[2].min) / (bd[2].bins() - 1);
369 for (
int i = 0;
i < 3;
i++) {
382 std::vector<Acts::Vector3> vectPos1;
383 vectPos1.push_back(pos1);
384 std::vector<Acts::Vector3> vectPos2;
385 vectPos2.push_back(pos2);
386 std::vector<Acts::Vector3> vectPos3;
387 vectPos3.push_back(pos3);
389 std::vector<std::pair<MaterialSlab, std::vector<Vector3>>> matRecord;
398 matRecord.push_back(std::make_pair(matprop1, vectPos1));
399 matRecord.push_back(std::make_pair(matprop2, vectPos2));
402 for (
const auto& rm : matRecord) {
404 for (
const auto&
point : rm.second) {