BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
DetectorContext (const IDetector2D *detector) | |
DetectorContext (const DetectorContext &other)=delete | |
DetectorContext & | operator= (const DetectorContext &other)=delete |
size_t | numberOfSimulationElements () const |
std::unique_ptr< IPixel > | createPixel (size_t element_index) const |
size_t | detectorIndex (size_t element_index) const |
Private Member Functions | |
void | setup_context (const IDetector2D *detector) |
Private Attributes | |
Eigen::Matrix2cd | analyzer_operator |
std::vector< std::unique_ptr< IPixel > > | pixels |
std::vector< size_t > | active_indices |
Holds precalculated information for faster SimulationElement generation.
Definition at line 28 of file DetectorContext.h.
DetectorContext::DetectorContext | ( | const IDetector2D * | detector | ) |
Definition at line 18 of file DetectorContext.cpp.
References setup_context().
|
delete |
|
delete |
size_t DetectorContext::numberOfSimulationElements | ( | ) | const |
Definition at line 23 of file DetectorContext.cpp.
References active_indices.
std::unique_ptr< IPixel > DetectorContext::createPixel | ( | size_t | element_index | ) | const |
Creates pixel for given element index.
Element index is sequetial index in a vector of SimulationElements. Corresponds to sequence of detector bins inside ROI and outside of masked areas.
Definition at line 32 of file DetectorContext.cpp.
References pixels.
size_t DetectorContext::detectorIndex | ( | size_t | element_index | ) | const |
Definition at line 37 of file DetectorContext.cpp.
References active_indices.
|
private |
Definition at line 42 of file DetectorContext.cpp.
References active_indices, IDetector2D::active_indices(), analyzer_operator, DetectionProperties::analyzerOperator(), IDetector2D::createPixel(), IDetector::detectionProperties(), and pixels.
Referenced by DetectorContext().
|
private |
Definition at line 45 of file DetectorContext.h.
Referenced by setup_context().
|
private |
Definition at line 46 of file DetectorContext.h.
Referenced by createPixel(), and setup_context().
|
private |
All unmasked pixels inside ROI.
Definition at line 47 of file DetectorContext.h.
Referenced by detectorIndex(), numberOfSimulationElements(), and setup_context().