14 const std::vector<bool>& rechitMask,
15 const std::vector<bool>& seedable,
17 const auto& hgcalMultiClusters = *
clusterH_;
23 std::unordered_map<uint32_t, size_t> detIdToIndex(
hits.size());
24 for (uint32_t
i = 0;
i <
hits.size(); ++
i) {
25 detIdToIndex[
hits[
i].detId()] =
i;
29 for (
const auto& mcl : hgcalMultiClusters) {
32 if (mcl.hitsAndFractions().empty()) {
37 float probTotal = 0.0f;
39 probTotal += tracksters[iMultiClus].id_probabilities(
cat);
47 double energy = 0.0, highest_energy = 0.0;
50 const auto& hitsAndFractions_mcl = mcl.hitsAndFractions();
52 std::vector<std::pair<DetId, float> > hitsAndFractions;
53 hitsAndFractions.insert(hitsAndFractions.end(), hitsAndFractions_mcl.begin(), hitsAndFractions_mcl.end());
56 if (hitsAndFractions.empty()) {
57 for (
const auto&
cl : mcl) {
58 const auto& hAndF_temp =
cl->hitsAndFractions();
59 hitsAndFractions.insert(hitsAndFractions.end(), hAndF_temp.begin(), hAndF_temp.end());
63 for (
const auto& hAndF : hitsAndFractions) {
64 auto itr = detIdToIndex.find(hAndF.first);
65 if (itr == detIdToIndex.end()) {
69 assert(ref->detId() == hAndF.first.rawId());
70 const double hit_energy = hAndF.second * ref->energy();
77 if (hit_energy > highest_energy || highest_energy == 0.0) {
78 highest_energy = hit_energy;