23 produces<reco::MuonTrackLinksCollection>();
37 auto output = std::make_unique<reco::MuonTrackLinksCollection>();
47 unsigned int trackIndex = 0;
48 unsigned int muonTrackHits =
link->trackerTrack()->extra()->recHitsSize();
49 for (reco::TrackCollection::const_iterator
track = incTracks->begin();
track != incTracks->end();
50 ++
track, ++trackIndex) {
56 unsigned trackHits =
track->extra()->recHitsSize();
58 unsigned int smallestNumberOfHits = trackHits < muonTrackHits ? trackHits : muonTrackHits;
59 int numberOfCommonDetIds = 0;
60 for (
auto hit =
track->extra()->recHitsBegin();
hit !=
track->extra()->recHitsEnd(); ++
hit) {
61 for (
auto mit =
link->trackerTrack()->extra()->recHitsBegin();
62 mit !=
link->trackerTrack()->extra()->recHitsEnd();
64 if ((*hit)->geographicalId() == (*mit)->geographicalId() &&
66 numberOfCommonDetIds++;
71 double fraction = (double)numberOfCommonDetIds / smallestNumberOfHits;