16 : m_splitFactor(splitFactor) {
23 const BinUtility& binUtility,
double splitFactor)
24 : m_binUtility(binUtility), m_splitFactor(splitFactor) {
34 if (m_binUtility.dimensions() == 0) {
35 m_accumulatedMaterial[0][0].accumulate(mp, pathCorrection);
38 size_t bin0 = m_binUtility.bin(lp, 0);
39 size_t bin1 = m_binUtility.bin(lp, 1);
40 m_accumulatedMaterial[bin1][bin0].accumulate(mp, pathCorrection);
41 return {bin0, bin1, 0};
47 if (m_binUtility.dimensions() == 0) {
48 m_accumulatedMaterial[0][0].accumulate(mp, pathCorrection);
51 std::array<size_t, 3> bTriple = m_binUtility.binTriple(gp);
52 m_accumulatedMaterial[bTriple[1]][bTriple[0]].accumulate(mp, pathCorrection);
59 if (m_binUtility.dimensions() == 0) {
60 m_accumulatedMaterial[0][0].trackAverage();
62 std::array<size_t, 3> bTriple = m_binUtility.binTriple(gp);
63 std::vector<std::array<size_t, 3>> trackBins = {bTriple};
64 trackAverage(trackBins, emptyHit);
69 const std::vector<std::array<size_t, 3>>& trackBins,
bool emptyHit) {
71 if (m_binUtility.dimensions() == 0) {
72 m_accumulatedMaterial[0][0].trackAverage(emptyHit);
77 if (not trackBins.empty()) {
78 for (
auto bin : trackBins) {
79 m_accumulatedMaterial[bin[1]][bin[0]].trackAverage(emptyHit);
83 for (
auto& matVec : m_accumulatedMaterial) {
84 for (
auto& mat : matVec) {
85 mat.trackAverage(emptyHit);
92 std::unique_ptr<const Acts::ISurfaceMaterial>
94 if (m_binUtility.bins() == 1) {
96 return std::make_unique<HomogeneousSurfaceMaterial>(
97 m_accumulatedMaterial[0][0].totalAverage().first, m_splitFactor);
101 m_binUtility.bins(1),
104 for (
size_t ib1 = 0; ib1 < m_binUtility.bins(1); ++ib1) {
105 for (
size_t ib0 = 0; ib0 < m_binUtility.bins(0); ++ib0) {
106 mpMatrix[ib1][ib0] = m_accumulatedMaterial[ib1][ib0].totalAverage().first;
110 return std::make_unique<const BinnedSurfaceMaterial>(
111 m_binUtility, std::move(mpMatrix), m_splitFactor);