15 #ifndef BORNAGAIN_SIM_SIMULATION_SPECULARSIMULATION_H
16 #define BORNAGAIN_SIM_SIMULATION_SPECULARSIMULATION_H
39 std::string
className() const final {
return "SpecularSimulation"; }
65 size_t n_elements)
override;
75 void normalize(
size_t start_ind,
size_t n_elements)
override;
86 std::unique_ptr<const ISpecularScan>
m_scan;
Defines interface ISimulation.
Abstract base class for one-dimensional axes.
Interface to provide axis translations to different units for simulation output.
Abstract base class, holds the infrastructure to run a simulation.
const MultiLayer * sample() const
Abstract base class for all types of specular scans.
Our sample model: a stack of layers one below the other.
A parametric distribution function, for use with any model parameter.
Convenience class for handling polarization density matrix and polarization analyzer operator.
Wrapper around Datafield that also provides unit conversions.
Data stucture containing both input and output of a single image pixel for specular simulation.
Specular reflectometry simulation.
SimulationResult pack_result() override
Sets m_result.
SpecularSimulation(SpecularSimulation &&)
void initElementVector() override
Initializes the vector of ISimulation elements.
std::vector< double > m_cache
bool force_polarized() const override
Force polarized computation even in absence of sample magnetization or external fields.
void addDataToCache(double weight) override
ICoordSystem * createCoordSystem() const override
std::unique_ptr< IComputation > createComputation(const reSample &re_sample, size_t start, size_t n_elements) override
Generate a single threaded computation for a given range of simulation elements.
const ISpecularScan * scan() const
Returns internal data handler.
size_t intensityMapSize() const override
Returns the total number of the intensity values in the simulation result.
~SpecularSimulation() override
std::unique_ptr< const ISpecularScan > m_scan
void addBackgroundIntensity(size_t start_ind, size_t n_elements) override
void prepareSimulation() override
Put into a clean state for running a simulation.
void moveDataFromCache() override
void validateParametrization(const ParameterDistribution &par_distr) const override
Checks the distribution validity for simulation.
std::string className() const final
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
std::vector< SpecularElement > m_eles
void normalize(size_t start_ind, size_t n_elements) override
Normalize the detector counts to beam intensity, to solid angle, and to exposure angle.
SpecularSimulation(const ISpecularScan &scan, const MultiLayer &sample)
size_t numberOfElements() const override
Gets the number of elements this simulation needs to calculate.
Data structure that contains all the necessary data for scattering calculations.