Visit all detector elements connected to the same physical sensor which match the given pattern.
65 {
66 assert( id_hash < det_ele_coll.
size() );
70
71
72 if (det_ele->getMaterialGeom()) {
73 std::pair< std::unordered_multimap< unsigned int, unsigned int>::const_iterator,
74 std::unordered_multimap< unsigned int, unsigned int>::const_iterator >
75 childs = connected_modules.equal_range(det_ele->getMaterialGeom()->getId());
76 unsigned int other_side_id_hash = id_helper.get_other_side(det_ele->
identifyHash());
77 using ConnectedKey_t = unsigned int;
78 for (const std::pair<const ConnectedKey_t, unsigned int> &child : std::ranges::subrange(childs.first, childs.second)) {
79 assert( child.second < det_ele_coll.
size());
81 int side = id_helper.side( connected_det_ele->identify());
84 || child.second == other_side_id_hash)) {
85 assert(connected_det_ele);
86 visit_func(child.second, *connected_det_ele);
87 }
88 }
89 }
90 }
91 }
bool matchesAllModuleRowsOfSensor(const std::vector< int > &a_module_pattern)
Test whether a pattern matches all module rows of a sensor or just a single row.
bool matchesBothSides(const std::vector< int > &a_module_pattern)
Test whether the given pattern matches identifiers which refer to either side of a sensor.
bool isSideMatching(const std::vector< int > &a_module_pattern, int side)
Test whether the given pattern matches the given side.