27 produces<nanoaod::FlatTable>();
36 desc.
add<
std::string>(
"name")->setComment(
"name of the muon nanoaod::FlatTable we are extending with IDs");
37 descriptions.
add(
"muonIDTable", desc);
62 unsigned int ncand = muons->size();
66 bool isRun2016BCDEF = (272007 <= iEvent.
run() && iEvent.
run() <= 278808);
67 std::vector<uint8_t> tight(ncand, 0), highPt(ncand, 0), soft(ncand, 0), medium(ncand, 0);
68 for (
unsigned int i = 0;
i < ncand; ++
i) {
76 auto tab = std::make_unique<nanoaod::FlatTable>(ncand,
name_,
false,
true);
78 tab->addColumn<uint8_t>(
"highPtId", highPt,
"POG highPt muon ID (1 = tracker high pT, 2 = global high pT, which includes tracker high pT)",
nanoaod::FlatTable::UInt8Column);
79 tab->addColumn<uint8_t>(
"softId", soft,
"POG Soft muon ID (using the relaxed cuts in the data Run 2016 B-F periods, and standard cuts elsewhere)",
nanoaod::FlatTable::BoolColumn);
80 tab->addColumn<uint8_t>(
"mediumId", medium,
"POG Medium muon ID (using the relaxed cuts in the data Run 2016 B-F periods, and standard cuts elsewhere)",
nanoaod::FlatTable::BoolColumn);
98 mu.
innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 &&
99 mu.
innerTrack()->hitPattern().pixelLayersWithMeasurement() > 0 &&
109 && mu.
innerTrack()->hitPattern().numberOfValidPixelHits() > 0
110 && mu.
innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5 );
float chi2LocalPosition
chi2 value for the STA-TK matching of local position
edm::EDGetTokenT< std::vector< reco::Vertex > > srcVtx_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void produce(edm::StreamID, edm::Event &, edm::EventSetup const &) const override
float trkKink
value of the kink algorithm applied to the inner track stub
edm::EDGetTokenT< std::vector< pat::Muon > > src_
const Point & position() const
position
bool isLooseMuon(const reco::Muon &)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
~MuonIDTableProducer() override
reco::TrackRef innerTrack() const override
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
bool isGlobalMuon() const override
MuonQuality combinedQuality() const
get energy deposition information
Abs< T >::type abs(const T &t)
float segmentCompatibility(const reco::Muon &muon, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool isSoftMuon(const reco::Muon &, const reco::Vertex &, bool run2016_hip_mitigation=false)
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
int numberOfMatchedStations(ArbitrationType type=SegmentAndTrackArbitration) const
static bool isSoftMuonHIP(const pat::Muon &muon, const reco::Vertex &vtx)
MuonIDTableProducer(const edm::ParameterSet &iConfig)
bool isHighPtMuon(const reco::Muon &, const reco::Vertex &)
reco::TrackRef globalTrack() const override
reference to Track reconstructed in both tracked and muon detector (reimplemented from reco::Muon) ...
static bool isMediumMuonHIP(const pat::Muon &muon)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
reco::TrackRef muonBestTrack() const override
Track selected to be the best measurement of the muon parameters (including PFlow global information)...
static bool isTrackerHighPt(const pat::Muon &mu, const reco::Vertex &primaryVertex)
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
Analysis-level muon class.