19 tracksterCollectionToken_(
21 produces<ticl::AssociationMap<ticl::mapWithFraction, std::vector<reco::CaloCluster>, std::vector<ticl::Trackster>>>();
41 auto lcToTracksterMap = std::make_unique<
46 for (
unsigned int tracksterId = 0; tracksterId <
tracksters->size(); ++tracksterId) {
47 const auto &trackster = (*tracksters)[tracksterId];
49 for (
unsigned int i = 0;
i < trackster.vertices().size(); ++
i) {
51 const auto &lc = (*layer_clusters)[trackster.vertices()[
i]];
52 float sharedEnergy = lc.energy() / trackster.vertex_multiplicity()[
i];
55 lcToTracksterMap->insert(lcRef, tracksterRef,
sharedEnergy);
65 descriptions.
add(
"LCToTSAssociatorProducer",
desc);
edm::EDGetTokenT< std::vector< reco::CaloCluster > > LCCollectionToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< std::vector< ticl::Trackster > > tracksterCollectionToken_
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
~LCToTSAssociatorProducer() override
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
float sharedEnergy(reco::CaloCluster const &clu1, reco::CaloCluster const &clu2, EcalRecHitCollection const &barrelRecHits, EcalRecHitCollection const &endcapRecHits)
LCToTSAssociatorProducer(const edm::ParameterSet &)