BornAgain  1.19.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 reflection and scattering
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_SAMPLE_FRESNEL_FORMFACTORCOHERENTSUM_H
21 #define BORNAGAIN_SAMPLE_FRESNEL_FORMFACTORCOHERENTSUM_H
22 
24 #include <vector>
25 
26 class SimulationElement;
27 
28 //! Information about particle form factor and abundance.
29 //! @ingroup formfactors_internal
30 
32 public:
33  FormFactorCoherentSum(double abundance);
34 
35  void addCoherentPart(const FormFactorCoherentPart& part);
36 
37  complex_t evaluate(const SimulationElement& sim_element) const;
38 
39 #ifndef SWIG
40  Eigen::Matrix2cd evaluatePol(const SimulationElement& sim_element) const;
41 #endif
42 
43  double relativeAbundance() const { return m_abundance; }
44  void scaleRelativeAbundance(double total_abundance);
45  double radialExtension() const;
46 
47 private:
48  FormFactorCoherentSum(const std::vector<FormFactorCoherentPart>& parts, double abundance);
49  std::vector<FormFactorCoherentPart> m_parts;
50  double m_abundance;
51 };
52 
53 #endif // BORNAGAIN_SAMPLE_FRESNEL_FORMFACTORCOHERENTSUM_H
54 #endif // USER_API
std::complex< double > complex_t
Definition: Complex.h:20
Defines class FormFactorCoherentPart.
Information about single particle form factor and specular info of the embedding layer.
Information about particle form factor and abundance.
complex_t evaluate(const SimulationElement &sim_element) const
void scaleRelativeAbundance(double total_abundance)
Eigen::Matrix2cd evaluatePol(const SimulationElement &sim_element) const
FormFactorCoherentSum(double abundance)
std::vector< FormFactorCoherentPart > m_parts
void addCoherentPart(const FormFactorCoherentPart &part)
double relativeAbundance() const
Data stucture containing both input and output of a single detector cell.