31 produces<edm::PtrVector<reco::Candidate>>();
41 auto result = std::make_unique<PtrVector<reco::Candidate>>();
42 std::set<reco::CandidatePtr> vetoedPtrs;
43 for (
auto const&
veto : *vetoes) {
44 auto const n =
veto.numberOfSourceCandidatePtrs();
45 for (
size_t j {}; j<
n; ++j) {
46 vetoedPtrs.insert(
veto.sourceCandidatePtr(j));
52 for (
size_t i {};
i<cands->size(); ++
i) {
53 auto const c = cands->ptrAt(
i);
54 if (vetoedPtrs.find(
c)==vetoedPtrs.cend()) {
57 for (
const auto& it : vetoedPtrs)
58 if (it.isNonnull() && it.isAvailable() &&
reco::deltaR2(*it, *
c) < 0.00000025) {
73 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
edm::EDGetTokenT< edm::View< reco::Candidate > > vetoSrcToken_
bool useDeltaRforFootprint_
CandPtrProjector(edm::ParameterSet const &iConfig)
#define DEFINE_FWK_MODULE(type)
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())