26 [
this](
edm::InputTag const&
tag) { return consumes<DetIdCollection>(tag); });
42 edm::LogError(
"ReducedRecHitCollectionProducer") <<
"VInputTag collections empty";
48 std::vector<DetId> xtalsToStore((*detIds).size());
49 std::copy((*detIds).begin(), (*detIds).end(), xtalsToStore.begin());
58 edm::LogError(
"MissingInput") <<
"no reason to skip detid from : (" <<
labels.module <<
", "
59 <<
labels.productInstance <<
", " <<
labels.process <<
")" << std::endl;
63 for (
unsigned int ii = 0;
ii < (*detId).size();
ii++) {
64 if (
std::find(xtalsToStore.begin(), xtalsToStore.end(), (*detId)[
ii]) == xtalsToStore.end())
65 xtalsToStore.push_back((*detId)[
ii]);
72 edm::LogError(
"ReducedRecHitCollectionProducer") <<
"RecHit collection not found";
77 auto miniRecHitCollection = std::make_unique<EcalRecHitCollection>();
79 for (
unsigned int iCry = 0; iCry < xtalsToStore.size(); iCry++) {
81 if ((iRecHit != recHitsHandle->
end()) &&
82 (miniRecHitCollection->find(xtalsToStore[iCry]) == miniRecHitCollection->end()))
83 miniRecHitCollection->push_back(*iRecHit);
86 std::sort(xtalsToStore.begin(), xtalsToStore.end());
87 std::unique(xtalsToStore.begin(), xtalsToStore.end());