22 produces<DetIdCollection>();
24 caloTopoToken_ = esConsumes<CaloTopology, CaloTopologyRecord, edm::Transition::BeginRun>();
38 auto interestingDetIdCollection = std::make_unique<DetIdCollection>();
40 for (reco::MuonCollection::const_iterator
muon = muons->begin();
muon != muons->end(); ++
muon) {
41 if (!
muon->isEnergyValid())
43 if (
muon->calEnergy().ecal_id.rawId() == 0)
47 const std::vector<DetId>& ids = topology->
getWindow(
muon->calEnergy().ecal_id, 5, 5);
48 for (std::vector<DetId>::const_iterator
id = ids.begin();
id != ids.end(); ++
id)
49 if (
std::find(interestingDetIdCollection->begin(), interestingDetIdCollection->end(), *
id) ==
50 interestingDetIdCollection->end())
51 interestingDetIdCollection->push_back(*
id);
const CaloTopology * caloTopology_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
InterestingEcalDetIdProducer(const edm::ParameterSet &)
uint16_t *__restrict__ id
~InterestingEcalDetIdProducer() override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void produce(edm::Event &, const edm::EventSetup &) override
edm::ESGetToken< CaloTopology, CaloTopologyRecord > caloTopoToken_
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_
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
T getParameter(std::string const &) 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
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const