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);
58 material0D.trackAverage();
60 material0D.accumulate(
Vector3D(0., 0., 0.), two);
61 material0D.trackAverage();
63 auto accMat0D = material0D.accumulatedMaterial();
64 auto accMatProp0D = accMat0D[0][0];
65 auto matProp0D = accMatProp0D.totalAverage();
67 BOOST_CHECK_EQUAL(matProp0D.second, 2
u);
68 BOOST_CHECK_EQUAL(matProp0D.first.thicknessInX0(), two.
thicknessInX0());
89 material2D.trackAverage();
94 material2D.trackAverage();
98 material2D.trackAverage();
101 material2D.trackAverage();
103 auto accMat2D = material2D.accumulatedMaterial();
105 auto accMatProp00 = accMat2D[0][0].totalAverage();
106 auto accMatProp01 = accMat2D[0][1].totalAverage();
107 auto accMatProp10 = accMat2D[1][0].totalAverage();
108 auto accMatProp11 = accMat2D[1][1].totalAverage();
110 BOOST_CHECK_EQUAL(accMatProp00.second, 1
u);
111 BOOST_CHECK_EQUAL(accMatProp01.second, 2
u);
112 BOOST_CHECK_EQUAL(accMatProp10.second, 3
u);
113 BOOST_CHECK_EQUAL(accMatProp11.second, 4
u);
115 BOOST_CHECK_EQUAL(accMatProp00.first.thicknessInX0(), one.
thicknessInX0());
116 BOOST_CHECK_EQUAL(accMatProp01.first.thicknessInX0(), two.
thicknessInX0());
117 BOOST_CHECK_EQUAL(accMatProp10.first.thicknessInX0(), three.
thicknessInX0());
118 BOOST_CHECK_EQUAL(accMatProp11.first.thicknessInX0(), four.
thicknessInX0());