5 #ifndef INDET_EMULATEDDEFECTS_H
6 #define INDET_EMULATEDDEFECTS_H
13 class SiDetectorElementCollection;
26 template <
class T_ModuleHelper>
30 static constexpr
unsigned int MASK_FOR_COMPARISON = T_ModuleHelper::CHIP_MASK | T_ModuleHelper::ROW_MASK | T_ModuleHelper::COL_MASK;
35 bool operator()(
unsigned int key_a,
unsigned int key_b) {
48 return std::make_pair( std::lower_bound( module_defects.begin(),module_defects.end(),
key,
greater()),
49 module_defects.end());
59 std::pair< std::vector<unsigned int>::const_iterator, std::vector<unsigned int>::const_iterator>
lower_bound(
unsigned int id_hash,
unsigned int key)
const {
60 const std::vector<unsigned int> &module_defects = this->at(id_hash);
61 return std::make_pair( std::lower_bound( module_defects.begin(),module_defects.end(),
key,
greater()),
62 module_defects.end());
74 return (defect_iter != end_iter &&
helper.isSameDefectWithGroups( *defect_iter,
key) );
85 bool isDefect(
const T_ModuleHelper &
helper,
unsigned int id_hash,
unsigned int row_idx_aka_phi,
unsigned int col_idx_aka_eta)
const {
86 unsigned int key =
helper.hardwareCoordinates(row_idx_aka_phi, col_idx_aka_eta);