BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
FootprintGauss (const std::vector< double > P) | |
FootprintGauss (double width_ratio) | |
void | accept (INodeVisitor *visitor) const override |
FootprintGauss * | clone () const override |
double | calculate (double alpha) const override |
std::string | print () const override |
void | setWidthRatio (double width_ratio) |
double | widthRatio () const |
virtual void | transferToCPP () |
virtual std::string | treeToString () const |
void | registerChild (INode *node) |
virtual std::vector< const INode * > | getChildren () const |
virtual void | setParent (const INode *newParent) |
const INode * | parent () const |
INode * | parent () |
int | copyNumber (const INode *node) const |
std::string | displayName () const |
ParameterPool * | createParameterTree () const |
ParameterPool * | parameterPool () const |
std::string | parametersToString () const |
RealParameter & | registerParameter (const std::string &name, double *parpointer) |
void | registerVector (const std::string &base_name, kvector_t *p_vec, const std::string &units="nm") |
void | setParameterValue (const std::string &name, double value) |
void | setVectorValue (const std::string &base_name, kvector_t value) |
RealParameter * | parameter (const std::string &name) const |
virtual void | onChange () |
void | removeParameter (const std::string &name) |
void | removeVector (const std::string &base_name) |
void | setName (const std::string &name) |
const std::string & | getName () const |
Static Public Member Functions | |
static std::string | XComponentName (const std::string &base_name) |
static std::string | YComponentName (const std::string &base_name) |
static std::string | ZComponentName (const std::string &base_name) |
Protected Attributes | |
const double & | m_width_ratio |
const size_t | m_NP |
std::vector< double > | m_P |
Private Member Functions | |
void | initialize () |
Private Attributes | |
const INode * | m_parent {nullptr} |
std::string | m_name |
std::unique_ptr< ParameterPool > | m_pool |
Calculates footprint coefficient for a gaussian beam Beam width is interpreted as the full width on the level of.
from the peak intensity.
Definition at line 25 of file FootprintGauss.h.
FootprintGauss::FootprintGauss | ( | const std::vector< double > | P | ) |
FootprintGauss::FootprintGauss | ( | double | width_ratio | ) |
Definition at line 25 of file FootprintGauss.cpp.
|
inlineoverridevirtual |
Calls the INodeVisitor's visit method.
Implements INode.
Definition at line 31 of file FootprintGauss.h.
References INodeVisitor::visit().
|
overridevirtual |
Implements IFootprintFactor.
Definition at line 30 of file FootprintGauss.cpp.
References FootprintGauss(), and IFootprintFactor::m_width_ratio.
|
overridevirtual |
Calculate footprint correction coefficient from the beam incident angle alpha.
Implements IFootprintFactor.
Definition at line 35 of file FootprintGauss.cpp.
References MathFunctions::erf(), M_PI_2, M_SQRT1_2, and IFootprintFactor::widthRatio().
|
overridevirtual |
Print python-formatted footprint definition.
Implements IFootprintFactor.
Definition at line 45 of file FootprintGauss.cpp.
References pyfmt::indent(), pyfmt::printDouble(), and IFootprintFactor::widthRatio().
|
inherited |
|
inlineinherited |
Definition at line 37 of file IFootprintFactor.h.
References IFootprintFactor::m_width_ratio.
Referenced by calculate(), FootprintSquare::calculate(), print(), and FootprintSquare::print().
|
privateinherited |
Beam to sample width ratio.
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 34 of file ICloneable.h.
|
virtualinherited |
Returns multiline string representing tree structure below the node.
Definition at line 53 of file INode.cpp.
References NodeUtils::nodeToString().
|
inherited |
Definition at line 58 of file INode.cpp.
References ASSERT, and INode::setParent().
Referenced by ParticleLayout::addAndRegisterAbstractParticle(), ParticleCoreShell::addAndRegisterCore(), MultiLayer::addAndRegisterInterface(), MultiLayer::addAndRegisterLayer(), ParticleCoreShell::addAndRegisterShell(), Layer::addLayout(), ParticleComposition::addParticlePointer(), Beam::Beam(), Crystal::Crystal(), IDetector::IDetector(), Simulation::initialize(), MesoCrystal::initialize(), Instrument::Instrument(), Beam::operator=(), Instrument::operator=(), Particle::Particle(), ParticleDistribution::ParticleDistribution(), IParticle::rotate(), ParticleLayout::setAndRegisterInterferenceFunction(), Simulation::setBackground(), InterferenceFunction1DLattice::setDecayFunction(), InterferenceFunction2DLattice::setDecayFunction(), Instrument::setDetector(), IDetector::setDetectorResolution(), Beam::setFootprintFactor(), Particle::setFormFactor(), InterferenceFunctionFinite3DLattice::setLattice(), InterferenceFunction2DLattice::setLattice(), InterferenceFunction2DParaCrystal::setLattice(), InterferenceFunction2DSuperLattice::setLattice(), InterferenceFunctionFinite2DLattice::setLattice(), InterferenceFunctionRadialParaCrystal::setProbabilityDistribution(), InterferenceFunction2DParaCrystal::setProbabilityDistributions(), ConvolutionDetectorResolution::setResolutionFunction(), IParticle::setRotation(), LayerInterface::setRoughness(), and InterferenceFunction2DSuperLattice::setSubstructureIFF().
|
virtualinherited |
Returns a vector of children (const).
Reimplemented in ParticleDistribution, ParticleCoreShell, ParticleComposition, Particle, MesoCrystal, Crystal, Layer, InterferenceFunctionRadialParaCrystal, InterferenceFunctionFinite3DLattice, InterferenceFunctionFinite2DLattice, InterferenceFunction3DLattice, InterferenceFunction2DSuperLattice, InterferenceFunction2DParaCrystal, InterferenceFunction2DLattice, InterferenceFunction1DLattice, SampleProvider, IParticle, IDetector, Beam, MultiLayer, ParticleLayout, LayerInterface, ConvolutionDetectorResolution, Instrument, and Simulation.
Definition at line 64 of file INode.cpp.
Referenced by INodeUtils::AllDescendantsOfType(), INodeUtils::ChildNodesOfType(), ISample::containedMaterials(), INode::copyNumber(), PostorderStrategy::first(), PreorderStrategy::next(), and PostorderStrategy::next().
|
virtualinherited |
Reimplemented in SampleProvider.
Definition at line 69 of file INode.cpp.
References INode::m_parent.
Referenced by INode::registerChild(), SampleProvider::setBuilder(), and SampleProvider::setParent().
|
inherited |
Definition at line 74 of file INode.cpp.
References INode::m_parent.
Referenced by INode::copyNumber(), INode::createParameterTree(), NodeUtils::nodePath(), Lattice2D::onChange(), SampleProvider::setBuilder(), SampleProvider::setParent(), and SampleProvider::setSample().
|
inherited |
|
inherited |
Returns copyNumber of child, which takes into account existence of children with same name.
Definition at line 84 of file INode.cpp.
References INode::getChildren(), IParameterized::getName(), and INode::parent().
Referenced by INode::displayName().
|
inherited |
Returns display name, composed from the name of node and it's copy number.
Definition at line 105 of file INode.cpp.
References INode::copyNumber(), IParameterized::getName(), and INode::m_parent.
Referenced by NodeUtils::nodePath(), and anonymous_namespace{NodeUtils.cpp}::nodeString().
|
virtualinherited |
Creates new parameter pool, with all local parameters and those of its children.
Reimplemented from IParameterized.
Definition at line 116 of file INode.cpp.
References ParameterPool::copyToExternalPool(), NodeIterator< Strategy >::first(), NodeIterator< Strategy >::getCurrent(), NodeIterator< Strategy >::isDone(), NodeIterator< Strategy >::next(), NodeUtils::nodePath(), IParameterized::parameterPool(), and INode::parent().
Referenced by ParticleDistribution::generateParticles(), Simulation::runSimulation(), DepthProbeSimulation::validateParametrization(), OffSpecSimulation::validateParametrization(), and SpecularSimulation::validateParametrization().
|
inlineinherited |
Returns pointer to the parameter pool.
Definition at line 38 of file IParameterized.h.
References IParameterized::m_pool.
Referenced by pyfmt2::argumentList(), SampleBuilderNode::borrow_builder_parameters(), INode::createParameterTree(), INode::INode(), IParameterized::IParameterized(), anonymous_namespace{NodeUtils.cpp}::poolToString(), SampleBuilderNode::reset(), and IDistribution1D::setUnits().
|
inherited |
Returns multiline string representing available parameters.
Definition at line 40 of file IParameterized.cpp.
References IParameterized::createParameterTree().
|
inherited |
Definition at line 48 of file IParameterized.cpp.
References IParameterized::getName(), IParameterized::m_pool, and IParameterized::onChange().
Referenced by BasicLattice::BasicLattice(), Beam::Beam(), CylindersInBABuilder::CylindersInBABuilder(), DetectionProperties::DetectionProperties(), HexagonalLattice::HexagonalLattice(), IInterferenceFunction::IInterferenceFunction(), INode::INode(), InterferenceFunction1DLattice::InterferenceFunction1DLattice(), InterferenceFunction2DParaCrystal::InterferenceFunction2DParaCrystal(), InterferenceFunctionHardDisk::InterferenceFunctionHardDisk(), InterferenceFunctionRadialParaCrystal::InterferenceFunctionRadialParaCrystal(), InterferenceFunctionTwin::InterferenceFunctionTwin(), Lattice2D::Lattice2D(), LayerRoughness::LayerRoughness(), MultiLayer::MultiLayer(), ParticleDistribution::ParticleDistribution(), PlainMultiLayerBySLDBuilder::PlainMultiLayerBySLDBuilder(), IParticle::registerAbundance(), ParticleLayout::registerParticleDensity(), Layer::registerThickness(), IParameterized::registerVector(), ParticleLayout::registerWeight(), ResolutionFunction2DGaussian::ResolutionFunction2DGaussian(), ResonatorBuilder::ResonatorBuilder(), Lattice2D::setRotationEnabled(), SquareLattice::SquareLattice(), and TriangularRippleBuilder::TriangularRippleBuilder().
|
inherited |
Definition at line 54 of file IParameterized.cpp.
References IParameterized::registerParameter(), RealParameter::setUnit(), IParameterized::XComponentName(), IParameterized::YComponentName(), and IParameterized::ZComponentName().
Referenced by Beam::Beam(), DetectionProperties::DetectionProperties(), InterferenceFunctionTwin::InterferenceFunctionTwin(), MultiLayer::MultiLayer(), Lattice::registerBasisVectors(), and IParticle::registerPosition().
|
inherited |
Definition at line 62 of file IParameterized.cpp.
References IParameterized::createParameterTree(), IParameterized::m_pool, and ParameterPool::setMatchedParametersValue().
Referenced by AsymRippleBuilder::buildSample(), and IParameterized::setVectorValue().
|
inherited |
Definition at line 75 of file IParameterized.cpp.
References IParameterized::setParameterValue(), BasicVector3D< T >::x(), IParameterized::XComponentName(), BasicVector3D< T >::y(), IParameterized::YComponentName(), BasicVector3D< T >::z(), and IParameterized::ZComponentName().
|
inherited |
Returns parameter with given 'name'.
Definition at line 83 of file IParameterized.cpp.
References IParameterized::m_pool.
Referenced by DepthProbeSimulation::initialize(), SpecularSimulation::initialize(), IParticle::registerAbundance(), Lattice::registerBasisVectors(), ParticleLayout::registerParticleDensity(), IParticle::registerPosition(), Layer::registerThickness(), Lattice2D::setRotationEnabled(), and DistributionLogNormal::setUnits().
|
inlinevirtualinherited |
Action to be taken in inherited class when a parameter has changed.
Reimplemented in IProfileRipple, FormFactorSphereLogNormalRadius, FormFactorSphereGaussianRadius, FormFactorGaussSphere, ISawtoothRipple, ICosineRipple, IProfileRectangularRipple, FormFactorTruncatedSpheroid, FormFactorTruncatedSphere, FormFactorTruncatedCube, FormFactorTetrahedron, FormFactorPyramid, FormFactorPrism6, FormFactorPrism3, FormFactorLongBoxLorentz, FormFactorLongBoxGauss, FormFactorIcosahedron, FormFactorHollowSphere, FormFactorHemiEllipsoid, FormFactorFullSpheroid, FormFactorFullSphere, FormFactorEllipsoidalCylinder, FormFactorDodecahedron, FormFactorCylinder, FormFactorCuboctahedron, FormFactorCone6, FormFactorCone, FormFactorCantellatedCube, FormFactorBox, FormFactorAnisoPyramid, InterferenceFunction3DLattice, InterferenceFunction2DLattice, Lattice, and Lattice2D.
Definition at line 58 of file IParameterized.h.
Referenced by Lattice2D::onChange(), and IParameterized::registerParameter().
|
inherited |
Definition at line 88 of file IParameterized.cpp.
References IParameterized::m_pool.
Referenced by IParticle::registerAbundance(), ParticleLayout::registerParticleDensity(), Layer::registerThickness(), IParameterized::removeVector(), and Lattice2D::setRotationEnabled().
|
inherited |
Definition at line 93 of file IParameterized.cpp.
References IParameterized::removeParameter(), IParameterized::XComponentName(), IParameterized::YComponentName(), and IParameterized::ZComponentName().
Referenced by IParticle::registerPosition().
|
staticinherited |
Definition at line 100 of file IParameterized.cpp.
Referenced by Lattice::registerBasisVectors(), IParticle::registerPosition(), IParameterized::registerVector(), IParameterized::removeVector(), and IParameterized::setVectorValue().
|
staticinherited |
Definition at line 105 of file IParameterized.cpp.
Referenced by IParameterized::registerVector(), IParameterized::removeVector(), and IParameterized::setVectorValue().
|
staticinherited |
Definition at line 110 of file IParameterized.cpp.
Referenced by IParameterized::registerVector(), IParameterized::removeVector(), and IParameterized::setVectorValue().
|
inlineinherited |
Definition at line 68 of file IParameterized.h.
References IParameterized::m_name.
Referenced by BasicLattice::BasicLattice(), Beam::Beam(), Layer::clone(), ConvolutionDetectorResolution::ConvolutionDetectorResolution(), LayersWithAbsorptionBuilder::createSampleByIndex(), Basic2DParaCrystalBuilder::createSampleByIndex(), ParticleInVacuumBuilder::createSampleByIndex(), SimpleMagneticRotationBuilder::createSampleByIndex(), Crystal::Crystal(), DetectionProperties::DetectionProperties(), DistributionHandler::DistributionHandler(), FormFactorBAPol::FormFactorBAPol(), FormFactorCoreShell::FormFactorCoreShell(), FormFactorCrystal::FormFactorCrystal(), FormFactorDecoratorMaterial::FormFactorDecoratorMaterial(), FormFactorDecoratorPositionFactor::FormFactorDecoratorPositionFactor(), FormFactorDecoratorRotation::FormFactorDecoratorRotation(), FormFactorDWBA::FormFactorDWBA(), FormFactorDWBAPol::FormFactorDWBAPol(), FormFactorWeighted::FormFactorWeighted(), HexagonalLattice::HexagonalLattice(), IDetector::IDetector(), DepthProbeSimulation::initialize(), GISASSimulation::initialize(), OffSpecSimulation::initialize(), SpecularSimulation::initialize(), SpecularDetector1D::initialize(), MesoCrystal::initialize(), Particle::initialize(), ParticleComposition::initialize(), INode::INode(), Instrument::Instrument(), InterferenceFunction1DLattice::InterferenceFunction1DLattice(), InterferenceFunction2DLattice::InterferenceFunction2DLattice(), InterferenceFunction2DParaCrystal::InterferenceFunction2DParaCrystal(), InterferenceFunction2DSuperLattice::InterferenceFunction2DSuperLattice(), InterferenceFunction3DLattice::InterferenceFunction3DLattice(), InterferenceFunctionFinite2DLattice::InterferenceFunctionFinite2DLattice(), InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice(), InterferenceFunctionHardDisk::InterferenceFunctionHardDisk(), InterferenceFunctionNone::InterferenceFunctionNone(), InterferenceFunctionRadialParaCrystal::InterferenceFunctionRadialParaCrystal(), InterferenceFunctionTwin::InterferenceFunctionTwin(), ISampleBuilder::ISampleBuilder(), IsGISAXSDetector::IsGISAXSDetector(), Lattice::Lattice(), Layer::Layer(), LayerInterface::LayerInterface(), LayerRoughness::LayerRoughness(), MultiLayer::MultiLayer(), Beam::operator=(), SampleBuilderNode::operator=(), ParticleCoreShell::ParticleCoreShell(), ParticleDistribution::ParticleDistribution(), ParticleLayout::ParticleLayout(), RectangularDetector::RectangularDetector(), SampleBuilderNode::reset(), ResolutionFunction2DGaussian::ResolutionFunction2DGaussian(), SampleBuilderNode::SampleBuilderNode(), SampleBuilderNode::setSBN(), SphericalDetector::SphericalDetector(), and SquareLattice::SquareLattice().
|
inlineinherited |
Definition at line 69 of file IParameterized.h.
References IParameterized::m_name.
Referenced by Beam::Beam(), Layer::clone(), IFormFactorBorn::computeSlicingEffects(), ConvolutionDetectorResolution::ConvolutionDetectorResolution(), INode::copyNumber(), IParameterized::createParameterTree(), IFormFactor::createSlicedFormFactor(), SampleToPython::defineFormFactors(), SampleToPython::defineInterferenceFunctions(), INode::displayName(), IDetector::IDetector(), Instrument::Instrument(), IParameterized::IParameterized(), Beam::operator=(), SampleBuilderNode::operator=(), anonymous_namespace{ParticleLayout.cpp}::particleDensityIsProvidedByInterference(), IParameterized::registerParameter(), SampleBuilderNode::SampleBuilderNode(), and IFormFactor::sliceFormFactor().
|
protectedinherited |
Definition at line 46 of file IFootprintFactor.h.
Referenced by clone(), FootprintSquare::clone(), and IFootprintFactor::widthRatio().
|
privateinherited |
Definition at line 81 of file INode.h.
Referenced by INode::displayName(), INode::parent(), and INode::setParent().
|
protectedinherited |
Definition at line 86 of file INode.h.
Referenced by INode::INode().
|
protectedinherited |
Definition at line 87 of file INode.h.
Referenced by INode::INode(), and IFootprintFactor::setWidthRatio().
|
privateinherited |
Definition at line 72 of file IParameterized.h.
Referenced by IParameterized::getName(), and IParameterized::setName().
|
privateinherited |
parameter pool (kind of pointer-to-implementation)
Definition at line 73 of file IParameterized.h.
Referenced by IParameterized::createParameterTree(), IParameterized::parameter(), IParameterized::parameterPool(), IParameterized::registerParameter(), IParameterized::removeParameter(), and IParameterized::setParameterValue().