Definition at line 13 of file IsolatedTrackCleaner.cc.
IsolatedTrackCleaner::~IsolatedTrackCleaner |
( |
| ) |
|
|
inlineoverride |
Definition at line 27 of file IsolatedTrackCleaner.cc.
References cut_, edm::Event::getByToken(), mps_fire::i, AK4GenJetFlavourInfos_cfi::leptons, leptons_, eostools::move(), gen::n, MillePedeFileConverter_cfg::out, edm::Event::put(), edm::refToPtr(), HiIsolationCommonParameters_cff::track, l1t::tracks, and tracks_.
28 auto out = std::make_unique<std::vector<pat::IsolatedTrack>>();
30 std::vector<reco::CandidatePtr> leptonPfCands;
32 for (
const auto & token :
leptons_) {
34 for (
const auto & lep : *leptons) {
35 for (
unsigned int i = 0,
n = lep.numberOfSourceCandidatePtrs();
i <
n; ++
i) {
36 auto ptr = lep.sourceCandidatePtr(
i);
37 if (ptr.isNonnull()) leptonPfCands.push_back(ptr);
41 std::sort(leptonPfCands.begin(), leptonPfCands.end());
45 for (
const auto &
track : *tracks) {
47 if (
track.packedCandRef().isNonnull()) {
49 if (std::binary_search(leptonPfCands.begin(), leptonPfCands.end(), pfCand)) {
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< std::vector< pat::IsolatedTrack > > tracks_
StringCutObjectSelector< pat::IsolatedTrack > cut_
std::vector< edm::EDGetTokenT< reco::CandidateView > > leptons_