1 #ifndef UtilAlgos_NewMatcher_h 2 #define UtilAlgos_NewMatcher_h 20 namespace modulesNew {
22 template <
typename C1,
typename C2,
typename S,
typename D = DeltaR<
typename C1::value_type,
typename C2::value_type> >
50 template <
typename C1,
typename C2,
typename S,
typename D>
54 distMin_(
cfg.
template getParameter<double>(
"distMin")),
60 template <
typename C1,
typename C2,
typename S,
typename D>
63 template <
typename C1,
typename C2,
typename S,
typename D>
72 size_t size =
cands->size();
77 for (
size_t c = 0;
c != size; ++
c) {
79 vector<helper::MatchPair>
v;
80 for (
size_t m = 0;
m !=
matched->size(); ++
m) {
81 const T2& match = (*matched)[
m];
83 double dist = matchDistance(
cand, match);
85 v.push_back(make_pair(
m, dist));
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< C1 > srcToken_
edm::Association< C2 > MatchMap
S make(const edm::ParameterSet &cfg)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< C2 > matchedToken_
Container::value_type value_type
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
def template(fileName, svg, replaceme="REPLACEME")
DecomposeProduct< arg, typename Div::arg > D
double matchDistance(const T1 &c1, const T2 &c2) const
std::pair< size_t, double > MatchPair
bool operator()(const MatchPair &p1, const MatchPair &p2) const
bool select(const T1 &c1, const T2 &c2) const
Matcher(const edm::ParameterSet &cfg)