BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
KzComputation.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Sample/Slice/KzComputation.h
6 //! @brief Declares functions in namespace KzComputation.
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_KZCOMPUTATION_H
16 #define BORNAGAIN_CORE_MULTILAYER_KZCOMPUTATION_H
17 
18 #include "Base/Types/Complex.h"
19 #include "Base/Vector/Vectors3D.h"
20 #include <vector>
21 
22 class Slice;
23 
24 //! Namespace containing functions for computing kz values for given multilayer and k (or kz) value
25 //! on the surface of the sample.
26 //! @ingroup samples_internal
27 
28 namespace KzComputation
29 {
30 /* Computes kz values from known k vector and slices with the following assumptions:
31  * - the beam penetrates fronting medium from a side
32  * - the wavelength is known for a distant point in vacuum (ref. index = 1)
33  * - the incident angle is known for the sample surface
34  *
35  * This function is used in GISAS and off-spec computations mainly for back-compatibility
36  * reasons and should be replaced with computeKzFromRefIndices.
37  */
38 std::vector<complex_t> computeReducedKz(const std::vector<Slice>& slices, kvector_t k);
39 
40 /* Computes kz values from kz of the incoming beam known at a distant point in vacuum.
41  * It is assumed, that the beam penetrates fronting medium from a side.
42  */
43 std::vector<complex_t> computeKzFromSLDs(const std::vector<Slice>& slices, double kz);
44 
45 /* Computes kz values from k-vector of the incoming beam known at a distant point in vacuum.
46  * It is assumed, that the beam penetrates fronting medium from a side.
47  */
48 std::vector<complex_t> computeKzFromRefIndices(const std::vector<Slice>& slices, kvector_t k);
49 } // namespace KzComputation
50 
51 #endif // BORNAGAIN_CORE_MULTILAYER_KZCOMPUTATION_H
Defines complex_t, and a few elementary functions.
Defines basic vectors in R^3 and C^3.
Data structure containing the data of a single slice, for calculating the Fresnel coefficients.
Definition: Slice.h:28
Namespace containing functions for computing kz values for given multilayer and k (or kz) value on th...
Definition: KzComputation.h:29
std::vector< complex_t > computeKzFromRefIndices(const std::vector< Slice > &slices, kvector_t k)
std::vector< complex_t > computeReducedKz(const std::vector< Slice > &slices, kvector_t k)
std::vector< complex_t > computeKzFromSLDs(const std::vector< Slice > &slices, double kz)