ATLAS Offline Software
Loading...
Searching...
No Matches
SCT_ModuleVetoTool.h
Go to the documentation of this file.
1// -*- C++ -*-
2
3/*
4 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5*/
6
12
13#ifndef SCT_ModuleVetoTool_h
14#define SCT_ModuleVetoTool_h
15
16//Athena includes
19
22
23//Gaudi includes
24#include "GaudiKernel/EventContext.h"
25
26//STL includes
27#include <vector>
28
29//forward declarations
30class SCT_ID;
31
36class SCT_ModuleVetoTool: public extends<AthAlgTool, ISCT_ConditionsTool> {
37 public:
38 //@name Tool methods
40 SCT_ModuleVetoTool(const std::string& type, const std::string& name, const IInterface* parent);
41 virtual ~SCT_ModuleVetoTool() = default;
42 virtual StatusCode initialize() override;
43 virtual StatusCode finalize() override;
45
47 virtual bool canReportAbout(InDetConditions::Hierarchy h) const override;
48
50 virtual bool isGood(const Identifier& elementId, const EventContext& ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override;
51
53 virtual bool isGood(const IdentifierHash& hashId, const EventContext& ctx) const override;
54 virtual void getDetectorElementStatus(const EventContext& ctx, InDet::SiDetectorElementStatus &element_status,
56
57 private:
58 StringArrayProperty m_badElements{this, "BadModuleIdentifiers", {}, "list of bad detector elements (= module sides)"};
60 const SCT_ID* m_pHelper{nullptr};
61 bool m_useDatabase{false};
62 StringProperty m_JsonLocation {this, "JsonPath", "", "Path to the JSON file containing list of modules to be masked."};
63 BooleanProperty m_maskLayers{this, "MaskLayers", false, "Mask full layers/disks in overlay"};
64 IntegerProperty m_maskSide{this, "MaskSide", -1, "Mask full modules (-1), inner (0) or outer (1) sides"};
65 IntegerArrayProperty m_layersToMask{this, "LayersToMask", {}, "Which barrel layers to mask out, goes from 0 to N-1"};
66 IntegerArrayProperty m_disksToMask{this, "DisksToMask", {}, "Which endcap disks to mask out, goes from -N+1 to N+1 , skipping zero"};
67
68 // ReadCondHandleKey
69 SG::ReadCondHandleKey<SCT_ModuleVetoCondData> m_condKey{this, "CondKey", "SCT_ModuleVetoCondData", "SCT modules to be vetoed"};
70 // Fill data from m_badElements
71 StatusCode fillData();
72 // Provides SCT_ModuleVetoCondData pointer
73 const SCT_ModuleVetoCondData* getCondData(const EventContext& ctx) const;
74
75};
76
77#endif // SCT_ModuleVetoTool_h
header file for baseclass of SCT conditions tools
Header containing the InDetHierarchy enum, to avoid pulling in a class every time it is needed and na...
header file for data object for SCT_ModuleVetoCondAlg, SCT_LinkMaskingCondAlg, SCT_ModuleVetoTool,...
Header file for AthHistogramAlgorithm.
This is a "hash" representation of an Identifier.
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Class for data object used in SCT_ModuleVetoCondAlg, SCT_LinkMaskingCondAlg, SCT_ModuleVetoTool,...
SG::ReadCondHandleKey< SCT_ModuleVetoCondData > m_condKey
IntegerProperty m_maskSide
StringProperty m_JsonLocation
SCT_ModuleVetoTool(const std::string &type, const std::string &name, const IInterface *parent)
IntegerArrayProperty m_disksToMask
virtual bool isGood(const Identifier &elementId, const EventContext &ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override
Is the detector element good?
virtual StatusCode finalize() override
virtual bool canReportAbout(InDetConditions::Hierarchy h) const override
Can the service report about the given component? (chip, module...).
StringArrayProperty m_badElements
const SCT_ID * m_pHelper
SCT_ModuleVetoCondData m_localCondData
IntegerArrayProperty m_layersToMask
virtual ~SCT_ModuleVetoTool()=default
const SCT_ModuleVetoCondData * getCondData(const EventContext &ctx) const
BooleanProperty m_maskLayers
virtual StatusCode initialize() override
virtual void getDetectorElementStatus(const EventContext &ctx, InDet::SiDetectorElementStatus &element_status, SG::WriteCondHandle< InDet::SiDetectorElementStatus > *whandle) const override