26 produces<reco::MuonTrackLinksCollection>();
52 for(reco::MuonTrackLinksCollection::const_iterator
link = links->begin();
55 unsigned int trackIndex = 0;
56 unsigned int muonTrackHits =
link->trackerTrack()->extra()->recHitsSize();
57 for(reco::TrackCollection::const_iterator track = incTracks->begin();
58 track != incTracks->end(); ++track, ++trackIndex){
59 if ( track->pt() <
ptMin )
continue;
60 if ( track->p() <
pMin )
continue;
62 unsigned trackHits = track->extra()->recHitsSize();
64 unsigned int smallestNumberOfHits = trackHits < muonTrackHits ? trackHits : muonTrackHits;
65 int numberOfCommonDetIds = 0;
66 for (
auto hit = track->extra()->recHitsBegin();
67 hit != track->extra()->recHitsEnd(); ++
hit ) {
68 for (
auto mit =
link->trackerTrack()->extra()->recHitsBegin();
69 mit !=
link->trackerTrack()->extra()->recHitsEnd(); ++mit ) {
70 if ( (*hit)->geographicalId() == (*mit)->geographicalId() &&
72 numberOfCommonDetIds++;
77 double fraction = (double)numberOfCommonDetIds/smallestNumberOfHits;
81 link->standAloneTrack(),
82 link->globalTrack() ) );
89 link->standAloneTrack(),
90 link->globalTrack() ) );
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::InputTag theLinkCollectionInInput
std::vector< MuonTrackLinks > MuonTrackLinksCollection
collection of MuonTrackLinks
edm::EDGetTokenT< reco::TrackCollection > trackToken_
edm::EDGetTokenT< reco::MuonTrackLinksCollection > linkToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
MuonLinksProducerForHLT(const edm::ParameterSet &)
edm::InputTag theInclusiveTrackCollectionInInput
virtual ~MuonLinksProducerForHLT()
virtual void produce(edm::Event &, const edm::EventSetup &)