59 [
this](
edm::InputTag const&
tag) { return consumes<DetIdCollection>(tag); });
75 edm::LogError(
"ReducedRecHitCollectionProducer") <<
"VInputTag collections empty";
81 std::vector<DetId> xtalsToStore((*detIds).size());
82 std::copy((*detIds).begin(), (*detIds).end(), xtalsToStore.begin());
91 edm::LogError(
"MissingInput") <<
"no reason to skip detid from : (" <<
labels.module <<
", "
92 <<
labels.productInstance <<
", " <<
labels.process <<
")" << std::endl;
96 for (
unsigned int ii = 0;
ii < (*detId).size();
ii++) {
97 if (
std::find(xtalsToStore.begin(), xtalsToStore.end(), (*detId)[
ii]) == xtalsToStore.end())
98 xtalsToStore.push_back((*detId)[
ii]);
104 if (!recHitsHandle.
isValid()) {
105 edm::LogError(
"ReducedRecHitCollectionProducer") <<
"RecHit collection not found";
110 auto miniRecHitCollection = std::make_unique<EcalRecHitCollection>();
112 for (
unsigned int iCry = 0; iCry < xtalsToStore.size(); iCry++) {
114 if ((iRecHit != recHitsHandle->
end()) &&
115 (miniRecHitCollection->find(xtalsToStore[iCry]) == miniRecHitCollection->end()))
116 miniRecHitCollection->push_back(*iRecHit);
119 std::sort(xtalsToStore.begin(), xtalsToStore.end());
120 std::unique(xtalsToStore.begin(), xtalsToStore.end());