Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
7 #include "DefectsEmulatorAlg.h"
9 #include "PixelEmulatedDefects.h"
12 
13 namespace 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 
54  static constexpr ActsTrk::DetectorType DETECTOR_TYPE = ActsTrk::DetectorType::Pixel;
55  };
56 
62  class PixelDefectsEmulatorAlg :public DefectsEmulatorAlg<PixelRDO_Container>
63  {
64  public:
66  };
67 }
68 #endif
PixelID.h
This is an Identifier helper class for the Pixel subdetector. This class is a factory for creating co...
PixelID::phi_index
int phi_index(const Identifier &id) const
Definition: PixelID.h:658
InDetDD::PixelModuleDesign
Definition: PixelModuleDesign.h:48
ActsTrk::DetectorType
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
Definition: GeometryDefs.h:17
InDet::PixelModuleHelper
Helper class to convert between offline column, row and hardware chip, column, row coordinates.
Definition: PixelModuleHelper.h:22
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::DefectsEmulatorTraits< PixelRDO_Container >::IDAdapter::m_idHelper
ID_Helper m_idHelper
Definition: PixelDefectsEmulatorAlg.h:18
InDet::DefectsEmulatorTraits< PixelRDO_Container >::IDAdapter::row_index
int row_index(const Identifier &rdoID) const
Definition: PixelDefectsEmulatorAlg.h:21
perfmonmt-printer.dest
dest
Definition: perfmonmt-printer.py:189
InDetRawDataContainer
Definition: InDetRawDataContainer.h:27
xAOD::identifier
identifier
Definition: UncalibratedMeasurement_v1.cxx:15
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
runBeamSpotCalibration.helper
helper
Definition: runBeamSpotCalibration.py:112
ActsTrk::DetectorType::Pixel
@ Pixel
Inner detector legacy.
DefectsEmulatorAlg.h
InDet::DefectsEmulatorTraits< PixelRDO_Container >::IDAdapter::cloneOrRejectHit
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)
Definition: PixelDefectsEmulatorAlg.h:33
InDetRawDataCollection
Definition: InDetRawDataCollection.h:31
Pixel1RawData
Definition: Pixel1RawData.h:23
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
InDet::PixelEmulatedDefects
Specialization of emulated defects conditions data for ITk pixels Defect conditions data for defects ...
Definition: PixelEmulatedDefects.h:15
InDet::PixelDefectsEmulatorAlg
Algorithm which selectively copies hits from an input PixelRDO_Container.
Definition: PixelDefectsEmulatorAlg.h:63
python.EventInfoMgtInit.release
release
Definition: EventInfoMgtInit.py:24
InDet::DefectsEmulatorTraits
Definition: DefectsEmulatorAlg.h:16
PixelEmulatedDefects.h
PixelRDO_Container.h
InDet::DefectsEmulatorTraits< PixelRDO_Container >::IDAdapter::col_index
int col_index(const Identifier &rdoID) const
Definition: PixelDefectsEmulatorAlg.h:22
PixelModuleDesign.h
PixelID::pixel_id
Identifier pixel_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
Definition: PixelID.h:432
InDet::DefectsEmulatorAlg
Algorithm template to selectivly copy RDOs from an InDetRawDataCollection.
Definition: DefectsEmulatorAlg.h:24
InDet::DefectsEmulatorTraits< PixelRDO_Container >::IDAdapter::IDAdapter
IDAdapter(ID_Helper helper)
Definition: PixelDefectsEmulatorAlg.h:20
PixelRDORawData
Definition: PixelRDORawData.h:23
InDet::EmulatedDefects::isDefect
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.
Definition: EmulatedDefects.h:87
InDet::DefectsEmulatorTraits< PixelRDO_Container >::IDAdapter::createNoiseHit
std::unique_ptr< Pixel1RawData > createNoiseHit(const T_ModuleHelper &helper, const Identifier &identifier, unsigned int cell_idx, unsigned int tot)
Definition: PixelDefectsEmulatorAlg.h:25
PixelID
Definition: PixelID.h:67
Identifier
Definition: IdentifierFieldParser.cxx:14