71 std::map<T1, std::vector<T2> > recHits_output;
72 std::vector<uint32_t> vetoHits;
80 if (iMuon->isGlobalMuon())
81 track = iMuon->outerTrack().get();
82 else if (iMuon->isStandAloneMuon())
83 track = iMuon->outerTrack().get();
84 else if (iMuon->isRPCMuon())
85 track = iMuon->innerTrack().get();
86 else if (iMuon->isTrackerMuon())
87 track = iMuon->innerTrack().get();
89 edm::LogError(
"TauEmbedding") <<
"The imput muon: " << (*iMuon)
90 <<
" must be either global or does or be tracker muon";
96 if (!(murechit).isValid())
108 RecHitCollectionHandle RecHitinput;
109 iEvent.
getByToken(input_.second, RecHitinput);
113 if (
find(vetoHits.begin(), vetoHits.end(),
getRawDetId(*recHit)) != vetoHits.end())
116 recHits_output[detId].push_back(*recHit);
121 for (
typename std::map<T1, std::vector<T2> >::const_iterator recHit = recHits_output.begin();
122 recHit != recHits_output.end();
124 output->put(recHit->first, recHit->second.begin(), recHit->second.end());
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
uint32_t getRawDetId(const T2 &)
bool checkrecHit(const TrackingRecHit &)
edm::RangeMap< T1, edm::OwnVector< T2 > > RecHitCollection
Log< level::Error, false > LogError
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
C::const_iterator const_iterator
constant access iterator type
const_iterator begin() const
const edm::EDGetTokenT< edm::View< pat::Muon > > mu_input_
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
void fillVetoHits(const TrackingRecHit &, std::vector< uint32_t > *)
const_iterator end() const
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.
std::map< std::string, edm::EDGetTokenT< RecHitCollection > > inputs_