From c612d49c10115606964eeec68d6da213ddc7f91d Mon Sep 17 00:00:00 2001
From: Susumu Oda <susumu.oda@cern.ch>
Date: Wed, 6 Feb 2019 13:39:57 +0000
Subject: [PATCH] Remove unnecessary const_cast in FastSCT_Clusterization

---
 .../InDetPrepRawDataToxAOD/src/SCT_RawDataToxAOD.cxx      | 3 ---
 .../src/FastSCT_Clusterization.cxx                        | 8 ++++----
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_RawDataToxAOD.cxx b/InnerDetector/InDetEventCnv/InDetPrepRawDataToxAOD/src/SCT_RawDataToxAOD.cxx
index 2ed5f243cb7..25ab40b25de 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 c14a8fe60e3..408497da8ad 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
-- 
GitLab