BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
SSCApproximationStrategy.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Sample/Interference/SSCApproximationStrategy.h
6 //! @brief Defines class SSCApproximationStrategy.
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_INTERFERENCE_SSCAPPROXIMATIONSTRATEGY_H
21 #define BORNAGAIN_SAMPLE_INTERFERENCE_SSCAPPROXIMATIONSTRATEGY_H
22 
24 #include <Eigen/StdVector>
25 
27 class SimulationElement;
28 
29 //! Strategy class to compute the total scattering from a particle layout
30 //! in the size-spacing correlation approximation.
31 //! @ingroup algorithms_internal
32 
34 public:
35  SSCApproximationStrategy(const std::vector<FormFactorCoherentSum>& weighted_formfactors,
37  SimulationOptions sim_params, bool polarized, double kappa);
38 
39 private:
40  double scalarCalculation(const SimulationElement& sim_element) const override;
41  double polarizedCalculation(const SimulationElement& sim_element) const override;
42 
43  void init(const std::vector<FormFactorCoherentSum>& ff_wrappers);
44 
45  complex_t
47  const std::vector<FormFactorCoherentSum>& ff_wrappers) const;
48  complex_t calculatePositionOffsetPhase(double qp, double radial_extension) const;
49 
50  std::unique_ptr<InterferenceFunctionRadialParaCrystal> m_iff;
51  double m_kappa;
52  double m_mean_radius;
53 };
54 
55 #endif // BORNAGAIN_SAMPLE_INTERFERENCE_SSCAPPROXIMATIONSTRATEGY_H
56 #endif // USER_API
std::complex< double > complex_t
Definition: Complex.h:20
Defines interface IInterferenceFunctionStrategy.
Base class of all interference function strategy classes.
Interference function of radial paracrystal.
Strategy class to compute the total scattering from a particle layout in the size-spacing correlation...
double polarizedCalculation(const SimulationElement &sim_element) const override
This is the polarized version.
double scalarCalculation(const SimulationElement &sim_element) const override
Returns the total scattering intensity for given kf and for one particle layout (implied by the given...
complex_t getCharacteristicSizeCoupling(double qp, const std::vector< FormFactorCoherentSum > &ff_wrappers) const
void init(const std::vector< FormFactorCoherentSum > &ff_wrappers)
std::unique_ptr< InterferenceFunctionRadialParaCrystal > m_iff
complex_t calculatePositionOffsetPhase(double qp, double radial_extension) const
SSCApproximationStrategy(const std::vector< FormFactorCoherentSum > &weighted_formfactors, const InterferenceFunctionRadialParaCrystal *iff, SimulationOptions sim_params, bool polarized, double kappa)
Data stucture containing both input and output of a single detector cell.
Collect the different options for simulation.
matrixFFVector_t polarized(const SimulationElement &sim_element, const std::vector< FormFactorCoherentSum > &ff_wrappers)