21 produces<SimHitTPAssociationList>();
22 std::vector<edm::InputTag>
tags =
cfg.getParameter<std::vector<edm::InputTag>>(
"simHitSrc");
25 _simHitSrc.emplace_back(consumes<edm::PSimHitContainer>(
tag));
44 for (
auto itrk = trackingParticle->g4Track_begin(); itrk != trackingParticle->g4Track_end(); ++itrk) {
45 std::pair<uint32_t, EncodedEventId> trkid(itrk->trackId(),
eid);
46 mapping.insert(std::make_pair(trkid, trackingParticle));
53 iEvent.getByToken(psit, PSimHitCollectionH);
54 for (
unsigned int psimHit = 0; psimHit != PSimHitCollectionH->size(); ++psimHit) {
56 std::pair<uint32_t, EncodedEventId> simTkIds(pSimHitRef->trackId(), pSimHitRef->eventId());
57 auto ipos =
mapping.find(simTkIds);
59 simHitTPList->push_back(std::make_pair(ipos->second, pSimHitRef));