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()->recHits().size();
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()->recHits().size();
64 unsigned int smallestNumberOfHits = trackHits < muonTrackHits ? trackHits : muonTrackHits;
65 int numberOfCommonDetIds = 0;
67 hit != track->extra()->recHitsEnd(); ++
hit ) {
69 mit !=
link->trackerTrack()->extra()->recHitsEnd(); ++mit ) {
70 if (
hit->get()->geographicalId() == mit->get()->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
std::string link(std::string &nm, std::string &ns)
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 &)