33 produces<reco::MuonTrackLinksCollection>();
55 for(reco::MuonTrackLinksCollection::const_iterator
link = links->begin();
58 unsigned int trackIndex = 0;
59 unsigned int muonTrackHits =
link->trackerTrack()->extra()->recHits().size();
60 for(reco::TrackCollection::const_iterator track = incTracks->begin();
61 track != incTracks->end(); ++track, ++trackIndex){
62 if ( track->pt() <
ptMin )
continue;
63 if ( track->p() <
pMin )
continue;
65 unsigned trackHits = track->extra()->recHits().size();
67 unsigned int smallestNumberOfHits = trackHits < muonTrackHits ? trackHits : muonTrackHits;
68 int numberOfCommonDetIds = 0;
70 hit != track->extra()->recHitsEnd(); ++
hit ) {
72 mit !=
link->trackerTrack()->extra()->recHitsEnd(); ++mit ) {
73 if (
hit->get()->geographicalId() == mit->get()->geographicalId() &&
75 numberOfCommonDetIds++;
80 double fraction = (double)numberOfCommonDetIds/smallestNumberOfHits;
84 link->standAloneTrack(),
85 link->globalTrack() ) );
92 link->standAloneTrack(),
93 link->globalTrack() ) );
T getParameter(std::string const &) const
edm::InputTag theLinkCollectionInInput
std::vector< MuonTrackLinks > MuonTrackLinksCollection
collection of MuonTrackLinks
std::string link(std::string &nm, std::string &ns)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
MuonLinksProducerForHLT(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag theInclusiveTrackCollectionInInput
virtual ~MuonLinksProducerForHLT()
virtual void produce(edm::Event &, const edm::EventSetup &)