47 produces<edm::ValueMap<reco::MuonMETCorrectionData>>(
"muCorrData");
61 std::vector<std::string>
algos = iConfig.
getParameter<std::vector<std::string>>(
"trackAlgos");
108 magFieldToken_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
132 auto vm_muCorrData = std::make_unique<edm::ValueMap<reco::MuonMETCorrectionData>>();
134 std::vector<reco::MuonMETCorrectionData> v_muCorrData;
138 for (
unsigned int iMu = 0; iMu <
nMuons; iMu++) {
146 if (
mu->isGlobalMuon() ||
mu->isTrackerMuon() ||
mu->isCaloMuon())
147 mu_track =
mu->innerTrack();
149 v_muCorrData.push_back(muMETCorrData);
155 if (mu_track->pt() <
minpt_)
164 deltax = response * mu_track->p() *
sin(outerTrkPosition.Theta()) *
cos(outerTrkPosition.Phi());
165 deltay = response * mu_track->p() *
sin(outerTrkPosition.Theta()) *
sin(outerTrkPosition.Phi());
173 v_muCorrData.push_back(
177 v_muCorrData.push_back(
181 v_muCorrData.push_back(muMETCorrData);
186 dataFiller.
insert(
muons_, v_muCorrData.begin(), v_muCorrData.end());
199 bool haveBeamSpot =
true;
201 haveBeamSpot =
false;
213 nhits = siTrack->numberOfValidHits();
256 for (
unsigned int iMu = 0; iMu <
nMuons; iMu++) {
266 double deltaEta = inputSiliconTrack.
get()->eta() - testSiliconTrack.
get()->eta();
267 double deltaPhi = acos(
cos(inputSiliconTrack.
get()->phi() - testSiliconTrack.
get()->phi()));
290 double dz = siTrack->dz(pvtx);
294 d0 = -1 * siTrack->dxy(pvtx);
298 bool haveBeamSpot =
true;
300 haveBeamSpot =
false;
303 d0 = -1 * siTrack->dxy(bspot);
307 bool haveBeamSpot =
true;
309 haveBeamSpot =
false;
312 d0 = -1 * siTrack->dxy(bspot);
322 if (fabs(
d0) > d0cut)
339 if (siTrack->numberOfValidHits() <
minhits_)
341 if (siTrack->normalizedChi2() >
maxchi2_)
343 if (fabs(siTrack->eta()) >
maxeta_)
345 if (siTrack->pt() >
maxpt_)
347 if ((siTrack->ptError() / siTrack->pt()) >
maxPtErr_)
349 if (fabs(siTrack->eta()) > 2.5 && siTrack->pt() >
maxpt_eta25_)
351 if (fabs(siTrack->eta()) > 2.0 && siTrack->pt() >
maxpt_eta20_)
359 if (!((siTrack->qualityMask() &
cut) ==
cut))
362 bool isGoodAlgo =
false;
378 TVector3 outerTrkPosition;
380 outerTrkPosition.SetPtEtaPhi(999., -10., 2 *
TMath::Pi());
384 if (!
track.isNonnull()) {
385 return outerTrkPosition;
390 int tpCharge(
track->charge());
394 const double zdist = 314.;
396 const double radius = 130.;
398 const double corner = 1.479;
422 outerTrkPosition.SetPtEtaPhi(999., -10., 2 *
TMath::Pi());
424 return outerTrkPosition;
430 return p.trackerLayersWithMeasurement();