Specialization of emulated defects conditions data for ITk strips Defect conditions data for defects which use addresses created by the StripModuleHelper.
More...
#include <StripEmulatedDefects.h>
|
using | KEY_TYPE = typename T_ModuleHelper::KEY_TYPE |
|
|
void | resize (std::size_t n_modules) |
| Resize data structures for this number of modules. More...
|
|
Specialization of emulated defects conditions data for ITk strips Defect conditions data for defects which use addresses created by the StripModuleHelper.
Definition at line 14 of file StripEmulatedDefects.h.
◆ KEY_TYPE
◆ getDetectorElement()
Return the detector element for the given ID hash.
will throw a range_error if the ID hash is invalid.
Definition at line 149 of file EmulatedDefects.h.
◆ getDetectorElementCollection()
◆ getRange()
Convenience method to get a range of keys.
- Parameters
-
key_iter | a valid iterator to defects |
- Returns
- a range of defect keys or a pair of identical keys If the iterator is a range iterator return the start key and the key of the last element of this range otherwise the given key twice.
Definition at line 98 of file EmulatedDefects.h.
99 if (T_ModuleHelper::isRangeKey(*key_iter)) {
100 auto prev = key_iter;
102 return std::make_pair(*key_iter,*prev);
105 return std::make_pair(*key_iter,*key_iter);
◆ isDefect() [1/2]
Test whether a pixel or strip on a certain module is marked as defect.
- Parameters
-
helper | utility matching this defect data to check whether a defect overlaps with pixel coordinates. |
id_hash | a valid ID hash |
key | packed hardware coordinates of the pixel to be tested. |
- Returns
- true if this data structure contains a defect for this module which overlaps with the given pixel coordinates. Will throw a range_error if the ID hash is invalid.
Definition at line 116 of file EmulatedDefects.h.
118 return (defect_iter != end_iter) &&
helper.isMatchingDefect(*defect_iter,
key);
◆ isDefect() [2/2]
Test whether a pixel on a certain module is marked as defect.
- Parameters
-
helper | utility matching this defect data to check whether a defect overlaps with pixel coordinates. |
id_hash | a valid ID hash |
row_idx_aka_phi | the offline row aka phi index of a pixel |
col_idx_aka_eta | the offline column aka eta index of a pixel |
- Returns
- true if this data structure contains a defect for this module which overlaps with the given pixel coordinates Will throw a range_error if the ID hash is invalid.
Definition at line 129 of file EmulatedDefects.h.
130 return isDefect(
helper, id_hash,
helper.hardwareCoordinates(row_idx_aka_phi, col_idx_aka_eta) );
◆ isModuleDefect()
Return true if the module defined by the given ID hash is defect.
Will throw a range_error if ID hash is invalid.
Definition at line 136 of file EmulatedDefects.h.
◆ lower_bound() [1/3]
Convenience method to find the preceding defect (read only).
- Parameters
-
module_defects | the defect list of a particular module |
key | packed hardware coordinates addressing a single pixel or column group defect. |
- Returns
- pair of the iterator of the preceding element and the end iterator If there is no preceding defect then both returned iterators will be the end iterator
Definition at line 72 of file EmulatedDefects.h.
74 return std::make_pair( std::lower_bound( module_defects.begin(),module_defects.end(),
key,
greater()),
75 module_defects.end());
◆ lower_bound() [2/3]
Convenience method to find the preceding defect.
- Parameters
-
module_defects | the defect list of a particular module |
key | packed hardware coordinates addressing a single pixel or column group defect. |
- Returns
- pair of the iterator of the preceding element and the end iterator If there is no preceding defect then both returned iterators will be the end iterator
Definition at line 59 of file EmulatedDefects.h.
61 return std::make_pair( std::lower_bound( module_defects.begin(),module_defects.end(),
key,
greater()),
62 module_defects.end());
◆ lower_bound() [3/3]
Convenience method to find the preceding defect.
- Parameters
-
id_hash | a valid ID hash of a module. |
key | packed hardware coordinates addressing a single pixel or column group defect. |
- Returns
- pair of the iterator of the preceding element and the end iterator of the corresponding module If there is no preceding defect then both returned iterators will be the end iterator. Will throw a range_error if the ID hash is invalid.
Definition at line 86 of file EmulatedDefects.h.
87 const std::vector<KEY_TYPE> &module_defects = this->at(id_hash);
88 return std::make_pair( std::lower_bound( module_defects.begin(),module_defects.end(),
key,
greater()),
89 module_defects.end());
◆ resize()
Resize data structures for this number of modules.
Definition at line 160 of file EmulatedDefects.h.
161 std::vector<std::vector< typename T_ModuleHelper::KEY_TYPE> >
::resize(n_modules);
◆ setModuleDefect()
◆ elements
T std::vector< T >::elements |
|
inherited |
◆ m_detectorElements
◆ m_moduleIsDefect
◆ MASK_FOR_COMPARISON
◆ s_needMasking
The documentation for this class was generated from the following file: