Commit 31fc4d7a authored by Susumu Oda's avatar Susumu Oda Committed by Walter Lampl
Browse files

Specify hierarchy of SCT_SIDE or SCT_MODULE for isGood method using IdentifierHash.

parent 6fe4ae53
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
......@@ -78,7 +78,11 @@ SCT_ConditionsSummaryTool::isGood(const IdentifierHash& elementHash) const {
if (not m_noReports) {
const EventContext& ctx{Gaudi::Hive::currentContext()};
for (const ToolHandle<ISCT_ConditionsTool>& tool: m_toolHandles) {
if (tool->canReportAbout(InDetConditions::SCT_SIDE) and (not tool->isGood(elementHash, ctx))) return false;
if ((tool->canReportAbout(InDetConditions::SCT_SIDE) or
tool->canReportAbout(InDetConditions::SCT_MODULE)) and
(not tool->isGood(elementHash, ctx))) {
return false;
}
}
}
return true;
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "SCT_ConfigurationConditionsTool.h"
......@@ -79,7 +79,7 @@ bool SCT_ConfigurationConditionsTool::isGood(const Identifier& elementId, InDetC
// Is a wafer with this IdentifierHash good?
bool SCT_ConfigurationConditionsTool::isGood(const IdentifierHash& hashId, const EventContext& ctx) const {
const Identifier elementId{m_pHelper->wafer_id(hashId)};
return isGood(elementId, ctx);
return isGood(elementId, ctx, InDetConditions::SCT_SIDE);
}
bool SCT_ConfigurationConditionsTool::isGood(const IdentifierHash& hashId) const {
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#include "SCT_LinkMaskingTool.h"
......@@ -61,7 +61,7 @@ bool SCT_LinkMaskingTool::isGood(const Identifier& elementId, InDetConditions::H
// Is a wafer with this IdentifierHash good?
bool SCT_LinkMaskingTool::isGood(const IdentifierHash& hashId, const EventContext& ctx) const {
Identifier elementId{m_sctHelper->wafer_id(hashId)};
return isGood(elementId, ctx);
return isGood(elementId, ctx, InDetConditions::SCT_SIDE);
}
bool SCT_LinkMaskingTool::isGood(const IdentifierHash& hashId) const {
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
......@@ -89,8 +89,10 @@ bool
SCT_ModuleVetoTool::isGood(const Identifier& elementId, const EventContext& ctx, InDetConditions::Hierarchy h) const {
if (not canReportAbout(h)) return true;
const Identifier waferId{m_pHelper->wafer_id(elementId)};
// Bad wafer in properties
if (m_localCondData.isBadWaferId(elementId)) return false;
if (m_localCondData.isBadWaferId(waferId)) return false;
// If database is not used, all wafer IDs here should be good.
if (not m_useDatabase) return true;
......@@ -99,7 +101,7 @@ SCT_ModuleVetoTool::isGood(const Identifier& elementId, const EventContext& ctx,
if (condData==nullptr) return true;
// Return the result of database
return (not condData->isBadWaferId(elementId));
return (not condData->isBadWaferId(waferId));
}
bool
......@@ -111,7 +113,7 @@ SCT_ModuleVetoTool::isGood(const Identifier& elementId, InDetConditions::Hierarc
bool
SCT_ModuleVetoTool::isGood(const IdentifierHash& hashId, const EventContext& ctx) const {
Identifier elementId{m_pHelper->wafer_id(hashId)};
return isGood(elementId, ctx);
return isGood(elementId, ctx, InDetConditions::SCT_SIDE);
}
bool
......
......@@ -113,7 +113,7 @@ SCT_MonitorConditionsTool::isGood(const Identifier& elementId, InDetConditions::
bool
SCT_MonitorConditionsTool::isGood(const IdentifierHash& hashId, const EventContext& ctx) const {
Identifier elementId{m_pHelper->wafer_id(hashId)};
return isGood(elementId, ctx);
return isGood(elementId, ctx, InDetConditions::SCT_SIDE);
}
//////////////////////////////////////////////////////////////////////////////////////////
......
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
/**
......@@ -46,7 +46,9 @@ SCT_RODVetoTool::finalize() {
bool
SCT_RODVetoTool::canReportAbout(InDetConditions::Hierarchy h) const {
return ((h==InDetConditions::DEFAULT) or (h==InDetConditions::SCT_SIDE));
return ((h==InDetConditions::DEFAULT) or
(h==InDetConditions::SCT_SIDE) or
(h==InDetConditions::SCT_MODULE));
}
bool
......@@ -57,7 +59,9 @@ SCT_RODVetoTool::isGood(const Identifier& elementId, const EventContext& ctx, In
ATH_MSG_ERROR("IdentifierSet cannot be retrieved in isGood. true is returned.");
return true;
}
bool result{badIds->find(elementId) == badIds->end()};
const Identifier waferId{m_pHelper->wafer_id(elementId)};
const Identifier moduleId{m_pHelper->module_id(waferId)};
bool result{badIds->find(moduleId) == badIds->end()};
return result;
}
......@@ -72,7 +76,7 @@ bool
SCT_RODVetoTool::isGood(const IdentifierHash& hashId, const EventContext& ctx) const {
Identifier elementId{m_pHelper->wafer_id(hashId)};
Identifier moduleId{m_pHelper->module_id(elementId)};
return isGood(moduleId, ctx);
return isGood(moduleId, ctx, InDetConditions::SCT_MODULE);
}
bool
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment