Skip to content
Snippets Groups Projects
Commit 4e5077af authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

depthprobe: elementwise access to m_cache

parent f6129c20
No related branches found
No related tags found
1 merge request!1281unified m_cache for ISimulation
......@@ -172,9 +172,14 @@ void DepthprobeSimulation::addBackgroundIntensity(size_t, size_t)
void DepthprobeSimulation::addDataToCache(double weight)
{
ASSERT(m_depth_eles.size() == m_cache.size());
for (size_t i = 0, size = m_depth_eles.size(); i < size; ++i)
m_cache[i] += m_depth_eles[i].getIntensities() * weight;
const size_t N0 = alphaAxis()->size();
const size_t N1 = zAxis()->size();
ASSERT(m_depth_eles.size() == N0);
// ASSERT(m_cache.size() == N0 * N1);
for (size_t j = 0; j < N0; ++j)
for (size_t i = 0; i < N1; ++i)
m_cache[j][i] += m_depth_eles[j].getIntensities()[i] * weight;
}
void DepthprobeSimulation::validateParametrization(const ParameterDistribution& par_distr) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment