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

Description

Definition at line 97 of file InterferenceItems.h.

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

Public Member Functions

 Interference2DParaCrystalItem ()
 
std::unique_ptr< IInterference > createInterference () const override
 
DoubleDescriptor dampingLength () const
 
DoubleDescriptor domainSize1 () const
 
DoubleDescriptor domainSize2 () const
 
SelectionDescriptor< Lattice2DItem * > latticeType () const
 
DoubleDescriptor positionVariance () const
 
SelectionDescriptor< Profile2DItem * > probabilityDistribution1 () const
 
SelectionDescriptor< Profile2DItem * > probabilityDistribution2 () const
 
void serialize (Streamer &s) override
 
void setDampingLength (double dampingLength)
 
void setDomainSize1 (double size)
 
void setDomainSize2 (double size)
 
void setLatticeType (Lattice2DItem *p)
 
void setPDF1Type (Profile2DItem *p)
 
void setPDF2Type (Profile2DItem *p)
 
void setXiIntegration (bool xiIntegration)
 
bool xiIntegration () const
 

Protected Attributes

SelectionProperty< Lattice2DItem * > m_latticeType
 
DoubleProperty m_positionVariance
 
bool m_xiIntegration
 

Private Attributes

DoubleProperty m_dampingLength
 
DoubleProperty m_domainSize1
 
DoubleProperty m_domainSize2
 
SelectionProperty< Profile2DItem * > m_pdf1
 
SelectionProperty< Profile2DItem * > m_pdf2
 

Constructor & Destructor Documentation

◆ Interference2DParaCrystalItem()

Interference2DParaCrystalItem::Interference2DParaCrystalItem ( )

Definition at line 164 of file InterferenceItems.cpp.

166 {
167  m_dampingLength.init("Damping length", "The damping (coherence) length of the paracrystal", 0.0,
168  Unit::nanometer, "dampingLen");
169  m_domainSize1.init("Domain size 1", "Size of the coherent domain along the first basis vector",
170  20000.0, Unit::nanometer, "size1");
171  m_domainSize2.init("Domain size 2", "Size of the coherent domain along the second basis vector",
172  20000.0, Unit::nanometer, "size2");
174  "PDF 1", "Probability distribution in first lattice direction", "pdf1");
176  "PDF 2", "Probability distribution in second lattice direction", "pdf2");
177 }
@ nanometer
void init(const QString &label, const QString &tooltip, double value, const variant< QString, Unit > &unit, const QString &persistentTag)
Interference2DAbstractLatticeItem(bool xiIntegration)
SelectionProperty< Profile2DItem * > m_pdf1
SelectionProperty< Profile2DItem * > m_pdf2
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 SelectionProperty< T >::init(), DoubleProperty::init(), m_dampingLength, m_domainSize1, m_domainSize2, m_pdf1, m_pdf2, and nanometer.

Here is the call graph for this function:

Member Function Documentation

◆ createInterference()

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

Implements InterferenceItem.

Definition at line 179 of file InterferenceItems.cpp.

180 {
181  Lattice2DItem* latticeItem = latticeType().currentItem();
182 
183  std::unique_ptr<Interference2DParaCrystal> result(
184  new Interference2DParaCrystal(*latticeItem->createLattice(), 0, 0, 0));
185 
186  result->setDampingLength(m_dampingLength);
187  result->setDomainSizes(m_domainSize1, m_domainSize2);
188  result->setIntegrationOverXi(xiIntegration());
189  result->setProbabilityDistributions(*m_pdf1->createProfile(), *m_pdf2->createProfile());
190  result->setPositionVariance(positionVariance());
191  return std::unique_ptr<IInterference>(result.release());
192 }
SelectionDescriptor< Lattice2DItem * > latticeType() const
DoubleDescriptor positionVariance() const
virtual std::unique_ptr< Lattice2D > createLattice() const =0
virtual std::unique_ptr< IProfile2D > createProfile() const =0

References Lattice2DItem::createLattice(), Profile2DItem::createProfile(), Interference2DAbstractLatticeItem::latticeType(), m_dampingLength, m_domainSize1, m_domainSize2, m_pdf1, m_pdf2, InterferenceItem::positionVariance(), and Interference2DAbstractLatticeItem::xiIntegration().

Here is the call graph for this function:

◆ dampingLength()

DoubleDescriptor Interference2DParaCrystalItem::dampingLength ( ) const

Definition at line 207 of file InterferenceItems.cpp.

208 {
209  return m_dampingLength;
210 }

References m_dampingLength.

Referenced by setDampingLength().

◆ domainSize1()

DoubleDescriptor Interference2DParaCrystalItem::domainSize1 ( ) const

Definition at line 217 of file InterferenceItems.cpp.

218 {
219  return m_domainSize1;
220 }

References m_domainSize1.

◆ domainSize2()

DoubleDescriptor Interference2DParaCrystalItem::domainSize2 ( ) const

Definition at line 227 of file InterferenceItems.cpp.

228 {
229  return m_domainSize2;
230 }

References m_domainSize2.

◆ latticeType()

◆ positionVariance()

◆ probabilityDistribution1()

SelectionDescriptor< Profile2DItem * > Interference2DParaCrystalItem::probabilityDistribution1 ( ) const

Definition at line 237 of file InterferenceItems.cpp.

238 {
239  return m_pdf1;
240 }

References m_pdf1.

◆ probabilityDistribution2()

SelectionDescriptor< Profile2DItem * > Interference2DParaCrystalItem::probabilityDistribution2 ( ) const

Definition at line 247 of file InterferenceItems.cpp.

248 {
249  return m_pdf2;
250 }

References m_pdf2.

◆ serialize()

void Interference2DParaCrystalItem::serialize ( Streamer s)
overridevirtual

Implements InterferenceItem.

Definition at line 194 of file InterferenceItems.cpp.

195 {
196  s.assertVersion(0);
198  Serialize::rwValue(s, "integrate", m_xiIntegration);
199  Serialize::rwSelected<Lattice2DItemCatalog>(s, m_latticeType);
203  Serialize::rwSelected<Profile2DItemCatalog>(s, m_pdf1);
204  Serialize::rwSelected<Profile2DItemCatalog>(s, m_pdf2);
205 }
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)
void rwValue(Streamer &s, const QString &tag, bool &val)
Definition: Serialize.cpp:19

References Streamer::assertVersion(), m_dampingLength, m_domainSize1, m_domainSize2, Interference2DAbstractLatticeItem::m_latticeType, m_pdf1, m_pdf2, InterferenceItem::m_positionVariance, Interference2DAbstractLatticeItem::m_xiIntegration, Serialize::rwProperty(), and Serialize::rwValue().

Here is the call graph for this function:

◆ setDampingLength()

void Interference2DParaCrystalItem::setDampingLength ( double  dampingLength)

Definition at line 212 of file InterferenceItems.cpp.

213 {
215 }
void set(double d)
Set the contained value.
DoubleDescriptor dampingLength() const

References dampingLength(), m_dampingLength, and DoubleProperty::set().

Here is the call graph for this function:

◆ setDomainSize1()

void Interference2DParaCrystalItem::setDomainSize1 ( double  size)

Definition at line 222 of file InterferenceItems.cpp.

223 {
224  m_domainSize1.set(size);
225 }

References m_domainSize1, and DoubleProperty::set().

Here is the call graph for this function:

◆ setDomainSize2()

void Interference2DParaCrystalItem::setDomainSize2 ( double  size)

Definition at line 232 of file InterferenceItems.cpp.

233 {
234  m_domainSize2.set(size);
235 }

References m_domainSize2, and DoubleProperty::set().

Here is the call graph for this function:

◆ setLatticeType()

void Interference2DAbstractLatticeItem::setLatticeType ( Lattice2DItem p)
inherited

Definition at line 99 of file InterferenceItems.cpp.

100 {
101  m_latticeType.set(p);
102 }
void set(T t, bool callInitializer=false)
Directly set the new item.

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

Here is the call graph for this function:

◆ setPDF1Type()

void Interference2DParaCrystalItem::setPDF1Type ( Profile2DItem p)

Definition at line 242 of file InterferenceItems.cpp.

243 {
244  m_pdf1.set(p);
245 }

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

Here is the call graph for this function:

◆ setPDF2Type()

void Interference2DParaCrystalItem::setPDF2Type ( Profile2DItem p)

Definition at line 252 of file InterferenceItems.cpp.

253 {
254  m_pdf2.set(p);
255 }

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

Here is the call graph for this function:

◆ setXiIntegration()

void Interference2DAbstractLatticeItem::setXiIntegration ( bool  xiIntegration)
inherited

Definition at line 109 of file InterferenceItems.cpp.

110 {
112 }

References Interference2DAbstractLatticeItem::m_xiIntegration, and Interference2DAbstractLatticeItem::xiIntegration().

Referenced by SampleEditorController::setIntegrateOverXi().

Here is the call graph for this function:

◆ xiIntegration()

Member Data Documentation

◆ m_dampingLength

DoubleProperty Interference2DParaCrystalItem::m_dampingLength
private

◆ m_domainSize1

DoubleProperty Interference2DParaCrystalItem::m_domainSize1
private

◆ m_domainSize2

DoubleProperty Interference2DParaCrystalItem::m_domainSize2
private

◆ m_latticeType

◆ m_pdf1

SelectionProperty<Profile2DItem*> Interference2DParaCrystalItem::m_pdf1
private

◆ m_pdf2

SelectionProperty<Profile2DItem*> Interference2DParaCrystalItem::m_pdf2
private

◆ m_positionVariance

◆ m_xiIntegration


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