1 #ifndef PhysicsTools_TagAndProbe_MatchedProbeMaker_H
2 #define PhysicsTools_TagAndProbe_MatchedProbeMaker_H
53 : m_candidateSource(iConfig.getUntrackedParameter<
edm::
InputTag>(
"CandidateSource")),
54 m_referenceSource(iConfig.getUntrackedParameter<
edm::
InputTag>(
"ReferenceSource")),
55 m_resMatchMapSource(iConfig.getUntrackedParameter<
edm::
InputTag>(
"ResMatchMapSource",
edm::
InputTag(
"Dummy"))),
56 matched_(iConfig.getUntrackedParameter<
bool>(
"Matched",
true)) {
58 produces<edm::RefVector<collection> >();
76 iEvent.getByLabel(m_candidateSource, Cands);
79 iEvent.getByLabel(m_referenceSource, Refs);
84 if (
iEvent.getByLabel(m_resMatchMapSource, ResMatchMap)) {
86 for (
unsigned i = 0;
i < Cands->size();
i++) {
92 if (
f != ResMatchMap->
end()) {
93 outputCollection_matched->push_back(CandRef);
95 outputCollection_unmatched->push_back(CandRef);
102 for (
unsigned i = 0;
i < Cands->size();
i++) {
109 for (
unsigned j = 0;
j < Refs->
size();
j++) {
113 if (
overlap(*CandRef, *RefRef)) {
119 outputCollection_matched->push_back(CandRef);
121 outputCollection_unmatched->push_back(CandRef);
132 template <
typename T>
136 template <
typename T>