From 604f3dce8be42b909f16f572d258c0a562916d01 Mon Sep 17 00:00:00 2001
From: Nicholas Styles <nicholas.styles@desy.de>
Date: Wed, 18 Nov 2020 12:21:59 +0100
Subject: [PATCH] remove conflicting methods from derived class

---
 .../InDetReadoutGeometry/SiDetectorElement.h  | 57 +----------------
 .../SiDetectorElement.icc                     | 20 ------
 .../src/SiDetectorElement.cxx                 | 64 +------------------
 3 files changed, 2 insertions(+), 139 deletions(-)

diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h
index 1e2ff4336620..55d451eeeec3 100644
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.h
@@ -64,7 +64,6 @@ namespace InDetDD {
    *
    * -  Identification
    * -  Navigation
-   * -  Transformation/Orientation
    * -  Module Frame
    * -  Element Extent
    * -  Design methods
@@ -72,7 +71,6 @@ namespace InDetDD {
    * -  Lorentz Correction
    * -  Readout cell id
    * -  Miscellaneous
-   * -  Cache handling.
    *
    *
    * @author Grant Gorfine
@@ -152,23 +150,6 @@ namespace InDetDD {
      */
     SiDetectorElement& operator=(SiDetectorElement&&) = delete;
 
-    /**
-     * @name Cache handling
-     *
-     * Methods to handle invalidating and updating caches. The cached values include values that are affected by alignment
-     */
-    //@{
-    /**
-     * Signal that cached values are no longer valid.
-     * Invalidate general cache (inline)
-     */
-    virtual void invalidate();
-
-    /**
-     * Set/calculate cache values (inline)
-     */
-    virtual void setCache();
-    //@}
 
     /**
      * @name Navigation setters
@@ -232,48 +213,12 @@ namespace InDetDD {
      * @name Surface
      */
     //@{
-    /**
-     * Element Surface
-     */
-    virtual Trk::Surface& surface();
-    virtual const Trk::Surface& surface() const;
-    /**
-     * TrkDetElementBase interface (inline)
-     */
-    virtual const Trk::Surface& surface(const Identifier&) const;
-    
+
     /**
      * Returns the full list of surfaces associated to this detector element
      */
     virtual const std::vector<const Trk::Surface*>& surfaces() const;
-    //@}
-
-    /**
-     * @name Transformation
-     */
     //@{
-    /**
-     * Local (simulation/hit frame) to global transform
-     */
-    virtual const GeoTrf::Transform3D& transformHit() const;
-
-    /**
-     * Local (reconstruction frame) to global transform
-     */
-    const HepGeom::Transform3D& transformCLHEP() const;
-    const Amg::Transform3D& transform() const;
-    /**
-     * TrkDetElementBase interface (inline)
-     */
-    virtual const Amg::Transform3D& transform(const Identifier&) const;
-
-    /**
-     * Default Local (reconstruction frame) to global transform
-     * ie with no misalignment.
-     */
-    const HepGeom::Transform3D defTransformCLHEP() const;
-    const Amg::Transform3D defTransform() const;
-
 
     /**
      * @name Module Frame
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.icc b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.icc
index 7882b206de3d..c822c091611f 100644
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.icc
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/InDetReadoutGeometry/SiDetectorElement.icc
@@ -11,16 +11,6 @@ namespace InDetDD {
   ///////////////////////////////////////////////////////////////////
   // Inline methods:
   ///////////////////////////////////////////////////////////////////
-    
-  inline void SiDetectorElement::invalidate()
-  {
-    m_cacheValid = false;
-  }
-
-  inline void SiDetectorElement::setCache()
-  {
-    updateCache();
-  }
 
   inline void SiDetectorElement::setNextInEta(const SiDetectorElement* element)
   {
@@ -77,16 +67,6 @@ namespace InDetDD {
     return (!isBarrel() && !isDBM());
   }
 
-  inline const Trk::Surface& SiDetectorElement::surface(const Identifier&) const
-  {
-    return surface();
-  }
-
-  inline const Amg::Transform3D& SiDetectorElement::transform(const Identifier&) const
-  {
-    return transform();
-  }
-
   inline double SiDetectorElement::hitDepthDirection() const
   {
     if (!m_cacheValid) {
diff --git a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx
index 0e626e3d45ba..be778739f8d8 100644
--- a/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx
+++ b/InnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorElement.cxx
@@ -155,18 +155,6 @@ namespace InDetDD {
     return cellId;
   }
 
-  Trk::Surface&
-  SiDetectorElement::surface()
-  {
-    return *m_surface;
-  }
-
-  const Trk::Surface&
-  SiDetectorElement::surface() const
-  {
-    return *m_surface;
-  }
-
   const std::vector<const Trk::Surface*>&
   SiDetectorElement::surfaces() const
   {
@@ -186,57 +174,7 @@ namespace InDetDD {
     // return the surfaces
     return m_surfaces;
   }
-
-  const GeoTrf::Transform3D&
-  SiDetectorElement::transformHit() const
-  {
-    if (m_geoAlignStore) {
-      const GeoTrf::Transform3D* ptrXf = m_geoAlignStore->getAbsPosition(getMaterialGeom());
-      if (ptrXf) return *ptrXf;
-    }
-    return getMaterialGeom()->getAbsoluteTransform();
-  }
-
-  const HepGeom::Transform3D&
-  SiDetectorElement::transformCLHEP() const
-  {
-    //stuff to get the CLHEP version of the local to global transform.
-    if (!m_cacheValid) {
-      std::lock_guard<std::mutex> lock(m_mutex);
-      if (!m_cacheValid) updateCache();
-    }
-
-    return m_transformCLHEP;
-  }
-
-  const Amg::Transform3D&
-  SiDetectorElement::transform() const
-  {
-    if (!m_cacheValid) {
-      std::lock_guard<std::mutex> lock(m_mutex);
-      if (!m_cacheValid) updateCache();
-    }
-
-    return m_transform;
-  }
-
-  const HepGeom::Transform3D
-  SiDetectorElement::defTransformCLHEP() const
-  {
-    if (m_geoAlignStore) {
-      const GeoTrf::Transform3D* ptrXf = m_geoAlignStore->getDefAbsPosition(getMaterialGeom());
-      if (ptrXf) return Amg::EigenTransformToCLHEP(*ptrXf) * recoToHitTransform();
-    }
-    return Amg::EigenTransformToCLHEP(getMaterialGeom()->getDefAbsoluteTransform()) * recoToHitTransform();
-  }  
-   
-  const Amg::Transform3D
-  SiDetectorElement::defTransform() const
-  {
-    HepGeom::Transform3D tmpTransform = defTransformCLHEP();
-    return Amg::CLHEPTransformToEigen(tmpTransform);
-  }
-
+ 
   const Amg::Transform3D&
   SiDetectorElement::moduleTransform() const
   {
-- 
GitLab