diff --git a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/CMakeLists.txt b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/CMakeLists.txt index 425c71b027ba1167cd8561dc183ef19704ae1ce0..cde4cd61a5f3ea01face700c16b1b0e4a12fef22 100644 --- a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/CMakeLists.txt +++ b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/CMakeLists.txt @@ -14,6 +14,7 @@ atlas_depends_on_subdirs( PUBLIC Tracking/TrkTools/TrkToolInterfaces PRIVATE DetectorDescription/AtlasDetDescr + DetectorDescription/GeoModel/GeoModelInterfaces DetectorDescription/Identifier InnerDetector/InDetConditions/InDetConditionsSummaryService InnerDetector/InDetConditions/SCT_ConditionsServices diff --git a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h index 6f51556c64da9127af9a5f22284b9d45af7c37cc..71f3e1dc30f63aa9a283cfdc76861319137488f6 100644 --- a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h +++ b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/InDetTrackHoleSearch/InDetTrackHoleSearchTool.h @@ -25,6 +25,7 @@ class AtlasID; class IInDetConditionsSvc; class ISCT_ConfigurationConditionsSvc; namespace InDet {class IInDetTestPixelLayerTool; } +class IGeoModelSvc; namespace Trk { class RIO_OnTrack; class TrackStateOnSurface; class Track;} namespace Trk { class IExtrapolator;} @@ -117,6 +118,9 @@ namespace InDet ToolHandle< IInDetTestPixelLayerTool > m_pixelLayerTool; ServiceHandle <ISCT_ConfigurationConditionsSvc> m_sctConfCondSvc; + /** Handle for IGeoModelSvc to retrieve geo model information */ + ServiceHandle<IGeoModelSvc> m_geoModelSvc; + const SCT_ID* m_sct_id; /** Configure outwards hole search */ diff --git a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx index 366e327d8c82299f4d25c5ddd344c1170e8a2a1b..878c57f224b3bcb5d6117137994c7600f751107b 100644 --- a/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx +++ b/InnerDetector/InDetRecTools/InDetTrackHoleSearch/src/InDetTrackHoleSearchTool.cxx @@ -29,6 +29,7 @@ #include "InDetRecToolInterfaces/IInDetTestPixelLayerTool.h" #include "TrkVolumes/Volume.h" #include "TrkVolumes/CylinderVolumeBounds.h" +#include "GeoModelInterfaces/IGeoModelSvc.h" #include <set> //================ Constructor ================================================= @@ -41,6 +42,7 @@ InDet::InDetTrackHoleSearchTool::InDetTrackHoleSearchTool(const std::string& t, m_sctCondSummarySvc ("SCT_ConditionsSummarySvc",n), m_pixelLayerTool("InDet::InDetTestPixelLayerTool"), m_sctConfCondSvc("SCT_ConfigurationConditionsSvc", n), + m_geoModelSvc("GeoModelSvc", n), m_sct_id(nullptr), m_extendedListOfHoles(false), m_cosmic(false), @@ -55,6 +57,7 @@ InDet::InDetTrackHoleSearchTool::InDetTrackHoleSearchTool(const std::string& t, declareProperty("SctSummarySvc" , m_sctCondSummarySvc); declareProperty("SctConfCondSvc" , m_sctConfCondSvc); declareProperty("PixelLayerTool" , m_pixelLayerTool); + declareProperty("GeoModelService" , m_geoModelSvc); declareProperty("ExtendedListOfHoles" , m_extendedListOfHoles = false); declareProperty("Cosmics" , m_cosmic); declareProperty("usePixel" , m_usepix); @@ -130,6 +133,19 @@ StatusCode InDet::InDetTrackHoleSearchTool::initialize() } } + if(m_checkBadSCTChip) { + // Check if ITk Strip is used because isBadSCTChip method is valid only for SCT. + if(m_geoModelSvc.retrieve().isFailure()) { + ATH_MSG_FATAL("Could not locate GeoModelSvc"); + return StatusCode::FAILURE; + } + if(m_geoModelSvc->geoConfig()==GeoModel::GEO_RUN4 or + m_geoModelSvc->geoConfig()==GeoModel::GEO_ITk) { + ATH_MSG_WARNING("Since ITk Strip is used, m_checkBadSCTChip is turned off."); + m_checkBadSCTChip = false; + } + } + if (m_extendedListOfHoles) msg(MSG::INFO) << "Search for extended list of holes " << endmsg;