BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
Interference1DLatticeItem Class Reference

Description

Definition at line 44 of file InterferenceItems.h.

Inheritance diagram for Interference1DLatticeItem:
[legend]
Collaboration diagram for Interference1DLatticeItem:
[legend]

Public Member Functions

 Interference1DLatticeItem ()
 
std::unique_ptr< IInterference > createInterference () const override
 
SelectionDescriptor< Profile1DItem * > decayFunction () const
 
DoubleDescriptor length () const
 
DoubleDescriptor positionVariance () const
 
DoubleDescriptor rotationAngle () const
 
void serialize (Streamer &s) override
 
void setDecayFunction (Profile1DItem *p)
 

Protected Attributes

DoubleProperty m_positionVariance
 

Private Attributes

SelectionProperty< Profile1DItem * > m_decayFunction
 
DoubleProperty m_length
 
DoubleProperty m_rotationAngle
 

Constructor & Destructor Documentation

◆ Interference1DLatticeItem()

Interference1DLatticeItem::Interference1DLatticeItem ( )

Definition at line 44 of file InterferenceItems.cpp.

45 {
46  m_length.init("Length", "Lattice length", 20.0, Unit::nanometer, "Length");
48  "Xi", "Rotation of lattice with respect to x-axis of reference frame (beam direction)", 0.0,
49  Unit::degree, "xi");
51  "Decay Function", "One-dimensional decay function (finite size effects)", "decay");
52 }
@ nanometer
@ degree
void init(const QString &label, const QString &tooltip, double value, const variant< QString, Unit > &unit, const QString &persistentTag)
SelectionProperty< Profile1DItem * > m_decayFunction
void init(const QString &label, const QString &tooltip, const QString &persistentTag, ArgsForCreation... argsForCreation)
Initialize by means of a catalog class and optional creation arguments.

References degree, SelectionProperty< T >::init(), DoubleProperty::init(), m_decayFunction, m_length, m_rotationAngle, and nanometer.

Here is the call graph for this function:

Member Function Documentation

◆ createInterference()

std::unique_ptr< IInterference > Interference1DLatticeItem::createInterference ( ) const
overridevirtual

Implements InterferenceItem.

Definition at line 54 of file InterferenceItems.cpp.

55 {
56  auto result =
57  std::make_unique<Interference1DLattice>(m_length, Units::deg2rad(m_rotationAngle));
58  result->setDecayFunction(*m_decayFunction->createProfile());
59  result->setPositionVariance(positionVariance());
60  return std::unique_ptr<IInterference>(result.release());
61 }
DoubleDescriptor positionVariance() const
virtual std::unique_ptr< IProfile1D > createProfile() const =0

References Profile1DItem::createProfile(), m_decayFunction, m_length, m_rotationAngle, and InterferenceItem::positionVariance().

Here is the call graph for this function:

◆ decayFunction()

SelectionDescriptor< Profile1DItem * > Interference1DLatticeItem::decayFunction ( ) const

Definition at line 78 of file InterferenceItems.cpp.

79 {
80  return m_decayFunction;
81 }

References m_decayFunction.

◆ length()

DoubleDescriptor Interference1DLatticeItem::length ( ) const

Definition at line 63 of file InterferenceItems.cpp.

64 {
65  return m_length;
66 }

References m_length.

◆ positionVariance()

◆ rotationAngle()

DoubleDescriptor Interference1DLatticeItem::rotationAngle ( ) const

Definition at line 68 of file InterferenceItems.cpp.

69 {
70  return m_rotationAngle;
71 }

References m_rotationAngle.

◆ serialize()

void Interference1DLatticeItem::serialize ( Streamer s)
overridevirtual

Implements InterferenceItem.

Definition at line 83 of file InterferenceItems.cpp.

84 {
85  s.assertVersion(0);
89  Serialize::rwSelected<Profile1DItemCatalog>(s, m_decayFunction);
90 }
void assertVersion(unsigned expectedVersion) const
As reader, throws DeserializationException unless the expected version is read. As writer,...
Definition: Streamer.cpp:26
void rwProperty(Streamer &s, DoubleProperty &d)

References Streamer::assertVersion(), m_decayFunction, m_length, InterferenceItem::m_positionVariance, m_rotationAngle, and Serialize::rwProperty().

Here is the call graph for this function:

◆ setDecayFunction()

void Interference1DLatticeItem::setDecayFunction ( Profile1DItem p)

Definition at line 73 of file InterferenceItems.cpp.

74 {
76 }
void set(T t, bool callInitializer=false)
Directly set the new item.

References m_decayFunction, and SelectionProperty< T >::set().

Here is the call graph for this function:

Member Data Documentation

◆ m_decayFunction

SelectionProperty<Profile1DItem*> Interference1DLatticeItem::m_decayFunction
private

◆ m_length

DoubleProperty Interference1DLatticeItem::m_length
private

◆ m_positionVariance

◆ m_rotationAngle

DoubleProperty Interference1DLatticeItem::m_rotationAngle
private

The documentation for this class was generated from the following files: