Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef INDET_EMULATEDDEFECTS_H
5 #define INDET_EMULATEDDEFECTS_H
23 template <
class T_ModuleHelper>
24 class EmulatedDefects :
public std::vector<std::vector< typename T_ModuleHelper::KEY_TYPE> >
27 static constexpr
unsigned int MASK_FOR_COMPARISON = T_ModuleHelper::CHIP_MASK | T_ModuleHelper::ROW_MASK | T_ModuleHelper::COL_MASK;
29 using KEY_TYPE =
typename T_ModuleHelper::KEY_TYPE;
62 return std::make_pair( std::lower_bound( module_defects.begin(),module_defects.end(),
key,
greater()),
63 module_defects.end());
73 std::pair< typename std::vector<KEY_TYPE>::const_iterator,
75 const std::vector<KEY_TYPE> &module_defects = this->at(id_hash);
76 return std::make_pair( std::lower_bound( module_defects.begin(),module_defects.end(),
key,
greater()),
77 module_defects.end());
89 return (defect_iter != end_iter &&
helper.isMatchingDefect( *defect_iter,
key) );
100 bool isDefect(
const T_ModuleHelper &
helper,
unsigned int id_hash,
unsigned int row_idx_aka_phi,
unsigned int col_idx_aka_eta)
const {
101 return isDefect(
helper, id_hash,
helper.hardwareCoordinates(row_idx_aka_phi, col_idx_aka_eta) );
132 std::vector<std::vector< typename T_ModuleHelper::KEY_TYPE> >
::resize(n_modules);
JetConstituentVector::iterator iterator
void setModuleDefect(unsigned int id_hash)
Mark the specified module as defect.
Special greater operator which ignores the column group flag in the comparison.
bool operator()(KEY_TYPE key_a, KEY_TYPE key_b)
static constexpr bool s_needMasking
bool greater(double a, double b)
Compare two FP numbers, working around x87 precision issues.
typename T_ModuleHelper::KEY_TYPE KEY_TYPE
void resize(std::size_t n_modules)
Resize data structures for this number of modules.
const InDetDD::SiDetectorElement & getDetectorElement(unsigned int id_hash) const
Return the detector element for the given ID hash.
std::pair< typename std::vector< KEY_TYPE >::const_iterator, typename std::vector< KEY_TYPE >::const_iterator > lower_bound(unsigned int id_hash, KEY_TYPE key) const
Convenience method to find the preceding defect.
static constexpr unsigned int MASK_FOR_COMPARISON
static std::pair< typename std::vector< KEY_TYPE >::iterator, typename std::vector< KEY_TYPE >::iterator > lower_bound(std::vector< KEY_TYPE > &module_defects, KEY_TYPE key)
Convenience method to find the preceding defect.
bool isModuleDefect(unsigned int id_hash) const
Return true if the module defined by the given ID hash is defect.
bool isDefect(const T_ModuleHelper &helper, unsigned int id_hash, unsigned int row_idx_aka_phi, unsigned int col_idx_aka_eta) const
Test whether a pixel on a certain module is marked as defect.
const InDetDD::SiDetectorElementCollection & getDetectorElementCollection() const
Return the detector element collection.
Data structure do mark e.g.
EmulatedDefects(const InDetDD::SiDetectorElementCollection &detector_elements)
const InDetDD::SiDetectorElementCollection * m_detectorElements
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.
std::vector< bool > m_moduleIsDefect