|
ATLAS Offline Software
|
#include <SCT_ModuleVetoTool.h>
|
| SCT_ModuleVetoTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~SCT_ModuleVetoTool ()=default |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | finalize () override |
|
virtual bool | canReportAbout (InDetConditions::Hierarchy h) const override |
| Can the service report about the given component? (chip, module...) More...
|
|
virtual bool | isGood (const Identifier &elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
| Is the detector element good? More...
|
|
virtual bool | isGood (const Identifier &elementId, const EventContext &ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override |
|
virtual bool | isGood (const IdentifierHash &hashId) const override |
| is it good?, using wafer hash More...
|
|
virtual bool | isGood (const IdentifierHash &hashId, const EventContext &ctx) const override |
|
virtual void | getDetectorElementStatus (const EventContext &ctx, InDet::SiDetectorElementStatus &element_status, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const override |
|
|
StringArrayProperty | m_badElements {this, "BadModuleIdentifiers", {}, "list of bad detector elements (= module sides)"} |
|
SCT_ModuleVetoCondData | m_localCondData {} |
|
const SCT_ID * | m_pHelper {nullptr} |
|
bool | m_useDatabase {false} |
|
StringProperty | m_JsonLocation {this, "JsonPath", "", "Path to the JSON file containing list of modules to be masked."} |
|
BooleanProperty | m_maskLayers {this, "MaskLayers", false, "Mask full layers/disks in overlay"} |
|
IntegerProperty | m_maskSide {this, "MaskSide", -1, "Mask full modules (-1), inner (0) or outer (1) sides"} |
|
IntegerArrayProperty | m_layersToMask {this, "LayersToMask", {}, "Which barrel layers to mask out, goes from 0 to N-1"} |
|
IntegerArrayProperty | m_disksToMask {this, "DisksToMask", {}, "Which endcap disks to mask out, goes from -N+1 to N+1 , skipping zero"} |
|
SG::ReadCondHandleKey< SCT_ModuleVetoCondData > | m_condKey {this, "CondKey", "SCT_ModuleVetoCondData", "SCT modules to be vetoed"} |
|
Tool allowing one to manually declare detector elements as 'bad' in the joboptions file
Definition at line 36 of file SCT_ModuleVetoTool.h.
◆ SCT_ModuleVetoTool()
SCT_ModuleVetoTool::SCT_ModuleVetoTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~SCT_ModuleVetoTool()
virtual SCT_ModuleVetoTool::~SCT_ModuleVetoTool |
( |
| ) |
|
|
virtualdefault |
◆ canReportAbout()
Can the service report about the given component? (chip, module...)
Definition at line 93 of file SCT_ModuleVetoTool.cxx.
◆ fillData()
StatusCode SCT_ModuleVetoTool::fillData |
( |
| ) |
|
|
private |
Definition at line 164 of file SCT_ModuleVetoTool.cxx.
174 if (!json_file.is_open()) {
176 return StatusCode::FAILURE;
181 for(
const auto&
i:
data)
183 std::string id_mod =
i[
"Decimal_ID"];
184 unsigned long long id_cstring = std::stoull(id_mod);
188 return StatusCode::SUCCESS;
201 std::vector<std::string>::const_iterator pId{
m_badElements.value().begin()};
202 std::vector<std::string>::const_iterator last{
m_badElements.value().end()};
203 for(; pId not_eq last;++pId) {
204 unsigned long long idToWrite{
static_cast<unsigned long long>(atoll(pId->c_str()))};
231 ATH_MSG_DEBUG(
"Successfully filled bad SCT identifiers list");
232 return (success ?
sc : StatusCode::FAILURE);
◆ finalize()
StatusCode SCT_ModuleVetoTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ getCondData()
◆ getDetectorElementStatus()
◆ initialize()
StatusCode SCT_ModuleVetoTool::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 39 of file SCT_ModuleVetoTool.cxx.
41 ATH_MSG_INFO(
"Layer/Disk masking enabled, but no layer/disk specified!");
46 ATH_MSG_INFO(
"Layer/Disk to mask specified, but masking is disabled!");
50 ATH_MSG_INFO(
"Layer/Disk side to mask specified, but masking is disabled!");
59 return StatusCode::FAILURE;
71 return StatusCode::FAILURE;
78 const std::string databaseUseString{
m_useDatabase ?
"" :
"not "};
81 <<
" elements declared bad. Database will " << databaseUseString <<
"be used.");
83 return StatusCode::SUCCESS;
◆ isGood() [1/4]
Definition at line 98 of file SCT_ModuleVetoTool.cxx.
110 if (condData==
nullptr)
return true;
113 return (not condData->isBadWaferId(waferId));
◆ isGood() [2/4]
Is the detector element good?
Definition at line 117 of file SCT_ModuleVetoTool.cxx.
118 const EventContext& ctx{Gaudi::Hive::currentContext()};
119 return isGood(elementId, ctx,
h);
◆ isGood() [3/4]
is it good?, using wafer hash
Definition at line 129 of file SCT_ModuleVetoTool.cxx.
130 const EventContext& ctx{Gaudi::Hive::currentContext()};
131 return isGood(hashId, ctx);
◆ isGood() [4/4]
◆ m_badElements
StringArrayProperty SCT_ModuleVetoTool::m_badElements {this, "BadModuleIdentifiers", {}, "list of bad detector elements (= module sides)"} |
|
private |
◆ m_condKey
◆ m_disksToMask
IntegerArrayProperty SCT_ModuleVetoTool::m_disksToMask {this, "DisksToMask", {}, "Which endcap disks to mask out, goes from -N+1 to N+1 , skipping zero"} |
|
private |
◆ m_JsonLocation
StringProperty SCT_ModuleVetoTool::m_JsonLocation {this, "JsonPath", "", "Path to the JSON file containing list of modules to be masked."} |
|
private |
◆ m_layersToMask
IntegerArrayProperty SCT_ModuleVetoTool::m_layersToMask {this, "LayersToMask", {}, "Which barrel layers to mask out, goes from 0 to N-1"} |
|
private |
◆ m_localCondData
◆ m_maskLayers
BooleanProperty SCT_ModuleVetoTool::m_maskLayers {this, "MaskLayers", false, "Mask full layers/disks in overlay"} |
|
private |
◆ m_maskSide
IntegerProperty SCT_ModuleVetoTool::m_maskSide {this, "MaskSide", -1, "Mask full modules (-1), inner (0) or outer (1) sides"} |
|
private |
◆ m_pHelper
◆ m_useDatabase
bool SCT_ModuleVetoTool::m_useDatabase {false} |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
char data[hepevt_bytes_allocation_ATLAS]
const std::vector< bool > & getElementStatus() const
std::string find(const std::string &s)
return a remapped string
void setFilled()
Set data filled.
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
const std::string & key() const
Return the StoreGate ID for the referenced object.
Class for data object used in SCT_ModuleVetoCondAlg, SCT_LinkMaskingCondAlg, SCT_ModuleVetoTool,...
::StatusCode StatusCode
StatusCode definition for legacy code.
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
long unsigned int size() const
Get the number of bad wafers.
size_type wafer_hash_max(void) const
int layer_disk(const Identifier &id) const
StatusCode initialize(bool used=true)
const std::set< Identifier > & badWaferIds() const
bool isBadWaferId(const Identifier waferId) const
Check if a wafer ID is bad or not.
#define ATH_MSG_WARNING(x)
int side(const Identifier &id) const
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
void addDependency(const EventIDRange &range)
bool setBadWaferId(const Identifier waferId)
Set a bad wafer ID.