From 82bb723256462108a1784cbe3d06e57456b417c9 Mon Sep 17 00:00:00 2001 From: Susumu Oda <susumu.oda@cern.ch> Date: Fri, 17 Aug 2018 14:40:24 +0000 Subject: [PATCH] Use condition object of SiDetectorElementCollection for SCT in ID tracking (ATLASRECTS-4517) --- .../SCT_ConditionsAlgorithms/CMakeLists.txt | 5 ++-- .../src/SCT_DetectorElementCondAlg.cxx | 8 +++++ .../share/InDetRecPreProcessingSilicon.py | 2 -- .../SCT_Monitoring/share/strippedDown.py | 1 - .../SCT_Clusterization.h | 8 ----- .../src/SCT_Clusterization.cxx | 10 ++----- .../SiTrackerSpacePointFinder.h | 6 ---- .../src/SiElementPropertiesTableCondAlg.cxx | 7 ----- .../src/SiElementPropertiesTableCondAlg.h | 6 ---- .../src/SiTrackerSpacePointFinder.cxx | 8 ----- .../ISCT_ClusteringTool.h | 6 ---- .../SiClusterizationTool/SCT_ClusteringTool.h | 3 -- .../src/SCT_ClusteringTool.cxx | 29 +++++++------------ .../SiDetElementBoundaryLinksCondAlg_xk.cxx | 8 ----- .../src/SiDetElementBoundaryLinksCondAlg_xk.h | 7 ----- .../src/SiDetElementsRoadCondAlg_xk.cxx | 6 ---- .../src/SiDetElementsRoadCondAlg_xk.h | 3 -- .../SCT_TrgClusterization.h | 7 ----- .../src/SCT_TrgClusterization.cxx | 20 ++----------- .../SiTrigSpacePointFinder.h | 6 ---- .../src/SiTrigSpacePointFinder.cxx | 11 ------- .../src/SCT_ClusterCacheTool.cxx | 1 - .../TrigUpgradeTest/python/InDetSetup.py | 1 - 23 files changed, 26 insertions(+), 143 deletions(-) diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt index 5b54b12a75c..0f54ba381fe 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/CMakeLists.txt @@ -23,7 +23,8 @@ atlas_depends_on_subdirs( PUBLIC Event/xAOD/xAODEventInfo PRIVATE InnerDetector/InDetDetDescr/InDetIdentifier - InnerDetector/InDetDetDescr/InDetReadoutGeometry ) + InnerDetector/InDetDetDescr/InDetReadoutGeometry + Tracking/TrkDetDescr/TrkGeometry ) # External dependencies: find_package( Boost COMPONENTS filesystem thread system ) @@ -33,6 +34,6 @@ atlas_add_component( SCT_ConditionsAlgorithms src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} - LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier DetDescrConditions GeoModelUtilities GaudiKernel SCT_ConditionsData SCT_CablingLib EventInfo xAODEventInfo AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry SCT_ConditionsToolsLib ) + LINK_LIBRARIES ${Boost_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests Identifier DetDescrConditions GeoModelUtilities GaudiKernel SCT_ConditionsData SCT_CablingLib EventInfo xAODEventInfo AthenaPoolUtilities InDetIdentifier InDetReadoutGeometry TrkGeometry SCT_ConditionsToolsLib ) # Install files from the package: diff --git a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx index 7d57a8a915b..51bacc1dbe0 100644 --- a/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx +++ b/InnerDetector/InDetConditions/SCT_ConditionsAlgorithms/src/SCT_DetectorElementCondAlg.cxx @@ -10,6 +10,8 @@ #include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/SiCommonItems.h" #include "InDetReadoutGeometry/SiDetectorElement.h" +#include "TrkSurfaces/Surface.h" +#include "TrkGeometry/Layer.h" SCT_DetectorElementCondAlg::SCT_DetectorElementCondAlg(const std::string& name, ISvcLocator* pSvcLocator) : ::AthAlgorithm(name, pSvcLocator) @@ -103,6 +105,7 @@ StatusCode SCT_DetectorElementCondAlg::execute() } // Set neighbours and other side + // Set layer to surface InDetDD::SiDetectorElementCollection::const_iterator oldIt{oldColl->begin()}; for (InDetDD::SiDetectorElement* newEl: *writeCdo) { if (oldToNewMap[(*oldIt)]!=newEl) { @@ -113,6 +116,11 @@ StatusCode SCT_DetectorElementCondAlg::execute() newEl->setNextInPhi(oldToNewMap[(*oldIt)->nextInPhi()]); newEl->setPrevInPhi(oldToNewMap[(*oldIt)->prevInPhi()]); newEl->setOtherSide(oldToNewMap[(*oldIt)->otherSide()]); + // Layer of old element is set by InDet::SiLayerBuilder::registerSurfacesToLayer. + const Trk::Layer* layer{(*oldIt)->surface().associatedLayer()}; + if (layer) { + newEl->surface().associateLayer(*layer); + } oldIt++; } diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py index 3839e4aec8e..b67e078bb7b 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetRecPreProcessingSilicon.py @@ -211,7 +211,6 @@ if InDetFlags.doPRDFormation(): InDetSCT_Clusterization = InDet__SCT_Clusterization(name = "InDetSCT_Clusterization", clusteringTool = InDetSCT_ClusteringTool, # ChannelStatus = InDetSCT_ChannelStatusAlg, - DetectorManagerName = InDetKeys.SCT_Manager(), DataObjectName = InDetKeys.SCT_RDOs(), ClustersName = InDetKeys.SCT_Clusters(), conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged) @@ -227,7 +226,6 @@ if InDetFlags.doPRDFormation(): InDetSCT_ClusterizationPU = InDet__SCT_Clusterization(name = "InDetSCT_ClusterizationPU", clusteringTool = InDetSCT_ClusteringTool, # ChannelStatus = InDetSCT_ChannelStatusAlg, - DetectorManagerName = InDetKeys.SCT_Manager(), DataObjectName = InDetKeys.SCT_PU_RDOs(), ClustersName = InDetKeys.SCT_PU_Clusters(), conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged) diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py index b03a7aed3f2..eb853c6edce 100644 --- a/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py +++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/share/strippedDown.py @@ -81,7 +81,6 @@ from InDetPrepRawDataFormation.InDetPrepRawDataFormationConf import InDet__SCT_C InDetSCT_Clusterization = InDet__SCT_Clusterization(name = "InDetSCT_Clusterization", clusteringTool = InDetSCT_ClusteringTool, #ChannelStatus = InDetSCT_ChannelStatusAlg, - DetectorManagerName = "SCT_Manager", DataObjectName = "SCT_RDOs", ClustersName = "SCT_Clusters") topSequence += InDetSCT_Clusterization diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h index fecf2dd78f7..b68889d2b6c 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/InDetPrepRawDataFormation/SCT_Clusterization.h @@ -40,15 +40,9 @@ class SCT_ID; class SCT_ChannelStatusAlg; -class SiDetectorManager; class ISvcLocator; class StatusCode; -namespace InDetDD{ - class SiDetectorManager; -} - - namespace InDet { /** * @class SCT_Clusterization @@ -81,7 +75,6 @@ private: //@} ToolHandle< ISCT_ClusteringTool > m_clusteringTool; //!< Clustering algorithm - std::string m_managerName; //REMOVE LATER //!< Detector manager name in StoreGate const SCT_ID* m_idHelper; SG::ReadHandleKey<TrigRoiDescriptorCollection> m_roiCollectionKey; @@ -94,7 +87,6 @@ private: SG::WriteHandleKey<SCT_ClusterContainer> m_clusterContainerKey; SG::WriteHandleKey<SiClusterContainer> m_clusterContainerLinkKey; SG::WriteHandleKey<SCT_FlaggedCondData> m_flaggedCondDataKey; - const InDetDD::SiDetectorManager* m_manager; unsigned int m_maxRDOs; ToolHandle<IInDetConditionsTool> m_pSummaryTool{this, "conditionsTool", "SCT_ConditionsSummaryTool/InDetSCT_ConditionsSummaryTool", "Tool to retrieve SCT conditions summary"}; diff --git a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx index 5761c69ab62..a410c252c69 100644 --- a/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx +++ b/InnerDetector/InDetRecAlgs/InDetPrepRawDataFormation/src/SCT_Clusterization.cxx @@ -13,7 +13,6 @@ #include "InDetPrepRawData/SCT_ClusterCollection.h" #include "InDetRawData/SCT_RDORawData.h" #include "InDetRawData/SCT_RDO_Container.h" -#include "InDetReadoutGeometry/SiDetectorManager.h" #include "AtlasDetDescr/AtlasDetectorID.h" #include "InDetIdentifier/SCT_ID.h" #include "SiClusterizationTool/ISCT_ClusteringTool.h" @@ -37,7 +36,6 @@ namespace InDet{ m_clusterContainerKey("SCT_Clusters"), m_clusterContainerLinkKey("SCT_Clusters"), m_flaggedCondDataKey("SCT_FlaggedCondData"), - m_manager(nullptr), m_maxRDOs(384), //(77), m_checkBadModules(true), m_flaggedModules(), @@ -46,7 +44,6 @@ namespace InDet{ { // Get parameter values from jobOptions file declareProperty("DataObjectName", m_rdoContainerKey, "SCT RDOs" ); - declareProperty("DetectorManagerName",m_managerName); declareProperty("clusteringTool",m_clusteringTool); //inconsistent nomenclature! declareProperty("RoIs", m_roiCollectionKey, "RoIs to read in"); declareProperty("isRoI_Seeded", m_roiSeeded, "Use RoI"); @@ -84,9 +81,6 @@ namespace InDet{ // Get the clustering tool ATH_CHECK (m_clusteringTool.retrieve()); - // Get the SCT manager - ATH_CHECK (detStore()->retrieve(m_manager,"SCT")); - // Get the SCT ID helper ATH_CHECK (detStore()->retrieve(m_idHelper,"SCT_ID")); @@ -169,7 +163,7 @@ namespace InDet{ continue; } // Use one of the specific clustering AlgTools to make clusters - std::unique_ptr<SCT_ClusterCollection> clusterCollection ( m_clusteringTool->clusterize(*rd,*m_manager,*m_idHelper)); + std::unique_ptr<SCT_ClusterCollection> clusterCollection ( m_clusteringTool->clusterize(*rd,*m_idHelper)); if (clusterCollection) { if (not clusterCollection->empty()) { const IdentifierHash hash(clusterCollection->identifyHash()); @@ -207,7 +201,7 @@ namespace InDet{ continue; } // Use one of the specific clustering AlgTools to make clusters - std::unique_ptr<SCT_ClusterCollection> clusterCollection (m_clusteringTool->clusterize(*RDO_Collection, *m_manager, *m_idHelper)); + std::unique_ptr<SCT_ClusterCollection> clusterCollection (m_clusteringTool->clusterize(*RDO_Collection, *m_idHelper)); if (clusterCollection && !clusterCollection->empty()){ ATH_MSG_VERBOSE( "REGTEST: SCT : clusterCollection contains " << clusterCollection->size() << " clusters" ); diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h index 7b4d96f9f83..823c20ef610 100755 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/SiSpacePointFormation/SiTrackerSpacePointFinder.h @@ -78,10 +78,6 @@ class SCT_ID; class PixelID; class IBeamCondSvc; -namespace InDetDD { - class SCT_DetectorManager; -} - namespace InDet { class SiTrackerSpacePointFinder:public AthReentrantAlgorithm { @@ -165,7 +161,6 @@ namespace InDet { mutable std::atomic<int> m_sctCacheHits; mutable std::atomic<int> m_pixCacheHits; bool m_cachemode; //used for online MT counters - const InDetDD::SCT_DetectorManager* m_manager; const SCT_ID* m_idHelper; const PixelID* m_idHelperPixel; @@ -176,7 +171,6 @@ namespace InDet { SG::UpdateHandleKey<SpacePointCache> m_SpacePointCache_PixKey; ToolHandle< SiSpacePointMakerTool > m_SiSpacePointMakerTool; - BooleanProperty m_useDetectorManager{this, "UseDetectorManager", true/*false*/, "Switch to use SiDetectorElementCollection from SCT_DetectorManager for debugging"}; SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}; SG::ReadCondHandleKey<InDet::SiElementPropertiesTable> m_SCTPropertiesKey{this, "SCTPropertiesKey", "SCT_ElementPropertiesTable", "Key of input SiElementPropertiesTable for SCT"}; }; diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.cxx b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.cxx index 68d0b853308..cfff38a7aec 100644 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.cxx +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.cxx @@ -5,7 +5,6 @@ #include "SiElementPropertiesTableCondAlg.h" #include "InDetIdentifier/SCT_ID.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include <memory> @@ -16,7 +15,6 @@ namespace InDet { : ::AthAlgorithm(name, pSvcLocator) , m_condSvc{"CondSvc", name} , m_idHelper{nullptr} - , m_detManager{nullptr} { } @@ -34,7 +32,6 @@ namespace InDet { // Register write handle ATH_CHECK(m_condSvc->regHandle(this, m_writeKey)); - ATH_CHECK(detStore()->retrieve(m_detManager, "SCT")); ATH_CHECK(detStore()->retrieve(m_idHelper, "SCT_ID")); return StatusCode::SUCCESS; @@ -70,10 +67,6 @@ namespace InDet { return StatusCode::FAILURE; } - if (m_useDetectorManager) { // For debugging: use SiDetectorElementCollection from SCT_DetectorManager - readCdo = m_detManager->getDetectorElementCollection(); - } - // ____________ Construct new Write Cond Object ____________ std::unique_ptr<InDet::SiElementPropertiesTable> writeCdo{std::make_unique<InDet::SiElementPropertiesTable>(*m_idHelper, *readCdo, m_epsWidth)}; diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.h b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.h index fa25dec5df4..7b1fbd908c8 100644 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.h +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiElementPropertiesTableCondAlg.h @@ -16,10 +16,6 @@ class SCT_ID; -namespace InDetDD { - class SCT_DetectorManager; -} - namespace InDet { class SiElementPropertiesTableCondAlg : public AthAlgorithm { @@ -36,11 +32,9 @@ namespace InDet { SG::WriteCondHandleKey<InDet::SiElementPropertiesTable> m_writeKey{this, "WriteKey", "SCT_ElementPropertiesTable", "Key of output SiElementPropertiesTable for SCT"}; FloatProperty m_epsWidth{this, "EpsWidth", 0.02, "Safety margin for half-widths, in cm"}; - BooleanProperty m_useDetectorManager{this, "UseDetectorManager", true/*false*/, "Switch to use SiDetectorElementCollection from SCT_DetectorManager for debugging"}; ServiceHandle<ICondSvc> m_condSvc; const SCT_ID* m_idHelper; - const InDetDD::SCT_DetectorManager* m_detManager; }; } diff --git a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx index 265ff77f966..2e3ecf2eb40 100755 --- a/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx +++ b/InnerDetector/InDetRecAlgs/SiSpacePointFormation/src/SiTrackerSpacePointFinder.cxx @@ -13,7 +13,6 @@ ATLAS Collaboration #include "SiSpacePointFormation/SiTrackerSpacePointFinder.h" // For processing clusters -#include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/SiLocalPosition.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" #include "InDetReadoutGeometry/SiDetectorElement.h" @@ -57,7 +56,6 @@ namespace InDet { m_numberOfEvents(0), m_numberOfPixel(0), m_numberOfSCT(0), m_sctCacheHits(0), m_pixCacheHits(0), m_cachemode(false), - m_manager(0), m_idHelper(nullptr), m_idHelperPixel(nullptr), m_SpacePointContainer_SCTKey("SCT_SpacePoints"), @@ -146,9 +144,6 @@ StatusCode SiTrackerSpacePointFinder::initialize() if (m_selectSCTs) { ATH_CHECK(detStore()->retrieve(m_idHelper,"SCT_ID")); - // also need the SCT Manager to get the detectorElementCollection - ATH_CHECK(detStore()->retrieve(m_manager,"SCT")); - // Initialize the key of input SiElementPropertiesTable and SiDetectorElementCollection for SCT ATH_CHECK(m_SCTPropertiesKey.initialize()); ATH_CHECK(m_SCTDetEleCollKey.initialize()); @@ -188,9 +183,6 @@ StatusCode SiTrackerSpacePointFinder::execute_r (const EventContext& ctx) const ATH_MSG_FATAL("Pointer of SiDetectorElementCollection (" << m_SCTDetEleCollKey.fullKey() << ") could not be retrieved"); return StatusCode::SUCCESS; } - if (m_useDetectorManager) { - elements = m_manager->getDetectorElementCollection(); - } SG::ReadCondHandle<SiElementPropertiesTable> sctProperties(m_SCTPropertiesKey, ctx); properties = sctProperties.retrieve(); if (properties==nullptr) { diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h index a0b857afb38..f30f3d7d739 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/ISCT_ClusteringTool.h @@ -23,10 +23,6 @@ class SCT_ID; -namespace InDetDD { - class SiDetectorManager; -} - class SCT_ChannelStatusAlg; class SCT_ConditionsSummary; @@ -54,7 +50,6 @@ class ISCT_ClusteringTool : virtual public IAlgTool */ virtual SCT_ClusterCollection *clusterize( const InDetRawDataCollection<SCT_RDORawData> & RDOs, - const InDetDD::SiDetectorManager& manager, const SCT_ID& idHelper, const SCT_ChannelStatusAlg* status, const bool CTBBadChannels) const = 0; @@ -69,7 +64,6 @@ class ISCT_ClusteringTool : virtual public IAlgTool */ virtual SCT_ClusterCollection *clusterize( const InDetRawDataCollection<SCT_RDORawData> & rdoCollection, - const InDetDD::SiDetectorManager& manager, const SCT_ID& idHelper) const = 0; }; diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h index ba2bdf66585..15d49786be4 100755 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/SiClusterizationTool/SCT_ClusteringTool.h @@ -47,7 +47,6 @@ namespace InDet { /// Clusterize the SCT RDOs... deprecated form passes explicit channel status object virtual SCT_ClusterCollection * clusterize( const InDetRawDataCollection<SCT_RDORawData> & RDOs, - const InDetDD::SiDetectorManager& manager, const SCT_ID& idHelper, const SCT_ChannelStatusAlg* status, const bool CTBBadChannels) const; @@ -55,7 +54,6 @@ namespace InDet { /// Clusterize the SCT RDOs... virtual SCT_ClusterCollection * clusterize( const InDetRawDataCollection<SCT_RDORawData> & RDOs, - const InDetDD::SiDetectorManager& manager, const SCT_ID& idHelper) const; private: @@ -73,7 +71,6 @@ namespace InDet { bool m_majority01X; bool m_useRowInformation; - BooleanProperty m_useDetectorManager{this, "UseDetectorManager", true/*false*/, "Switch to use SiDetectorElementCollection from SCT_DetectorManager for debugging"}; SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}; ///Add strips to a cluster vector without checking for bad strips diff --git a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx index eeefa8d4e2d..8ec902c0fb2 100644 --- a/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx +++ b/InnerDetector/InDetRecTools/SiClusterizationTool/src/SCT_ClusteringTool.cxx @@ -18,7 +18,6 @@ #include "InDetReadoutGeometry/SiCellId.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "InDetReadoutGeometry/SiDetectorDesign.h" -#include "InDetReadoutGeometry/SiDetectorManager.h" #include "InDetReadoutGeometry/SiLocalPosition.h" #include "InDetPrepRawData/SiWidth.h" #include "Identifier/IdentifierHash.h" @@ -188,13 +187,12 @@ namespace InDet{ } SCT_ClusterCollection* SCT_ClusteringTool::clusterize(const InDetRawDataCollection<SCT_RDORawData> &collection, - const InDetDD::SiDetectorManager& manager, const SCT_ID& idHelper, const SCT_ChannelStatusAlg* /*status */, const bool /*CTBBadChannels */) const { - ATH_MSG_INFO( "You have invoked the deprecated form of clusterize(...), please use the new interface, of the form clusterize(InDetRawDataCollection<SCT_RDORawData> & collection,InDetDD::SiDetectorManager& manager,SCT_ID& idHelper)"); - return clusterize(collection, manager, idHelper); + ATH_MSG_INFO( "You have invoked the deprecated form of clusterize(...), please use the new interface, of the form clusterize(InDetRawDataCollection<SCT_RDORawData> & collection,SCT_ID& idHelper)"); + return clusterize(collection, idHelper); } void SCT_ClusteringTool::addStripsToCluster(const Identifier & firstStripId, const unsigned int nStrips, @@ -320,7 +318,7 @@ namespace InDet{ SCT_ClusterCollection * SCT_ClusteringTool::clusterize(const InDetRawDataCollection<SCT_RDORawData> & collection, - const InDetDD::SiDetectorManager& manager, const SCT_ID& idHelper) const + const SCT_ID& idHelper) const { ATH_MSG_VERBOSE ("SCT_ClusteringTool::clusterize()"); @@ -438,20 +436,15 @@ namespace InDet{ // Find detector element for these digits Identifier elementID(collection.identify()); - const InDetDD::SiDetectorElement* element = nullptr; - if (m_useDetectorManager) { - element = manager.getDetectorElement(elementID); - } else { - const Identifier waferId{idHelper.wafer_id(elementID)}; - const IdentifierHash waferHash{idHelper.wafer_hash(waferId)}; - SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey); - const InDetDD::SiDetectorElementCollection* sctDetEle{*sctDetEleHandle}; - if (not sctDetEleHandle.isValid() or sctDetEle==nullptr) { - ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available."); - return nullResult; - } - element = sctDetEle->getDetectorElement(waferHash); + const Identifier waferId{idHelper.wafer_id(elementID)}; + const IdentifierHash waferHash{idHelper.wafer_hash(waferId)}; + SG::ReadCondHandle<InDetDD::SiDetectorElementCollection> sctDetEleHandle(m_SCTDetEleCollKey); + const InDetDD::SiDetectorElementCollection* sctDetEle{*sctDetEleHandle}; + if (not sctDetEleHandle.isValid() or sctDetEle==nullptr) { + ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " is not available."); + return nullResult; } + const InDetDD::SiDetectorElement* element = sctDetEle->getDetectorElement(waferHash); if (!element) { ATH_MSG_WARNING("Element not in the element map, ID = "<< elementID); return nullResult; diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.cxx b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.cxx index 418f5763f8a..7d8d9c33cbd 100644 --- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.cxx +++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.cxx @@ -4,7 +4,6 @@ #include "SiDetElementBoundaryLinksCondAlg_xk.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/SiDetectorElement.h" #include "SiCombinatorialTrackFinderTool_xk/SiDetElementBoundaryLink_xk.h" #include "StoreGate/ReadCondHandle.h" @@ -15,7 +14,6 @@ namespace InDet { SiDetElementBoundaryLinksCondAlg_xk::SiDetElementBoundaryLinksCondAlg_xk(const std::string& name, ISvcLocator* pSvcLocator) : ::AthAlgorithm(name, pSvcLocator) , m_condSvc{"CondSvc", name} - , m_detManager{nullptr} { } @@ -33,8 +31,6 @@ namespace InDet { // Register write handle ATH_CHECK(m_condSvc->regHandle(this, m_writeKey)); - ATH_CHECK(detStore()->retrieve(m_detManager, "SCT")); - return StatusCode::SUCCESS; } @@ -68,10 +64,6 @@ namespace InDet { return StatusCode::FAILURE; } - if (m_useDetectorManager) { // For debugging: use SiDetectorElementCollection from SCT_DetectorManager - readCdo = m_detManager->getDetectorElementCollection(); - } - // ____________ Construct new Write Cond Object ____________ // Copied from // InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiCombinatorialTrackFinder_xk.cxx diff --git a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.h b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.h index c98d0f042b8..1f614f6e359 100644 --- a/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.h +++ b/InnerDetector/InDetRecTools/SiCombinatorialTrackFinderTool_xk/src/SiDetElementBoundaryLinksCondAlg_xk.h @@ -14,10 +14,6 @@ #include "GaudiKernel/ICondSvc.h" -namespace InDetDD { - class SCT_DetectorManager; -} - namespace InDet { class SiDetElementBoundaryLinksCondAlg_xk : public AthAlgorithm { @@ -33,10 +29,7 @@ namespace InDet { SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_readKey{this, "ReadKey", "SCT_DetectorElementCollection", "Key of input SiDetectorElementCollection for SCT"}; SG::WriteCondHandleKey<InDet::SiDetElementBoundaryLinks_xk> m_writeKey{this, "WriteKey", "SCT_DetElementBoundaryLinks_xk", "Key of output SiDetElementBoundaryLinks_xk for SCT"}; - BooleanProperty m_useDetectorManager{this, "UseDetectorManager", true/*false*/, "Switch to use SiDetectorElementCollection from SCT_DetectorManager for debugging"}; - ServiceHandle<ICondSvc> m_condSvc; - const InDetDD::SCT_DetectorManager* m_detManager; }; } diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.cxx b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.cxx index 82209d1321f..6a94690b339 100644 --- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.cxx +++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.cxx @@ -9,7 +9,6 @@ #include "SiDetElementsRoadTool_xk/SiDetElementsComparison.h" #include "SiDetElementsRoadTool_xk/SiDetElementsLayer_xk.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "SiDetElementsRoadUtils_xk.h" /////////////////////////////////////////////////////////////////// @@ -19,7 +18,6 @@ InDet::SiDetElementsRoadCondAlg_xk::SiDetElementsRoadCondAlg_xk(const std::string& name, ISvcLocator* pSvcLocator) : ::AthAlgorithm(name, pSvcLocator), m_pixmgr{nullptr}, - m_sctmgr{nullptr}, m_condSvc{"CondSvc", name} { } @@ -46,7 +44,6 @@ StatusCode InDet::SiDetElementsRoadCondAlg_xk::initialize() // Get SCT Detector Manager and SCT ID helper if (m_useSCT) { - ATH_CHECK(detStore()->retrieve(m_sctmgr, m_sct)); ATH_CHECK(m_SCTDetEleCollKey.initialize()); } @@ -132,9 +129,6 @@ StatusCode InDet::SiDetElementsRoadCondAlg_xk::execute() ATH_MSG_ERROR(m_SCTDetEleCollKey.fullKey() << " is not available."); return StatusCode::FAILURE; } - if (m_useDetectorManager) { - sctDetEle = m_sctmgr->getDetectorElementCollection(); - } for (const InDetDD::SiDetectorElement* s: *sctDetEle) { if (s->isBarrel() ) pW[1].push_back(s); // Barrel else if (s->center().z() > 0.) pW[2].push_back(s); // Right endcap diff --git a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.h b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.h index f8d56b4545b..d4bc41f32ef 100644 --- a/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.h +++ b/InnerDetector/InDetRecTools/SiDetElementsRoadTool_xk/src/SiDetElementsRoadCondAlg_xk.h @@ -26,7 +26,6 @@ class SCT_ID; namespace InDetDD { class PixelDetectorManager; - class SCT_DetectorManager; } namespace InDet { @@ -68,9 +67,7 @@ namespace InDet { StringProperty m_pix{this, "PixManagerLocation", "Pixel", "PIX manager location"}; StringProperty m_sct{this, "SCTManagerLocation", "SCT", "SCT manager location"}; const InDetDD::PixelDetectorManager* m_pixmgr; - const InDetDD::SCT_DetectorManager* m_sctmgr; ServiceHandle<ICondSvc> m_condSvc; - BooleanProperty m_useDetectorManager{this, "UseDetectorManager", true/*false*/, "Switch to use SiDetectorElementCollection from SCT_DetectorManager for debugging"}; /////////////////////////////////////////////////////////////////// // Methods diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h index 67cd5d59672..d1410c8ed4b 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/InDetTrigPrepRawDataFormat/SCT_TrgClusterization.h @@ -52,11 +52,6 @@ class TrigTimer; class SCT_ID; class SCT_ChannelStatusAlg; - -namespace InDetDD { - class SiDetectorManager; -} - namespace InDet { class SCT_TrgClusterization : public HLT::FexAlgo { @@ -105,13 +100,11 @@ namespace InDet { ToolHandle<ITrigRawDataProviderTool> m_rawDataProvider; ToolHandle<ISCT_ClusteringTool> m_clusteringTool; //!< clustering algorithm - std::string m_managerName; //!< detector manager name in StoreGate std::string m_clustersName; std::string m_flaggedCondDataName; const SCT_ID* m_idHelper; SCT_ClusterContainer* m_clusterContainer; - const InDetDD::SiDetectorManager* m_manager; // !< Trigger part ServiceHandle<IRegSelSvc> m_regionSelector; //!< region selector service diff --git a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx index 4c4bbbf9f82..adf1d04fe54 100755 --- a/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx +++ b/InnerDetector/InDetTrigRecAlgs/InDetTrigPrepRawDataFormat/src/SCT_TrgClusterization.cxx @@ -21,7 +21,6 @@ #include "InDetRawData/SCT_RDORawData.h" #include "InDetRawData/InDetRawDataCLASS_DEF.h" -#include "InDetReadoutGeometry/SiDetectorManager.h" #include "InDetReadoutGeometry/PixelDetectorManager.h" #include "Identifier/Identifier.h" #include "AtlasDetDescr/AtlasDetectorID.h" @@ -54,12 +53,10 @@ namespace InDet{ HLT::FexAlgo(name, pSvcLocator), m_rawDataProvider("InDet::TrigSCTRawDataProvider"), m_clusteringTool("InDet::SCT_ClusteringTool"), - m_managerName("SCT"), m_clustersName("SCT_TrigClusters"), m_flaggedCondDataName("SCT_FlaggedCondData_TRIG"), m_idHelper(0), m_clusterContainer(nullptr), - m_manager(nullptr), m_regionSelector("RegSelSvc", name), m_doFullScan(false), m_etaHalfWidth(0.1), @@ -75,7 +72,6 @@ namespace InDet{ m_timerDecoder(0) { // Get parameter values from jobOptions file - declareProperty("DetectorManagerName", m_managerName); declareProperty("SCT_RDOContainerName",m_sctRDOContainerName); declareProperty("clusteringTool", m_clusteringTool); declareProperty("ClustersName", m_clustersName); @@ -136,16 +132,6 @@ namespace InDet{ return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP); } - - StatusCode sc = detStore()->retrieve(m_manager,m_managerName); - if (sc.isFailure()){ - ATH_MSG_FATAL( "Cannot retrieve detector manager!" ); - return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP); - } - else{ - ATH_MSG_VERBOSE( "Detector manager found !" ); - } - const SCT_ID * IdHelper(0); if (detStore()->retrieve(IdHelper, "SCT_ID").isFailure()) { ATH_MSG_FATAL( "Could not get SCT ID helper" ); @@ -171,7 +157,7 @@ namespace InDet{ } } else { - sc = store()->retrieve(m_clusterContainer, m_clustersName); + StatusCode sc = store()->retrieve(m_clusterContainer, m_clustersName); if (sc.isFailure()) { ATH_MSG_ERROR( "Failed to get Cluster Container" ); @@ -185,7 +171,7 @@ namespace InDet{ //symlink the collection const SiClusterContainer* symSiContainer(0); - sc = store()->symLink(m_clusterContainer, symSiContainer); + StatusCode sc = store()->symLink(m_clusterContainer, symSiContainer); if (sc.isFailure()) { ATH_MSG_WARNING( "SCT clusters could not be symlinked in StoreGate !" ); } @@ -450,7 +436,6 @@ namespace InDet{ // Use one of the specific clustering AlgTools to make clusters m_clusterCollection = m_clusteringTool->clusterize(*RDO_Collection, - *m_manager, *m_idHelper); // -me- fix test @@ -525,7 +510,6 @@ namespace InDet{ if (rdosize>0 && goodModule){ // Use one of the specific clustering AlgTools to make clusters m_clusterCollection = m_clusteringTool->clusterize(*rd, - *m_manager, *m_idHelper); diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h index 95ad53cd7cb..d2aef5faf93 100755 --- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h +++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/SiTrigSpacePointFormation/SiTrigSpacePointFinder.h @@ -52,10 +52,6 @@ class SpacePointOverlapCollection; class IRegSelSvc; class TrigTimer; -namespace InDetDD { - class SCT_DetectorManager; -} - namespace InDet{ class SiSpacePointMakerTool; @@ -89,7 +85,6 @@ namespace InDet{ // int m_numberOfEvents; // const InDetDD::PixelDetectorManager *m_managerPixel; // const PixelID* m_idHelperPixel; - const InDetDD::SCT_DetectorManager* m_managerSCT; IdentifierHash m_maxKey; const SCT_ClusterContainer *m_sctClusterContainer{}; @@ -99,7 +94,6 @@ namespace InDet{ SpacePointOverlapCollection* m_spOverlapColl; - BooleanProperty m_useDetectorManager{this, "UseDetectorManager", true/*false*/, "Switch to use SiDetectorElementCollection from SCT_DetectorManager for debugging"}; SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}; SG::ReadCondHandleKey<InDet::SiElementPropertiesTable> m_SCTPropertiesKey{this, "SCTPropertiesKey", "SCT_ElementPropertiesTable", "Key of input SiElementPropertiesTable for SCT"}; diff --git a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx index 97312605e03..593154b775e 100755 --- a/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx +++ b/InnerDetector/InDetTrigRecAlgs/SiTrigSpacePointFormation/src/SiTrigSpacePointFinder.cxx @@ -16,7 +16,6 @@ ATLAS Collaboration #include "InDetPrepRawData/PixelClusterCollection.h" #include "InDetPrepRawData/SCT_ClusterCollection.h" -#include "InDetReadoutGeometry/SCT_DetectorManager.h" #include "InDetReadoutGeometry/SiLocalPosition.h" #include "InDetReadoutGeometry/SiDetectorElement.h" @@ -56,7 +55,6 @@ namespace InDet{ m_selectPixels(true), m_selectSCTs(true), m_overlap(false), - m_managerSCT(nullptr), m_SpacePointContainerSCT(0), m_SpacePointContainerPixel(0), m_spOverlapColl(0), @@ -173,12 +171,6 @@ namespace InDet{ ATH_MSG_FATAL( "Cannot retrieve SCT ID helper!" ); return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP); } - // SCT detector manager - sc = detStore()->retrieve(m_managerSCT, "SCT"); - if (sc.isFailure()) { - ATH_MSG_FATAL( "Cannot retrieve SCT detector manager!" ); - return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP); - } // register the IdentifiableContainer into StoreGate // ------------------------------------------------------ @@ -444,9 +436,6 @@ namespace InDet{ ATH_MSG_FATAL("Pointer of SiDetectorElementCollection (" << m_SCTDetEleCollKey.fullKey() << ") could not be retrieved"); return HLT::ErrorCode(HLT::Action::ABORT_JOB, HLT::Reason::BAD_JOB_SETUP); } - if (m_useDetectorManager) { - elements = m_managerSCT->getDetectorElementCollection(); - } SG::ReadCondHandle<SiElementPropertiesTable> sctProperties(m_SCTPropertiesKey); const SiElementPropertiesTable* properties(sctProperties.retrieve()); if (properties==nullptr) { diff --git a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx index f7d79103ff2..5cab2807e30 100755 --- a/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx +++ b/Trigger/TrigTools/TrigOnlineSpacePointTool/src/SCT_ClusterCacheTool.cxx @@ -420,7 +420,6 @@ StatusCode SCT_ClusterCacheTool::convertBStoClusters(std::vector<const ROBF*>& r { const InDetRawDataCollection<SCT_RDORawData>* pRdoColl = (*collIt); const InDet::SCT_ClusterCollection* pColl = m_clusteringTool->clusterize(*pRdoColl, - *m_indet_mgr, *m_sct_id); if(pColl!=NULL) { diff --git a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py index 446fe7d6abc..90b18294278 100644 --- a/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py +++ b/Trigger/TrigValidation/TrigUpgradeTest/python/InDetSetup.py @@ -201,7 +201,6 @@ def makeInDetAlgs(): InDetSCT_Clusterization = InDet__SCT_Clusterization(name = "InDetSCT_Clusterization", clusteringTool = InDetSCT_ClusteringTool, # ChannelStatus = InDetSCT_ChannelStatusAlg, - DetectorManagerName = InDetKeys.SCT_Manager(), DataObjectName = InDetKeys.SCT_RDOs(), ClustersName = "SCT_TrigClusters", conditionsTool = InDetSCT_ConditionsSummaryToolWithoutFlagged) -- GitLab