BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
Beam Class Reference
Inheritance diagram for Beam:
Collaboration diagram for Beam:

Public Member Functions

 Beam (double wavelength, double alpha, double phi, double intensity)
 
 Beam (const Beam &other)
 
Beamoperator= (const Beam &other)
 
virtual ~Beam ()
 
kvector_t getCentralK () const
 
void setCentralK (double wavelength, double alpha_i, double phi_i)
 
double getIntensity () const
 
void setIntensity (double intensity)
 
const IFootprintFactorfootprintFactor () const
 
void setFootprintFactor (const IFootprintFactor &shape_factor)
 
void setWidthRatio (double width_ratio)
 
void setPolarization (const kvector_t bloch_vector)
 
kvector_t getBlochVector () const
 
Eigen::Matrix2cd getPolarization () const
 
double getWavelength () const
 
double getAlpha () const
 
double getPhi () const
 
void accept (INodeVisitor *visitor) const override
 
std::vector< const INode * > getChildren () const override
 
virtual std::string treeToString () const
 
void registerChild (INode *node)
 
virtual void setParent (const INode *newParent)
 
const INodeparent () const
 
INodeparent ()
 
int copyNumber (const INode *node) const
 
std::string displayName () const
 
ParameterPoolcreateParameterTree () const
 
ParameterPoolparameterPool () const
 
std::string parametersToString () const
 
RealParameterregisterParameter (const std::string &name, double *parpointer)
 
void registerVector (const std::string &base_name, kvector_t *p_vec, const std::string &units="nm")
 
void setParameterValue (const std::string &name, double value)
 
void setVectorValue (const std::string &base_name, kvector_t value)
 
RealParameterparameter (const std::string &name) const
 
virtual void onChange ()
 
void removeParameter (const std::string &name)
 
void removeVector (const std::string &base_name)
 
void setName (const std::string &name)
 
const std::string & getName () const
 

Static Public Member Functions

static Beam horizontalBeam ()
 
static std::string XComponentName (const std::string &base_name)
 
static std::string YComponentName (const std::string &base_name)
 
static std::string ZComponentName (const std::string &base_name)
 

Protected Attributes

const size_t m_NP
 
std::vector< double > m_P
 

Private Attributes

double m_wavelength
 
double m_alpha
 
double m_phi
 
double m_intensity
 
std::unique_ptr< IFootprintFactorm_shape_factor
 
kvector_t m_bloch_vector
 
const INodem_parent {nullptr}
 
std::string m_name
 
std::unique_ptr< ParameterPoolm_pool
 

Detailed Description

Beam defined by wavelength, direction and intensity.

Definition at line 26 of file Beam.h.

Constructor & Destructor Documentation

◆ Beam() [1/2]

Beam::Beam ( double  wavelength,
double  alpha,
double  phi,
double  intensity 
)

Definition at line 26 of file Beam.cpp.

27  : m_wavelength(wavelength), m_alpha(alpha), m_phi(phi), m_intensity(intensity)
28 {
29  setName("Beam");
30  registerParameter("Wavelength", &m_wavelength).setUnit("nm").setNonnegative();
31  registerParameter("InclinationAngle", &m_alpha).setUnit("rad").setLimited(0, INCLINATION_LIMIT);
32  registerParameter("AzimuthalAngle", &m_phi).setUnit("rad").setLimited(-M_PI_2, M_PI_2);
34  registerVector("BlochVector", &m_bloch_vector, "");
35 }
static constexpr double INCLINATION_LIMIT
Definition: Beam.cpp:24
#define M_PI_2
Definition: MathConstants.h:40
double m_alpha
Definition: Beam.h:78
double m_wavelength
Definition: Beam.h:77
kvector_t m_bloch_vector
Bloch vector encoding the beam's polarization.
Definition: Beam.h:82
double m_phi
Definition: Beam.h:79
double m_intensity
beam intensity (neutrons/sec)
Definition: Beam.h:80
RealParameter & registerParameter(const std::string &name, double *parpointer)
void setName(const std::string &name)
void registerVector(const std::string &base_name, kvector_t *p_vec, const std::string &units="nm")
RealParameter & setNonnegative()
RealParameter & setLimited(double lower, double upper)
RealParameter & setUnit(const std::string &name)

References INCLINATION_LIMIT, m_alpha, m_bloch_vector, m_intensity, m_phi, M_PI_2, m_wavelength, IParameterized::registerParameter(), IParameterized::registerVector(), RealParameter::setLimited(), IParameterized::setName(), RealParameter::setNonnegative(), and RealParameter::setUnit().

Referenced by horizontalBeam().

Here is the call graph for this function:

◆ Beam() [2/2]

Beam::Beam ( const Beam other)

Definition at line 42 of file Beam.cpp.

43  : Beam(other.m_wavelength, other.m_alpha, other.m_phi, other.m_intensity)
44 {
46  setName(other.getName());
47  if (other.m_shape_factor) {
48  m_shape_factor.reset(other.m_shape_factor->clone());
50  }
51 }
Beam(double wavelength, double alpha, double phi, double intensity)
Definition: Beam.cpp:26
std::unique_ptr< IFootprintFactor > m_shape_factor
footprint correction handler
Definition: Beam.h:81
void registerChild(INode *node)
Definition: INode.cpp:58
const std::string & getName() const

References IParameterized::getName(), m_bloch_vector, m_shape_factor, INode::registerChild(), and IParameterized::setName().

Here is the call graph for this function:

◆ ~Beam()

Beam::~Beam ( )
virtualdefault

Member Function Documentation

◆ operator=()

Beam & Beam::operator= ( const Beam other)

Definition at line 53 of file Beam.cpp.

54 {
55  m_wavelength = other.m_wavelength;
56  m_alpha = other.m_alpha;
57  m_phi = other.m_phi;
58  m_intensity = other.m_intensity;
60  setName(other.getName());
61  if (other.m_shape_factor) {
62  m_shape_factor.reset(other.m_shape_factor->clone());
64  } else
65  m_shape_factor.release();
66  return *this;
67 }

References IParameterized::getName(), m_alpha, m_bloch_vector, m_intensity, m_phi, m_shape_factor, m_wavelength, INode::registerChild(), and IParameterized::setName().

Here is the call graph for this function:

◆ horizontalBeam()

Beam Beam::horizontalBeam ( )
static

Definition at line 37 of file Beam.cpp.

38 {
39  return Beam(1.0, 0.0, 0.0, 1.0);
40 }

References Beam().

Here is the call graph for this function:

◆ getCentralK()

kvector_t Beam::getCentralK ( ) const

Returns the wavevector.

Definition at line 71 of file Beam.cpp.

72 {
74 }
BasicVector3D< double > vecOfLambdaAlphaPhi(double _lambda, double _alpha, double _phi)
Creates a vector<double> as a wavevector with given wavelength and angles.

References m_alpha, m_phi, m_wavelength, and vecOfLambdaAlphaPhi().

Referenced by RectangularDetector::init().

Here is the call graph for this function:

◆ setCentralK()

void Beam::setCentralK ( double  wavelength,
double  alpha_i,
double  phi_i 
)

Sets the wavevector in terms of wavelength and incoming angles.

Definition at line 76 of file Beam.cpp.

77 {
78  if (wavelength <= 0.0)
80  "Beam::setCentralK() -> Error. Wavelength can't be negative or zero.");
81  if (alpha_i < 0.0)
83  "Beam::setCentralK() -> Error. Inclination angle alpha_i can't be negative.");
85  m_alpha = alpha_i;
86  m_phi = phi_i;
87 }

References m_alpha, m_phi, m_wavelength, and anonymous_namespace{SlicedCylindersBuilder.cpp}::wavelength().

Referenced by OffSpecSimulation::initSimulationElementVector(), and Instrument::setBeamParameters().

Here is the call graph for this function:

◆ getIntensity()

double Beam::getIntensity ( ) const
inline

Returns the beam intensity in neutrons/sec.

Definition at line 45 of file Beam.h.

45 { return m_intensity; }

References m_intensity.

Referenced by SimulationToPython::defineBeamIntensity(), and Instrument::getBeamIntensity().

◆ setIntensity()

void Beam::setIntensity ( double  intensity)
inline

Sets the beam intensity in neutrons/sec.

Definition at line 48 of file Beam.h.

48 { m_intensity = intensity; }

References m_intensity.

Referenced by Instrument::setBeamIntensity().

◆ footprintFactor()

const IFootprintFactor * Beam::footprintFactor ( ) const

Returns footprint factor.

Definition at line 89 of file Beam.cpp.

90 {
91  return m_shape_factor.get();
92 }

References m_shape_factor.

Referenced by DepthProbeSimulation::normalize().

◆ setFootprintFactor()

void Beam::setFootprintFactor ( const IFootprintFactor shape_factor)

Sets footprint factor to the beam.

Definition at line 94 of file Beam.cpp.

95 {
96  m_shape_factor.reset(shape_factor.clone());
98 }
virtual IFootprintFactor * clone() const =0

References IFootprintFactor::clone(), m_shape_factor, and INode::registerChild().

Referenced by DepthProbeSimulation::setBeamParameters().

Here is the call graph for this function:

◆ setWidthRatio()

void Beam::setWidthRatio ( double  width_ratio)

Sets beam to sample width ratio in footprint factor.

Definition at line 100 of file Beam.cpp.

101 {
102  if (!m_shape_factor)
103  throw std::runtime_error("Error in Beam::setWidthRatio: footprint factor is nullptr. "
104  "Probably, you have forgotten to initialize it.");
105  m_shape_factor->setWidthRatio(width_ratio);
106 }

References m_shape_factor.

◆ setPolarization()

void Beam::setPolarization ( const kvector_t  bloch_vector)

Sets the polarization density matrix according to the given Bloch vector.

Definition at line 108 of file Beam.cpp.

109 {
110  if (bloch_vector.mag() > 1.0) {
112  "Beam::setPolarization: "
113  "The given Bloch vector cannot represent a real physical ensemble");
114  }
115  m_bloch_vector = bloch_vector;
116 }
double mag() const
Returns magnitude of the vector.

References m_bloch_vector, and BasicVector3D< T >::mag().

Referenced by Instrument::setBeamPolarization().

Here is the call graph for this function:

◆ getBlochVector()

kvector_t Beam::getBlochVector ( ) const

Definition at line 118 of file Beam.cpp.

119 {
120  return m_bloch_vector;
121 }

References m_bloch_vector.

Referenced by SimulationToPython::defineBeamPolarization().

◆ getPolarization()

Eigen::Matrix2cd Beam::getPolarization ( ) const

Returns the polarization density matrix (in spin basis along z-axis)

Definition at line 123 of file Beam.cpp.

124 {
125  Eigen::Matrix2cd result;
126  double x = m_bloch_vector.x();
127  double y = m_bloch_vector.y();
128  double z = m_bloch_vector.z();
129  result(0, 0) = (1.0 + z) / 2.0;
130  result(0, 1) = complex_t(x, -y) / 2.0;
131  result(1, 0) = complex_t(x, y) / 2.0;
132  result(1, 1) = (1.0 - z) / 2.0;
133  return result;
134 }
std::complex< double > complex_t
Definition: Complex.h:20
T z() const
Returns z-component in cartesian coordinate system.
Definition: BasicVector3D.h:68
T y() const
Returns y-component in cartesian coordinate system.
Definition: BasicVector3D.h:66
T x() const
Returns x-component in cartesian coordinate system.
Definition: BasicVector3D.h:64

References m_bloch_vector, BasicVector3D< T >::x(), BasicVector3D< T >::y(), and BasicVector3D< T >::z().

Referenced by Simulation2D::generateSimulationElements(), and anonymous_namespace{SpecularSimulation.cpp}::generateSimulationElements().

Here is the call graph for this function:

◆ getWavelength()

◆ getAlpha()

◆ getPhi()

◆ accept()

void Beam::accept ( INodeVisitor visitor) const
inlineoverridevirtual

Calls the INodeVisitor's visit method.

Implements INode.

Definition at line 73 of file Beam.h.

73 { visitor->visit(this); }
virtual void visit(const BasicLattice *)
Definition: INodeVisitor.h:154

References INodeVisitor::visit().

Here is the call graph for this function:

◆ getChildren()

std::vector< const INode * > Beam::getChildren ( ) const
overridevirtual

Returns a vector of children (const).

Reimplemented from INode.

Definition at line 136 of file Beam.cpp.

137 {
138  if (m_shape_factor)
139  return {m_shape_factor.get()};
140  return {};
141 }

References m_shape_factor.

◆ treeToString()

std::string INode::treeToString ( ) const
virtualinherited

Returns multiline string representing tree structure below the node.

Definition at line 53 of file INode.cpp.

54 {
55  return NodeUtils::nodeToString(*this);
56 }
std::string nodeToString(const INode &node)
Returns multiline string representing tree structure starting from given node.
Definition: NodeUtils.cpp:67

References NodeUtils::nodeToString().

Here is the call graph for this function:

◆ registerChild()

void INode::registerChild ( INode node)
inherited

Definition at line 58 of file INode.cpp.

59 {
60  ASSERT(node);
61  node->setParent(this);
62 }
#define ASSERT(condition)
Definition: Assert.h:26
virtual void setParent(const INode *newParent)
Definition: INode.cpp:69

References ASSERT, and INode::setParent().

Referenced by ParticleLayout::addAndRegisterAbstractParticle(), ParticleCoreShell::addAndRegisterCore(), MultiLayer::addAndRegisterInterface(), MultiLayer::addAndRegisterLayer(), ParticleCoreShell::addAndRegisterShell(), Layer::addLayout(), ParticleComposition::addParticlePointer(), Beam(), Crystal::Crystal(), IDetector::IDetector(), Simulation::initialize(), MesoCrystal::initialize(), Instrument::Instrument(), operator=(), Instrument::operator=(), Particle::Particle(), ParticleDistribution::ParticleDistribution(), IParticle::rotate(), ParticleLayout::setAndRegisterInterferenceFunction(), Simulation::setBackground(), InterferenceFunction1DLattice::setDecayFunction(), InterferenceFunction2DLattice::setDecayFunction(), Instrument::setDetector(), IDetector::setDetectorResolution(), setFootprintFactor(), Particle::setFormFactor(), InterferenceFunctionFinite3DLattice::setLattice(), InterferenceFunction2DLattice::setLattice(), InterferenceFunction2DParaCrystal::setLattice(), InterferenceFunction2DSuperLattice::setLattice(), InterferenceFunctionFinite2DLattice::setLattice(), InterferenceFunctionRadialParaCrystal::setProbabilityDistribution(), InterferenceFunction2DParaCrystal::setProbabilityDistributions(), ConvolutionDetectorResolution::setResolutionFunction(), IParticle::setRotation(), LayerInterface::setRoughness(), and InterferenceFunction2DSuperLattice::setSubstructureIFF().

Here is the call graph for this function:

◆ setParent()

void INode::setParent ( const INode newParent)
virtualinherited

Reimplemented in SampleProvider.

Definition at line 69 of file INode.cpp.

70 {
71  m_parent = newParent;
72 }
const INode * m_parent
Definition: INode.h:81

References INode::m_parent.

Referenced by INode::registerChild(), SampleProvider::setBuilder(), and SampleProvider::setParent().

◆ parent() [1/2]

const INode * INode::parent ( ) const
inherited

◆ parent() [2/2]

INode * INode::parent ( )
inherited

Definition at line 79 of file INode.cpp.

80 {
81  return const_cast<INode*>(m_parent);
82 }
Base class for tree-like structures containing parameterized objects.
Definition: INode.h:49

References INode::m_parent.

◆ copyNumber()

int INode::copyNumber ( const INode node) const
inherited

Returns copyNumber of child, which takes into account existence of children with same name.

Definition at line 84 of file INode.cpp.

85 {
86  if (node->parent() != this)
87  return -1;
88 
89  int result(-1), count(0);
90  for (auto child : getChildren()) {
91 
92  if (child == nullptr)
93  throw std::runtime_error("INode::copyNumber() -> Error. Nullptr as child.");
94 
95  if (child == node)
96  result = count;
97 
98  if (child->getName() == node->getName())
99  ++count;
100  }
101 
102  return count > 1 ? result : -1;
103 }
const INode * parent() const
Definition: INode.cpp:74
virtual std::vector< const INode * > getChildren() const
Returns a vector of children (const).
Definition: INode.cpp:64

References INode::getChildren(), IParameterized::getName(), and INode::parent().

Referenced by INode::displayName().

Here is the call graph for this function:

◆ displayName()

std::string INode::displayName ( ) const
inherited

Returns display name, composed from the name of node and it's copy number.

Definition at line 105 of file INode.cpp.

106 {
107  std::string result = getName();
108  if (m_parent) {
109  int index = m_parent->copyNumber(this);
110  if (index >= 0)
111  result = result + std::to_string(index);
112  }
113  return result;
114 }
int copyNumber(const INode *node) const
Returns copyNumber of child, which takes into account existence of children with same name.
Definition: INode.cpp:84

References INode::copyNumber(), IParameterized::getName(), and INode::m_parent.

Referenced by NodeUtils::nodePath(), and anonymous_namespace{NodeUtils.cpp}::nodeString().

Here is the call graph for this function:

◆ createParameterTree()

ParameterPool * INode::createParameterTree ( ) const
virtualinherited

Creates new parameter pool, with all local parameters and those of its children.

Reimplemented from IParameterized.

Definition at line 116 of file INode.cpp.

117 {
118  std::unique_ptr<ParameterPool> result(new ParameterPool);
119 
121  it.first();
122  while (!it.isDone()) {
123  const INode* child = it.getCurrent();
124  const std::string path = NodeUtils::nodePath(*child, this->parent()) + "/";
125  child->parameterPool()->copyToExternalPool(path, result.get());
126  it.next();
127  }
128 
129  return result.release();
130 }
ParameterPool * parameterPool() const
Returns pointer to the parameter pool.
Iterator through INode tree of objects.
Definition: NodeIterator.h:90
Container with parameters for IParameterized object.
Definition: ParameterPool.h:30
void copyToExternalPool(const std::string &prefix, ParameterPool *other_pool) const
Copies parameters of given pool to other pool, prepeding prefix to the parameter names.
std::string nodePath(const INode &node, const INode *root=nullptr)
Returns path composed of node's displayName, with respect to root node.
Definition: NodeUtils.cpp:82

References ParameterPool::copyToExternalPool(), NodeIterator< Strategy >::first(), NodeIterator< Strategy >::getCurrent(), NodeIterator< Strategy >::isDone(), NodeIterator< Strategy >::next(), NodeUtils::nodePath(), IParameterized::parameterPool(), and INode::parent().

Referenced by ParticleDistribution::generateParticles(), Simulation::runSimulation(), DepthProbeSimulation::validateParametrization(), OffSpecSimulation::validateParametrization(), and SpecularSimulation::validateParametrization().

Here is the call graph for this function:

◆ parameterPool()

ParameterPool* IParameterized::parameterPool ( ) const
inlineinherited

Returns pointer to the parameter pool.

Definition at line 38 of file IParameterized.h.

38 { return m_pool.get(); } // has non-const usages!
std::unique_ptr< ParameterPool > m_pool
parameter pool (kind of pointer-to-implementation)

References IParameterized::m_pool.

Referenced by pyfmt2::argumentList(), SampleBuilderNode::borrow_builder_parameters(), INode::createParameterTree(), INode::INode(), IParameterized::IParameterized(), anonymous_namespace{NodeUtils.cpp}::poolToString(), SampleBuilderNode::reset(), and IDistribution1D::setUnits().

◆ parametersToString()

std::string IParameterized::parametersToString ( ) const
inherited

Returns multiline string representing available parameters.

Definition at line 40 of file IParameterized.cpp.

41 {
42  std::ostringstream result;
43  std::unique_ptr<ParameterPool> P_pool(createParameterTree());
44  result << *P_pool << "\n";
45  return result.str();
46 }
virtual ParameterPool * createParameterTree() const
Creates new parameter pool, with all local parameters and those of its children.

References IParameterized::createParameterTree().

Here is the call graph for this function:

◆ registerParameter()

RealParameter & IParameterized::registerParameter ( const std::string &  name,
double *  parpointer 
)
inherited

Definition at line 48 of file IParameterized.cpp.

49 {
50  return m_pool->addParameter(
51  new RealParameter(name, data, getName(), [&]() -> void { onChange(); }));
52 }
virtual void onChange()
Action to be taken in inherited class when a parameter has changed.
Wraps a parameter of type double.
Definition: RealParameter.h:32

References IParameterized::getName(), IParameterized::m_pool, and IParameterized::onChange().

Referenced by BasicLattice::BasicLattice(), Beam(), CylindersInBABuilder::CylindersInBABuilder(), DetectionProperties::DetectionProperties(), HexagonalLattice::HexagonalLattice(), IInterferenceFunction::IInterferenceFunction(), INode::INode(), InterferenceFunction1DLattice::InterferenceFunction1DLattice(), InterferenceFunction2DParaCrystal::InterferenceFunction2DParaCrystal(), InterferenceFunctionHardDisk::InterferenceFunctionHardDisk(), InterferenceFunctionRadialParaCrystal::InterferenceFunctionRadialParaCrystal(), InterferenceFunctionTwin::InterferenceFunctionTwin(), Lattice2D::Lattice2D(), LayerRoughness::LayerRoughness(), MultiLayer::MultiLayer(), ParticleDistribution::ParticleDistribution(), PlainMultiLayerBySLDBuilder::PlainMultiLayerBySLDBuilder(), IParticle::registerAbundance(), ParticleLayout::registerParticleDensity(), Layer::registerThickness(), IParameterized::registerVector(), ParticleLayout::registerWeight(), ResolutionFunction2DGaussian::ResolutionFunction2DGaussian(), ResonatorBuilder::ResonatorBuilder(), Lattice2D::setRotationEnabled(), SquareLattice::SquareLattice(), and TriangularRippleBuilder::TriangularRippleBuilder().

Here is the call graph for this function:

◆ registerVector()

void IParameterized::registerVector ( const std::string &  base_name,
kvector_t p_vec,
const std::string &  units = "nm" 
)
inherited

Definition at line 54 of file IParameterized.cpp.

56 {
57  registerParameter(XComponentName(base_name), &((*p_vec)[0])).setUnit(units);
58  registerParameter(YComponentName(base_name), &((*p_vec)[1])).setUnit(units);
59  registerParameter(ZComponentName(base_name), &((*p_vec)[2])).setUnit(units);
60 }
static std::string XComponentName(const std::string &base_name)
static std::string YComponentName(const std::string &base_name)
static std::string ZComponentName(const std::string &base_name)

References IParameterized::registerParameter(), RealParameter::setUnit(), IParameterized::XComponentName(), IParameterized::YComponentName(), and IParameterized::ZComponentName().

Referenced by Beam(), DetectionProperties::DetectionProperties(), InterferenceFunctionTwin::InterferenceFunctionTwin(), MultiLayer::MultiLayer(), Lattice::registerBasisVectors(), and IParticle::registerPosition().

Here is the call graph for this function:

◆ setParameterValue()

void IParameterized::setParameterValue ( const std::string &  name,
double  value 
)
inherited

Definition at line 62 of file IParameterized.cpp.

63 {
64  if (name.find('*') == std::string::npos && name.find('/') == std::string::npos) {
65  m_pool->setParameterValue(name, value);
66  } else {
67  std::unique_ptr<ParameterPool> P_pool{createParameterTree()};
68  if (name.find('*') != std::string::npos)
69  P_pool->setMatchedParametersValue(name, value);
70  else
71  P_pool->setParameterValue(name, value);
72  }
73 }
int setMatchedParametersValue(const std::string &wildcards, double value)
Sets value of the nonzero parameters that match pattern ('*' allowed), or throws.

References IParameterized::createParameterTree(), IParameterized::m_pool, and ParameterPool::setMatchedParametersValue().

Referenced by AsymRippleBuilder::buildSample(), and IParameterized::setVectorValue().

Here is the call graph for this function:

◆ setVectorValue()

void IParameterized::setVectorValue ( const std::string &  base_name,
kvector_t  value 
)
inherited

Definition at line 75 of file IParameterized.cpp.

76 {
77  setParameterValue(XComponentName(base_name), value.x());
78  setParameterValue(YComponentName(base_name), value.y());
79  setParameterValue(ZComponentName(base_name), value.z());
80 }
void setParameterValue(const std::string &name, double value)

References IParameterized::setParameterValue(), BasicVector3D< T >::x(), IParameterized::XComponentName(), BasicVector3D< T >::y(), IParameterized::YComponentName(), BasicVector3D< T >::z(), and IParameterized::ZComponentName().

Here is the call graph for this function:

◆ parameter()

RealParameter * IParameterized::parameter ( const std::string &  name) const
inherited

◆ onChange()

◆ removeParameter()

void IParameterized::removeParameter ( const std::string &  name)
inherited

◆ removeVector()

void IParameterized::removeVector ( const std::string &  base_name)
inherited

Definition at line 93 of file IParameterized.cpp.

94 {
95  removeParameter(XComponentName(base_name));
96  removeParameter(YComponentName(base_name));
97  removeParameter(ZComponentName(base_name));
98 }
void removeParameter(const std::string &name)

References IParameterized::removeParameter(), IParameterized::XComponentName(), IParameterized::YComponentName(), and IParameterized::ZComponentName().

Referenced by IParticle::registerPosition().

Here is the call graph for this function:

◆ XComponentName()

std::string IParameterized::XComponentName ( const std::string &  base_name)
staticinherited

◆ YComponentName()

std::string IParameterized::YComponentName ( const std::string &  base_name)
staticinherited

Definition at line 105 of file IParameterized.cpp.

106 {
107  return base_name + "Y";
108 }

Referenced by IParameterized::registerVector(), IParameterized::removeVector(), and IParameterized::setVectorValue().

◆ ZComponentName()

std::string IParameterized::ZComponentName ( const std::string &  base_name)
staticinherited

Definition at line 110 of file IParameterized.cpp.

111 {
112  return base_name + "Z";
113 }

Referenced by IParameterized::registerVector(), IParameterized::removeVector(), and IParameterized::setVectorValue().

◆ setName()

void IParameterized::setName ( const std::string &  name)
inlineinherited

Definition at line 68 of file IParameterized.h.

68 { m_name = name; }
std::string m_name

References IParameterized::m_name.

Referenced by BasicLattice::BasicLattice(), Beam(), Layer::clone(), ConvolutionDetectorResolution::ConvolutionDetectorResolution(), LayersWithAbsorptionBuilder::createSampleByIndex(), Basic2DParaCrystalBuilder::createSampleByIndex(), ParticleInVacuumBuilder::createSampleByIndex(), SimpleMagneticRotationBuilder::createSampleByIndex(), Crystal::Crystal(), DetectionProperties::DetectionProperties(), DistributionHandler::DistributionHandler(), FormFactorBAPol::FormFactorBAPol(), FormFactorCoreShell::FormFactorCoreShell(), FormFactorCrystal::FormFactorCrystal(), FormFactorDecoratorMaterial::FormFactorDecoratorMaterial(), FormFactorDecoratorPositionFactor::FormFactorDecoratorPositionFactor(), FormFactorDecoratorRotation::FormFactorDecoratorRotation(), FormFactorDWBA::FormFactorDWBA(), FormFactorDWBAPol::FormFactorDWBAPol(), FormFactorWeighted::FormFactorWeighted(), HexagonalLattice::HexagonalLattice(), IDetector::IDetector(), DepthProbeSimulation::initialize(), GISASSimulation::initialize(), OffSpecSimulation::initialize(), SpecularSimulation::initialize(), SpecularDetector1D::initialize(), MesoCrystal::initialize(), Particle::initialize(), ParticleComposition::initialize(), INode::INode(), Instrument::Instrument(), InterferenceFunction1DLattice::InterferenceFunction1DLattice(), InterferenceFunction2DLattice::InterferenceFunction2DLattice(), InterferenceFunction2DParaCrystal::InterferenceFunction2DParaCrystal(), InterferenceFunction2DSuperLattice::InterferenceFunction2DSuperLattice(), InterferenceFunction3DLattice::InterferenceFunction3DLattice(), InterferenceFunctionFinite2DLattice::InterferenceFunctionFinite2DLattice(), InterferenceFunctionFinite3DLattice::InterferenceFunctionFinite3DLattice(), InterferenceFunctionHardDisk::InterferenceFunctionHardDisk(), InterferenceFunctionNone::InterferenceFunctionNone(), InterferenceFunctionRadialParaCrystal::InterferenceFunctionRadialParaCrystal(), InterferenceFunctionTwin::InterferenceFunctionTwin(), ISampleBuilder::ISampleBuilder(), IsGISAXSDetector::IsGISAXSDetector(), Lattice::Lattice(), Layer::Layer(), LayerInterface::LayerInterface(), LayerRoughness::LayerRoughness(), MultiLayer::MultiLayer(), operator=(), SampleBuilderNode::operator=(), ParticleCoreShell::ParticleCoreShell(), ParticleDistribution::ParticleDistribution(), ParticleLayout::ParticleLayout(), RectangularDetector::RectangularDetector(), SampleBuilderNode::reset(), ResolutionFunction2DGaussian::ResolutionFunction2DGaussian(), SampleBuilderNode::SampleBuilderNode(), SampleBuilderNode::setSBN(), SphericalDetector::SphericalDetector(), and SquareLattice::SquareLattice().

◆ getName()

Member Data Documentation

◆ m_wavelength

double Beam::m_wavelength
private

Definition at line 77 of file Beam.h.

Referenced by Beam(), getCentralK(), getWavelength(), operator=(), and setCentralK().

◆ m_alpha

double Beam::m_alpha
private

Definition at line 78 of file Beam.h.

Referenced by Beam(), getAlpha(), getCentralK(), operator=(), and setCentralK().

◆ m_phi

double Beam::m_phi
private

Definition at line 79 of file Beam.h.

Referenced by Beam(), getCentralK(), getPhi(), operator=(), and setCentralK().

◆ m_intensity

double Beam::m_intensity
private

beam intensity (neutrons/sec)

Definition at line 80 of file Beam.h.

Referenced by Beam(), getIntensity(), operator=(), and setIntensity().

◆ m_shape_factor

std::unique_ptr<IFootprintFactor> Beam::m_shape_factor
private

footprint correction handler

Definition at line 81 of file Beam.h.

Referenced by Beam(), footprintFactor(), getChildren(), operator=(), setFootprintFactor(), and setWidthRatio().

◆ m_bloch_vector

kvector_t Beam::m_bloch_vector
private

Bloch vector encoding the beam's polarization.

Definition at line 82 of file Beam.h.

Referenced by Beam(), getBlochVector(), getPolarization(), operator=(), and setPolarization().

◆ m_parent

const INode* INode::m_parent {nullptr}
privateinherited

Definition at line 81 of file INode.h.

Referenced by INode::displayName(), INode::parent(), and INode::setParent().

◆ m_NP

const size_t INode::m_NP
protectedinherited

Definition at line 86 of file INode.h.

Referenced by INode::INode().

◆ m_P

std::vector<double> INode::m_P
protectedinherited

Definition at line 87 of file INode.h.

Referenced by INode::INode(), and IFootprintFactor::setWidthRatio().

◆ m_name

std::string IParameterized::m_name
privateinherited

Definition at line 72 of file IParameterized.h.

Referenced by IParameterized::getName(), and IParameterized::setName().

◆ m_pool

std::unique_ptr<ParameterPool> IParameterized::m_pool
privateinherited

The documentation for this class was generated from the following files: