26 std::string SampleLabelHandler::labelCrystal(
const Crystal* cr)
28 return m_CrystalLabel[cr];
31 std::string SampleLabelHandler::labelFormFactor(
const IFormFactor* ff)
33 return m_FormFactorLabel[ff];
38 return m_InterferenceFunctionLabel[iff];
41 std::string SampleLabelHandler::labelLayer(
const Layer* layer)
43 return m_LayerLabel[layer];
46 std::string SampleLabelHandler::labelLayout(
const ILayout* layout)
48 return m_ILayoutLabel[layout];
51 std::string SampleLabelHandler::labelMaterial(
const Material* mat)
53 return m_MaterialLabel[mat];
56 std::string SampleLabelHandler::labelLattice(
const Lattice* lat)
58 return m_LatticeLabel[lat];
61 std::string SampleLabelHandler::labelMultiLayer(
const MultiLayer* ml)
63 return m_MultiLayerLabel[ml];
66 std::string SampleLabelHandler::labelParticle(
const IAbstractParticle* absparticle)
68 if (
const auto core_shell_particle =
dynamic_cast<const ParticleCoreShell*
>(absparticle))
69 return m_ParticleCoreShellLabel[core_shell_particle];
70 if (
const auto particle =
dynamic_cast<const Particle*
>(absparticle))
71 return m_ParticleLabel[particle];
73 return m_ParticleDistributionLabel[particle];
75 return m_ParticleCompositionLabel[lattice_basis];
76 if (
const auto mesocrystal =
dynamic_cast<const MesoCrystal*
>(absparticle))
77 return m_MesoCrystalLabel[mesocrystal];
79 "SampleLabelHandler::getLabel: called for unknown IParticle type");
82 std::string SampleLabelHandler::labelRotation(
const IRotation* rot)
84 return m_RotationsLabel[rot];
87 std::string SampleLabelHandler::labelRoughness(
const LayerRoughness* roughness)
89 return m_LayerRoughnessLabel[roughness];
92 void SampleLabelHandler::insertCrystal(
const Crystal* sample)
94 std::string label =
"crystal_" + std::to_string(m_CrystalLabel.size() + 1);
95 m_CrystalLabel.insert(sample, label);
98 void SampleLabelHandler::insertFormFactor(
const IFormFactor* sample)
100 std::string label =
"formFactor_" + std::to_string(m_FormFactorLabel.size() + 1);
101 m_FormFactorLabel.insert(sample, label);
106 std::string label =
"interference_" + std::to_string(m_InterferenceFunctionLabel.size() + 1);
107 m_InterferenceFunctionLabel.insert(sample, label);
110 void SampleLabelHandler::insertLayer(
const Layer* sample)
112 std::string label =
"layer_" + std::to_string(m_LayerLabel.size() + 1);
113 m_LayerLabel.insert(sample, label);
116 void SampleLabelHandler::insertLayout(
const ILayout* sample)
118 std::string label =
"layout_" + std::to_string(m_ILayoutLabel.size() + 1);
119 m_ILayoutLabel.insert(sample, label);
122 void SampleLabelHandler::insertMaterial(
const Material* mat)
124 for (
auto it = m_MaterialLabel.begin(); it != m_MaterialLabel.end(); ++it) {
125 if (*(it->first) == *mat) {
126 m_MaterialLabel.insert(mat, it->second);
131 std::set<std::string> unique_labels;
132 for (
auto it = m_MaterialLabel.begin(); it != m_MaterialLabel.end(); ++it)
133 unique_labels.insert(it->second);
135 std::string label =
"material_" + std::to_string(unique_labels.size() + 1);
136 m_MaterialLabel.insert(mat, label);
139 void SampleLabelHandler::insertLattice(
const Lattice* sample)
141 std::string label =
"lattice_" + std::to_string(m_LatticeLabel.size() + 1);
142 m_LatticeLabel.insert(sample, label);
145 void SampleLabelHandler::insertMesoCrystal(
const MesoCrystal* sample)
147 std::string label =
"mesocrystal_" + std::to_string(m_MesoCrystalLabel.size() + 1);
148 m_MesoCrystalLabel.insert(sample, label);
151 void SampleLabelHandler::insertMultiLayer(
const MultiLayer* sample)
153 std::string label =
"multiLayer_" + std::to_string(m_MultiLayerLabel.size() + 1);
154 m_MultiLayerLabel.insert(sample, label);
160 "particleComposition_" + std::to_string(m_ParticleCompositionLabel.size() + 1);
161 m_ParticleCompositionLabel.insert(sample, label);
167 "particleDistribution_" + std::to_string(m_ParticleDistributionLabel.size() + 1);
168 m_ParticleDistributionLabel.insert(sample, label);
171 void SampleLabelHandler::insertParticle(
const Particle* sample)
173 std::string label =
"particle_" + std::to_string(m_ParticleLabel.size() + 1);
174 m_ParticleLabel.insert(sample, label);
177 void SampleLabelHandler::insertParticleCoreShell(
const ParticleCoreShell* sample)
179 std::string label =
"particleCoreShell_" + std::to_string(m_ParticleCoreShellLabel.size() + 1);
180 m_ParticleCoreShellLabel.insert(sample, label);
183 void SampleLabelHandler::insertRotation(
const IRotation* sample)
185 std::string label =
"rotation_" + std::to_string(m_RotationsLabel.size() + 1);
186 m_RotationsLabel.insert(sample, label);
189 void SampleLabelHandler::insertRoughness(
const LayerRoughness* sample)
193 std::string label =
"layerRoughness_" + std::to_string(m_LayerRoughnessLabel.size() + 1);
194 m_LayerRoughnessLabel.insert(sample, label);
Defines and implements the interface class IInterferenceFunction.
Defines class LayerRoughness.
Defines class MesoCrystal.
Defines class MultiLayer.
Defines class ParticleComposition.
Defines ParticleCoreShell.
Defines class ParticleDistribution.
Defines classes LabelMap and SampleLabelHandler.
A crystal structure with a ParticleComposition as a basis.
Interface for a generic particle.
Pure virtual base class of interference functions.
Pure virtual interface class to equip a sample layer with scattering properties.
Pure virtual interface for rotations.
A lattice with three basis vectors.
A roughness of interface between two layers.
double getSigma() const
Returns rms of roughness.
double getLatteralCorrLength() const
Returns lateral correlation length.
double getHurstParameter() const
Returns hurst parameter.
A layer, with thickness (in nanometer) and material.
A wrapper for underlying material implementation.
A particle with an internal structure of smaller particles.
Our sample model: a stack of layers one below the other.
A composition of particles at fixed positions.
A particle with a core/shell geometry.
A particle type that is a parametric distribution of IParticle's.
A particle with a form factor and refractive index.