53 produces<edm::RefToBaseVector<reco::GsfElectron> >();
67 try_ += electrons->size();
70 auto result = std::make_unique<RefToBaseVector<reco::GsfElectron>>();
74 std::vector<size_t>::const_iterator itdup = duplicates->begin(), enddup = duplicates->end();
75 for (
size_t i = 0,
n = electrons->size();
i <
n; ++
i) {
76 while ((itdup != enddup) && (*itdup <
i)) { ++itdup; }
77 if ((itdup != enddup) && (*itdup ==
i))
continue;
79 result->push_back(electrons->refAt(
i));
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Remove duplicates from the list of electrons.
std::unique_ptr< std::vector< size_t > > duplicatesToRemove(const std::vector< reco::GsfElectron > &electrons) const
std::atomic< uint64_t > try_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::atomic< uint64_t > pass_
#define DEFINE_FWK_MODULE(type)
DuplicatedElectronCleaner(const edm::ParameterSet &iConfig)
~DuplicatedElectronCleaner() override
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > electronSrcToken_
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const final
const pat::DuplicatedElectronRemover duplicateRemover_