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

rm local vars

parent ba8d0bb6
No related branches found
No related tags found
1 merge request!1275streamline computation of scattering contributions
......@@ -187,19 +187,15 @@ SimulationResult ScatteringSimulation::packResult()
std::vector<DiffuseElement> ScatteringSimulation::generateElements(const Beam& beam) const
{
const double wavelength = beam.wavelength();
const double alpha_i = beam.alpha_i();
const double phi_i = beam.phi_i();
const SpinMatrix beam_polMatrices = beam.polMatrix();
const SpinMatrix analyzer_operator = m_detector->analyzer().matrix();
const size_t i_specular = m_detector->indexOfSpecular(beam);
const size_t N = m_active_indices.size();
std::vector<DiffuseElement> result;
result.reserve(N);
for (size_t i = 0; i < N; ++i)
result.emplace_back(DiffuseElement(
wavelength, alpha_i, phi_i, std::unique_ptr<IPixel>(m_pixels[i]->clone()),
beam_polMatrices, analyzer_operator, m_active_indices[i] == i_specular));
result.emplace_back(DiffuseElement(beam.wavelength(), beam.alpha_i(), beam.phi_i(),
std::unique_ptr<IPixel>(m_pixels[i]->clone()),
beam.polMatrix(), m_detector->analyzer().matrix(),
m_active_indices[i] == i_specular));
return result;
}
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