2 #include <unordered_map> 46 hgcalOnly_(ps.getParameter<
bool>(
"hgcalOnly")) {
47 produces<DetIdRecHitMap>(
"hgcalRecHitMap");
49 produces<DetIdRecHitMap>(
"barrelRecHitMap");
60 desc.add<
bool>(
"hgcalOnly",
true);
61 descriptions.
add(
"recHitMapProducer",
desc);
65 auto hitMapHGCal = std::make_unique<DetIdRecHitMap>();
75 for (
unsigned int i = 0;
i < rechitManager.
size(); ++
i) {
76 const auto recHitDetId = rechitManager[
i].detid();
77 hitMapHGCal->emplace(recHitDetId,
i);
83 auto hitMapBarrel = std::make_unique<DetIdRecHitMap>();
88 for (
unsigned int i = 0;
i < barrelRechitManager.size(); ++
i) {
89 const auto recHitDetId = barrelRechitManager[
i].detId();
90 hitMapBarrel->emplace(recHitDetId,
i);
std::unordered_map< DetId, const unsigned int > DetIdRecHitMap
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< HGCRecHit > HGCRecHitCollection
const edm::EDGetTokenT< reco::PFRecHitCollection > hits_ho_token_
bool get(ProductID const &oid, Handle< PROD > &result) const
RecHitMapProducer(const edm::ParameterSet &)
const edm::EDGetTokenT< HGCRecHitCollection > hits_fh_token_
std::vector< PFRecHit > PFRecHitCollection
collection of PFRecHit objects
const edm::EDGetTokenT< reco::PFRecHitCollection > hits_hb_token_
const edm::EDGetTokenT< reco::PFRecHitCollection > hits_eb_token_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
const edm::EDGetTokenT< HGCRecHitCollection > hits_bh_token_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::EDGetTokenT< HGCRecHitCollection > hits_ee_token_
void addVector(std::span< const T > vec)