|
|
Go to the documentation of this file.
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()) {
83 lostTrackMap[
sel]->push_back(lostTrack);
87 lostTrackMap[
sel]->push_back(lostTrack);
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);
const edm::EDGetTokenT< pat::PackedCandidateCollection > lostTrackToken_
const edm::EDGetTokenT< reco::MuonCollection > muonToken_
void produce(edm::Event &, const edm::EventSetup &) override
~PackedCandidateMuonSelectorProducer() override=default
const std::vector< std::string > muonSelectors_
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
SelectionType selectionTypeFromString(const std::string &label)
std::map< std::string, std::unique_ptr< StringCutObjectSelector< reco::Muon > > > muonIDMap_
std::vector< Muon > MuonCollection
PackedCandidateMuonSelectorProducer(const edm::ParameterSet &iConfig)
static void fillDescriptions(edm::ConfigurationDescriptions &)
const edm::EDGetTokenT< edm::Association< reco::PFCandidateCollection > > candidate2PFToken_
const edm::EDGetTokenT< pat::PackedCandidateCollection > candidateToken_
const std::vector< std::string > muonIDs_
std::vector< l1t::PFCandidate > PFCandidateCollection
std::vector< pat::PackedCandidate > PackedCandidateCollection
static TrackQuality qualityByName(const std::string &name)
const edm::EDGetTokenT< edm::Association< pat::PackedCandidateCollection > > track2LostTrackToken_
edm::Ref< pat::PackedCandidateCollection > PackedCandidateRef