19 caloTopologyToken_ = esConsumes<CaloTopology, CaloTopologyRecord, edm::Transition::BeginRun>();
20 severityLevelToken_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd, edm::Transition::BeginRun>();
26 edm::LogError(
"InterestingDetIdFromSuperClusterProducerError") <<
"Size of eta/phi should be odd numbers";
35 nextToDeadToken_ = esConsumes<EcalNextToDeadChannel, EcalNextToDeadChannelRcd>();
61 std::vector<DetId> indexToStore;
62 indexToStore.reserve(1000);
64 reco::SuperClusterCollection::const_iterator sclusIt;
66 std::vector<DetId> xtalsToStore;
67 xtalsToStore.reserve(50);
70 for (sclusIt = pClusters->begin(); sclusIt != pClusters->end(); sclusIt++) {
78 std::vector<std::pair<DetId, float> > clusterDetIds = (*clusIt)->hitsAndFractions();
79 std::vector<std::pair<DetId, float> >::iterator posCurrent;
83 for (posCurrent = clusterDetIds.begin(); posCurrent != clusterDetIds.end(); posCurrent++) {
85 if ((!((*posCurrent).first.null())) && (itt != recHitsHandle->
end()) && ((*itt).energy() >
eMax)) {
86 eMax = (*itt).energy();
97 std::vector<std::pair<DetId, float> > xtalsInClus = (*clusIt)->hitsAndFractions();
99 for (
unsigned int ii = 0;
ii < xtalsInClus.size();
ii++) {
100 xtalsToStore.push_back(xtalsInClus[
ii].
first);
103 indexToStore.insert(indexToStore.end(), xtalsToStore.begin(), xtalsToStore.end());
110 indexToStore.push_back(it->id());
114 indexToStore.push_back(it->id());
120 indexToStore.push_back(it->id());
128 if (
abs(ebid.ieta()) == 85)
129 indexToStore.push_back(it->id());
132 indexToStore.push_back(it->id());
138 std::sort(indexToStore.begin(), indexToStore.end());
139 std::unique(indexToStore.begin(), indexToStore.end());
141 auto detIdCollection = std::make_unique<DetIdCollection>(indexToStore);