Skip to content
Snippets Groups Projects

cleanup while preparing for replacement of SimulationAreaDetector

Merged Wuttke, Joachim requested to merge j.724h into main
1 file
+ 2
8
Compare changes
  • Side-by-side
  • Inline
@@ -4,7 +4,6 @@
#include "Base/Axis/Scale.h"
#include "Base/Const/Units.h"
#include "Device/Beam/Beam.h"
#include "Device/Detector/SimulationAreaIterator.h"
#include "Device/Mask/MaskStack.h"
#include "Device/Mask/Polygon.h"
#include "Device/Mask/Rectangle.h"
@@ -111,10 +110,7 @@ TEST(SphericalDetectorTest, Clone)
detector.setDetectorResolution(
ConvolutionDetectorResolution(ResolutionFunction2DGaussian(1, 1)));
std::vector<size_t> indexes1;
detector.iterateOverNonMaskedPoints(
[&](const auto it) { indexes1.push_back(it.detectorIndex()); });
EXPECT_EQ(indexes1, std::vector<size_t>({8, 9, 10, 13, 14, 15}));
std::vector<size_t> indexes1 = detector.activeIndices();
std::unique_ptr<SphericalDetector> clone(detector.clone());
@@ -127,8 +123,6 @@ TEST(SphericalDetectorTest, Clone)
EXPECT_EQ(data.axis(1).max(), 2.9 * Units::deg);
// checking iteration over the map of cloned detector
std::vector<size_t> indexes2;
clone->iterateOverNonMaskedPoints(
[&](const auto it) { indexes2.push_back(it.detectorIndex()); });
std::vector<size_t> indexes2 = detector.activeIndices();
EXPECT_EQ(indexes2, indexes1);
}
Loading