9 #include <boost/test/unit_test.hpp>
25 BOOST_CHECK_EQUAL(accMat0D.size(), 1
u);
26 BOOST_CHECK_EQUAL(accMat0D[0].size(), 1
u);
27 BOOST_CHECK_EQUAL(material0D.splitFactor(), 0.);
33 auto accMat1D = material1D.accumulatedMaterial();
34 BOOST_CHECK_EQUAL(accMat1D.size(), 1
u);
35 BOOST_CHECK_EQUAL(accMat1D[0].size(), 10
u);
42 auto accMat2D = material2D.accumulatedMaterial();
43 BOOST_CHECK_EQUAL(accMat2D.size(), 20
u);
44 for (
size_t ib = 0; ib < accMat2D.size(); ++ib) {
45 BOOST_CHECK_EQUAL(accMat2D[ib].size(), 10
u);
59 material0D.trackAverage();
61 material0D.accumulate(
Vector3D(0., 0., 0.), two);
62 material0D.trackAverage();
64 auto accMat0D = material0D.accumulatedMaterial();
65 auto accMatProp0D = accMat0D[0][0];
66 auto [matProp0D, trackCount] = accMatProp0D.totalAverage();
68 BOOST_CHECK_EQUAL(matProp0D.thicknessInX0(), two.
thicknessInX0());
69 BOOST_CHECK_EQUAL(trackCount, 2
u);
91 material2D.trackAverage();
96 material2D.trackAverage();
100 material2D.trackAverage();
103 material2D.trackAverage();
105 auto accMat2D = material2D.accumulatedMaterial();
107 auto [accMatProp00, trackCount00] = accMat2D[0][0].totalAverage();
108 auto [accMatProp01, trackCount01] = accMat2D[0][1].totalAverage();
109 auto [accMatProp10, trackCount10] = accMat2D[1][0].totalAverage();
110 auto [accMatProp11, trackCount11] = accMat2D[1][1].totalAverage();
112 BOOST_CHECK_EQUAL(accMatProp00.thicknessInX0(), one.
thicknessInX0());
113 BOOST_CHECK_EQUAL(accMatProp01.thicknessInX0(), two.
thicknessInX0());
114 BOOST_CHECK_EQUAL(accMatProp10.thicknessInX0(), three.
thicknessInX0());
115 BOOST_CHECK_EQUAL(accMatProp11.thicknessInX0(), four.
thicknessInX0());
116 BOOST_CHECK_EQUAL(trackCount00, 1
u);
117 BOOST_CHECK_EQUAL(trackCount01, 2
u);
118 BOOST_CHECK_EQUAL(trackCount10, 3
u);
119 BOOST_CHECK_EQUAL(trackCount11, 4
u);