13 #ifndef TauAnalysis_MCEmbeddingTools_TrackerCleaner_H
14 #define TauAnalysis_MCEmbeddingTools_TrackerCleaner_H
49 std::map<std::string, edm::EDGetTokenT<TrackClusterCollection> >
inputs_;
59 std::vector<edm::InputTag> inCollections = iConfig.
getParameter<std::vector<edm::InputTag> >(
"oldCollection");
60 for (
const auto& inCollection : inCollections) {
61 inputs_[inCollection.instance()] = consumes<TrackClusterCollection>(inCollection);
62 produces<TrackClusterCollection>(inCollection.instance());
76 iEvent.getByToken(mu_input_, muonHandle);
79 for (
auto input_ : inputs_) {
81 iEvent.getByToken(input_.second, inputClusters);
83 std::vector<bool> vetodClusters;
85 vetodClusters.resize(inputClusters->dataSize(),
false);
88 if (!iMuon->isGlobalMuon())
90 const reco::Track* mutrack = iMuon->globalTrack().get();
94 if (!(murechit).isValid())
97 if (match_rechit_type(murechit)) {
98 auto& thit = reinterpret_cast<BaseTrackerRecHit const&>(murechit);
99 auto const& cluster = thit.firstClusterRef();
100 vetodClusters[cluster.key()] =
true;
108 clustSet != inputClusters->end();
110 DetId detIdObject(clustSet->detId());
115 if (vetodClusters[
idx - 1])
118 spc.push_back(*clustIt);