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

Public Member Functions

 OffSpecSimulation ()
 
 ~OffSpecSimulation () final
 
OffSpecSimulationclone () const override
 
void accept (INodeVisitor *visitor) const final
 
void prepareSimulation () final
 
SimulationResult result () const override
 
void setBeamParameters (double wavelength, const IAxis &alpha_axis, double phi_i)
 
const IAxisbeamAxis () const
 
std::unique_ptr< IUnitConvertercreateUnitConverter () const
 
size_t intensityMapSize () const override
 
void setDetectorParameters (size_t n_phi, double phi_min, double phi_max, size_t n_alpha, double alpha_min, double alpha_max)
 
void setDetector (const IDetector2D &detector)
 
void removeMasks ()
 
void addMask (const IShape2D &shape, bool mask_value=true)
 
void maskAll ()
 
void setRegionOfInterest (double xlow, double ylow, double xup, double yup)
 
void runSimulation ()
 
void runMPISimulation ()
 
void setInstrument (const Instrument &instrument_)
 
const Instrumentinstrument () const
 
Instrumentinstrument ()
 
void setBeamIntensity (double intensity)
 
double getBeamIntensity () const
 
void setBeamPolarization (const kvector_t bloch_vector)
 
void setDetectorResolutionFunction (const IResolutionFunction2D &resolution_function)
 
void removeDetectorResolutionFunction ()
 
void setAnalyzerProperties (const kvector_t direction, double efficiency, double total_transmission)
 
void setSample (const MultiLayer &sample)
 
const MultiLayersample () const
 
void setSampleBuilder (const std::shared_ptr< ISampleBuilder > &sample_builder)
 
void setBackground (const IBackground &bg)
 
const IBackgroundbackground () const
 
void addParameterDistribution (const std::string &param_name, const IDistribution1D &distribution, size_t nbr_samples, double sigma_factor=0.0, const RealLimits &limits=RealLimits())
 
void addParameterDistribution (const ParameterDistribution &par_distr)
 
const DistributionHandlergetDistributionHandler () const
 
void setOptions (const SimulationOptions &options)
 
const SimulationOptionsgetOptions () const
 
SimulationOptionsgetOptions ()
 
void subscribe (ProgressHandler::Callback_t inform)
 
void setTerminalProgressMonitor ()
 
std::vector< const INode * > getChildren () const
 
SimulationResult convertData (const OutputData< double > &data, bool put_masked_areas_to_zero=true)
 
virtual void transferToCPP ()
 
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 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 Member Functions

virtual void initUnitConverter ()
 
std::unique_ptr< IComputationgenerateSingleThreadedComputation (size_t start, size_t n_elements) override
 
std::vector< SimulationElementgenerateSimulationElements (const Beam &beam)
 
void normalize (size_t start_ind, size_t n_elements) override
 
void addBackgroundIntensity (size_t start_ind, size_t n_elements) override
 
void addDataToCache (double weight) override
 
void moveDataFromCache () override
 
const SimulationOptionsoptions () const
 
ProgressHandlerprogress ()
 

Protected Attributes

std::vector< SimulationElementm_sim_elements
 
std::vector< double > m_cache
 
const size_t m_NP
 
std::vector< double > m_P
 

Private Member Functions

 OffSpecSimulation (const OffSpecSimulation &other)
 
void initSimulationElementVector () override
 
void validateParametrization (const ParameterDistribution &par_distr) const override
 
void transferResultsToIntensityMap () override
 
void updateIntensityMap () override
 
size_t numberOfSimulationElements () const final
 
void transferDetectorImage (size_t index)
 
void checkInitialization () const
 
void initialize ()
 
std::vector< double > rawResults () const override
 
void setRawResults (const std::vector< double > &raw_data) override
 
void runSingleSimulation (size_t batch_start, size_t batch_size, double weight=1.0)
 

Private Attributes

std::unique_ptr< IAxismP_alpha_i_axis
 
OutputData< double > m_intensity_map
 
std::unique_ptr< DetectorContextm_detector_context
 
SimulationOptions m_options
 
ProgressHandler m_progress
 
SampleProvider m_sample_provider
 
DistributionHandler m_distribution_handler
 
Instrument m_instrument
 
std::unique_ptr< IBackgroundm_background
 
const INodem_parent {nullptr}
 
std::string m_name
 
std::unique_ptr< ParameterPoolm_pool
 

Detailed Description

Main class to run an off-specular simulation.

Definition at line 26 of file OffSpecSimulation.h.

Constructor & Destructor Documentation

◆ OffSpecSimulation() [1/2]

OffSpecSimulation::OffSpecSimulation ( )

Definition at line 25 of file OffSpecSimulation.cpp.

26 {
27  initialize();
28 }

References initialize().

Referenced by clone().

Here is the call graph for this function:

◆ ~OffSpecSimulation()

OffSpecSimulation::~OffSpecSimulation ( )
inlinefinal

Definition at line 30 of file OffSpecSimulation.h.

30 {}

◆ OffSpecSimulation() [2/2]

OffSpecSimulation::OffSpecSimulation ( const OffSpecSimulation other)
private

Definition at line 82 of file OffSpecSimulation.cpp.

82  : Simulation2D(other)
83 {
84  if (other.mP_alpha_i_axis)
85  mP_alpha_i_axis.reset(other.mP_alpha_i_axis->clone());
87  initialize();
88 }
std::unique_ptr< IAxis > mP_alpha_i_axis
OutputData< double > m_intensity_map
void copyFrom(const OutputData< T > &x)
Definition: OutputData.h:261

References OutputData< T >::copyFrom(), initialize(), m_intensity_map, and mP_alpha_i_axis.

Here is the call graph for this function:

Member Function Documentation

◆ clone()

OffSpecSimulation* OffSpecSimulation::clone ( ) const
inlineoverridevirtual

Implements Simulation2D.

Definition at line 32 of file OffSpecSimulation.h.

32 { return new OffSpecSimulation(*this); }

References OffSpecSimulation().

Here is the call graph for this function:

◆ accept()

void OffSpecSimulation::accept ( INodeVisitor visitor) const
inlinefinalvirtual

Calls the INodeVisitor's visit method.

Implements INode.

Definition at line 34 of file OffSpecSimulation.h.

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

◆ prepareSimulation()

void OffSpecSimulation::prepareSimulation ( )
finalvirtual

Put into a clean state for running a simulation.

Reimplemented from Simulation.

Definition at line 30 of file OffSpecSimulation.cpp.

31 {
34 }
void checkInitialization() const
Check correct number of axes.
void prepareSimulation() override
Put into a clean state for running a simulation.

References checkInitialization(), and Simulation2D::prepareSimulation().

Here is the call graph for this function:

◆ result()

SimulationResult OffSpecSimulation::result ( ) const
overridevirtual

Returns the results of the simulation in a format that supports unit conversion and export to numpy arrays.

Implements Simulation.

Definition at line 42 of file OffSpecSimulation.cpp.

43 {
44  auto data = std::unique_ptr<OutputData<double>>(m_intensity_map.clone());
45  OffSpecularConverter converter(instrument().detector2D(), instrument().getBeam(),
47  return SimulationResult(*data, converter);
48 }
IUnitConverter class that handles the unit translations for off-specular simulations with a spherical...
OutputData * clone() const
Definition: OutputData.h:253
Wrapper around OutputData<double> that also provides unit conversions.
const Instrument & instrument() const
Definition: Simulation.h:55

References OutputData< T >::clone(), Simulation::instrument(), m_intensity_map, and mP_alpha_i_axis.

Here is the call graph for this function:

◆ setBeamParameters()

void OffSpecSimulation::setBeamParameters ( double  wavelength,
const IAxis alpha_axis,
double  phi_i 
)

Sets beam parameters from here (forwarded to Instrument)

Definition at line 50 of file OffSpecSimulation.cpp.

51 {
52  mP_alpha_i_axis.reset(alpha_axis.clone());
53  if (alpha_axis.size() < 1)
54  throw Exceptions::ClassInitializationException("OffSpecSimulation::prepareSimulation() "
55  "-> Error. Incoming alpha range size < 1.");
56  const double alpha_zero = alpha_axis.getMin();
57  instrument().setBeamParameters(wavelength, alpha_zero, phi_i);
59 }
virtual IAxis * clone() const =0
clone function
virtual double getMin() const =0
Returns value of first point of axis.
virtual size_t size() const =0
retrieve the number of bins
void setBeamParameters(double wavelength, double alpha_i, double phi_i)
Sets the beam wavelength and incoming angles.
Definition: Instrument.cpp:87
void updateIntensityMap() override
Default implementation only adds the detector axes.

References IAxis::clone(), IAxis::getMin(), Simulation::instrument(), mP_alpha_i_axis, Instrument::setBeamParameters(), IAxis::size(), updateIntensityMap(), and anonymous_namespace{SlicedCylindersBuilder.cpp}::wavelength().

Here is the call graph for this function:

◆ beamAxis()

const IAxis * OffSpecSimulation::beamAxis ( ) const

Returns axis of the beam.

Definition at line 61 of file OffSpecSimulation.cpp.

62 {
63  return mP_alpha_i_axis.get();
64 }

References mP_alpha_i_axis.

Referenced by createUnitConverter(), and SimulationToPython::defineOffSpecBeam().

◆ createUnitConverter()

std::unique_ptr< IUnitConverter > OffSpecSimulation::createUnitConverter ( ) const

Definition at line 66 of file OffSpecSimulation.cpp.

67 {
68  const IAxis* axis = beamAxis();
69  if (!axis)
70  throw std::runtime_error("Error in OffSpecSimulation::createUnitConverter:"
71  " missing inclination angle axis");
72  return std::make_unique<OffSpecularConverter>(instrument().detector2D(), instrument().getBeam(),
73  *axis);
74 }
Interface for one-dimensional axes.
Definition: IAxis.h:25
const IAxis * beamAxis() const
Returns axis of the beam.

References beamAxis(), and Simulation::instrument().

Here is the call graph for this function:

◆ intensityMapSize()

size_t OffSpecSimulation::intensityMapSize ( ) const
overridevirtual

Returns the total number of the intensity values in the simulation result.

Implements Simulation.

Definition at line 76 of file OffSpecSimulation.cpp.

77 {
79  return mP_alpha_i_axis->size() * instrument().getDetectorAxis(1).size();
80 }
const IAxis & getDetectorAxis(size_t index) const
Definition: Instrument.cpp:157

References checkInitialization(), Instrument::getDetectorAxis(), Simulation::instrument(), mP_alpha_i_axis, and IAxis::size().

Here is the call graph for this function:

◆ initSimulationElementVector()

void OffSpecSimulation::initSimulationElementVector ( )
overrideprivatevirtual

Initializes the vector of Simulation elements.

Implements Simulation.

Definition at line 90 of file OffSpecSimulation.cpp.

91 {
92  m_sim_elements.clear();
93  Beam beam = instrument().getBeam();
94  const double wavelength = beam.getWavelength();
95  const double phi_i = beam.getPhi();
96 
97  for (size_t i = 0; i < mP_alpha_i_axis->size(); ++i) {
98  // Incoming angle by convention defined as positive:
99  double alpha_i = mP_alpha_i_axis->getBin(i).getMidPoint();
100  double total_alpha = alpha_i;
101  beam.setCentralK(wavelength, total_alpha, phi_i);
102  auto sim_elements_i = generateSimulationElements(beam);
103  m_sim_elements.insert(m_sim_elements.end(), std::make_move_iterator(sim_elements_i.begin()),
104  std::make_move_iterator(sim_elements_i.end()));
105  }
106  if (m_cache.empty())
107  m_cache.resize(m_sim_elements.size(), 0.0);
108 }
Beam defined by wavelength, direction and intensity.
Definition: Beam.h:27
double getWavelength() const
Definition: Beam.h:69
void setCentralK(double wavelength, double alpha_i, double phi_i)
Sets the wavevector in terms of wavelength and incoming angles.
Definition: Beam.cpp:76
double getPhi() const
Definition: Beam.h:71
Beam & getBeam()
Definition: Instrument.h:44
std::vector< double > m_cache
Definition: Simulation2D.h:95
std::vector< SimulationElement > m_sim_elements
Definition: Simulation2D.h:94
std::vector< SimulationElement > generateSimulationElements(const Beam &beam)
Generate simulation elements for given beam.

References Simulation2D::generateSimulationElements(), Instrument::getBeam(), Beam::getPhi(), Beam::getWavelength(), Simulation::instrument(), Simulation2D::m_cache, Simulation2D::m_sim_elements, mP_alpha_i_axis, Beam::setCentralK(), and anonymous_namespace{SlicedCylindersBuilder.cpp}::wavelength().

Here is the call graph for this function:

◆ validateParametrization()

void OffSpecSimulation::validateParametrization ( const ParameterDistribution par_distr) const
overrideprivatevirtual

Checks the distribution validity for simulation.

Reimplemented from Simulation.

Definition at line 110 of file OffSpecSimulation.cpp.

111 {
112  const bool zero_mean = par_distr.getDistribution()->getMean() == 0.0;
113  if (zero_mean)
114  return;
115 
116  std::unique_ptr<ParameterPool> parameter_pool(createParameterTree());
117  const std::vector<RealParameter*> names =
118  parameter_pool->getMatchedParameters(par_distr.getMainParameterName());
119  for (const auto par : names)
120  if (par->getName().find("InclinationAngle") != std::string::npos && !zero_mean)
121  throw std::runtime_error("Error in OffSpecSimulation: parameter distribution of "
122  "beam inclination angle should have zero mean.");
123 }
virtual double getMean() const =0
Returns the distribution-specific mean.
ParameterPool * createParameterTree() const
Creates new parameter pool, with all local parameters and those of its children.
Definition: INode.cpp:116
const IDistribution1D * getDistribution() const
std::string getMainParameterName() const
get the main parameter's name

References INode::createParameterTree(), ParameterDistribution::getDistribution(), ParameterDistribution::getMainParameterName(), and IDistribution1D::getMean().

Here is the call graph for this function:

◆ transferResultsToIntensityMap()

void OffSpecSimulation::transferResultsToIntensityMap ( )
overrideprivatevirtual

Creates the appropriate data structure (e.g.

2D intensity map) from the calculated SimulationElement objects

Reimplemented from Simulation.

Definition at line 125 of file OffSpecSimulation.cpp.

126 {
128  const IAxis& phi_axis = instrument().getDetectorAxis(0);
129  size_t phi_f_size = phi_axis.size();
130  if (phi_f_size * m_intensity_map.getAllocatedSize() != m_sim_elements.size())
132  "OffSpecSimulation::transferResultsToIntensityMap: "
133  "intensity map size does not conform to number of calculated intensities");
134  for (size_t i = 0; i < mP_alpha_i_axis->size(); ++i)
136 }
void transferDetectorImage(size_t index)
Normalize, apply detector resolution and transfer detector image corresponding to alpha_i = mp_alpha_...
size_t getAllocatedSize() const
Returns total size of data buffer (product of bin number in every dimension).
Definition: OutputData.h:62

References checkInitialization(), OutputData< T >::getAllocatedSize(), Instrument::getDetectorAxis(), Simulation::instrument(), m_intensity_map, Simulation2D::m_sim_elements, mP_alpha_i_axis, IAxis::size(), and transferDetectorImage().

Here is the call graph for this function:

◆ updateIntensityMap()

void OffSpecSimulation::updateIntensityMap ( )
overrideprivatevirtual

Default implementation only adds the detector axes.

Reimplemented from Simulation.

Definition at line 138 of file OffSpecSimulation.cpp.

139 {
141  if (mP_alpha_i_axis)
143  size_t detector_dimension = instrument().getDetectorDimension();
144  if (detector_dimension == 2)
145  m_intensity_map.addAxis(instrument().getDetectorAxis(1));
147 }
size_t getDetectorDimension() const
Definition: Instrument.cpp:162
void setAllTo(const T &value)
Sets content of output data to specific value.
Definition: OutputData.h:479
void addAxis(const IAxis &new_axis)
Definition: OutputData.h:289
void clear()
Sets object into initial state (no dimensions, data)
Definition: OutputData.h:473

References OutputData< T >::addAxis(), OutputData< T >::clear(), Instrument::getDetectorDimension(), Simulation::instrument(), m_intensity_map, mP_alpha_i_axis, and OutputData< T >::setAllTo().

Referenced by setBeamParameters().

Here is the call graph for this function:

◆ numberOfSimulationElements()

size_t OffSpecSimulation::numberOfSimulationElements ( ) const
finalprivatevirtual

Gets the number of elements this simulation needs to calculate.

Implements Simulation.

Definition at line 36 of file OffSpecSimulation.cpp.

37 {
40 }
size_t numberOfSimulationElements() const override
Gets the number of elements this simulation needs to calculate.

References checkInitialization(), mP_alpha_i_axis, and Simulation2D::numberOfSimulationElements().

Here is the call graph for this function:

◆ transferDetectorImage()

void OffSpecSimulation::transferDetectorImage ( size_t  index)
private

Normalize, apply detector resolution and transfer detector image corresponding to alpha_i = mp_alpha_i_axis->getBin(index)

Definition at line 149 of file OffSpecSimulation.cpp.

150 {
151  OutputData<double> detector_image;
152  size_t detector_dimension = instrument().getDetectorDimension();
153  for (size_t dim = 0; dim < detector_dimension; ++dim)
154  detector_image.addAxis(instrument().getDetectorAxis(dim));
155  size_t detector_size = detector_image.getAllocatedSize();
156  for (size_t i = 0; i < detector_size; ++i)
157  detector_image[i] = m_sim_elements[index * detector_size + i].getIntensity();
158  instrument().applyDetectorResolution(&detector_image);
159  size_t y_axis_size = instrument().getDetectorAxis(1).size();
160  for (size_t i = 0; i < detector_size; ++i)
161  m_intensity_map[index * y_axis_size + i % y_axis_size] += detector_image[i];
162 }
void applyDetectorResolution(OutputData< double > *p_intensity_map) const
apply the detector resolution to the given intensity map
Definition: Instrument.cpp:82

References OutputData< T >::addAxis(), Instrument::applyDetectorResolution(), OutputData< T >::getAllocatedSize(), Instrument::getDetectorAxis(), Instrument::getDetectorDimension(), Simulation::instrument(), m_intensity_map, Simulation2D::m_sim_elements, and IAxis::size().

Referenced by transferResultsToIntensityMap().

Here is the call graph for this function:

◆ checkInitialization()

void OffSpecSimulation::checkInitialization ( ) const
private

Check correct number of axes.

Definition at line 164 of file OffSpecSimulation.cpp.

165 {
166  if (!mP_alpha_i_axis || mP_alpha_i_axis->size() < 1)
167  throw Exceptions::ClassInitializationException("OffSpecSimulation::checkInitialization() "
168  "Incoming alpha range not configured.");
169  if (instrument().getDetectorDimension() != 2)
171  "OffSpecSimulation::checkInitialization: detector is not two-dimensional");
172 }

References Simulation::instrument(), and mP_alpha_i_axis.

Referenced by intensityMapSize(), numberOfSimulationElements(), prepareSimulation(), and transferResultsToIntensityMap().

Here is the call graph for this function:

◆ initialize()

void OffSpecSimulation::initialize ( )
private

Definition at line 174 of file OffSpecSimulation.cpp.

175 {
176  setName("OffSpecSimulation");
177 }
void setName(const std::string &name)

References IParameterized::setName().

Referenced by OffSpecSimulation().

Here is the call graph for this function:

◆ setDetectorParameters()

void Simulation2D::setDetectorParameters ( size_t  n_phi,
double  phi_min,
double  phi_max,
size_t  n_alpha,
double  alpha_min,
double  alpha_max 
)
inherited

Sets spherical detector parameters using angle ranges.

Parameters
n_phinumber of phi-axis bins
phi_minlow edge of first phi-bin
phi_maxupper edge of last phi-bin
n_alphanumber of alpha-axis bins
alpha_minlow edge of first alpha-bin
alpha_maxupper edge of last alpha-bin

Definition at line 64 of file Simulation2D.cpp.

66 {
67  instrument().detector2D().setDetectorParameters(n_x, x_min, x_max, n_y, y_min, y_max);
69 }
void setDetectorParameters(size_t n_x, double x_min, double x_max, size_t n_y, double y_min, double y_max)
Sets detector parameters using angle ranges.
Definition: IDetector2D.cpp:35
IDetector2D & detector2D()
Definition: Instrument.cpp:139
virtual void updateIntensityMap()
Definition: Simulation.h:115

References Instrument::detector2D(), Simulation::instrument(), IDetector2D::setDetectorParameters(), and Simulation::updateIntensityMap().

Referenced by StandardSimulations::BasicGISAS(), StandardSimulations::ExtraLongWavelengthGISAS(), StandardSimulations::GISASWithMasks(), StandardSimulations::MaxiGISAS(), StandardSimulations::MiniGISAS(), StandardSimulations::MiniGISAS_v2(), StandardSimulations::MiniGISASFit(), StandardSimulations::MiniGISASSpecularPeak(), and StandardSimulations::SphericalDetWithRoi().

Here is the call graph for this function:

◆ setDetector()

void Simulation2D::setDetector ( const IDetector2D detector)
inherited

Sets the detector (axes can be overwritten later)

Definition at line 71 of file Simulation2D.cpp.

72 {
73  instrument().setDetector(detector);
75 }
void setDetector(const IDetector &detector)
Sets the detector (axes can be overwritten later)
Definition: Instrument.cpp:48
virtual void initUnitConverter()
Definition: Simulation2D.h:69

References Simulation2D::initUnitConverter(), Simulation::instrument(), and Instrument::setDetector().

Referenced by StandardSimulations::IsGISAXSSimulation1(), StandardSimulations::IsGISAXSSimulation2(), StandardSimulations::RectDetectorGeneric(), StandardSimulations::RectDetectorPerpToDirectBeam(), StandardSimulations::RectDetectorPerpToReflectedBeam(), StandardSimulations::RectDetectorPerpToReflectedBeamDpos(), and StandardSimulations::RectDetectorPerpToSample().

Here is the call graph for this function:

◆ removeMasks()

void Simulation2D::removeMasks ( )
inherited

removes all masks from the detector

Definition at line 32 of file Simulation2D.cpp.

33 {
35 }
void removeMasks()
Removes all masks from the detector.
Definition: IDetector2D.cpp:74

References Instrument::detector2D(), Simulation::instrument(), and IDetector2D::removeMasks().

Here is the call graph for this function:

◆ addMask()

void Simulation2D::addMask ( const IShape2D shape,
bool  mask_value = true 
)
inherited

Adds mask of given shape to the stack of detector masks.

The mask value 'true' means that the channel will be excluded from the simulation. The mask which is added last has priority.

Parameters
shapeThe shape of mask (Rectangle, Polygon, Line, Ellipse)
mask_valueThe value of mask

Definition at line 37 of file Simulation2D.cpp.

38 {
39  instrument().detector2D().addMask(shape, mask_value);
40 }
void addMask(const IShape2D &shape, bool mask_value=true)
Adds mask of given shape to the stack of detector masks.
Definition: IDetector2D.cpp:79

References IDetector2D::addMask(), Instrument::detector2D(), and Simulation::instrument().

Referenced by StandardSimulations::GISASWithMasks(), StandardSimulations::RectDetWithRoi(), and StandardSimulations::SphericalDetWithRoi().

Here is the call graph for this function:

◆ maskAll()

void Simulation2D::maskAll ( )
inherited

Put the mask for all detector channels (i.e. exclude whole detector from the analysis)

Definition at line 42 of file Simulation2D.cpp.

43 {
45 }
void maskAll()
Put the mask for all detector channels (i.e. exclude whole detector from the analysis)
Definition: IDetector2D.cpp:85

References Instrument::detector2D(), Simulation::instrument(), and IDetector2D::maskAll().

Referenced by StandardSimulations::GISASWithMasks().

Here is the call graph for this function:

◆ setRegionOfInterest()

void Simulation2D::setRegionOfInterest ( double  xlow,
double  ylow,
double  xup,
double  yup 
)
inherited

Sets rectangular region of interest with lower left and upper right corners defined.

Definition at line 47 of file Simulation2D.cpp.

48 {
49  instrument().detector2D().setRegionOfInterest(xlow, ylow, xup, yup);
50 }
void setRegionOfInterest(double xlow, double ylow, double xup, double yup)
Sets rectangular region of interest with lower left and upper right corners defined.
Definition: IDetector2D.cpp:48

References Instrument::detector2D(), Simulation::instrument(), and IDetector2D::setRegionOfInterest().

Referenced by StandardSimulations::RectDetWithRoi(), and StandardSimulations::SphericalDetWithRoi().

Here is the call graph for this function:

◆ initUnitConverter()

virtual void Simulation2D::initUnitConverter ( )
inlineprotectedvirtualinherited

Definition at line 69 of file Simulation2D.h.

69 {}

Referenced by Simulation2D::setDetector().

◆ generateSingleThreadedComputation()

std::unique_ptr< IComputation > Simulation2D::generateSingleThreadedComputation ( size_t  start,
size_t  n_elements 
)
overrideprotectedvirtualinherited

Generate a single threaded computation for a given range of simulation elements.

Parameters
startIndex of the first element to include into computation
n_elementsNumber of elements to process

Implements Simulation.

Definition at line 77 of file Simulation2D.cpp.

79 {
80  ASSERT(start < m_sim_elements.size() && start + n_elements <= m_sim_elements.size());
81  const auto& begin = m_sim_elements.begin() + static_cast<long>(start);
82  return std::make_unique<DWBAComputation>(*sample(), options(), progress(), begin,
83  begin + static_cast<long>(n_elements));
84 }
#define ASSERT(condition)
Definition: Assert.h:26
ProgressHandler & progress()
Definition: Simulation.h:121
const MultiLayer * sample() const
Definition: Simulation.cpp:247
const SimulationOptions & options() const
Definition: Simulation.h:120

References ASSERT, Simulation2D::m_sim_elements, Simulation::options(), Simulation::progress(), and Simulation::sample().

Here is the call graph for this function:

◆ generateSimulationElements()

std::vector< SimulationElement > Simulation2D::generateSimulationElements ( const Beam beam)
protectedinherited

Generate simulation elements for given beam.

Definition at line 86 of file Simulation2D.cpp.

87 {
88  const double wavelength = beam.getWavelength();
89  const double alpha_i = -beam.getAlpha(); // Defined to be always positive in Beam
90  const double phi_i = beam.getPhi();
91  const Eigen::Matrix2cd beam_polarization = beam.getPolarization();
92 
93  const IDetector2D& detector = instrument().detector2D();
94  const Eigen::Matrix2cd analyzer_operator = detector.detectionProperties().analyzerOperator();
95  const size_t spec_index = detector.indexOfSpecular(beam);
96 
97  const size_t N = m_detector_context->numberOfSimulationElements();
98 
99  std::vector<SimulationElement> result;
100  result.reserve(N);
101  for (size_t element_index = 0; element_index < N; ++element_index) {
102  SimulationElement element(wavelength, alpha_i, phi_i,
103  m_detector_context->createPixel(element_index));
104  element.setPolarization(beam_polarization);
105  element.setAnalyzerOperator(analyzer_operator);
106  if (m_detector_context->detectorIndex(element_index) == spec_index)
107  element.setSpecular(true);
108  result.emplace_back(std::move(element));
109  }
110  return result;
111 }
Eigen::Matrix2cd getPolarization() const
Returns the polarization density matrix (in spin basis along z-axis)
Definition: Beam.cpp:123
double getAlpha() const
Definition: Beam.h:70
Eigen::Matrix2cd analyzerOperator() const
Return the polarization density matrix (in spin basis along z-axis)
Abstract 2D detector interface.
Definition: IDetector2D.h:31
virtual size_t indexOfSpecular(const Beam &beam) const =0
Returns index of pixel that contains the specular wavevector.
const DetectionProperties & detectionProperties() const
Returns detection properties.
Definition: IDetector.h:93
std::unique_ptr< DetectorContext > m_detector_context
Definition: Simulation2D.h:100
Data stucture containing both input and output of a single detector cell.
virtual SimulationResult result() const =0
Returns the results of the simulation in a format that supports unit conversion and export to numpy a...

References DetectionProperties::analyzerOperator(), IDetector::detectionProperties(), Instrument::detector2D(), Beam::getAlpha(), Beam::getPhi(), Beam::getPolarization(), Beam::getWavelength(), IDetector2D::indexOfSpecular(), Simulation::instrument(), Simulation2D::m_detector_context, Simulation::result(), SimulationElement::setAnalyzerOperator(), SimulationElement::setPolarization(), SimulationElement::setSpecular(), and anonymous_namespace{SlicedCylindersBuilder.cpp}::wavelength().

Referenced by GISASSimulation::initSimulationElementVector(), and initSimulationElementVector().

Here is the call graph for this function:

◆ normalize()

void Simulation2D::normalize ( size_t  start_ind,
size_t  n_elements 
)
overrideprotectedvirtualinherited

Normalize the detector counts to beam intensity, to solid angle, and to exposure angle.

Parameters
start_indIndex of the first element to operate on
n_elementsNumber of elements to process

Implements Simulation.

Definition at line 113 of file Simulation2D.cpp.

114 {
115  const double beam_intensity = getBeamIntensity();
116  if (beam_intensity == 0.0)
117  return; // no normalization when beam intensity is zero
118  for (size_t i = start_ind, stop_point = start_ind + n_elements; i < stop_point; ++i) {
119  SimulationElement& element = m_sim_elements[i];
120  double sin_alpha_i = std::abs(std::sin(element.getAlphaI()));
121  if (sin_alpha_i == 0.0)
122  sin_alpha_i = 1.0;
123  const double solid_angle = element.getSolidAngle();
124  element.setIntensity(element.getIntensity() * beam_intensity * solid_angle / sin_alpha_i);
125  }
126 }
double getIntensity() const
double getSolidAngle() const
double getAlphaI() const
void setIntensity(double intensity)
double getBeamIntensity() const
Definition: Simulation.cpp:178

References SimulationElement::getAlphaI(), Simulation::getBeamIntensity(), SimulationElement::getIntensity(), SimulationElement::getSolidAngle(), Simulation2D::m_sim_elements, and SimulationElement::setIntensity().

Here is the call graph for this function:

◆ addBackgroundIntensity()

void Simulation2D::addBackgroundIntensity ( size_t  start_ind,
size_t  n_elements 
)
overrideprotectedvirtualinherited

Implements Simulation.

Definition at line 128 of file Simulation2D.cpp.

129 {
130  if (!background())
131  return;
132  for (size_t i = start_ind, stop_point = start_ind + n_elements; i < stop_point; ++i) {
133  SimulationElement& element = m_sim_elements[i];
134  element.setIntensity(background()->addBackground(element.getIntensity()));
135  }
136 }
const IBackground * background() const
Definition: Simulation.h:75

References Simulation::background(), SimulationElement::getIntensity(), Simulation2D::m_sim_elements, and SimulationElement::setIntensity().

Here is the call graph for this function:

◆ addDataToCache()

void Simulation2D::addDataToCache ( double  weight)
overrideprotectedvirtualinherited

Implements Simulation.

Definition at line 138 of file Simulation2D.cpp.

139 {
140  if (m_sim_elements.size() != m_cache.size())
141  throw std::runtime_error("Error in Simulation2D::addDataToCache(double): cache size"
142  " not the same as element size");
143  for (unsigned i = 0; i < m_sim_elements.size(); i++)
144  m_cache[i] += m_sim_elements[i].getIntensity() * weight;
145 }

References Simulation2D::m_cache, and Simulation2D::m_sim_elements.

◆ moveDataFromCache()

void Simulation2D::moveDataFromCache ( )
overrideprotectedvirtualinherited

Implements Simulation.

Definition at line 147 of file Simulation2D.cpp.

148 {
149  ASSERT(!m_cache.empty());
150  if (!m_cache.empty()) {
151  for (unsigned i = 0; i < m_sim_elements.size(); i++)
152  m_sim_elements[i].setIntensity(m_cache[i]);
153  m_cache.clear();
154  }
155 }

References ASSERT, Simulation2D::m_cache, and Simulation2D::m_sim_elements.

◆ rawResults()

std::vector< double > Simulation2D::rawResults ( ) const
overrideprivatevirtualinherited

Implements Simulation.

Definition at line 157 of file Simulation2D.cpp.

158 {
159  std::vector<double> result;
160  result.resize(m_sim_elements.size());
161  for (unsigned i = 0; i < m_sim_elements.size(); ++i)
162  result[i] = m_sim_elements[i].getIntensity();
163  return result;
164 }

References Simulation2D::m_sim_elements, and Simulation::result().

Here is the call graph for this function:

◆ setRawResults()

void Simulation2D::setRawResults ( const std::vector< double > &  raw_data)
overrideprivatevirtualinherited

Implements Simulation.

Definition at line 166 of file Simulation2D.cpp.

167 {
169  if (raw_data.size() != m_sim_elements.size())
170  throw std::runtime_error("Simulation2D::setRawResults: size of vector passed as "
171  "argument doesn't match number of elements in this simulation");
172  for (unsigned i = 0; i < raw_data.size(); i++)
173  m_sim_elements[i].setIntensity(raw_data[i]);
175 }
virtual void initSimulationElementVector()=0
Initializes the vector of Simulation elements.
virtual void transferResultsToIntensityMap()
Creates the appropriate data structure (e.g.
Definition: Simulation.h:110

References Simulation::initSimulationElementVector(), Simulation2D::m_sim_elements, and Simulation::transferResultsToIntensityMap().

Here is the call graph for this function:

◆ runSimulation()

void Simulation::runSimulation ( )
inherited

Run a simulation, possibly averaged over parameter distributions.

Run simulation with possible averaging over parameter distributions.

Definition at line 200 of file Simulation.cpp.

201 {
203 
204  const size_t total_size = numberOfSimulationElements();
205  size_t param_combinations = m_distribution_handler.getTotalNumberOfSamples();
206 
207  m_progress.reset();
208  m_progress.setExpectedNTicks(param_combinations * total_size);
209 
210  // restrict calculation to current batch
211  const size_t n_batches = m_options.getNumberOfBatches();
212  const size_t current_batch = m_options.getCurrentBatch();
213 
214  const size_t batch_start = getStartIndex(n_batches, current_batch, total_size);
215  const size_t batch_size = getNumberOfElements(n_batches, current_batch, total_size);
216  if (batch_size == 0)
217  return;
218 
219  std::unique_ptr<ParameterPool> param_pool(createParameterTree());
220  for (size_t index = 0; index < param_combinations; ++index) {
221  double weight = m_distribution_handler.setParameterValues(param_pool.get(), index);
222  runSingleSimulation(batch_start, batch_size, weight);
223  }
227 }
double setParameterValues(ParameterPool *p_parameter_pool, size_t index)
set the parameter values of the simulation object to a specific combination of values,...
void setParameterToMeans(ParameterPool *p_parameter_pool) const
Sets mean distribution values to the parameter pool.
size_t getTotalNumberOfSamples() const
get the total number of parameter value combinations (product of the individual sizes of each paramet...
void setExpectedNTicks(size_t n)
unsigned getNumberOfBatches() const
unsigned getCurrentBatch() const
virtual void moveDataFromCache()=0
SimulationOptions m_options
Definition: Simulation.h:152
virtual void prepareSimulation()
Put into a clean state for running a simulation.
Definition: Simulation.cpp:189
DistributionHandler m_distribution_handler
Definition: Simulation.h:155
void runSingleSimulation(size_t batch_start, size_t batch_size, double weight=1.0)
Runs a single simulation with fixed parameter values.
Definition: Simulation.cpp:289
ProgressHandler m_progress
Definition: Simulation.h:153
virtual size_t numberOfSimulationElements() const =0
Gets the number of elements this simulation needs to calculate.
size_t getStartIndex(size_t n_handlers, size_t current_handler, size_t n_elements)
Definition: Simulation.cpp:53
size_t getNumberOfElements(size_t n_handlers, size_t current_handler, size_t n_elements)
Definition: Simulation.cpp:62

References INode::createParameterTree(), SimulationOptions::getCurrentBatch(), SimulationOptions::getNumberOfBatches(), anonymous_namespace{Simulation.cpp}::getNumberOfElements(), anonymous_namespace{Simulation.cpp}::getStartIndex(), DistributionHandler::getTotalNumberOfSamples(), Simulation::m_distribution_handler, Simulation::m_options, Simulation::m_progress, Simulation::moveDataFromCache(), Simulation::numberOfSimulationElements(), Simulation::prepareSimulation(), ProgressHandler::reset(), Simulation::runSingleSimulation(), ProgressHandler::setExpectedNTicks(), DistributionHandler::setParameterToMeans(), DistributionHandler::setParameterValues(), and Simulation::transferResultsToIntensityMap().

Here is the call graph for this function:

◆ runMPISimulation()

void Simulation::runMPISimulation ( )
inherited

Run a simulation in a MPI environment.

Definition at line 229 of file Simulation.cpp.

230 {
231  MPISimulation ompi;
232  ompi.runSimulation(this);
233 }
void runSimulation(Simulation *simulation)

References MPISimulation::runSimulation().

Here is the call graph for this function:

◆ setInstrument()

void Simulation::setInstrument ( const Instrument instrument_)
inherited

Definition at line 235 of file Simulation.cpp.

236 {
237  m_instrument = instrument_;
239 }
Instrument m_instrument
Definition: Simulation.h:156

References Simulation::m_instrument, and Simulation::updateIntensityMap().

Here is the call graph for this function:

◆ instrument() [1/2]

const Instrument& Simulation::instrument ( ) const
inlineinherited

Definition at line 55 of file Simulation.h.

55 { return m_instrument; }

References Simulation::m_instrument.

Referenced by Simulation2D::addMask(), checkInitialization(), Simulation::convertData(), DepthProbeSimulation::createUnitConverter(), createUnitConverter(), SimulationToPython::defineDetector(), SimulationToPython::defineDetectorPolarizationAnalysis(), SimulationToPython::defineDetectorResolutionFunction(), SimulationToPython::defineGISASBeam(), SimulationToPython::defineMasks(), SimulationToPython::defineOffSpecBeam(), SimulationToPython::defineSpecularScan(), Simulation2D::generateSimulationElements(), Simulation::getBeamIntensity(), Simulation::getChildren(), DepthProbeSimulation::initialize(), SpecularSimulation::initialize(), DepthProbeSimulation::initSimulationElementVector(), GISASSimulation::initSimulationElementVector(), initSimulationElementVector(), SpecularSimulation::initSimulationElementVector(), GISASSimulation::intensityMapSize(), intensityMapSize(), Simulation2D::maskAll(), DepthProbeSimulation::normalize(), SpecularSimulation::normalize(), GISASSimulation::prepareSimulation(), Simulation2D::prepareSimulation(), SpecularSimulation::prepareSimulation(), Simulation::removeDetectorResolutionFunction(), Simulation2D::removeMasks(), GISASSimulation::result(), result(), Simulation::setAnalyzerProperties(), Simulation::setBeamIntensity(), DepthProbeSimulation::setBeamParameters(), setBeamParameters(), GISASSimulation::setBeamParameters(), Simulation::setBeamPolarization(), Simulation2D::setDetector(), Simulation2D::setDetectorParameters(), Simulation::setDetectorResolutionFunction(), Simulation2D::setRegionOfInterest(), SpecularSimulation::setScan(), transferDetectorImage(), transferResultsToIntensityMap(), and updateIntensityMap().

◆ instrument() [2/2]

Instrument& Simulation::instrument ( )
inlineinherited

Definition at line 56 of file Simulation.h.

56 { return m_instrument; }

References Simulation::m_instrument.

◆ setBeamIntensity()

void Simulation::setBeamIntensity ( double  intensity)
inherited

Definition at line 173 of file Simulation.cpp.

174 {
175  instrument().setBeamIntensity(intensity);
176 }
void setBeamIntensity(double intensity)
Definition: Instrument.cpp:106

References Simulation::instrument(), and Instrument::setBeamIntensity().

Referenced by StandardSimulations::GISASWithMasks().

Here is the call graph for this function:

◆ getBeamIntensity()

double Simulation::getBeamIntensity ( ) const
inherited

Definition at line 178 of file Simulation.cpp.

179 {
180  return instrument().getBeamIntensity();
181 }
double getBeamIntensity() const
Definition: Instrument.cpp:116

References Instrument::getBeamIntensity(), and Simulation::instrument().

Referenced by DepthProbeSimulation::normalize(), Simulation2D::normalize(), and SpecularSimulation::normalize().

Here is the call graph for this function:

◆ setBeamPolarization()

void Simulation::setBeamPolarization ( const kvector_t  bloch_vector)
inherited

Sets the beam polarization according to the given Bloch vector.

Definition at line 184 of file Simulation.cpp.

185 {
186  instrument().setBeamPolarization(bloch_vector);
187 }
void setBeamPolarization(const kvector_t bloch_vector)
Sets the beam's polarization according to the given Bloch vector.
Definition: Instrument.cpp:111

References Simulation::instrument(), and Instrument::setBeamPolarization().

Referenced by StandardSimulations::BasicGISAS00(), StandardSimulations::BasicPolarizedGISAS(), StandardSimulations::MaxiGISAS00(), StandardSimulations::MiniGISASPolarizationMM(), StandardSimulations::MiniGISASPolarizationMP(), StandardSimulations::MiniGISASPolarizationPM(), and StandardSimulations::MiniGISASPolarizationPP().

Here is the call graph for this function:

◆ setDetectorResolutionFunction()

void Simulation::setDetectorResolutionFunction ( const IResolutionFunction2D resolution_function)
inherited

Definition at line 156 of file Simulation.cpp.

157 {
158  instrument().setDetectorResolutionFunction(resolution_function);
159 }
void setDetectorResolutionFunction(const IResolutionFunction2D &p_resolution_function)
Sets detector resolution function.
Definition: Instrument.cpp:72

References Simulation::instrument(), and Instrument::setDetectorResolutionFunction().

Referenced by StandardSimulations::MiniGISASDetectorResolution().

Here is the call graph for this function:

◆ removeDetectorResolutionFunction()

void Simulation::removeDetectorResolutionFunction ( )
inherited

Definition at line 161 of file Simulation.cpp.

162 {
164 }
void removeDetectorResolution()
Removes detector resolution function.
Definition: Instrument.cpp:77

References Simulation::instrument(), and Instrument::removeDetectorResolution().

Here is the call graph for this function:

◆ setAnalyzerProperties()

void Simulation::setAnalyzerProperties ( const kvector_t  direction,
double  efficiency,
double  total_transmission 
)
inherited

Sets the polarization analyzer characteristics of the detector.

Definition at line 167 of file Simulation.cpp.

169 {
170  instrument().setAnalyzerProperties(direction, efficiency, total_transmission);
171 }
void setAnalyzerProperties(const kvector_t direction, double efficiency, double total_transmission)
Sets the polarization analyzer characteristics of the detector.
Definition: Instrument.cpp:167

References Simulation::instrument(), and Instrument::setAnalyzerProperties().

Referenced by StandardSimulations::BasicGISAS00(), StandardSimulations::BasicPolarizedGISAS(), StandardSimulations::MaxiGISAS00(), StandardSimulations::MiniGISASPolarizationMM(), StandardSimulations::MiniGISASPolarizationMP(), StandardSimulations::MiniGISASPolarizationPM(), and StandardSimulations::MiniGISASPolarizationPP().

Here is the call graph for this function:

◆ setSample()

void Simulation::setSample ( const MultiLayer sample)
inherited

The MultiLayer object will not be owned by the Simulation object.

Definition at line 242 of file Simulation.cpp.

243 {
245 }
void setSample(const MultiLayer &multilayer)
SampleProvider m_sample_provider
Definition: Simulation.h:154

References Simulation::m_sample_provider, Simulation::sample(), and SampleProvider::setSample().

Here is the call graph for this function:

◆ sample()

const MultiLayer * Simulation::sample ( ) const
inherited

Definition at line 247 of file Simulation.cpp.

248 {
249  return m_sample_provider.sample();
250 }
const MultiLayer * sample() const
Returns current sample.

References Simulation::m_sample_provider, and SampleProvider::sample().

Referenced by SimulationToPython::generateSimulationCode(), DepthProbeSimulation::generateSingleThreadedComputation(), Simulation2D::generateSingleThreadedComputation(), SpecularSimulation::generateSingleThreadedComputation(), Simulation::setSample(), and DepthProbeSimulation::validityCheck().

Here is the call graph for this function:

◆ setSampleBuilder()

void Simulation::setSampleBuilder ( const std::shared_ptr< ISampleBuilder > &  sample_builder)
inherited

Definition at line 252 of file Simulation.cpp.

253 {
254  m_sample_provider.setBuilder(sample_builder);
255 }
void setBuilder(const std::shared_ptr< ISampleBuilder > &sample_builder)

References Simulation::m_sample_provider, and SampleProvider::setBuilder().

Here is the call graph for this function:

◆ setBackground()

void Simulation::setBackground ( const IBackground bg)
inherited

Definition at line 257 of file Simulation.cpp.

258 {
259  m_background.reset(bg.clone());
261 }
virtual IBackground * clone() const =0
void registerChild(INode *node)
Definition: INode.cpp:58
std::unique_ptr< IBackground > m_background
Definition: Simulation.h:157

References IBackground::clone(), Simulation::m_background, and INode::registerChild().

Referenced by StandardSimulations::ConstantBackgroundGISAS(), and Simulation::Simulation().

Here is the call graph for this function:

◆ background()

◆ addParameterDistribution() [1/2]

void Simulation::addParameterDistribution ( const std::string &  param_name,
const IDistribution1D distribution,
size_t  nbr_samples,
double  sigma_factor = 0.0,
const RealLimits limits = RealLimits() 
)
inherited

Definition at line 273 of file Simulation.cpp.

276 {
277  ParameterDistribution par_distr(param_name, distribution, nbr_samples, sigma_factor, limits);
278  addParameterDistribution(par_distr);
279 }
A parametric distribution function, for use with any model parameter.
void addParameterDistribution(const std::string &param_name, const IDistribution1D &distribution, size_t nbr_samples, double sigma_factor=0.0, const RealLimits &limits=RealLimits())
Definition: Simulation.cpp:273

Referenced by StandardSimulations::MiniGISASBeamDivergence().

◆ addParameterDistribution() [2/2]

void Simulation::addParameterDistribution ( const ParameterDistribution par_distr)
inherited

Definition at line 281 of file Simulation.cpp.

282 {
283  validateParametrization(par_distr);
285 }
void addParameterDistribution(const std::string &param_name, const IDistribution1D &distribution, size_t nbr_samples, double sigma_factor=0.0, const RealLimits &limits=RealLimits())
add a sampled parameter distribution
virtual void validateParametrization(const ParameterDistribution &) const
Checks the distribution validity for simulation.
Definition: Simulation.h:135

References DistributionHandler::addParameterDistribution(), Simulation::m_distribution_handler, and Simulation::validateParametrization().

Here is the call graph for this function:

◆ getDistributionHandler()

const DistributionHandler& Simulation::getDistributionHandler ( ) const
inlineinherited

◆ setOptions()

void Simulation::setOptions ( const SimulationOptions options)
inlineinherited

Definition at line 91 of file Simulation.h.

91 { m_options = options; }

References Simulation::m_options, and Simulation::options().

Here is the call graph for this function:

◆ getOptions() [1/2]

const SimulationOptions& Simulation::getOptions ( ) const
inlineinherited

◆ getOptions() [2/2]

SimulationOptions& Simulation::getOptions ( )
inlineinherited

Definition at line 93 of file Simulation.h.

93 { return m_options; }

References Simulation::m_options.

◆ subscribe()

void Simulation::subscribe ( ProgressHandler::Callback_t  inform)
inlineinherited

Definition at line 95 of file Simulation.h.

95 { m_progress.subscribe(inform); }
void subscribe(ProgressHandler::Callback_t callback)

References Simulation::m_progress, and ProgressHandler::subscribe().

Here is the call graph for this function:

◆ setTerminalProgressMonitor()

void Simulation::setTerminalProgressMonitor ( )
inherited

Initializes a progress monitor that prints to stdout.

Definition at line 145 of file Simulation.cpp.

146 {
147  m_progress.subscribe([](size_t percentage_done) -> bool {
148  if (percentage_done < 100)
149  std::cout << std::setprecision(2) << "\r... " << percentage_done << "%" << std::flush;
150  else // wipe out
151  std::cout << "\r... 100%\n";
152  return true;
153  });
154 }

References Simulation::m_progress, and ProgressHandler::subscribe().

Here is the call graph for this function:

◆ getChildren()

std::vector< const INode * > Simulation::getChildren ( ) const
virtualinherited

Returns a vector of children (const).

Reimplemented from INode.

Definition at line 263 of file Simulation.cpp.

264 {
265  std::vector<const INode*> result;
266  result.push_back(&instrument());
268  if (m_background)
269  result.push_back(m_background.get());
270  return result;
271 }
std::vector< const INode * > getChildren() const override
Returns a vector of children (const).

References SampleProvider::getChildren(), Simulation::instrument(), Simulation::m_background, Simulation::m_sample_provider, and Simulation::result().

Here is the call graph for this function:

◆ convertData()

SimulationResult Simulation::convertData ( const OutputData< double > &  data,
bool  put_masked_areas_to_zero = true 
)
inherited

Convert user data to SimulationResult object for later drawing in various axes units.

User data will be cropped to the ROI defined in the simulation, amplitudes in areas corresponding to the masked areas of the detector will be set to zero.

Definition at line 317 of file Simulation.cpp.

319 {
320  auto converter = UnitConverterUtils::createConverter(*this);
321  auto roi_data = UnitConverterUtils::createOutputData(*converter, converter->defaultUnits());
322 
323  const IDetector& detector = instrument().detector();
324 
325  if (roi_data->hasSameDimensions(data)) {
326  // data is already cropped to ROI
327  if (put_masked_areas_to_zero) {
328  detector.iterate(
329  [&](IDetector::const_iterator it) {
330  (*roi_data)[it.roiIndex()] = data[it.roiIndex()];
331  },
332  /*visit_masked*/ false);
333  } else {
334  roi_data->setRawDataVector(data.getRawDataVector());
335  }
336 
337  } else if (detHasSameDimensions(detector, data)) {
338  // exp data has same shape as the detector, we have to put orig data to smaller roi map
339  detector.iterate(
340  [&](IDetector::const_iterator it) {
341  (*roi_data)[it.roiIndex()] = data[it.detectorIndex()];
342  },
343  /*visit_masked*/ !put_masked_areas_to_zero);
344 
345  } else {
346  throw std::runtime_error("FitObject::init_dataset() -> Error. Detector and exp data have "
347  "different shape.");
348  }
349 
350  return SimulationResult(*roi_data, *converter);
351 }
Abstract detector interface.
Definition: IDetector.h:36
void iterate(std::function< void(const_iterator)> func, bool visit_masks=false) const
Definition: IDetector.cpp:201
IDetector & detector()
Definition: Instrument.cpp:133
std::vector< T > getRawDataVector() const
Returns copy of raw data vector.
Definition: OutputData.h:335
An iterator for SimulationArea.
std::unique_ptr< IUnitConverter > createConverter(const Simulation &simulation)
std::unique_ptr< OutputData< double > > createOutputData(const IUnitConverter &converter, Axes::Units units)
Returns zero-valued output data array in specified units.
bool detHasSameDimensions(const IDetector &detector, const OutputData< double > &data)
Definition: Simulation.cpp:33

References UnitConverterUtils::createConverter(), UnitConverterUtils::createOutputData(), Instrument::detector(), SimulationAreaIterator::detectorIndex(), anonymous_namespace{Simulation.cpp}::detHasSameDimensions(), OutputData< T >::getRawDataVector(), Simulation::instrument(), IDetector::iterate(), and SimulationAreaIterator::roiIndex().

Here is the call graph for this function:

◆ options()

◆ progress()

◆ runSingleSimulation()

void Simulation::runSingleSimulation ( size_t  batch_start,
size_t  batch_size,
double  weight = 1.0 
)
privateinherited

Runs a single simulation with fixed parameter values.

If desired, the simulation is run in several threads.

Definition at line 289 of file Simulation.cpp.

290 {
292 
293  const size_t n_threads = m_options.getNumberOfThreads();
294  ASSERT(n_threads > 0);
295 
296  std::vector<std::unique_ptr<IComputation>> computations;
297 
298  for (size_t i_thread = 0; i_thread < n_threads;
299  ++i_thread) { // Distribute computations by threads
300  const size_t thread_start = batch_start + getStartIndex(n_threads, i_thread, batch_size);
301  const size_t thread_size = getNumberOfElements(n_threads, i_thread, batch_size);
302  if (thread_size == 0)
303  break;
304  computations.push_back(generateSingleThreadedComputation(thread_start, thread_size));
305  }
306  runComputations(std::move(computations));
307 
308  normalize(batch_start, batch_size);
309  addBackgroundIntensity(batch_start, batch_size);
310  addDataToCache(weight);
311 }
unsigned getNumberOfThreads() const
virtual std::unique_ptr< IComputation > generateSingleThreadedComputation(size_t start, size_t n_elements)=0
Generate a single threaded computation for a given range of simulation elements.
virtual void addDataToCache(double weight)=0
virtual void addBackgroundIntensity(size_t start_ind, size_t n_elements)=0
virtual void normalize(size_t start_ind, size_t n_elements)=0
Normalize the detector counts to beam intensity, to solid angle, and to exposure angle.
void runComputations(std::vector< std::unique_ptr< IComputation >> computations)
Definition: Simulation.cpp:71

References Simulation::addBackgroundIntensity(), Simulation::addDataToCache(), ASSERT, Simulation::generateSingleThreadedComputation(), anonymous_namespace{Simulation.cpp}::getNumberOfElements(), SimulationOptions::getNumberOfThreads(), anonymous_namespace{Simulation.cpp}::getStartIndex(), Simulation::initSimulationElementVector(), Simulation::m_options, Simulation::normalize(), and anonymous_namespace{Simulation.cpp}::runComputations().

Referenced by Simulation::runSimulation().

Here is the call graph for this function:

◆ transferToCPP()

virtual void ICloneable::transferToCPP ( )
inlinevirtualinherited

Used for Python overriding of clone (see swig/tweaks.py)

Definition at line 34 of file ICloneable.h.

◆ 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 }
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::Beam(), Crystal::Crystal(), IDetector::IDetector(), Simulation::initialize(), MesoCrystal::initialize(), Instrument::Instrument(), Beam::operator=(), Instrument::operator=(), Particle::Particle(), ParticleDistribution::ParticleDistribution(), IParticle::rotate(), ParticleLayout::setAndRegisterInterferenceFunction(), Simulation::setBackground(), InterferenceFunction1DLattice::setDecayFunction(), InterferenceFunction2DLattice::setDecayFunction(), Instrument::setDetector(), IDetector::setDetectorResolution(), Beam::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
const std::string & getName() const

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(), 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::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 }
RealParameter & registerParameter(const std::string &name, double *parpointer)
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)
RealParameter & setUnit(const std::string &name)

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

Referenced by Beam::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 }
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
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::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(), 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(), Beam::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

◆ mP_alpha_i_axis

◆ m_intensity_map

OutputData<double> OffSpecSimulation::m_intensity_map
private

◆ m_sim_elements

◆ m_cache

std::vector<double> Simulation2D::m_cache
protectedinherited

◆ m_detector_context

std::unique_ptr<DetectorContext> Simulation2D::m_detector_context
privateinherited

◆ m_options

◆ m_progress

ProgressHandler Simulation::m_progress
privateinherited

◆ m_sample_provider

◆ m_distribution_handler

DistributionHandler Simulation::m_distribution_handler
privateinherited

◆ m_instrument

Instrument Simulation::m_instrument
privateinherited

◆ m_background

std::unique_ptr<IBackground> Simulation::m_background
privateinherited

◆ 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: