51 edm::LogError(
"ReducedRecHitCollectionProducer") <<
"VInputTag collections empty" ;
58 std::vector<DetId> xtalsToStore((*detIds).size());
59 std::copy( (*detIds).begin() , (*detIds).end() , xtalsToStore.begin() );
71 for (
unsigned int ii=0;
ii<(*detId).size();
ii++)
73 if (
std::find(xtalsToStore.begin(),xtalsToStore.end(),(*detId)[
ii]) == xtalsToStore.end())
74 xtalsToStore.push_back((*detId)[
ii]);
80 if( !recHitsHandle.isValid() )
82 edm::LogError(
"ReducedRecHitCollectionProducer") <<
"RecHit collection not found";
89 for (
unsigned int iCry=0;iCry<xtalsToStore.size();iCry++)
92 if ( (iRecHit != recHitsHandle->end()) && (miniRecHitCollection->find(xtalsToStore[iCry]) == miniRecHitCollection->end()) )
93 miniRecHitCollection->push_back(*iRecHit);
96 std::sort(xtalsToStore.begin(), xtalsToStore.end());
97 std::unique(xtalsToStore.begin(), xtalsToStore.end());
T getParameter(std::string const &) const
std::vector< EcalRecHit >::const_iterator const_iterator
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< edm::InputTag > interestingDetIdCollections_
ReducedRecHitCollectionProducer(const edm::ParameterSet &)
ctor
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag recHitsLabel_
~ReducedRecHitCollectionProducer()
virtual void produce(edm::Event &, const edm::EventSetup &)
producer
std::string reducedHitsCollection_