26 produces< DetIdCollection >() ;
48 std::auto_ptr< DetIdCollection > interestingDetIdCollection(
new DetIdCollection() ) ;
50 for(reco::MuonCollection::const_iterator
muon = muons->begin();
muon != muons->end(); ++
muon){
51 if (!
muon->isEnergyValid() )
continue;
52 if (
muon->calEnergy().ecal_id.rawId()==0 )
continue;
54 const std::vector<DetId>& ids = topology->
getWindow(
muon->calEnergy().ecal_id, 5, 5);
55 for ( std::vector<DetId>::const_iterator
id = ids.begin();
id != ids.end(); ++id )
56 if(
std::find(interestingDetIdCollection->begin(), interestingDetIdCollection->end(), *id)
57 == interestingDetIdCollection->end())
58 interestingDetIdCollection->push_back(*
id);
60 iEvent.
put(interestingDetIdCollection);
T getParameter(std::string const &) const
const CaloTopology * caloTopology_
InterestingEcalDetIdProducer(const edm::ParameterSet &)
CaloTopology const * topology(0)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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)
edm::EDGetTokenT< reco::MuonCollection > muonToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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