From a5e82e13a2d5089c19868e41f14e12ab7788a795 Mon Sep 17 00:00:00 2001
From: Lamar Moore <lamar.moore@stfc.ac.uk>
Date: Thu, 11 Jan 2018 10:50:38 +0000
Subject: [PATCH] review changes and fix unit tests #21339

---
 .../inc/MantidGeometry/Instrument/DetectorInfo.h     |  2 --
 Framework/Geometry/src/Instrument/DetectorInfo.cpp   | 12 ------------
 Framework/Geometry/test/InstrumentVisitorTest.h      |  4 ++--
 3 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfo.h b/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfo.h
index f8cfc21eff7..18924dc6f9c 100644
--- a/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfo.h
+++ b/Framework/Geometry/inc/MantidGeometry/Instrument/DetectorInfo.h
@@ -90,8 +90,6 @@ public:
   double twoTheta(const std::pair<size_t, size_t> &index) const;
   double signedTwoTheta(const size_t index) const;
   double signedTwoTheta(const std::pair<size_t, size_t> &index) const;
-  double getPhi(const size_t index) const;
-  double getPhiOffset(const size_t index, const double offset) const;
   Kernel::V3D position(const size_t index) const;
   Kernel::V3D position(const std::pair<size_t, size_t> &index) const;
   Kernel::Quat rotation(const size_t index) const;
diff --git a/Framework/Geometry/src/Instrument/DetectorInfo.cpp b/Framework/Geometry/src/Instrument/DetectorInfo.cpp
index a31bf27e3a8..d2b98326e48 100644
--- a/Framework/Geometry/src/Instrument/DetectorInfo.cpp
+++ b/Framework/Geometry/src/Instrument/DetectorInfo.cpp
@@ -231,18 +231,6 @@ DetectorInfo::signedTwoTheta(const std::pair<size_t, size_t> &index) const {
   return angle;
 }
 
-double DetectorInfo::getPhi(const size_t index) const {
-  const Kernel::V3D pos = position(index);
-  return std::atan2(pos[1], pos[0]);
-}
-
-/// Calculate the phi angle between detector and beam, and then offset.
-double DetectorInfo::getPhiOffset(const size_t index,
-                                  const double offset) const {
-  double avgPos = getPhi(index);
-  return avgPos < 0 ? -(offset + avgPos) : offset - avgPos;
-}
-
 /// Returns the position of the detector with given index.
 Kernel::V3D DetectorInfo::position(const size_t index) const {
   return Kernel::toV3D(m_detectorInfo->position(index));
diff --git a/Framework/Geometry/test/InstrumentVisitorTest.h b/Framework/Geometry/test/InstrumentVisitorTest.h
index dbd6ecf5eec..f5d948ce895 100644
--- a/Framework/Geometry/test/InstrumentVisitorTest.h
+++ b/Framework/Geometry/test/InstrumentVisitorTest.h
@@ -165,7 +165,7 @@ public:
     TSM_ASSERT_EQUALS("Detector has parent of instrument",
                       compInfo->parent(detectorIndex), instrumentIndex);
     TSM_ASSERT_EQUALS("Instrument has single detector",
-                      compInfo->detectorsInSubtree(instrumentIndex),
+                      compInfo->detectorsInFullSubtree(instrumentIndex),
                       std::vector<size_t>{detectorIndex});
   }
 
@@ -238,7 +238,7 @@ public:
     compInfo->setDetectorInfo(detInfo.get());
     detInfo->setComponentInfo(compInfo.get());
 
-    TS_ASSERT_EQUALS(compInfo->detectorsInSubtree(3), std::vector<size_t>{0});
+    TS_ASSERT_EQUALS(compInfo->detectorsInFullSubtree(3), std::vector<size_t>{0});
   }
 
   void test_visitor_component_ranges_check() {
-- 
GitLab