BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ISpecularScan.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Core/Scan/ISpecularScan.h
6 //! @brief Declares and implements interface ISpecularScan.
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 USER_API
16 #ifndef BORNAGAIN_CORE_SCAN_ISPECULARSCAN_H
17 #define BORNAGAIN_CORE_SCAN_ISPECULARSCAN_H
18 
19 #include "Base/Types/ICloneable.h"
20 
21 #include <sstream>
22 #include <string>
23 #include <vector>
24 
25 class IAxis;
26 class IFootprintFactor;
27 class Instrument;
29 
30 //! Abstract base class for all types of specular scans.
31 
32 class ISpecularScan : public ICloneable {
33 public:
34  ISpecularScan* clone() const override = 0;
35 
36 #ifndef SWIG
37  //! Generates simulation elements for specular simulations
38  virtual std::vector<SpecularSimulationElement>
39  generateSimulationElements(const Instrument& instrument) const = 0;
40 
41  //! Returns coordinate axis assigned to the data holder
42  virtual const IAxis* coordinateAxis() const = 0;
43 
44  //! Returns IFootprintFactor object pointer
45  virtual const IFootprintFactor* footprintFactor() const = 0;
46 
47  //! Returns footprint correction factor for a range of simulation elements of size _n_elements_
48  //! and starting from element with index _i_.
49  virtual std::vector<double> footprint(size_t i, size_t n_elements) const = 0;
50 
51  //! Returns the number of simulation elements
52  virtual size_t numberOfSimulationElements() const = 0;
53 
54  //! Returns intensity vector corresponding to convolution of given simulation elements
55  virtual std::vector<double>
56  createIntensities(const std::vector<SpecularSimulationElement>& sim_elements) const = 0;
57 
58 #endif // USER_API
59 };
60 
61 #endif // BORNAGAIN_CORE_SCAN_ISPECULARSCAN_H
62 #endif // USER_API
Defines and implements the standard mix-in ICloneable.
Interface for one-dimensional axes.
Definition: IAxis.h:25
Interface for polymorphic classes that should not be copied, except by explicit cloning.
Definition: ICloneable.h:25
Abstract base for classes that calculate the beam footprint factor.
Abstract base class for all types of specular scans.
Definition: ISpecularScan.h:32
virtual std::vector< double > footprint(size_t i, size_t n_elements) const =0
Returns footprint correction factor for a range of simulation elements of size n_elements and startin...
virtual const IAxis * coordinateAxis() const =0
Returns coordinate axis assigned to the data holder.
virtual const IFootprintFactor * footprintFactor() const =0
Returns IFootprintFactor object pointer.
virtual std::vector< SpecularSimulationElement > generateSimulationElements(const Instrument &instrument) const =0
Generates simulation elements for specular simulations.
ISpecularScan * clone() const override=0
virtual std::vector< double > createIntensities(const std::vector< SpecularSimulationElement > &sim_elements) const =0
Returns intensity vector corresponding to convolution of given simulation elements.
virtual size_t numberOfSimulationElements() const =0
Returns the number of simulation elements.
Assembles beam, detector and their relative positions with respect to the sample.
Definition: Instrument.h:32
Data stucture containing both input and output of a single image pixel for specular simulation.