diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_RawDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_RawDataToxAOD.cxx
index 2ed5f243cb70d831c57f0bf55524c9f3269eec0f..25ab40b25deb6c25ddae7bc3beee066bed3b2865 100644
--- a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_RawDataToxAOD.cxx
+++ b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_RawDataToxAOD.cxx
@@ -61,9 +61,6 @@ StatusCode SCT_RawDataToxAOD::execute(const EventContext& ctx) const {
       phi_module_acc(*xrdo) = m_SCTHelper->phi_module(id);
       eta_module_acc(*xrdo) = m_SCTHelper->eta_module(id);
       side_acc(*xrdo) = m_SCTHelper->side(id);
-      // error condensed hit not used anymore (duplicates information from ByteStream errors)
-      //      SCT3_RawData* rdo3 = const_cast<SCT3_RawData*>(dynamic_cast<const SCT3_RawData*>(rdo));
-      //      if (rdo3) xrdo->setErrorCondensedHit(rdo3->getErrorCondensedHit());
     }
   }
   ATH_MSG_DEBUG(" recorded SCT_RawData objects: size " << xaod->size());
diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx
index c14a8fe60e3f1cd1a84dee2de0e9de05076f425f..408497da8ad468db885b9d2fb64e740ecceceaa5 100755
--- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx
+++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/FastSCT_Clusterization.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
 */
 
 #include "TrigOnlineSpacePointTool/FastSCT_Clusterization.h"
@@ -13,9 +13,9 @@
 void FastSCT_Clusterization::initializeGeometry(const InDetDD::SCT_DetectorManager* manager){
 
   ///@todo WARNING - hack needed here for non-const method of SCT_DetectorManager
-  m_man = const_cast<InDetDD::SCT_DetectorManager*>(manager);
+  m_man = manager;
   // Barrel geometry : get a barrel element (use layer 0, phi 1, eta 1, side 0)
-  InDetDD::SiDetectorElement* element = m_man->getDetectorElement(0, 0, 1, 1, 0);
+  const InDetDD::SiDetectorElement* element = m_man->getDetectorElement(0, 0, 1, 1, 0);
   m_barrel_pitch  = element->phiPitch();
   m_deltaXlorentz=0.0026;
   m_corrTable[0]= 1.0;
@@ -30,7 +30,7 @@ std::cout << " barrel: pitch " << m_barrel_pitch  << " lorentz shift " << m_delt
   for (int disk=0; disk<s_ndisk; disk++)
     for (int ieta=0; ieta<s_neta; ieta++){
       // find the forward element. Use phi 0, side 0
-      InDetDD::SiDetectorElement* element = m_man->getDetectorElement(2, disk, 0, ieta, 0);
+      const InDetDD::SiDetectorElement* element = m_man->getDetectorElement(2, disk, 0, ieta, 0);
       if (0==element) continue;
       m_forward_pitch[disk][ieta]=element->phiPitch();
 #ifdef CLUSTERING_DBG