BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Interference function of a 2D lattice.
Definition at line 25 of file Interference2DLattice.h.
Public Member Functions | |
Interference2DLattice (const Lattice2D &lattice) | |
~Interference2DLattice () override | |
void | checkNodeArgs () const |
Raises exception if a parameter value is invalid. More... | |
std::string | className () const final |
Returns the class name, to be hard-coded in each leaf class that inherits from INode. More... | |
Interference2DLattice * | clone () const override |
double | DWfactor (R3 q) const |
structureFactors the Debye-Waller factor for a given wavevector transfer More... | |
bool | integrationOverXi () const |
const Lattice2D & | lattice () const |
std::vector< const INode * > | nodeChildren () const override |
Returns all children. More... | |
std::vector< const INode * > | nodeOffspring () const |
Returns all descendants. More... | |
virtual std::vector< ParaMeta > | parDefs () const |
Returns the parameter definitions, to be hard-coded in each leaf class. More... | |
double | particleDensity () const override |
Returns the particle density associated with this 2d lattice. More... | |
double | positionVariance () const |
Returns the position variance. More... | |
void | setDecayFunction (const IProfile2D &decay) |
Sets two-dimensional decay function. More... | |
void | setIntegrationOverXi (bool integrate_xi) |
void | setPositionVariance (double var) |
Sets the variance of the position for the calculation of the DW factor It is defined as the variance in each relevant dimension. More... | |
virtual double | structureFactor (R3 q, double outer_iff=1.0) const |
The interference function for a given wavevector transfer. More... | |
virtual bool | supportsMultilayer () const |
Indicates if this interference function can be used with a sample (DWBA mode) More... | |
virtual void | transferToCPP () |
Used for Python overriding of clone (see swig/tweaks.py) More... | |
Protected Member Functions | |
double | iff_no_inner (R3 q, double outer_iff) const |
Calculates the structure factor in the absence of extra inner structure. More... | |
Protected Attributes | |
std::vector< double > | m_P |
double | m_position_var |
Private Member Functions | |
std::pair< double, double > | calculateReciprocalVectorFraction (double qx, double qy, double xi) const |
Returns qx,qy coordinates of q - qint, where qint is a reciprocal lattice vector bounding the reciprocal unit cell to which q belongs. More... | |
double | iff_without_dw (R3 q) const override |
Calculates the structure factor without Debye-Waller factor. More... | |
double | interferenceAtOneRecLatticePoint (double qx, double qy) const |
Returns interference from a single reciprocal lattice vector. More... | |
double | interferenceForXi (double xi, double qx, double qy) const |
std::pair< double, double > | rotateOrthonormal (double qx, double qy, double gamma) const |
Returns reciprocal coordinates in the coordinate system rotated by the angle gamma. More... | |
Private Attributes | |
std::unique_ptr< IProfile2D > | m_decay |
bool | m_integrate_xi |
Integrate over the orientation xi. More... | |
std::unique_ptr< Lattice2D > | m_lattice |
int | m_na |
int | m_nb |
determines the number of reciprocal lattice points to use More... | |
Lattice2D::ReciprocalBases | m_sbase |
reciprocal lattice is stored without xi More... | |
Interference2DLattice::Interference2DLattice | ( | const Lattice2D & | lattice | ) |
Definition at line 50 of file Interference2DLattice.cpp.
References Lattice2D::clone(), lattice(), m_lattice, m_sbase, and Lattice2D::reciprocalBases().
Referenced by clone().
|
overridedefault |
|
private |
Returns qx,qy coordinates of q - qint, where qint is a reciprocal lattice vector bounding the reciprocal unit cell to which q belongs.
Definition at line 171 of file Interference2DLattice.cpp.
References Lattice2D::ReciprocalBases::m_asx, Lattice2D::ReciprocalBases::m_asy, Lattice2D::ReciprocalBases::m_bsx, Lattice2D::ReciprocalBases::m_bsy, m_lattice, m_sbase, and M_TWOPI.
Referenced by interferenceForXi().
|
inherited |
Raises exception if a parameter value is invalid.
Definition at line 27 of file INode.cpp.
References ASSERT, RealLimits::check(), INode::className(), INF, RealLimits::limited(), RealLimits::limitless(), INode::m_P, ParaMeta::name, RealLimits::nonnegative(), INode::parDefs(), ParaMeta::vMax, and ParaMeta::vMin.
Referenced by BarGauss::BarGauss(), BarLorentz::BarLorentz(), Bipyramid4::Bipyramid4(), Box::Box(), CantellatedCube::CantellatedCube(), Cone::Cone(), ConstantBackground::ConstantBackground(), CosineRippleBox::CosineRippleBox(), CosineRippleGauss::CosineRippleGauss(), CosineRippleLorentz::CosineRippleLorentz(), Cylinder::Cylinder(), DistributionCosine::DistributionCosine(), DistributionGate::DistributionGate(), DistributionGaussian::DistributionGaussian(), DistributionLogNormal::DistributionLogNormal(), DistributionLorentz::DistributionLorentz(), DistributionTrapezoid::DistributionTrapezoid(), Dodecahedron::Dodecahedron(), EllipsoidalCylinder::EllipsoidalCylinder(), FootprintGauss::FootprintGauss(), FootprintSquare::FootprintSquare(), FuzzySphere::FuzzySphere(), GaussSphere::GaussSphere(), HemiEllipsoid::HemiEllipsoid(), HollowSphere::HollowSphere(), HorizontalCylinder::HorizontalCylinder(), Icosahedron::Icosahedron(), LongBoxGauss::LongBoxGauss(), LongBoxLorentz::LongBoxLorentz(), PlatonicOctahedron::PlatonicOctahedron(), PlatonicTetrahedron::PlatonicTetrahedron(), Prism3::Prism3(), Prism6::Prism6(), Profile1DCauchy::Profile1DCauchy(), Profile1DCosine::Profile1DCosine(), Profile1DGate::Profile1DGate(), Profile1DGauss::Profile1DGauss(), Profile1DTriangle::Profile1DTriangle(), Profile1DVoigt::Profile1DVoigt(), Profile2DCauchy::Profile2DCauchy(), Profile2DCone::Profile2DCone(), Profile2DGate::Profile2DGate(), Profile2DGauss::Profile2DGauss(), Profile2DVoigt::Profile2DVoigt(), Pyramid2::Pyramid2(), Pyramid3::Pyramid3(), Pyramid4::Pyramid4(), Pyramid6::Pyramid6(), RotationEuler::RotationEuler(), RotationX::RotationX(), RotationY::RotationY(), RotationZ::RotationZ(), SawtoothRippleBox::SawtoothRippleBox(), SawtoothRippleGauss::SawtoothRippleGauss(), SawtoothRippleLorentz::SawtoothRippleLorentz(), Sphere::Sphere(), Spheroid::Spheroid(), TruncatedCube::TruncatedCube(), TruncatedSphere::TruncatedSphere(), and TruncatedSpheroid::TruncatedSpheroid().
|
inlinefinalvirtual |
Returns the class name, to be hard-coded in each leaf class that inherits from INode.
Implements INode.
Definition at line 31 of file Interference2DLattice.h.
|
overridevirtual |
Implements IInterference.
Definition at line 66 of file Interference2DLattice.cpp.
References Interference2DLattice(), integrationOverXi(), m_decay, m_lattice, and IInterference::m_position_var.
|
inherited |
structureFactors the Debye-Waller factor for a given wavevector transfer
Definition at line 48 of file IInterference.cpp.
References IInterference::m_position_var, and IInterference::supportsMultilayer().
Referenced by IInterference::iff_no_inner(), and Interference2DSuperLattice::interferenceForXi().
|
protectedinherited |
Calculates the structure factor in the absence of extra inner structure.
Definition at line 56 of file IInterference.cpp.
References IInterference::DWfactor(), and IInterference::iff_without_dw().
Referenced by IInterference::structureFactor().
|
overrideprivatevirtual |
Calculates the structure factor without Debye-Waller factor.
Implements IInterference.
Definition at line 120 of file Interference2DLattice.cpp.
References RealIntegrator::integrate(), interferenceForXi(), m_decay, m_integrate_xi, m_lattice, and M_TWOPI.
|
inline |
Definition at line 36 of file Interference2DLattice.h.
References m_integrate_xi.
Referenced by clone().
|
private |
Returns interference from a single reciprocal lattice vector.
Definition at line 148 of file Interference2DLattice.cpp.
References ROOT::Math::Cephes::gamma(), m_decay, and rotateOrthonormal().
Referenced by interferenceForXi().
|
private |
Definition at line 133 of file Interference2DLattice.cpp.
References calculateReciprocalVectorFraction(), interferenceAtOneRecLatticePoint(), Lattice2D::ReciprocalBases::m_asx, Lattice2D::ReciprocalBases::m_asy, Lattice2D::ReciprocalBases::m_bsx, Lattice2D::ReciprocalBases::m_bsy, m_na, m_nb, m_sbase, and particleDensity().
Referenced by iff_without_dw().
const Lattice2D & Interference2DLattice::lattice | ( | ) | const |
Definition at line 101 of file Interference2DLattice.cpp.
References m_lattice.
Referenced by Interference2DLattice().
|
overridevirtual |
|
inherited |
Returns all descendants.
Definition at line 61 of file INode.cpp.
References INode::nodeChildren().
|
inlinevirtualinherited |
Returns the parameter definitions, to be hard-coded in each leaf class.
Reimplemented in ConstantBackground, GaussSphere, FuzzySphere, RotationEuler, RotationZ, RotationY, RotationX, Crystal, Layer, HexagonalLattice2D, SquareLattice2D, BasicLattice2D, LayerRoughness, TruncatedSpheroid, TruncatedSphere, TruncatedCube, Spheroid, Sphere, SawtoothRippleLorentz, SawtoothRippleGauss, SawtoothRippleBox, Pyramid6, Pyramid4, Pyramid3, Pyramid2, Prism6, Prism3, PlatonicTetrahedron, PlatonicOctahedron, LongBoxLorentz, LongBoxGauss, Icosahedron, HorizontalCylinder, HollowSphere, HemiEllipsoid, EllipsoidalCylinder, Dodecahedron, Cylinder, CosineRippleLorentz, CosineRippleGauss, CosineRippleBox, Cone, CantellatedCube, Box, Bipyramid4, BarLorentz, BarGauss, Profile2DVoigt, Profile2DCone, Profile2DGate, Profile2DGauss, Profile2DCauchy, Profile1DVoigt, Profile1DCosine, Profile1DTriangle, Profile1DGate, Profile1DGauss, Profile1DCauchy, MisesGaussPeakShape, MisesFisherGaussPeakShape, LorentzFisherPeakShape, GaussFisherPeakShape, IsotropicLorentzPeakShape, IsotropicGaussPeakShape, ParticleLayout, InterferenceTwin, InterferenceRadialParaCrystal, InterferenceHardDisk, Interference2DSuperLattice, Interference2DParaCrystal, Interference1DLattice, DistributionTrapezoid, DistributionCosine, DistributionLogNormal, DistributionGaussian, DistributionLorentz, DistributionGate, ResolutionFunction2DGaussian, PolFilter, FootprintSquare, and FootprintGauss.
Definition at line 51 of file INode.h.
Referenced by INode::checkNodeArgs(), and IFormFactor::pythonConstructor().
|
overridevirtual |
Returns the particle density associated with this 2d lattice.
Reimplemented from IInterference.
Definition at line 109 of file Interference2DLattice.cpp.
References m_lattice.
Referenced by interferenceForXi().
|
inlineinherited |
Returns the position variance.
Definition at line 40 of file IInterference.h.
References IInterference::m_position_var.
|
private |
Returns reciprocal coordinates in the coordinate system rotated by the angle gamma.
Definition at line 159 of file Interference2DLattice.cpp.
References ROOT::Math::Cephes::gamma().
Referenced by interferenceAtOneRecLatticePoint().
void Interference2DLattice::setDecayFunction | ( | const IProfile2D & | decay | ) |
Sets two-dimensional decay function.
decay | two-dimensional decay function in reciprocal space |
Definition at line 78 of file Interference2DLattice.cpp.
References IProfile2D::clone(), m_decay, m_lattice, m_na, and m_nb.
Referenced by ExemplarySamples::createBasic2DLattice(), ExemplarySamples::createBoxesSquareLattice2D(), ExemplarySamples::createCenteredSquareLattice2D(), ExemplarySamples::createParticleComposition(), ExemplarySamples::createRotatedSquareLattice2D(), and ExemplarySamples::createSquareLattice2D().
void Interference2DLattice::setIntegrationOverXi | ( | bool | integrate_xi | ) |
|
inherited |
Sets the variance of the position for the calculation of the DW factor It is defined as the variance in each relevant dimension.
Definition at line 40 of file IInterference.cpp.
References IInterference::m_position_var.
Referenced by ExemplarySamples::createFiniteSquareLattice2D(), and ExemplarySamples::createSuperLattice().
|
virtualinherited |
The interference function for a given wavevector transfer.
Reimplemented in Interference2DSuperLattice.
Definition at line 35 of file IInterference.cpp.
References IInterference::iff_no_inner().
|
inlinevirtualinherited |
Indicates if this interference function can be used with a sample (DWBA mode)
Reimplemented in InterferenceFinite3DLattice, and Interference3DLattice.
Definition at line 47 of file IInterference.h.
Referenced by IInterference::DWfactor().
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 32 of file ICloneable.h.
|
private |
Definition at line 62 of file Interference2DLattice.h.
Referenced by clone(), iff_without_dw(), interferenceAtOneRecLatticePoint(), nodeChildren(), and setDecayFunction().
|
private |
Integrate over the orientation xi.
Definition at line 61 of file Interference2DLattice.h.
Referenced by iff_without_dw(), integrationOverXi(), and setIntegrationOverXi().
|
private |
Definition at line 63 of file Interference2DLattice.h.
Referenced by Interference2DLattice(), calculateReciprocalVectorFraction(), clone(), iff_without_dw(), lattice(), nodeChildren(), particleDensity(), setDecayFunction(), and setIntegrationOverXi().
|
private |
Definition at line 65 of file Interference2DLattice.h.
Referenced by interferenceForXi(), and setDecayFunction().
|
private |
determines the number of reciprocal lattice points to use
Definition at line 65 of file Interference2DLattice.h.
Referenced by interferenceForXi(), and setDecayFunction().
|
protectedinherited |
Definition at line 63 of file INode.h.
Referenced by IFootprintFactor::IFootprintFactor(), INode::checkNodeArgs(), IProfile1D::pythonConstructor(), IProfile2D::pythonConstructor(), IFormFactor::pythonConstructor(), Profile1DVoigt::pythonConstructor(), and Profile2DVoigt::pythonConstructor().
|
protectedinherited |
Definition at line 53 of file IInterference.h.
Referenced by IInterference::IInterference(), Interference1DLattice::clone(), clone(), Interference2DParaCrystal::clone(), Interference2DSuperLattice::clone(), Interference3DLattice::clone(), InterferenceFinite2DLattice::clone(), InterferenceFinite3DLattice::clone(), InterferenceHardDisk::clone(), InterferenceNone::clone(), InterferenceRadialParaCrystal::clone(), InterferenceTwin::clone(), IInterference::DWfactor(), IInterference::positionVariance(), and IInterference::setPositionVariance().
|
private |
reciprocal lattice is stored without xi
Definition at line 64 of file Interference2DLattice.h.
Referenced by Interference2DLattice(), calculateReciprocalVectorFraction(), and interferenceForXi().