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

DpSim: rm m_beam

parent 440abb9d
No related branches found
No related tags found
1 merge request!1454rm Beam from Dp|Offsp-Sim
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "Base/Axis/Frame.h" #include "Base/Axis/Frame.h"
#include "Base/Math/Constants.h" #include "Base/Math/Constants.h"
#include "Base/Util/Assert.h" #include "Base/Util/Assert.h"
#include "Device/Beam/Beam.h"
#include "Device/Beam/IFootprintFactor.h" #include "Device/Beam/IFootprintFactor.h"
#include "Device/Coord/CoordSystem2D.h" #include "Device/Coord/CoordSystem2D.h"
#include "Device/Data/Datafield.h" #include "Device/Data/Datafield.h"
...@@ -33,7 +32,6 @@ ...@@ -33,7 +32,6 @@
DepthprobeSimulation::DepthprobeSimulation(const IBeamScan& scan, const MultiLayer& sample) DepthprobeSimulation::DepthprobeSimulation(const IBeamScan& scan, const MultiLayer& sample)
: ISimulation(sample) : ISimulation(sample)
, m_scan(dynamic_cast<AlphaScan*>(scan.clone())) , m_scan(dynamic_cast<AlphaScan*>(scan.clone()))
, m_beam(InBeam(1., scan.wavelength(), 0., 0.).clone())
, m_alpha_axis(scan.coordinateAxis()->clone()) , m_alpha_axis(scan.coordinateAxis()->clone())
{ {
if (!m_scan) if (!m_scan)
...@@ -72,11 +70,8 @@ void DepthprobeSimulation::initDistributionHandler() ...@@ -72,11 +70,8 @@ void DepthprobeSimulation::initDistributionHandler()
switch (distribution.whichParameter()) { switch (distribution.whichParameter()) {
case ParameterDistribution::BeamInclinationAngle: { case ParameterDistribution::BeamInclinationAngle: {
distributionHandler().defineCallbackForDistribution(&distribution, [&](double d) { distributionHandler().defineCallbackForDistribution(
m_beam->setInclination(d); &distribution, [&](double d) { m_scan->setAlphaOffset(d); });
m_scan->setAlphaOffset(d);
ASSERT(m_scan->alphaOffset() == m_beam->alpha_i());
});
break; break;
} }
case ParameterDistribution::BeamWavelength: case ParameterDistribution::BeamWavelength:
...@@ -91,8 +86,6 @@ void DepthprobeSimulation::initDistributionHandler() ...@@ -91,8 +86,6 @@ void DepthprobeSimulation::initDistributionHandler()
void DepthprobeSimulation::runComputation(const ReSample& re_sample, size_t i, double weight) void DepthprobeSimulation::runComputation(const ReSample& re_sample, size_t i, double weight)
{ {
std::cout << m_scan->alphaOffset() << " vs " << m_beam->alpha_i() << std::endl;
ASSERT(m_scan->alphaOffset() == m_beam->alpha_i());
const double result_angle = m_alpha_axis->bin(i).center() + m_scan->alphaOffset(); const double result_angle = m_alpha_axis->bin(i).center() + m_scan->alphaOffset();
DepthprobeElement ele(m_scan->wavelength(), -result_angle, m_z_axis.get(), DepthprobeElement ele(m_scan->wavelength(), -result_angle, m_z_axis.get(),
0 < result_angle && result_angle < M_PI_2); 0 < result_angle && result_angle < M_PI_2);
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "Sim/Simulation/ISimulation.h" #include "Sim/Simulation/ISimulation.h"
class AlphaScan; class AlphaScan;
class Beam;
class DepthprobeElement; class DepthprobeElement;
class IAxis; class IAxis;
class IBeamScan; class IBeamScan;
...@@ -76,7 +75,6 @@ private: ...@@ -76,7 +75,6 @@ private:
//... Model components: //... Model components:
std::unique_ptr<AlphaScan> m_scan; std::unique_ptr<AlphaScan> m_scan;
std::unique_ptr<Beam> m_beam;
//... Caches: //... Caches:
std::unique_ptr<IAxis> m_alpha_axis; std::unique_ptr<IAxis> m_alpha_axis;
......
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