BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
InterferenceItems.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/Model/Sample/InterferenceItems.h
6 //! @brief Defines InterferenceItems's classes
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2021
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
15 #ifndef BORNAGAIN_GUI_MODEL_SAMPLE_INTERFERENCEITEMS_H
16 #define BORNAGAIN_GUI_MODEL_SAMPLE_INTERFERENCEITEMS_H
17 
23 #include <memory>
24 
25 class IInterference;
26 class Streamer;
27 
29 public:
30  virtual ~InterferenceItem() = default;
31  virtual std::unique_ptr<IInterference> createInterference() const = 0;
32  virtual void serialize(Streamer& s) = 0;
33 
35 
36 protected:
38 
40 };
41 
42 // ------------------------------------------------------------------------------------------------
43 
45 public:
47 
48  std::unique_ptr<IInterference> createInterference() const override;
49  void serialize(Streamer& s) override;
50 
51  DoubleDescriptor length() const;
53 
56 
57 private:
61 };
62 
63 // ------------------------------------------------------------------------------------------------
64 
66 public:
69 
70  bool xiIntegration() const;
72 
73 protected:
75 
78 };
79 
80 // ------------------------------------------------------------------------------------------------
81 
83 public:
85  std::unique_ptr<IInterference> createInterference() const override;
86  void serialize(Streamer& s) override;
87 
90 
91 protected:
93 };
94 
95 // ------------------------------------------------------------------------------------------------
96 
98 public:
100  std::unique_ptr<IInterference> createInterference() const override;
101  void serialize(Streamer& s) override;
102 
104  void setDampingLength(double dampingLength);
105 
107  void setDomainSize1(double size);
109  void setDomainSize2(double size);
110 
112  void setPDF1Type(Profile2DItem* p);
113 
115  void setPDF2Type(Profile2DItem* p);
116 
117 private:
123 };
124 
125 // ------------------------------------------------------------------------------------------------
126 
128 public:
130  std::unique_ptr<IInterference> createInterference() const override;
131  void serialize(Streamer& s) override;
132 
133  UIntDescriptor domainSize1() const;
134  void setDomainSize1(unsigned int domain_size1);
135  UIntDescriptor domainSize2() const;
136  void setDomainSize2(unsigned int domain_size2);
137 
138 private:
141 };
142 
143 // ------------------------------------------------------------------------------------------------
144 
146 public:
148  std::unique_ptr<IInterference> createInterference() const override;
149  void serialize(Streamer& s) override;
150 
151  DoubleDescriptor radius() const;
152  DoubleDescriptor density() const;
153 
154 private:
157 };
158 
159 // ------------------------------------------------------------------------------------------------
160 
162 public:
164  std::unique_ptr<IInterference> createInterference() const override;
165  void serialize(Streamer& s) override;
166 
170  DoubleDescriptor kappa() const;
172  void setPDFType(Profile1DItem* p);
173 
174 private:
180 };
181 
182 #endif // BORNAGAIN_GUI_MODEL_SAMPLE_INTERFERENCEITEMS_H
Defines class DoubleProperty.
Defines classes Lattice2DItems.
Defines Profile1DItem's classes.
Defines class SelectionProperty.
Defines class UIntProperty.
Describes properties of a double value which are necessary to allow GUI representation,...
Class for representing a double value, its attributes and its accessors.
SelectionProperty< Profile1DItem * > m_decayFunction
void serialize(Streamer &s) override
DoubleDescriptor length() const
std::unique_ptr< IInterference > createInterference() const override
void setDecayFunction(Profile1DItem *p)
SelectionDescriptor< Profile1DItem * > decayFunction() const
DoubleDescriptor rotationAngle() const
void setLatticeType(Lattice2DItem *p)
SelectionDescriptor< Lattice2DItem * > latticeType() const
Interference2DAbstractLatticeItem(bool xiIntegration)
SelectionProperty< Lattice2DItem * > m_latticeType
void setXiIntegration(bool xiIntegration)
SelectionProperty< Profile2DItem * > m_decayFunction
void setDecayFunctionType(Profile2DItem *p)
void serialize(Streamer &s) override
std::unique_ptr< IInterference > createInterference() const override
SelectionDescriptor< Profile2DItem * > decayFunction() const
SelectionDescriptor< Profile2DItem * > probabilityDistribution2() const
DoubleDescriptor dampingLength() const
void setPDF2Type(Profile2DItem *p)
void serialize(Streamer &s) override
void setDampingLength(double dampingLength)
DoubleDescriptor domainSize1() const
DoubleDescriptor domainSize2() const
std::unique_ptr< IInterference > createInterference() const override
void setPDF1Type(Profile2DItem *p)
SelectionProperty< Profile2DItem * > m_pdf1
SelectionProperty< Profile2DItem * > m_pdf2
SelectionDescriptor< Profile2DItem * > probabilityDistribution1() const
void serialize(Streamer &s) override
void setDomainSize1(unsigned int domain_size1)
void setDomainSize2(unsigned int domain_size2)
UIntDescriptor domainSize2() const
std::unique_ptr< IInterference > createInterference() const override
UIntDescriptor domainSize1() const
DoubleDescriptor density() const
void serialize(Streamer &s) override
DoubleDescriptor radius() const
std::unique_ptr< IInterference > createInterference() const override
virtual std::unique_ptr< IInterference > createInterference() const =0
virtual void serialize(Streamer &s)=0
DoubleDescriptor positionVariance() const
virtual ~InterferenceItem()=default
DoubleProperty m_positionVariance
SelectionDescriptor< Profile1DItem * > probabilityDistribution() const
DoubleDescriptor dampingLength() const
void serialize(Streamer &s) override
SelectionProperty< Profile1DItem * > m_pdf
std::unique_ptr< IInterference > createInterference() const override
DoubleDescriptor domainSize() const
DoubleDescriptor peakDistance() const
Describes a selection (various possibilities and the current one).
Supports serialization to or deserialization from QXmlStream.
Definition: Streamer.h:36
Describes properties of a uint value which are necessary to allow GUI representation,...
Class for representing a uint value, its attributes and its accessors.
Definition: UIntProperty.h:39