Skip to content
Snippets Groups Projects
Commit 4e378c01 authored by Savici, Andrei T.'s avatar Savici, Andrei T.
Browse files

Re #20495. Fix caching of boundaries

parent 6ef15be5
No related branches found
No related tags found
No related merge requests found
......@@ -405,21 +405,21 @@ void MDNormDirectSC::cacheDimensionXValues() {
(PhysicalConstants::h * PhysicalConstants::h);
if (!m_hIntegrated) {
auto &hDim = *m_normWS->getDimension(m_hIdx);
m_hX.resize(hDim.getNBins());
m_hX.resize(hDim.getNBins()+1);
for (size_t i = 0; i < m_hX.size(); ++i) {
m_hX[i] = hDim.getX(i);
}
}
if (!m_kIntegrated) {
auto &kDim = *m_normWS->getDimension(m_kIdx);
m_kX.resize(kDim.getNBins());
m_kX.resize(kDim.getNBins()+1);
for (size_t i = 0; i < m_kX.size(); ++i) {
m_kX[i] = kDim.getX(i);
}
}
if (!m_lIntegrated) {
auto &lDim = *m_normWS->getDimension(m_lIdx);
m_lX.resize(lDim.getNBins());
m_lX.resize(lDim.getNBins()+1);
for (size_t i = 0; i < m_lX.size(); ++i) {
m_lX[i] = lDim.getX(i);
}
......@@ -427,7 +427,7 @@ void MDNormDirectSC::cacheDimensionXValues() {
if (!m_dEIntegrated) {
// NOTE: store k final instead
auto &eDim = *m_normWS->getDimension(m_eIdx);
m_eX.resize(eDim.getNBins());
m_eX.resize(eDim.getNBins()+1);
for (size_t i = 0; i < m_eX.size(); ++i) {
double temp = m_Ei - eDim.getX(i);
temp = std::max(temp, 0.);
......
......@@ -367,21 +367,21 @@ MDNormSCD::findIntergratedDimensions(const std::vector<coord_t> &otherDimValues,
void MDNormSCD::cacheDimensionXValues() {
if (!m_hIntegrated) {
auto &hDim = *m_normWS->getDimension(m_hIdx);
m_hX.resize(hDim.getNBins());
m_hX.resize(hDim.getNBins()+1);
for (size_t i = 0; i < m_hX.size(); ++i) {
m_hX[i] = hDim.getX(i);
}
}
if (!m_kIntegrated) {
auto &kDim = *m_normWS->getDimension(m_kIdx);
m_kX.resize(kDim.getNBins());
m_kX.resize(kDim.getNBins()+1);
for (size_t i = 0; i < m_kX.size(); ++i) {
m_kX[i] = kDim.getX(i);
}
}
if (!m_lIntegrated) {
auto &lDim = *m_normWS->getDimension(m_lIdx);
m_lX.resize(lDim.getNBins());
m_lX.resize(lDim.getNBins()+1);
for (size_t i = 0; i < m_lX.size(); ++i) {
m_lX[i] = lDim.getX(i);
}
......
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