ATLAS Offline Software
Loading...
Searching...
No Matches
PixelRDOTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6// PixelRDOTool.h
8// (c) ATLAS Detector software
10
11#ifndef SICLUSTERIZATIONTOOL_PIXELRDOTOOL_H
12#define SICLUSTERIZATIONTOOL_PIXELRDOTOOL_H
13
14//#include "GaudiKernel/AlgTool.h"
17#include "GaudiKernel/ToolHandle.h"
22
24template <class T> class ServiceHandle;
25
26namespace InDetDD {
28}
29namespace InDet {
30
32
34 public:
35
36 UnpackedPixelRDO(int ncl, int row, int col, int tot, int lvl1, Identifier id):
37 NCL(ncl), ROW(row), COL(col), TOT(tot), LVL1(lvl1), ID(id) {};
38
39 int NCL;
40 int ROW;
41 int COL;
42 int TOT;
43 int LVL1;
45};
46
47
48class PixelRDOTool : public AthAlgTool
49{
50
51public:
53 (const std::string& type,
54 const std::string& name,
55 const IInterface* parent);
56
57 virtual ~PixelRDOTool() = default;
58 virtual StatusCode initialize();
59
60 // Produces a vector of validated unpacked pixel RDOs
61 std::vector<UnpackedPixelRDO>
63 const PixelID& pixelID,
64 const InDetDD::SiDetectorElement* element,
65 const EventContext& ctx,
66 int defaultLabel = -1) const;
67
68 // Determines if a pixel cell (whose identifier is the first argument) is
69 // a ganged pixel. If this is the case, the last argument assumes the
70 // value of the identifier of the cell it is ganged with.
71 // The second argument is the pixel module the hit belongs to.
72 static std::optional<Identifier>
73 isGanged(const Identifier& rdoID,
74 const InDetDD::SiDetectorElement* element);
75
76 // Method to check if an RDO is duplicated.
77 // If it is, update lvl1 value.
78 bool checkDuplication(const PixelID& pixelID,
79 const Identifier& rdoID,
80 const int lvl1,
81 std::vector<UnpackedPixelRDO>& collectionID) const;
82
83 const InDet::SiDetectorElementStatus* getPixelDetElStatus(const EventContext& ctx) const;
84
85 // Check if we have a valid RDO collection. If so, return pointer
86 // to corresponding detector element.
89 const EventContext& ctx) const;
90
91
92private:
93 // Same method to check for a pixel in a good state, but with less id look-ups
94 bool isGoodRDO(const InDet::SiDetectorElementStatus *pixelDetElStatus,
95 const IdentifierHash& moduleHash,
96 const InDetDD::PixelModuleDesign &pixel_design,
97 const Identifier& rdoID,
98 const EventContext& ctx,
99 const IInDetConditionsTool::IDCCacheEntry* cacheEntry) const;
100
101 ToolHandle<IInDetConditionsTool> m_summaryTool {
102 this,
103 "PixelConditionsSummaryTool",
104 "PixelConditionsSummaryTool",
105 "Tool to retrieve Pixel Conditions summary"
106 };
107
114 this,
115 "PixelDetElStatus",
116 "" ,
117 "Key of SiDetectorElementStatus for Pixel"
118 };
119
120 const PixelID* m_pixelId = nullptr;
121
122 BooleanProperty m_checkDuplicatedRDO {
123 this,
124 "CheckDuplicatedRDO",
125 false,
126 "Check duplicated RDOs using isDuplicated method"
127 };
128
129 BooleanProperty m_printDuplicate {
130 this,
131 "PrintDuplicate",
132 true,
133 "Print duplicate RDO warning"
134 };
135
136 BooleanProperty m_checkGanged {
137 this,
138 "CheckGanged",
139 true,
140 "Check for ganged pixels when unpacking the RDOs"
141 };
142
143
144 BooleanProperty m_useModuleMap {
145 this,
146 "UsePixelModuleMap",
147 true,
148 "Use bad modules map"
149 };
150
151 BooleanProperty m_isITk {
152 this,
153 "isITk",
154 false,
155 "Toggle specific checks for ITk RDO data"
156 };
157
159 this,
160 "PixelDetEleCollKey",
161 "PixelDetectorElementCollection",
162 "Key of SiDetectorElementCollection for Pixel"
163 };
164
165
166};
167
168}
169#endif // SICLUSTERIZATIONTOOL_PIXELRDOTOOL_H
This is an Identifier helper class for the Pixel subdetector.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Interface class for service providing summary of status of a detector element.
This is a "hash" representation of an Identifier.
Class used to describe the design of a module (diode segmentation and readout scheme)
Class to hold geometrical description of a silicon detector element.
PixelRDOTool(const std::string &type, const std::string &name, const IInterface *parent)
BooleanProperty m_useModuleMap
std::vector< UnpackedPixelRDO > getUnpackedPixelRDOs(const InDetRawDataCollection< PixelRDORawData > &collection, const PixelID &pixelID, const InDetDD::SiDetectorElement *element, const EventContext &ctx, int defaultLabel=-1) const
BooleanProperty m_isITk
virtual ~PixelRDOTool()=default
const PixelID * m_pixelId
const InDetDD::SiDetectorElement * checkCollection(const InDetRawDataCollection< PixelRDORawData > &collection, const EventContext &ctx) const
bool isGoodRDO(const InDet::SiDetectorElementStatus *pixelDetElStatus, const IdentifierHash &moduleHash, const InDetDD::PixelModuleDesign &pixel_design, const Identifier &rdoID, const EventContext &ctx, const IInDetConditionsTool::IDCCacheEntry *cacheEntry) const
bool checkDuplication(const PixelID &pixelID, const Identifier &rdoID, const int lvl1, std::vector< UnpackedPixelRDO > &collectionID) const
BooleanProperty m_printDuplicate
virtual StatusCode initialize()
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
SG::ReadHandleKey< InDet::SiDetectorElementStatus > m_pixelDetElStatus
Optional read handle to get status data to test whether a pixel detector element is good.
BooleanProperty m_checkDuplicatedRDO
ToolHandle< IInDetConditionsTool > m_summaryTool
const InDet::SiDetectorElementStatus * getPixelDetElStatus(const EventContext &ctx) const
static std::optional< Identifier > isGanged(const Identifier &rdoID, const InDetDD::SiDetectorElement *element)
BooleanProperty m_checkGanged
UnpackedPixelRDO(int ncl, int row, int col, int tot, int lvl1, Identifier id)
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
Property holding a SG store/key/clid from which a ReadHandle is made.
Message Stream Member.
Primary Vertex Finder.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...