9 #include <boost/test/unit_test.hpp>
39 BOOST_CHECK_EQUAL(
bool(averageA.first),
false);
40 BOOST_CHECK_EQUAL(averageA.second, 0
u);
44 BOOST_CHECK_EQUAL(
bool(averageB.first),
false);
45 BOOST_CHECK_EQUAL(averageB.second, 0
u);
49 BOOST_CHECK_EQUAL(
bool(averageC.first),
false);
50 BOOST_CHECK_EQUAL(averageC.second, 0
u);
71 BOOST_CHECK_EQUAL(averageAbc.second, 1
u);
72 auto mpAbc = averageAbc.first;
78 CHECK_CLOSE_REL(mpAbc.material().Z() / mpAbc.material().Ar(), 0.5, 0.0001);
85 mpAbc.thicknessInX0(), 0.0001);
91 double rhoTmapped = mpAbc.material().massDensity() * mpAbc.thickness();
113 BOOST_CHECK_EQUAL(a, averageAA.first);
114 BOOST_CHECK_EQUAL(averageAA.second, 2
u);
125 auto averageAV = av.totalAverage();
126 auto matAV = averageAV.first;
128 BOOST_CHECK_EQUAL(halfA.thicknessInX0(), matAV.thicknessInX0());
129 BOOST_CHECK_EQUAL(halfA.thicknessInL0(), matAV.thicknessInL0());
131 matAV.material().massDensity() * matAV.thickness(), 0.0001);
132 BOOST_CHECK_EQUAL(averageAV.second, 2
u);
142 auto averageAA3 = aa3.totalAverage();
143 auto matAA3 = averageAA3.first;
145 BOOST_CHECK_EQUAL(doubleA.thicknessInX0(), matAA3.thicknessInX0());
146 BOOST_CHECK_EQUAL(doubleA.thicknessInL0(), matAA3.thicknessInL0());
147 CHECK_CLOSE_REL(doubleA.material().massDensity() * doubleA.thickness(),
148 matAA3.material().massDensity() * matAA3.thickness(), 0.0001);
149 BOOST_CHECK_EQUAL(averageAA3.second, 2
u);
161 auto matAA3V = averageAA3V.first;
164 BOOST_CHECK_EQUAL(averageAA3V.second, 3
u);
175 auto matA4V = averageA4V.first;
177 CHECK_CLOSE_REL(doubleA.thicknessInX0(), matA4V.thicknessInX0(), 0.00001);
178 BOOST_CHECK_EQUAL(averageA4V.second, 2
u);
189 auto matAA3E = averageAA3E.first;
192 BOOST_CHECK_EQUAL(averageAA3E.second, 3
u);