31 edm::LogError(
"InterestingDetIdFromSuperClusterProducerError") <<
"Size of eta/phi should be odd numbers";
65 std::vector<DetId> indexToStore;
66 indexToStore.reserve(1000);
68 reco::SuperClusterCollection::const_iterator sclusIt;
70 std::vector<DetId> xtalsToStore;
71 xtalsToStore.reserve(50);
74 for (sclusIt = pClusters->begin(); sclusIt != pClusters->end(); sclusIt++) {
82 std::vector<std::pair<DetId, float> > clusterDetIds = (*clusIt)->hitsAndFractions();
83 std::vector<std::pair<DetId, float> >::iterator posCurrent;
87 for (posCurrent = clusterDetIds.begin(); posCurrent != clusterDetIds.end(); posCurrent++) {
89 if ((!((*posCurrent).first.null())) && (itt != recHitsHandle->
end()) && ((*itt).energy() >
eMax)) {
90 eMax = (*itt).energy();
101 std::vector<std::pair<DetId, float> > xtalsInClus = (*clusIt)->hitsAndFractions();
103 for (
unsigned int ii = 0;
ii < xtalsInClus.size();
ii++) {
104 xtalsToStore.push_back(xtalsInClus[
ii].
first);
107 indexToStore.insert(indexToStore.end(), xtalsToStore.begin(), xtalsToStore.end());
114 indexToStore.push_back(it->id());
118 indexToStore.push_back(it->id());
123 indexToStore.push_back(it->id());
131 if (
abs(ebid.ieta()) == 85)
132 indexToStore.push_back(it->id());
135 indexToStore.push_back(it->id());
141 std::sort(indexToStore.begin(), indexToStore.end());
142 std::unique(indexToStore.begin(), indexToStore.end());
144 auto detIdCollection = std::make_unique<DetIdCollection>(indexToStore);