BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Data structure that contains all the necessary data for scattering calculations. More...
Public Member Functions | |
ProcessedSample (const MultiLayer &sample, const SimulationOptions &options, bool forcePolarized=false) | |
~ProcessedSample () | |
const std::vector< Slice > & | averageSlices () const |
const LayerRoughness * | bottomRoughness (size_t i) const |
bool | containsMagneticMaterial () const |
double | crossCorrelationLength () const |
double | crossCorrSpectralFun (const kvector_t kvec, size_t j, size_t k) const |
Fourier transform of the correlation function of roughnesses between the interfaces. More... | |
kvector_t | externalField () const |
const IFresnelMap * | fresnelMap () const |
bool | hasRoughness () const |
const std::vector< ProcessedLayout > & | layouts () const |
size_t | numberOfSlices () const |
double | sliceBottomZ (size_t i) const |
const std::vector< Slice > & | slices () const |
double | sliceTopZ (size_t i) const |
Private Member Functions | |
void | addNSlices (size_t n, double thickness, const Material &material, const LayerRoughness *p_roughness=nullptr) |
void | addSlice (double thickness, const Material &material, const LayerRoughness *p_roughness=nullptr) |
void | initBFields () |
void | initFresnelMap (const SimulationOptions &sim_options) |
void | initLayouts (const MultiLayer &sample) |
void | initSlices (const MultiLayer &sample, const SimulationOptions &options) |
void | mergeRegionMap (const std::map< size_t, std::vector< HomogeneousRegion >> ®ion_map) |
Private Attributes | |
double | m_crossCorrLength |
kvector_t | m_ext_field |
std::unique_ptr< IFresnelMap > | m_fresnel_map |
std::vector< ProcessedLayout > | m_layouts |
bool | m_polarized |
std::map< size_t, std::vector< HomogeneousRegion > > | m_region_map |
std::vector< Slice > | m_slices |
double | m_top_z |
Data structure that contains all the necessary data for scattering calculations.
If the usage of average materials is requested, layers and particles are sliced into multiple slices and the average material is calculated for each slice.
Definition at line 42 of file ProcessedSample.h.
ProcessedSample::ProcessedSample | ( | const MultiLayer & | sample, |
const SimulationOptions & | options, | ||
bool | forcePolarized = false |
||
) |
Definition at line 111 of file ProcessedSample.cpp.
References initBFields(), initFresnelMap(), initLayouts(), initSlices(), m_fresnel_map, and m_slices.
|
default |
|
private |
Definition at line 303 of file ProcessedSample.cpp.
References addSlice().
Referenced by initSlices().
|
private |
Definition at line 294 of file ProcessedSample.cpp.
References m_slices.
Referenced by addNSlices(), and initSlices().
const std::vector< Slice > & ProcessedSample::averageSlices | ( | ) | const |
Definition at line 138 of file ProcessedSample.cpp.
References m_fresnel_map.
Referenced by ProfileHelper::ProfileHelper().
const LayerRoughness * ProcessedSample::bottomRoughness | ( | size_t | i | ) | const |
Definition at line 163 of file ProcessedSample.cpp.
References m_slices.
Referenced by ProfileHelper::ProfileHelper(), RoughMultiLayerComputation::compute(), crossCorrSpectralFun(), and RoughMultiLayerComputation::get_sum8terms().
bool ProcessedSample::containsMagneticMaterial | ( | ) | const |
Definition at line 191 of file ProcessedSample.cpp.
References m_polarized.
double ProcessedSample::crossCorrelationLength | ( | ) | const |
Definition at line 153 of file ProcessedSample.cpp.
References m_crossCorrLength.
Referenced by RoughMultiLayerComputation::compute().
double ProcessedSample::crossCorrSpectralFun | ( | const kvector_t | kvec, |
size_t | j, | ||
size_t | k | ||
) | const |
Fourier transform of the correlation function of roughnesses between the interfaces.
Definition at line 204 of file ProcessedSample.cpp.
References bottomRoughness(), LayerRoughness::getSigma(), LayerRoughness::getSpectralFun(), m_crossCorrLength, and sliceBottomZ().
Referenced by RoughMultiLayerComputation::compute().
kvector_t ProcessedSample::externalField | ( | ) | const |
Definition at line 158 of file ProcessedSample.cpp.
References m_ext_field.
const IFresnelMap * ProcessedSample::fresnelMap | ( | ) | const |
Definition at line 148 of file ProcessedSample.cpp.
References m_fresnel_map.
Referenced by DepthProbeComputationTerm::compute(), and RoughMultiLayerComputation::get_sum8terms().
bool ProcessedSample::hasRoughness | ( | ) | const |
|
private |
Definition at line 317 of file ProcessedSample.cpp.
References m_ext_field, m_slices, Slice::Magnetic_Permeability, and BasicVector3D< T >::z().
Referenced by ProcessedSample().
|
private |
Definition at line 338 of file ProcessedSample.cpp.
References m_fresnel_map, m_region_map, m_slices, and SimulationOptions::useAvgMaterials().
Referenced by ProcessedSample().
|
private |
Definition at line 278 of file ProcessedSample.cpp.
References ISampleNode::isMagnetic(), MultiLayer::layer(), m_fresnel_map, m_layouts, m_polarized, m_slices, m_top_z, mergeRegionMap(), MultiLayer::numberOfLayers(), and Layer::thickness().
Referenced by ProcessedSample().
|
private |
Definition at line 225 of file ProcessedSample.cpp.
References addNSlices(), addSlice(), ZLimits::isFinite(), MultiLayer::layer(), MultiLayerUtils::LayerTopRoughness(), ZLimits::lowerLimit(), m_top_z, OneSidedLimit::m_value, MultiLayer::numberOfLayers(), Layer::numberOfSlices(), ZLimits::upperLimit(), and SimulationOptions::useAvgMaterials().
Referenced by ProcessedSample().
const std::vector< ProcessedLayout > & ProcessedSample::layouts | ( | ) | const |
Definition at line 143 of file ProcessedSample.cpp.
References m_layouts.
|
private |
Definition at line 328 of file ProcessedSample.cpp.
References m_region_map.
Referenced by initLayouts().
size_t ProcessedSample::numberOfSlices | ( | ) | const |
Definition at line 128 of file ProcessedSample.cpp.
References m_slices.
Referenced by ProfileHelper::ProfileHelper(), DepthProbeComputationTerm::compute(), RoughMultiLayerComputation::compute(), and sliceBottomZ().
double ProcessedSample::sliceBottomZ | ( | size_t | i | ) | const |
Definition at line 178 of file ProcessedSample.cpp.
References m_slices, m_top_z, and numberOfSlices().
Referenced by ProfileHelper::ProfileHelper(), DepthProbeComputationTerm::compute(), crossCorrSpectralFun(), and sliceTopZ().
const std::vector< Slice > & ProcessedSample::slices | ( | ) | const |
Definition at line 133 of file ProcessedSample.cpp.
References m_slices.
Referenced by RoughMultiLayerComputation::get_refractive_term(), and RoughMultiLayerComputation::get_sum8terms().
double ProcessedSample::sliceTopZ | ( | size_t | i | ) | const |
Definition at line 171 of file ProcessedSample.cpp.
References m_top_z, and sliceBottomZ().
Referenced by DepthProbeComputationTerm::compute().
|
private |
Definition at line 81 of file ProcessedSample.h.
Referenced by crossCorrelationLength(), and crossCorrSpectralFun().
|
private |
Definition at line 82 of file ProcessedSample.h.
Referenced by externalField(), and initBFields().
|
private |
Definition at line 76 of file ProcessedSample.h.
Referenced by ProcessedSample(), averageSlices(), fresnelMap(), initFresnelMap(), and initLayouts().
|
private |
Definition at line 80 of file ProcessedSample.h.
Referenced by initLayouts(), and layouts().
|
private |
Definition at line 79 of file ProcessedSample.h.
Referenced by containsMagneticMaterial(), and initLayouts().
|
private |
Definition at line 83 of file ProcessedSample.h.
Referenced by initFresnelMap(), and mergeRegionMap().
|
private |
Definition at line 77 of file ProcessedSample.h.
Referenced by ProcessedSample(), addSlice(), bottomRoughness(), hasRoughness(), initBFields(), initFresnelMap(), initLayouts(), numberOfSlices(), sliceBottomZ(), and slices().
|
private |
Definition at line 78 of file ProcessedSample.h.
Referenced by initLayouts(), initSlices(), sliceBottomZ(), and sliceTopZ().