56 : minPt_(iConfig.getParameter<double>(
"minPt")),
57 maxEta_(iConfig.getParameter<double>(
"maxEta")),
58 isAlsoTkMu_(iConfig.getParameter<
bool>(
"isAlsoTkMu")),
59 maxNormChi2_(iConfig.getParameter<double>(
"maxNormChi2")),
60 maxd0_(iConfig.getParameter<double>(
"maxd0")),
61 minnHits_(iConfig.getParameter<
int>(
"minnHits")),
62 minnValidStaHits_(iConfig.getParameter<
int>(
"minnValidStaHits")),
63 useTrackAssociatorPositions_(iConfig.getParameter<
bool>(
"useTrackAssociatorPositions")),
64 useHO_(iConfig.getParameter<
bool>(
"useHO")),
65 towerEtThreshold_(iConfig.getParameter<double>(
"towerEtThreshold")),
66 useRecHits_(iConfig.getParameter<
bool>(
"useRecHits")) {
69 magFieldToken_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
76 produces<edm::ValueMap<reco::MuonMETCorrectionData>>(
"muCorrData");
91 std::vector<reco::MuonMETCorrectionData> muCorrDataList;
101 muCorrDataList.push_back(muMETCorrData);
104 auto valueMapMuCorrData = std::make_unique<edm::ValueMap<reco::MuonMETCorrectionData>>();
108 dataFiller.insert(
muons, muCorrDataList.begin(), muCorrDataList.end());
123 if (
muon.isGlobalMuon())
124 mu_track =
muon.globalTrack();
125 else if (
muon.isTrackerMuon() ||
muon.isRPCMuon() ||
muon.isGEMMuon() ||
muon.isME0Muon())
126 mu_track =
muon.innerTrack();
128 mu_track =
muon.outerTrack();
142 return reco::MuonMETCorrectionData::Type::MuonCandidateValuesUsed;
144 return reco::MuonMETCorrectionData::Type::NotUsed;
150 if (!
muon.isGlobalMuon())
161 if (fabs(globTk->dxy(beamSpotPosition)) > fabs(
maxd0_))
163 if (siTk->numberOfValidHits() <
minnHits_)