5 typedef std::pair<const reco::MuonChamberMatch*, const reco::MuonSegmentMatch*>
MatchPair;
17 if (
abs(match1.first->x - match1.second->x) >
abs(match2.first->x - match2.second->x))
39 return (
match.first->dXdZ -
match.second->dXdZ) /
61 return (
match.first->dYdZ -
match.second->dYdZ) /
78 const int n_stations = 2;
80 for (
unsigned int i = 0;
i < n_stations; ++
i)
81 matches.push_back(std::pair(
nullptr,
nullptr));
84 for (
auto& chamberMatch :
muon.matches()) {
85 unsigned int station = chamberMatch.station() - 1;
92 for (
auto& segmentMatch : chamberMatch.segmentMatches) {
100 auto match_pair =
MatchPair(&chamberMatch, &segmentMatch);
115 if (!
muon.isTrackerMuon() && !
muon.isGlobalMuon())
121 booster.
set(
"eta",
muon.eta());
122 booster.
set(
"trkValidFrac",
muon.innerTrack()->validFraction());
123 booster.
set(
"glbTrackProbability",
muon.combinedQuality().glbTrackProbability);
124 booster.
set(
"nLostHitsInner",
126 booster.
set(
"nLostHitsOuter",
128 booster.
set(
"trkKink",
muon.combinedQuality().trkKink);
129 booster.
set(
"chi2LocalPosition",
muon.combinedQuality().chi2LocalPosition);
130 booster.
set(
"nPixels",
muon.innerTrack()->hitPattern().numberOfValidPixelHits());
131 booster.
set(
"nValidHits",
muon.innerTrack()->hitPattern().numberOfValidTrackerHits());
133 booster.
set(
"glbNormChi2",
muon.isGlobalMuon() ?
muon.globalTrack()->normalizedChi2() : 9999.);
134 booster.
set(
"trkLayers",
muon.innerTrack()->hitPattern().trackerLayersWithMeasurement());
const MatchPair & getBetterMatch(const MatchPair &match1, const MatchPair &match2)
void fillMatchInfoForStation(std::string prefix, pat::XGBooster &booster, const MatchPair &match)
static const unsigned int BestInStationByDR
float predict(const int iterationEnd=0)
float pullDyDz(const MatchPair &match)
float computeSoftMvaRun3(XGBooster &booster, const Muon &muon)
std::pair< const reco::MuonChamberMatch *, const reco::MuonSegmentMatch * > MatchPair
float pullDxDz(const MatchPair &match)
Abs< T >::type abs(const T &t)
float dX(const MatchPair &match)
void fillMatchInfo(pat::XGBooster &booster, const pat::Muon &muon)
static const unsigned int BelongsToTrackByDR
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
void set(std::string name, float value)
float pullY(const MatchPair &match)
Analysis-level muon class.
Power< A, B >::type pow(const A &a, const B &b)
float pullX(const MatchPair &match)
float dY(const MatchPair &match)