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-2022 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, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override;
51 virtual bool isGood(const Identifier& elementId, const EventContext& ctx, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override;
52
54 virtual bool isGood(const IdentifierHash& hashId) const override;
55 virtual bool isGood(const IdentifierHash& hashId, const EventContext& ctx) const override;
56 virtual void getDetectorElementStatus(const EventContext& ctx, InDet::SiDetectorElementStatus &element_status,
58
59 private:
60 StringArrayProperty m_badElements{this, "BadModuleIdentifiers", {}, "list of bad detector elements (= module sides)"};
62 const SCT_ID* m_pHelper{nullptr};
63 bool m_useDatabase{false};
64 StringProperty m_JsonLocation {this, "JsonPath", "", "Path to the JSON file containing list of modules to be masked."};
65 BooleanProperty m_maskLayers{this, "MaskLayers", false, "Mask full layers/disks in overlay"};
66 IntegerProperty m_maskSide{this, "MaskSide", -1, "Mask full modules (-1), inner (0) or outer (1) sides"};
67 IntegerArrayProperty m_layersToMask{this, "LayersToMask", {}, "Which barrel layers to mask out, goes from 0 to N-1"};
68 IntegerArrayProperty m_disksToMask{this, "DisksToMask", {}, "Which endcap disks to mask out, goes from -N+1 to N+1 , skipping zero"};
69
70 // ReadCondHandleKey
71 SG::ReadCondHandleKey<SCT_ModuleVetoCondData> m_condKey{this, "CondKey", "SCT_ModuleVetoCondData", "SCT modules to be vetoed"};
72 // Fill data from m_badElements
73 StatusCode fillData();
74 // Provides SCT_ModuleVetoCondData pointer
75 const SCT_ModuleVetoCondData* getCondData(const EventContext& ctx) const;
76
77};
78
79#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 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
virtual bool isGood(const Identifier &elementId, InDetConditions::Hierarchy h=InDetConditions::DEFAULT) const override
Is the detector element good?
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