diff --git a/common/DetectorModuleGeometry.cpp b/common/DetectorModuleGeometry.cpp index 8f87f35b..0b7ff67a 100644 --- a/common/DetectorModuleGeometry.cpp +++ b/common/DetectorModuleGeometry.cpp @@ -19,21 +19,6 @@ DetectorModuleGeometry::DetectorModuleGeometry(int64_t in_x0, int64_t in_y0, if ((dir_x(fast) && dir_x(slow)) || (!dir_x(fast) && !dir_x(slow))) throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "One of axes (fast/slow) has to be X and another one Y."); - if (dir_x(fast) && (fast == Direction::Xneg) && (x0 - fast_pixels + 1 < 0)) - throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, - "Edge of module in X is outside of the area."); - - if (dir_x(slow) && (slow == Direction::Xneg) && (x0 - slow_pixels + 1 < 0)) - throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, - "Edge of module in X is outside of the area."); - - if (dir_x(fast) && (slow == Direction::Yneg) && (y0 - slow_pixels + 1 < 0)) - throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, - "Edge of module in Y is outside of the area."); - - if (dir_x(slow) && (fast == Direction::Yneg) && (y0 - fast_pixels + 1 < 0)) - throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, - "Edge of module in Y is outside of the area."); } int64_t DetectorModuleGeometry::GetMaxX() const { diff --git a/tests/DetectorGeometryTest.cpp b/tests/DetectorGeometryTest.cpp index eb90c110..593b1439 100644 --- a/tests/DetectorGeometryTest.cpp +++ b/tests/DetectorGeometryTest.cpp @@ -119,31 +119,6 @@ TEST_CASE("DetectorModuleGeometry_SameAxis", "[DetectorGeometry]") { DetectorModuleGeometry::Direction::Xpos)); } - -TEST_CASE("DetectorModuleGeometry_NoSpace", "[DetectorGeometry]") { - std::unique_ptr geometry; - - REQUIRE_THROWS(geometry = std::make_unique(1022,0, - DetectorModuleGeometry::Direction::Xneg, - DetectorModuleGeometry::Direction::Ypos)); - - REQUIRE_THROWS(geometry = std::make_unique(1022,512, - DetectorModuleGeometry::Direction::Xpos, - DetectorModuleGeometry::Direction::Yneg)); - - REQUIRE_THROWS(geometry = std::make_unique(1029,513, - DetectorModuleGeometry::Direction::Yneg, - DetectorModuleGeometry::Direction::Xneg)); - - REQUIRE_NOTHROW(geometry = std::make_unique(1029,513, - DetectorModuleGeometry::Direction::Xneg, - DetectorModuleGeometry::Direction::Yneg)); - - REQUIRE_NOTHROW(geometry = std::make_unique(513,1029, - DetectorModuleGeometry::Direction::Yneg, - DetectorModuleGeometry::Direction::Xneg)); -} - TEST_CASE("DetectorModuleGeometry_GetMaxX_GetMaxY", "[DetectorGeometry]") { std::unique_ptr geometry; @@ -209,7 +184,6 @@ TEST_CASE("DetectorGeometryModular_Custom", "[DetectorGeometry]") { REQUIRE(geometry.GetModulesNum() == 3); - CHECK(geometry.GetHeight(true) == 2999+1); CHECK(geometry.GetWidth(true) == 5513+1); CHECK(geometry.GetPixel0(0, true) == 2999 * geometry.GetWidth(true) + 2999);