28 produces< DetIdCollection >() ;
49 std::auto_ptr< DetIdCollection > interestingDetIdCollection(
new DetIdCollection() ) ;
51 for(reco::MuonCollection::const_iterator
muon = muons->begin();
muon != muons->end(); ++
muon){
52 if (!
muon->isEnergyValid() )
continue;
53 if (
muon->calEnergy().ecal_id.rawId()==0 )
continue;
55 const std::vector<DetId>& ids = topology->
getWindow(
muon->calEnergy().ecal_id, 5, 5);
56 for ( std::vector<DetId>::const_iterator
id = ids.begin();
id != ids.end(); ++id )
57 if(
std::find(interestingDetIdCollection->begin(), interestingDetIdCollection->end(), *id)
58 == interestingDetIdCollection->end())
59 interestingDetIdCollection->push_back(*
id);
61 iEvent.
put(interestingDetIdCollection);
T getParameter(std::string const &) const
const CaloTopology * caloTopology_
InterestingEcalDetIdProducer(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &) override
edm::InputTag inputCollection_
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.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
void beginRun(const edm::Run &, const edm::EventSetup &) override
~InterestingEcalDetIdProducer()
edm::EDCollection< DetId > DetIdCollection