82 caloTopologyToken_ = esConsumes<CaloTopology, CaloTopologyRecord, edm::Transition::BeginRun>();
83 severityLevelToken_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd, edm::Transition::BeginRun>();
89 edm::LogError(
"InterestingDetIdFromSuperClusterProducerError") <<
"Size of eta/phi should be odd numbers";
98 nextToDeadToken_ = esConsumes<EcalNextToDeadChannel, EcalNextToDeadChannelRcd>();
124 std::vector<DetId> indexToStore;
125 indexToStore.reserve(1000);
127 reco::SuperClusterCollection::const_iterator sclusIt;
129 std::vector<DetId> xtalsToStore;
130 xtalsToStore.reserve(50);
133 for (sclusIt = pClusters->begin(); sclusIt != pClusters->end(); sclusIt++) {
141 std::vector<std::pair<DetId, float> > clusterDetIds = (*clusIt)->hitsAndFractions();
142 std::vector<std::pair<DetId, float> >::iterator posCurrent;
146 for (posCurrent = clusterDetIds.begin(); posCurrent != clusterDetIds.end(); posCurrent++) {
148 if ((!((*posCurrent).first.null())) && (itt != recHitsHandle->
end()) && ((*itt).energy() >
eMax)) {
149 eMax = (*itt).energy();
150 eMaxId = (*itt).id();
160 std::vector<std::pair<DetId, float> > xtalsInClus = (*clusIt)->hitsAndFractions();
162 for (
unsigned int ii = 0;
ii < xtalsInClus.size();
ii++) {
163 xtalsToStore.push_back(xtalsInClus[
ii].
first);
166 indexToStore.insert(indexToStore.end(), xtalsToStore.begin(), xtalsToStore.end());
173 indexToStore.push_back(it->id());
177 indexToStore.push_back(it->id());
183 indexToStore.push_back(it->id());
191 if (
abs(ebid.ieta()) == 85)
192 indexToStore.push_back(it->id());
195 indexToStore.push_back(it->id());
201 std::sort(indexToStore.begin(), indexToStore.end());
202 std::unique(indexToStore.begin(), indexToStore.end());
204 auto detIdCollection = std::make_unique<DetIdCollection>(indexToStore);