17#include <boost/container/flat_set.hpp>
23 const std::string &name,
24 const IInterface *parent) :
42 return StatusCode::SUCCESS;
46 std::optional<Identifier>
62 const Identifier& rdoID,
const EventContext& ctx,
66 std::array<InDetDD::PixelDiodeTree::CellIndexType,2> diode_idx
70 std::uint32_t feValue = design.
getFE(si_param);
74 pixelDetElStatus ? pixelDetElStatus->
isChipGood(moduleHash,feValue) :
false,
81 if (pixelDetElStatus) {
83 return pixelDetElStatus->
isChipGood(moduleHash, feValue);
85 return m_summaryTool->isGood(moduleHash, rdoID, ctx, cacheEntry);
93 std::vector<UnpackedPixelRDO>& collectionID)
const
103 const auto pDuplicate = std::find_if(collectionID.begin(), collectionID.end(),isDuplicate);
104 const bool foundDuplicate {pDuplicate != collectionID.end()};
106 pDuplicate->LVL1 = std::max(pDuplicate->LVL1, lvl1);
108 return foundDuplicate;
119 if (!status.isValid()) {
120 std::stringstream
msg;
122 throw std::runtime_error(
msg.str());
124 return status.cptr();
132 const unsigned int RDO_size = collection.
size();
141 if (pixelDetElStatus){
145 pixelDetElStatus->
isGood(idHash),
156 if (not pixelDetEleHandle.
isValid() or pixelDetEle ==
nullptr) {
165 ATH_MSG_ERROR(
"Dynamic cast failed at "<<__LINE__<<
" of PixelRDOTool.cxx.");
172 std::vector<UnpackedPixelRDO>
176 const EventContext& ctx,
177 int defaultLabel)
const
179 std::vector<UnpackedPixelRDO> unpacked;
180 unpacked.reserve(collection.
size());
192 boost::container::flat_set<Identifier> idset;
194 for(
const auto *
const rdo : collection) {
205 const int lvl1 = rdo->getLVL1A();
209 if (not idset.insert(rdoID).second) {
220 const int tot = rdo->getToT();
222 unpacked.emplace_back(
233 std::optional<Identifier> gangedID =
isGanged(rdoID, element);
234 if (gangedID.has_value()) {
235 unpacked.emplace_back(
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
This is an Identifier helper class for the Pixel subdetector.
#define VALIDATE_STATUS_ARRAY(use_info, info_val, summary_val)
#define VALIDATE_STATUS_ARRAY_ACTIVATED
const ServiceHandle< StoreGateSvc > & detStore() const
size_type size() const noexcept
Returns the number of elements in the collection.
This is a "hash" representation of an Identifier.
static constexpr std::array< PixelDiodeTree::CellIndexType, 2 > makeCellIndex(T local_x_idx, T local_y_idx)
Create a 2D cell index from the indices in local-x (phi, row) and local-y (eta, column) direction.
Class used to describe the design of a module (diode segmentation and readout scheme)
PixelDiodeTree::DiodeProxyWithPosition diodeProxyFromIdxCachePosition(const std::array< PixelDiodeTree::IndexType, 2 > &idx) const
static unsigned int getFE(const PixelDiodeTree::DiodeProxy &diode_proxy)
Identifier for the strip or pixel cell.
Class to hold the SiDetectorElement objects to be put in the detector store.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Class to hold geometrical description of a silicon detector element.
virtual SiCellId cellIdFromIdentifier(const Identifier &identifier) const override final
SiCellId from Identifier.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
virtual Identifier identifierFromCellId(const SiCellId &cellId) const override final
Identifier <-> SiCellId (ie strip number or pixel eta_index,phi_index) Identifier from SiCellId (ie s...
SiCellId connectedCell(const SiCellId cellId, int number) const
Get the cell ids sharing the readout for this cell.
int numberOfConnectedCells(const SiCellId cellId) const
Test if readout cell has more than one diode associated with it.
Trk::Surface & surface()
Element Surface.
virtual IdentifierHash identifyHash() const override final
bool isChipGood(IdentifierHash hash, unsigned int chip) const
bool isGood(IdentifierHash hash) const
This is an Identifier helper class for the Pixel subdetector.
int eta_index(const Identifier &id) const
int phi_index(const Identifier &id) const
Bounds for a rectangular, planar surface.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
A diode proxy which caches the position of a diode.