BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
ReCompound.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file Resample/Particle/ReCompound.h
6 //! @brief Defines class ReCompound.
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_RESAMPLE_PARTICLE_RECOMPOUND_H
21 #define BORNAGAIN_RESAMPLE_PARTICLE_RECOMPOUND_H
22 
23 #include "Base/Spin/SpinMatrix.h"
25 #include <vector>
26 
27 //! A reprocessed ParticleComposition.
28 
29 class ReCompound : public IReParticle {
30 public:
31  ReCompound() = default;
32  ~ReCompound() override;
33 
34  ReCompound* clone() const override;
35 
36  double radialExtension() const override;
37 
38  double bottomZ(const IRotation* rotation) const override;
39 
40  double topZ(const IRotation* rotation) const override;
41 
42  void addFormFactor(const IReParticle& formfactor);
43 
44  void setAmbientMaterial(const Material& material) override;
45 
46  complex_t theFF(const WavevectorInfo& wavevectors) const override;
47 
48  //! Calculates and returns a polarized form factor calculation in DWBA
49  SpinMatrix thePolFF(const WavevectorInfo& wavevectors) const override;
50 
51 protected:
52  std::vector<IReParticle*> m_components;
53 };
54 
55 #endif // BORNAGAIN_RESAMPLE_PARTICLE_RECOMPOUND_H
56 #endif // USER_API
Defines and implements interface IReParticle.
Defines class SpinMatrix.
Abstract base class for reprocessed particles.
Definition: IReParticle.h:37
Abstract base class for rotations.
Definition: Rotations.h:29
A wrapper for underlying material implementation.
Definition: Material.h:35
A reprocessed ParticleComposition.
Definition: ReCompound.h:29
complex_t theFF(const WavevectorInfo &wavevectors) const override
Returns scattering amplitude for complex wavevectors ki, kf.
Definition: ReCompound.cpp:71
ReCompound()=default
~ReCompound() override
Definition: ReCompound.cpp:19
SpinMatrix thePolFF(const WavevectorInfo &wavevectors) const override
Calculates and returns a polarized form factor calculation in DWBA.
Definition: ReCompound.cpp:79
void addFormFactor(const IReParticle &formfactor)
Definition: ReCompound.cpp:60
ReCompound * clone() const override
Definition: ReCompound.cpp:25
void setAmbientMaterial(const Material &material) override
Passes the material in which this particle is embedded.
Definition: ReCompound.cpp:65
double radialExtension() const override
Returns the (approximate in some cases) radial size of the particle of this form factor's shape....
Definition: ReCompound.cpp:33
double bottomZ(const IRotation *rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
Definition: ReCompound.cpp:41
std::vector< IReParticle * > m_components
Definition: ReCompound.h:52
double topZ(const IRotation *rotation) const override
Returns the z-coordinate of the lowest point in this shape after a given rotation.
Definition: ReCompound.cpp:51
Holds all wavevector information relevant for calculating form factors.