33 throw std::runtime_error(
"ScatteringSimulation::prepareSimulation() "
34 "-> Error. The detector was not properly configured.");
41 const std::unique_ptr<Datafield> data(
detector().createDetectorIntensity(
m_eles));
42 return {*data, *coordsys};
58 return det2D->scatteringCoords(
beam());
Defines the macro ASSERT.
#define ASSERT(condition)
Defines interface CoordSystem2D and its subclasses.
Defines and implements templated class Datafield.
Defines class DiffuseElement.
Defines common detector interface.
Defines class ScatteringSimulation.
Defines class SimulationResult.
An incident neutron or x-ray beam.
Interface to provide axis translations to different units for simulation output.
Abstract detector interface.
void iterateOverRegionOfInterest(std::function< void(const_iterator)> func) const
Iterate over all points within "region of interest", no matter whether they are masked or not....
Abstract base class of simulations that generate 2D patterns.
std::vector< std::unique_ptr< DiffuseElement > > generateElements(const Beam &beam)
Generate simulation elements for given beam.
void prepareSimulation() override
Put into a clean state for running a simulation.
std::vector< double > m_cache
std::vector< std::unique_ptr< DiffuseElement > > m_eles
const IDetector * getDetector() const
Our sample model: a stack of layers one below the other.
ICoordSystem * createCoordSystem() const override
ScatteringSimulation(const Beam &beam, const MultiLayer &sample, const IDetector &detector)
void initElementVector() override
Initializes the vector of ISimulation elements.
size_t intensityMapSize() const override
Returns the total number of the intensity values in the simulation result.
void prepareSimulation() override
Put into a clean state for running a simulation.
SimulationResult pack_result() override
Sets m_result.
An iterator for SimulationArea.
Wrapper around Datafield that also provides unit conversions.