21 iConfig.getParameter<
edm::
InputTag>(
"candidates"))),
23 iConfig.getParameter<
edm::
InputTag>(
"lostTracks"))),
27 produces<pat::PackedCandidateRefVector>(
"lostTracks" +
sel);
28 produces<pat::PackedCandidateRefVector>(
"pfCandidates" +
sel);
31 muonIDMap_[
sel] = std::make_unique<StringCutObjectSelector<reco::Muon>>(
"passed('" +
sel +
"')");
32 produces<pat::PackedCandidateRefVector>(
"lostTracks" +
sel);
33 produces<pat::PackedCandidateRefVector>(
"pfCandidates" +
sel);
50 std::map<std::string, std::unique_ptr<StringCutObjectSelector<reco::Muon>>>
muonIDMap_;
61 std::map<std::string, std::unique_ptr<pat::PackedCandidateRefVector>> lostTrackMap, candMap;
73 const auto& muonTrack =
muon.innerTrack();
79 const auto& lostTrack = track2LostTrack[muonTrack];
80 if (lostTrack.isNonnull()) {
95 const auto& candTrack = candidate2PF[
cand]->trackRef();
97 if (candTrack.isNonnull() && muonTrack == candTrack) {
111 for (
auto&
s : lostTrackMap) {
114 for (
auto&
s : candMap) {
124 ->setComment(
"packed PF candidate input collection");
126 desc.add<std::vector<std::string>>(
"muonSelectors", {
"AllTrackerMuons",
"TMOneStationTight"})
127 ->setComment(
"muon selectors");
128 desc.add<std::vector<std::string>>(
"muonIDs", {})->setComment(
"muon IDs");
129 descriptions.
add(
"packedCandidateMuonID",
desc);
static void fillDescriptions(edm::ConfigurationDescriptions &)
~PackedCandidateMuonSelectorProducer() override=default
#define DEFINE_FWK_MODULE(type)
const edm::EDGetTokenT< edm::Association< reco::PFCandidateCollection > > candidate2PFToken_
std::vector< l1t::PFCandidate > PFCandidateCollection
std::vector< pat::PackedCandidate > PackedCandidateCollection
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > track2LostTrackToken_
std::map< std::string, std::unique_ptr< StringCutObjectSelector< reco::Muon > > > muonIDMap_
edm::Ref< pat::PackedCandidateCollection > PackedCandidateRef
void produce(edm::Event &, const edm::EventSetup &) override
PackedCandidateMuonSelectorProducer(const edm::ParameterSet &iConfig)
const edm::EDGetTokenT< reco::MuonCollection > muonToken_
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
const std::vector< std::string > muonIDs_
static TrackQuality qualityByName(const std::string &name)
SelectionType selectionTypeFromString(const std::string &label)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< Muon > MuonCollection
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})
const std::vector< std::string > muonSelectors_
const edm::EDGetTokenT< pat::PackedCandidateCollection > candidateToken_
const edm::EDGetTokenT< pat::PackedCandidateCollection > lostTrackToken_