BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
FormFactorCoherentSum.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Fresnel/FormFactorCoherentSum.h
6 //! @brief Defines class FormFactorCoherentSum.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************** //
14 
15 #ifndef BORNAGAIN_CORE_MULTILAYER_FORMFACTORCOHERENTSUM_H
16 #define BORNAGAIN_CORE_MULTILAYER_FORMFACTORCOHERENTSUM_H
17 
19 #include <vector>
20 
21 class SimulationElement;
22 
23 //! Information about particle form factor and abundance.
24 //! @ingroup formfactors_internal
25 
27 {
28 public:
29  FormFactorCoherentSum(double abundance);
30 
31  void addCoherentPart(const FormFactorCoherentPart& part);
32 
33  complex_t evaluate(const SimulationElement& sim_element) const;
34 
35 #ifndef SWIG
36  Eigen::Matrix2cd evaluatePol(const SimulationElement& sim_element) const;
37 #endif
38 
39  double relativeAbundance() const { return m_abundance; }
40  void scaleRelativeAbundance(double total_abundance);
41  double radialExtension() const;
42 
43 private:
44  FormFactorCoherentSum(const std::vector<FormFactorCoherentPart>& parts, double abundance);
45  std::vector<FormFactorCoherentPart> m_parts;
46  double m_abundance;
47 };
48 
49 #endif // BORNAGAIN_CORE_MULTILAYER_FORMFACTORCOHERENTSUM_H
Defines class FormFactorCoherentPart.
Information about single particle form factor and specular info of the embedding layer.
Information about particle form factor and abundance.
Data stucture containing both input and output of a single detector cell.