15 : m_splitFactor(splitFactor) {
22 const BinUtility& binUtility,
double splitFactor)
23 : m_binUtility(binUtility), m_splitFactor(splitFactor) {
33 if (m_binUtility.dimensions() == 0) {
34 m_accumulatedMaterial[0][0].accumulate(mp, pathCorrection);
37 size_t bin0 = m_binUtility.bin(lp, 0);
38 size_t bin1 = m_binUtility.bin(lp, 1);
39 m_accumulatedMaterial[bin1][bin0].accumulate(mp, pathCorrection);
40 return {bin0, bin1, 0};
46 if (m_binUtility.dimensions() == 0) {
47 m_accumulatedMaterial[0][0].accumulate(mp, pathCorrection);
50 std::array<size_t, 3> bTriple = m_binUtility.binTriple(gp);
51 m_accumulatedMaterial[bTriple[1]][bTriple[0]].accumulate(mp, pathCorrection);
58 if (m_binUtility.dimensions() == 0) {
59 m_accumulatedMaterial[0][0].trackAverage();
61 std::array<size_t, 3> bTriple = m_binUtility.binTriple(gp);
62 std::vector<std::array<size_t, 3>> trackBins = {bTriple};
63 trackAverage(trackBins, emptyHit);
68 const std::vector<std::array<size_t, 3>>& trackBins,
bool emptyHit) {
70 if (m_binUtility.dimensions() == 0) {
71 m_accumulatedMaterial[0][0].trackAverage(emptyHit);
76 if (not trackBins.empty()) {
77 for (
auto bin : trackBins) {
78 m_accumulatedMaterial[
bin[1]][
bin[0]].trackAverage(emptyHit);
82 for (
auto& matVec : m_accumulatedMaterial) {
83 for (
auto&
mat : matVec) {
84 mat.trackAverage(emptyHit);
91 std::unique_ptr<const Acts::ISurfaceMaterial>
93 if (m_binUtility.bins() == 1) {
95 return std::make_unique<HomogeneousSurfaceMaterial>(
96 m_accumulatedMaterial[0][0].totalAverage().first, m_splitFactor);
100 m_binUtility.bins(1),
103 for (
size_t ib1 = 0; ib1 < m_binUtility.bins(1); ++ib1) {
104 for (
size_t ib0 = 0; ib0 < m_binUtility.bins(0); ++ib0) {
105 mpMatrix[ib1][ib0] = m_accumulatedMaterial[ib1][ib0].totalAverage().first;
109 return std::make_unique<const BinnedSurfaceMaterial>(
110 m_binUtility, std::move(mpMatrix), m_splitFactor);