diff --git a/Tracking/Acts/ActsDataPreparation/src/StripClusteringTool.cxx b/Tracking/Acts/ActsDataPreparation/src/StripClusteringTool.cxx index 066bbdc281e7431ebc211f886cca9312b2e7e493..8981816b8c1913ba8f00eb2d974ed71cd90fd90f 100644 --- a/Tracking/Acts/ActsDataPreparation/src/StripClusteringTool.cxx +++ b/Tracking/Acts/ActsDataPreparation/src/StripClusteringTool.cxx @@ -140,7 +140,7 @@ StripClusteringTool::clusterize(const RawDataCollection& RDOs, m_stripDetElStatus.empty() ? nullptr : status.cptr(); std::optional<std::pair<CellCollection,bool>> unpckd - = unpackRDOs(RDOs, stripID, stripDetElStatus); + = unpackRDOs(RDOs, stripID, stripDetElStatus, ctx); if (not unpckd.has_value()) { ATH_MSG_FATAL("Error encountered while unpacking strip RDOs!"); return StatusCode::FAILURE; @@ -265,7 +265,8 @@ bool StripClusteringTool::passTiming(const std::bitset<3>& timePattern) const { } -bool StripClusteringTool::isBadStrip(const InDet::SiDetectorElementStatus *stripDetElStatus, +bool StripClusteringTool::isBadStrip(const EventContext& ctx, + const InDet::SiDetectorElementStatus *stripDetElStatus, const StripID& stripID, IdentifierHash waferHash, Identifier stripId) const @@ -278,7 +279,6 @@ bool StripClusteringTool::isBadStrip(const InDet::SiDetectorElementStatus *strip m_conditionsTool->isGood(stripId, InDetConditions::SCT_STRIP)); return not stripDetElStatus->isCellGood(waferHash.value(), strip_i) ; } - const EventContext& ctx{Gaudi::Hive::currentContext()}; return not m_conditionsTool->isGood(stripId, InDetConditions::SCT_STRIP, ctx); } @@ -286,7 +286,8 @@ bool StripClusteringTool::isBadStrip(const InDet::SiDetectorElementStatus *strip std::optional<std::pair<StripClusteringTool::CellCollection, bool>> StripClusteringTool::unpackRDOs(const InDetRawDataCollection<StripRDORawData>& RDOs, const StripID& stripID, - const InDet::SiDetectorElementStatus *stripDetElStatus) const + const InDet::SiDetectorElementStatus *stripDetElStatus, + const EventContext& ctx) const { CellCollection cells; bool badStripOnModule{false}; @@ -315,7 +316,7 @@ StripClusteringTool::unpackRDOs(const InDetRawDataCollection<StripRDORawData>& R for (size_t i = iFirstStrip; i < iMaxStrip; i++) { Identifier stripIdent = stripID.strip_id(waferId, i); - if (isBadStrip(stripDetElStatus, stripID, waferHash, stripIdent)) { + if (isBadStrip(ctx, stripDetElStatus, stripID, waferHash, stripIdent)) { // Bad strip, throw it out to minimize useless work. ATH_MSG_DEBUG("Bad strip encountered:" << stripIdent << ", wafer is: " << waferId); diff --git a/Tracking/Acts/ActsDataPreparation/src/StripClusteringTool.h b/Tracking/Acts/ActsDataPreparation/src/StripClusteringTool.h index 4cdb040dfe51b84f3245025d8724b2ccbe659dc9..2ba8da682f5107bbe7ed87aa436b213b77b4871c 100644 --- a/Tracking/Acts/ActsDataPreparation/src/StripClusteringTool.h +++ b/Tracking/Acts/ActsDataPreparation/src/StripClusteringTool.h @@ -68,9 +68,11 @@ private: std::optional<std::pair<std::vector<Cell>, bool>> unpackRDOs(const InDetRawDataCollection<StripRDORawData>& RDOs, const StripID& idHelper, - const InDet::SiDetectorElementStatus *sctDetElStatus) const; + const InDet::SiDetectorElementStatus *sctDetElStatus, + const EventContext& ctx) const; - bool isBadStrip(const InDet::SiDetectorElementStatus *sctDetElStatus, + bool isBadStrip(const EventContext& ctx, + const InDet::SiDetectorElementStatus *sctDetElStatus, const StripID& idHelper, IdentifierHash waferHash, Identifier stripId) const;