30 produces<edm::PtrVector<reco::Candidate>>();
40 auto result = std::make_unique<PtrVector<reco::Candidate>>();
41 std::set<reco::CandidatePtr> vetoedPtrs;
42 for (
auto const&
veto : *vetoes) {
43 auto const n =
veto.numberOfSourceCandidatePtrs();
44 for (
size_t j {}; j<
n; ++j) {
45 vetoedPtrs.insert(
veto.sourceCandidatePtr(j));
51 for (
size_t i {};
i<cands->size(); ++
i) {
52 auto const c = cands->ptrAt(
i);
53 if (vetoedPtrs.find(
c)==vetoedPtrs.cend()) {
56 for (
const auto& it : vetoedPtrs)
57 if (it.isNonnull() && it.isAvailable() &&
reco::deltaR2(*it, *
c) < 0.00000025) {
72 desc.
add<
bool>(
"useDeltaRforFootprint",
false);
T getParameter(std::string const &) const
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< edm::View< reco::Candidate > > vetoSrcToken_
bool useDeltaRforFootprint_
CandPtrProjector(edm::ParameterSet const &iConfig)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< edm::View< reco::Candidate > > candSrcToken_
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())