ATLAS Offline Software
Loading...
Searching...
No Matches
PixelDefectsEmulatorAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef InDet_PixelDefectsEmulatorAlg_H
5#define InDet_PixelDefectsEmulatorAlg_H
6
12
13namespace InDet {
14 template <>
16 using ID_Helper = const PixelID *;
17 struct IDAdapter {
19
20 IDAdapter(ID_Helper helper) : m_idHelper(helper) {}
21 int row_index(const Identifier &rdoID) const { return m_idHelper->phi_index(rdoID); }
22 int col_index(const Identifier &rdoID) const { return m_idHelper->eta_index(rdoID); }
23
24 template <typename T_ModuleHelper>
25 std::unique_ptr<Pixel1RawData> createNoiseHit(const T_ModuleHelper &helper, const Identifier &identifier, unsigned int cell_idx, unsigned int tot) {
26 unsigned int row_aka_phi=cell_idx % helper.rows();
27 unsigned int col_aka_eta=cell_idx / helper.rows();
28 return std::make_unique<Pixel1RawData>( m_idHelper->pixel_id(identifier,row_aka_phi, col_aka_eta),
29 tot,
30 0 /*BCID*/,
31 0 /*LVL1*/);
32 }
33 unsigned int cloneOrRejectHit( const PixelModuleHelper &module_helper,
34 const PixelEmulatedDefects &emulated_defects,
35 unsigned int idHash,
36 unsigned int row_idx,
37 unsigned int col_idx,
38 const PixelRDORawData &rdo,
40 unsigned int n_new=0u;
41 if (!emulated_defects.isDefect(module_helper, idHash, row_idx, col_idx)) {
42 dest.push_back(std::make_unique<Pixel1RawData>(dynamic_cast<const Pixel1RawData &>(rdo)).release() );
43 ++n_new;
44 }
45 return n_new;
46 }
47
48 };
53
55 };
56
62 class PixelDefectsEmulatorAlg :public DefectsEmulatorAlg<PixelRDO_Container>
63 {
64 public:
66 };
67}
68#endif
This is an Identifier helper class for the Pixel subdetector.
InDetRawDataContainer< InDetRawDataCollection< PixelRDORawData > > PixelRDO_Container
Class used to describe the design of a module (diode segmentation and readout scheme)
Algorithm template to selectivly copy RDOs from an InDetRawDataCollection.
bool isDefect(const T_ModuleHelper &helper, unsigned int id_hash, KEY_TYPE key) const
Test whether a pixel or strip on a certain module is marked as defect.
Algorithm which selectively copies hits from an input PixelRDO_Container.
Specialization of emulated defects conditions data for ITk pixels Defect conditions data for defects ...
Helper class to convert between offline column, row and hardware chip, column, row coordinates.
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
static std::string release
Definition computils.h:50
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
@ Pixel
Inner detector legacy.
Primary Vertex Finder.
std::unique_ptr< Pixel1RawData > createNoiseHit(const T_ModuleHelper &helper, const Identifier &identifier, unsigned int cell_idx, unsigned int tot)
unsigned int cloneOrRejectHit(const PixelModuleHelper &module_helper, const PixelEmulatedDefects &emulated_defects, unsigned int idHash, unsigned int row_idx, unsigned int col_idx, const PixelRDORawData &rdo, InDetRawDataCollection< PixelRDORawData > &dest)
static constexpr ActsTrk::DetectorType DETECTOR_TYPE