15 #ifndef BORNAGAIN_CORE_BEAM_BEAM_H
16 #define BORNAGAIN_CORE_BEAM_BEAM_H
29 Beam(
double wavelength,
double alpha,
double phi,
double intensity);
36 static Beam horizontalBeam();
42 void setCentralK(
double wavelength,
double alpha_i,
double phi_i);
69 double getWavelength()
const {
return m_wavelength; }
70 double getAlpha()
const {
return m_alpha; }
71 double getPhi()
const {
return m_phi; }
74 std::vector<const INode*>
getChildren()
const override;
81 std::unique_ptr<IFootprintFactor> m_shape_factor;
Include to deal with Eigen alignment centrally.
Beam defined by wavelength, direction and intensity.
void setWidthRatio(double width_ratio)
Sets beam to sample width ratio in footprint factor.
void setPolarization(const kvector_t bloch_vector)
Sets the polarization density matrix according to the given Bloch vector.
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.
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).
void setCentralK(double wavelength, double alpha_i, double phi_i)
Sets the wavevector in terms of wavelength and incoming angles.
Visitor interface to visit ISample objects.
Base class for tree-like structures containing parameterized objects.