BornAgain  1.19.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 reflection and scattering
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_SAMPLE_SLICE_KZCOMPUTATION_H
21 #define BORNAGAIN_SAMPLE_SLICE_KZCOMPUTATION_H
22 
23 #include "Base/Vector/Vectors3D.h"
24 #include <vector>
25 
26 class Slice;
27 
28 //! Namespace containing functions for computing kz values for given multilayer and k (or kz) value
29 //! on the surface of the sample.
30 //! @ingroup samples_internal
31 
32 namespace KzComputation {
33 /* Computes kz values from known k vector and slices with the following assumptions:
34  * - the beam penetrates fronting medium from a side
35  * - the wavelength is known for a distant point in vacuum (ref. index = 1)
36  * - the incident angle is known for the sample surface
37  *
38  * This function is used in GISAS and off-spec computations mainly for back-compatibility
39  * reasons and should be replaced with computeKzFromRefIndices.
40  */
41 std::vector<complex_t> computeReducedKz(const std::vector<Slice>& slices, kvector_t k);
42 
43 /* Computes kz values from kz of the incoming beam known at a distant point in vacuum.
44  * It is assumed, that the beam penetrates fronting medium from a side.
45  */
46 std::vector<complex_t> computeKzFromSLDs(const std::vector<Slice>& slices, double kz);
47 
48 /* Computes kz values from k-vector of the incoming beam known at a distant point in vacuum.
49  * It is assumed, that the beam penetrates fronting medium from a side.
50  */
51 std::vector<complex_t> computeKzFromRefIndices(const std::vector<Slice>& slices, kvector_t k);
52 } // namespace KzComputation
53 
54 #endif // BORNAGAIN_SAMPLE_SLICE_KZCOMPUTATION_H
55 #endif // USER_API
Defines basic vectors in Z^3, R^3, C^3.
Data structure containing the data of a single slice, for calculating the Fresnel coefficients.
Definition: Slice.h:32
Namespace containing functions for computing kz values for given multilayer and k (or kz) value on th...
Definition: KzComputation.h:32
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)