|
|
Go to the documentation of this file.
25 produces<nanoaod::FlatTable>();
34 ->setComment(
"input vertex collection, for dxy/dz");
35 desc.add<
std::string>(
"name")->setComment(
"name of the muon nanoaod::FlatTable we are extending with IDs");
36 descriptions.
add(
"muonIDTable",
desc);
58 unsigned int ncand =
muons->size();
62 bool isRun2016BCDEF = (272007 <=
iEvent.run() &&
iEvent.run() <= 278808);
63 std::vector<uint8_t> tight(ncand, 0), highPt(ncand, 0), soft(ncand, 0), medium(ncand, 0);
64 for (
unsigned int i = 0;
i < ncand; ++
i) {
72 auto tab = std::make_unique<nanoaod::FlatTable>(ncand,
name_,
false,
true);
73 tab->addColumn<
bool>(
"tightId", tight,
"POG Tight muon ID");
74 tab->addColumn<uint8_t>(
77 "POG highPt muon ID (1 = tracker high pT, 2 = global high pT, which includes tracker high pT)");
81 "POG Soft muon ID (using the relaxed cuts in the data Run 2016 B-F periods, and standard cuts elsewhere)");
85 "POG Medium muon ID (using the relaxed cuts in the data Run 2016 B-F periods, and standard cuts elsewhere)");
91 bool goodGlob =
mu.isGlobalMuon() &&
mu.globalTrack()->normalizedChi2() < 3 &&
92 mu.combinedQuality().chi2LocalPosition < 12 &&
mu.combinedQuality().trkKink < 20;
100 mu.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 &&
101 mu.innerTrack()->hitPattern().pixelLayersWithMeasurement() > 0 &&
106 return (
mu.numberOfMatchedStations() > 1 && (
mu.muonBestTrack()->ptError() /
mu.muonBestTrack()->pt()) < 0.3 &&
109 mu.innerTrack()->hitPattern().numberOfValidPixelHits() > 0 &&
110 mu.innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5);
~MuonIDTableProducer() override
bool isSoftMuon(const reco::Muon &, const reco::Vertex &, bool run2016_hip_mitigation=false)
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const override
Analysis-level muon class.
edm::EDGetTokenT< std::vector< reco::Vertex > > srcVtx_
primaryVertex
hltOfflineBeamSpot for HLTMON
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
bool isLooseMuon(const reco::Muon &)
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool isHighPtMuon(const reco::Muon &, const reco::Vertex &)
MuonIDTableProducer(const edm::ParameterSet &iConfig)
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
static bool isMediumMuonHIP(const pat::Muon &muon)
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
static bool isSoftMuonHIP(const pat::Muon &muon, const reco::Vertex &vtx)
static bool isTrackerHighPt(const pat::Muon &mu, const reco::Vertex &primaryVertex)
edm::EDGetTokenT< std::vector< pat::Muon > > src_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Abs< T >::type abs(const T &t)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)