18 DetectorContext::DetectorContext(
const IDetector2D* detector)
 
   20     setup_context(detector);
 
   23 size_t DetectorContext::numberOfSimulationElements()
 const 
   25     return active_indices.size();
 
   34     return std::unique_ptr<IPixel>(pixels[element_index]->clone());
 
   37 size_t DetectorContext::detectorIndex(
size_t element_index)
 const 
   39     return active_indices[element_index];
 
   42 void DetectorContext::setup_context(
const IDetector2D* detector)
 
   46     pixels.reserve(active_indices.size());
 
   47     for (
auto detector_index : active_indices)
 
   48         pixels.emplace_back(detector->
createPixel(detector_index));
 
Define DetectorContext class.
 
Defines interface IDetector2D.
 
Eigen::Matrix2cd analyzerOperator() const
Return the polarization density matrix (in spin basis along z-axis)
 
std::unique_ptr< IPixel > createPixel(size_t element_index) const
Creates pixel for given element index.
 
Abstract 2D detector interface.
 
virtual IPixel * createPixel(size_t index) const =0
Creates an IPixel for the given OutputData object and index.
 
std::vector< size_t > active_indices() const
Returns vector of unmasked detector indices.
 
const DetectionProperties & detectionProperties() const
Returns detection properties.