11 const std::vector<bool>& rechitMask,
12 const std::vector<bool>& seedable,
14 const auto& hgcalMultiClusters = *
clusterH_;
18 std::unordered_map<uint32_t, size_t> detIdToIndex(
hits.size());
19 for (uint32_t
i = 0;
i <
hits.size(); ++
i) {
20 detIdToIndex[
hits[
i].detId()] =
i;
23 for (
const auto& mcl : hgcalMultiClusters) {
25 double energy = 0.0, highest_energy = 0.0;
28 for (
const auto&
cl : mcl) {
29 const auto& hitsAndFractions =
cl->hitsAndFractions();
30 for (
const auto& hAndF : hitsAndFractions) {
31 auto itr = detIdToIndex.find(hAndF.first);
32 if (
itr == detIdToIndex.end()) {
36 assert(ref->detId() == hAndF.first.rawId());
37 const double hit_energy = hAndF.second * ref->energy();
44 if (hit_energy > highest_energy || highest_energy == 0.0) {
45 highest_energy = hit_energy;