43 : muons_(iConfig.getParameter<
edm::
InputTag>(
"muons")),
44 muonsCut_(iConfig.getParameter<
std::
string>(
"muonCut")),
46 pfCandidateCut_(iConfig.getParameter<
std::
string>(
"pfCandidatesCut")),
47 lostTrack_(iConfig.getParameter<
edm::
InputTag>(
"otherTracks")),
48 lostTrackCut_(iConfig.getParameter<
std::
string>(
"lostTrackCut")) {
52 produces<std::vector<pat::Muon>>();
64 descriptions.
add(
"mergedMuonsNoCuts", desc);
76 auto out = std::make_unique<std::vector<pat::Muon>>();
87 for (
unsigned int pf = 0;
pf < pfCands->size(); ++
pf) {
88 auto pfCand = pfCands->at(
pf);
92 bool isPFMuon =
false;
94 for (
unsigned int i = 0,
n =
muon.numberOfSourceCandidatePtrs();
i <
n; ++
i) {
96 if (ptr.
isNonnull() && ptr == pfCandPtr) {
109 double energy =
sqrt(pfCand.p() * pfCand.p() + 0.011163691);
120 if (
std::abs(lostTrack.pdgId()) == 13)
124 double energy =
sqrt(lostTrack.p() * lostTrack.p() + 0.011163691);