19 auto hitsTags =
pset.getParameter<std::vector<edm::InputTag>>(
"hits");
20 for (
const auto &
tag : hitsTags) {
23 produces<ticl::AssociationMap<ticl::mapWithFraction>>(
"hitToLayerClusterMap");
47 auto hitToLayerClusterMap = std::make_unique<ticl::AssociationMap<ticl::mapWithFraction>>(rechitManager.
size());
50 for (
unsigned int lcId = 0; lcId <
layer_clusters->size(); ++lcId) {
51 const auto &layer_cluster = (*layer_clusters)[lcId];
53 for (
const auto &hitAndFraction : layer_cluster.hitsAndFractions()) {
54 auto hitMapIter = hitMap->find(hitAndFraction.first);
55 if (hitMapIter != hitMap->end()) {
56 unsigned int rechitIndex = hitMapIter->second;
57 float fraction = hitAndFraction.second;
58 hitToLayerClusterMap->insert(rechitIndex, lcId,
fraction);
69 desc.add<std::vector<edm::InputTag>>(
"hits",
73 descriptions.
add(
"hitToLayerClusterAssociator",
desc);
#define DEFINE_FWK_MODULE(type)
std::vector< edm::EDGetTokenT< HGCRecHitCollection > > hitsTokens_
~HitToLayerClusterAssociatorProducer() override
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void addVector(std::span< const T > vec)
edm::EDGetTokenT< std::vector< reco::CaloCluster > > LCCollectionToken_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
edm::EDGetTokenT< std::unordered_map< DetId, unsigned int > > hitMapToken_
HitToLayerClusterAssociatorProducer(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)