18 leptons_.push_back(consumes<reco::CandidateView>(
tag));
20 produces<std::vector<pat::IsolatedTrack>>();
26 auto out = std::make_unique<std::vector<pat::IsolatedTrack>>();
28 std::vector<reco::CandidatePtr> leptonPfCands;
32 for (
const auto& lep : *
leptons) {
33 for (
unsigned int i = 0,
n = lep.numberOfSourceCandidatePtrs();
i <
n; ++
i) {
34 auto ptr = lep.sourceCandidatePtr(
i);
36 leptonPfCands.push_back(ptr);
40 std::sort(leptonPfCands.begin(), leptonPfCands.end());
47 if (
track.packedCandRef().isNonnull()) {
49 if (std::binary_search(leptonPfCands.begin(), leptonPfCands.end(), pfCand)) {
62 std::vector<edm::EDGetTokenT<reco::CandidateView>>
leptons_;
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
IsolatedTrackCleaner(edm::ParameterSet const ¶ms)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< std::vector< pat::IsolatedTrack > > tracks_
auto const & tracks
cannot be loose
StringCutObjectSelector< pat::IsolatedTrack > cut_
~IsolatedTrackCleaner() override
std::vector< edm::EDGetTokenT< reco::CandidateView > > leptons_