15 #ifndef BORNAGAIN_CORE_BEAM_BEAM_H
16 #define BORNAGAIN_CORE_BEAM_BEAM_H
29 Beam(
double wavelength,
double alpha,
double phi,
double intensity);
74 std::vector<const INode*>
getChildren()
const override;
Include to deal with Eigen alignment centrally.
Beam defined by wavelength, direction and intensity.
Beam(double wavelength, double alpha, double phi, double intensity)
static Beam horizontalBeam()
void setWidthRatio(double width_ratio)
Sets beam to sample width ratio in footprint factor.
double getWavelength() const
void setPolarization(const kvector_t bloch_vector)
Sets the polarization density matrix according to the given Bloch vector.
kvector_t m_bloch_vector
Bloch vector encoding the beam's polarization.
Eigen::Matrix2cd getPolarization() const
Returns the polarization density matrix (in spin basis along z-axis)
void setIntensity(double intensity)
Sets the beam intensity in neutrons/sec.
Beam & operator=(const Beam &other)
void accept(INodeVisitor *visitor) const override
Calls the INodeVisitor's visit method.
double getIntensity() const
Returns the beam intensity in neutrons/sec.
const IFootprintFactor * footprintFactor() const
Returns footprint factor.
void setFootprintFactor(const IFootprintFactor &shape_factor)
Sets footprint factor to the beam.
kvector_t getCentralK() const
Returns the wavevector.
std::vector< const INode * > getChildren() const override
Returns a vector of children (const).
std::unique_ptr< IFootprintFactor > m_shape_factor
footprint correction handler
kvector_t getBlochVector() const
void setCentralK(double wavelength, double alpha_i, double phi_i)
Sets the wavevector in terms of wavelength and incoming angles.
double m_intensity
beam intensity (neutrons/sec)
Visitor interface to visit ISample objects.
virtual void visit(const BasicLattice *)
Base class for tree-like structures containing parameterized objects.
const double wavelength(0.154)