47 double pow2(
double val) {
return val *
val; }
53 maxDR2ToClean_(pow2(iConfig.getParameter<double>(
"maxDRToClean"))) {
54 produces<std::vector<edm::Ptr<reco::Candidate>>>();
66 const std::vector<std::pair<float, float>>& etaPhisToMatch,
68 const float candEta =
cand.eta();
69 const float candPhi =
cand.phi();
70 for (
const auto& etaPhi : etaPhisToMatch) {
71 if (
reco::deltaR2(candEta, candPhi, etaPhi.first, etaPhi.second) <= maxDR2) {
83 auto outColl = std::make_unique<std::vector<edm::Ptr<reco::Candidate>>>();
88 std::vector<std::pair<float, float>> coll1EtaPhis;
89 for (
size_t objNr = 0; objNr < coll1Handle->size(); objNr++) {
91 coll1EtaPhis.push_back({objPtr->
eta(), objPtr->
phi()});
94 for (
size_t objNr = 0; objNr < coll2Handle->size(); objNr++) {
109 desc.
add<
double>(
"maxDRToClean", 0.05);
110 descriptions.
add(
"candMergerCleanOthersByDR", desc);