24 for (
unsigned int ww = 0; ww <
associators.size(); ww++) {
25 for (
unsigned int www = 0; www <
label.size(); www++) {
30 auto setBinLogX = [
this](TH1* th1) {
36 if (!
algo.process().empty())
38 if (!
algo.label().empty())
40 if (!
algo.instance().empty())
49 if (
assoc.find(
"tpToTkmuTrackAssociation") <
assoc.length()) {
58 h_charge.push_back(ibooker.
book1D(
"Ncharge",
"track charge", 3, -1.5, 1.5));
61 h_assoceta.push_back(ibooker.
book1D(
62 "num_assoSimToReco_eta",
"N of associated tracks (simToReco) vs eta",
nintEta,
minEta,
maxEta));
63 h_assoc2eta.push_back(ibooker.
book1D(
64 "num_assoRecoToSim_eta",
"N of associated (recoToSim) tracks vs eta",
nintEta,
minEta,
maxEta));
66 h_misideta.push_back(ibooker.
book1D(
"num_chargemisid_eta",
67 "N of associated (simToReco) tracks with charge misID vs eta",
72 h_recopT.push_back(ibooker.
book1D(
"num_reco_pT",
"N of reco track vs pT",
nintPt,
minPt,
maxPt, setBinLogX));
73 h_assocpT.push_back(ibooker.
book1D(
74 "num_assoSimToReco_pT",
"N of associated tracks (simToReco) vs pT",
nintPt,
minPt,
maxPt, setBinLogX));
75 h_assoc2pT.push_back(ibooker.
book1D(
76 "num_assoRecoToSim_pT",
"N of associated (recoToSim) tracks vs pT",
nintPt,
minPt,
maxPt, setBinLogX));
79 h_misidpT.push_back(ibooker.
book1D(
"num_chargemisid_pT",
80 "N of associated (simToReco) tracks with charge misID vs pT",
87 h_assocphi.push_back(ibooker.
book1D(
88 "num_assoSimToReco_phi",
"N of associated tracks (simToReco) vs phi",
nintPhi,
minPhi,
maxPhi));
89 h_assoc2phi.push_back(ibooker.
book1D(
90 "num_assoRecoToSim_phi",
"N of associated (recoToSim) tracks vs phi",
nintPhi,
minPhi,
maxPhi));
92 h_misidphi.push_back(ibooker.
book1D(
"num_chargemisid_phi",
93 "N of associated (simToReco) tracks with charge misID vs phi",
99 h_assochit.push_back(ibooker.
book1D(
101 h_assoc2hit.push_back(ibooker.
book1D(
103 h_simulhit.push_back(
105 h_misidhit.push_back(ibooker.
book1D(
"num_chargemisid_hit",
106 "N of associated (recoToSim) tracks with charge misID vs N RecHits",
112 h_assocdxy.push_back(ibooker.
book1D(
113 "num_assoSimToReco_dxy",
"N of associated tracks (simToReco) vs dxy",
nintDxy,
minDxy,
maxDxy));
114 h_assoc2dxy.push_back(ibooker.
book1D(
115 "num_assoRecoToSim_dxy",
"N of associated (recoToSim) tracks vs dxy",
nintDxy,
minDxy,
maxDxy));
117 h_misiddxy.push_back(ibooker.
book1D(
"num_chargemisid_dxy",
118 "N of associated (simToReco) tracks with charge misID vs dxy",
124 ibooker.
book1D(
"num_assoSimToReco_dz",
"N of associated tracks (simToReco) vs dz",
nintDz,
minDz,
maxDz));
125 h_assoc2dz.push_back(
126 ibooker.
book1D(
"num_assoRecoToSim_dz",
"N of associated (recoToSim) tracks vs dz",
nintDz,
minDz,
maxDz));
128 h_misiddz.push_back(ibooker.
book1D(
129 "num_chargemisid_dz",
"N of associated (simToReco) tracks with charge misID vs dz",
nintDz,
minDz,
maxDz));
131 h_assocRpos.push_back(ibooker.
book1D(
133 h_simulRpos.push_back(
136 h_assocZpos.push_back(ibooker.
book1D(
142 ibooker.
book1D(
"num_assoSimToReco_pu",
"N of associated tracks (simToReco) vs pu",
nintPU,
minPU,
maxPU));
143 h_assoc2pu.push_back(
144 ibooker.
book1D(
"num_assoRecoToSim_pu",
"N of associated (recoToSim) tracks vs pu",
nintPU,
minPU,
maxPU));
146 h_misidpu.push_back(ibooker.
book1D(
147 "num_chargemisid_pu",
"N of associated (simToReco) charge misIDed tracks vs pu",
nintPU,
minPU,
maxPU));
149 h_nchi2.push_back(ibooker.
book1D(
"chi2",
"Track normalized #chi^{2}", 80, 0., 20.));
150 h_nchi2_prob.push_back(ibooker.
book1D(
"chi2prob",
"Probability of track normalized #chi^{2}", 100, 0., 1.));
152 chi2_vs_nhits.push_back(
158 nhits_vs_eta.push_back(
160 nhits_vs_phi.push_back(
164 nDThits_vs_eta.push_back(ibooker.
book2D(
166 nCSChits_vs_eta.push_back(ibooker.
book2D(
168 nRPChits_vs_eta.push_back(ibooker.
book2D(
171 nGEMhits_vs_eta.push_back(ibooker.
book2D(
174 nME0hits_vs_eta.push_back(ibooker.
book2D(
179 nTRK_LayersWithMeas_vs_eta.push_back(ibooker.
book2D(
"nTRK_LayersWithMeas_vs_eta",
180 "# TRK Layers with measurement vs eta",
187 nPixel_LayersWithMeas_vs_eta.push_back(ibooker.
book2D(
"nPixel_LayersWithMeas_vs_eta",
188 "Number of Pixel Layers with measurement vs eta",
195 h_nmisslayers_inner.push_back(ibooker.
book1D(
197 h_nmisslayers_outer.push_back(ibooker.
book1D(
199 h_nlosthits.push_back(ibooker.
book1D(
"nlosthits",
"Number of lost hits per track", 6, -0.5, 5.5));
200 nlosthits_vs_eta.push_back(ibooker.
book2D(
201 "nlosthits_vs_eta",
"Number of lost hits per track vs eta",
nintEta,
minEta,
maxEta, 6, -0.5, 5.5));
204 ptres_vs_eta.push_back(ibooker.
book2D(
"ptres_vs_eta",
205 "p_{T} Relative Residual vs #eta",
212 ptres_vs_phi.push_back(ibooker.
book2D(
"ptres_vs_phi",
213 "p_{T} Relative Residual vs #phi",
220 ptres_vs_pt.push_back(ibooker.
book2D(
"ptres_vs_pt",
221 "p_{T} Relative Residual vs p_{T}",
229 h_ptpull.push_back(ibooker.
book1D(
"ptpull",
"p_{T} Pull", 100, -10., 10.));
230 ptpull_vs_eta.push_back(
232 ptpull_vs_phi.push_back(
234 h_qoverppull.push_back(ibooker.
book1D(
"qoverppull",
"q/p Pull", 100, -10., 10.));
237 etares_vs_eta.push_back(ibooker.
book2D(
"etares_vs_eta",
238 "#eta Residual vs #eta",
246 thetaCotres_vs_eta.push_back(ibooker.
book2D(
"thetaCotres_vs_eta",
247 "cot(#theta) Residual vs #eta",
254 thetaCotres_vs_pt.push_back(ibooker.
book2D(
"thetaCotres_vs_pt",
255 "cot(#theta) Residual vs p_{T}",
263 h_thetapull.push_back(ibooker.
book1D(
"thetapull",
"#theta Pull", 100, -10., 10.));
264 thetapull_vs_eta.push_back(
266 thetapull_vs_phi.push_back(
269 phires_vs_eta.push_back(ibooker.
book2D(
"phires_vs_eta",
270 "#phi Residual vs #eta",
277 phires_vs_pt.push_back(ibooker.
book2D(
"phires_vs_pt",
278 "#phi Residual vs p_{T}",
286 phires_vs_phi.push_back(ibooker.
book2D(
"phires_vs_phi",
287 "#phi Residual vs #phi",
294 h_phipull.push_back(ibooker.
book1D(
"phipull",
"#phi Pull", 100, -10., 10.));
295 phipull_vs_eta.push_back(
297 phipull_vs_phi.push_back(
300 dxyres_vs_eta.push_back(ibooker.
book2D(
"dxyres_vs_eta",
301 "dxy Residual vs #eta",
308 dxyres_vs_pt.push_back(ibooker.
book2D(
"dxyres_vs_pt",
309 "dxy Residual vs p_{T}",
317 h_dxypull.push_back(ibooker.
book1D(
"dxypull",
"dxy Pull", 100, -10., 10.));
318 dxypull_vs_eta.push_back(
321 dzres_vs_eta.push_back(ibooker.
book2D(
323 dzres_vs_pt.push_back(ibooker.
book2D(
"dzres_vs_pt",
324 "dz Residual vs p_{T}",
332 h_dzpull.push_back(ibooker.
book1D(
"dzpull",
"dz Pull", 100, -10., 10.));
333 dzpull_vs_eta.push_back(
336 nRecHits_vs_nSimHits.push_back(ibooker.
book2D(
340 h_PurityVsQuality.push_back(
341 ibooker.
book2D(
"PurityVsQuality",
"Purity vs Quality (MABH)", 20, 0.01, 1.01, 20, 0.01, 1.01));
345 h_assochi2.push_back(ibooker.
book1D(
"assocChi2",
"track association #chi^{2}", 1000, 0., 100.));
346 h_assochi2_prob.push_back(ibooker.
book1D(
"assocChi2_prob",
"probability of association #chi^{2}", 100, 0., 1.));
347 }
else if (
associators[ww] ==
"trackAssociatorByHits") {
348 h_assocFraction.push_back(ibooker.
book1D(
"assocFraction",
"fraction of shared hits", 22, 0., 1.1));
349 h_assocSharedHit.push_back(ibooker.
book1D(
"assocSharedHit",
"number of shared hits", 41, -0.5, 40.5));
357 using namespace reco;
359 edm::LogInfo(
"MuonTrackValidator") <<
"\n====================================================" 361 <<
"Analyzing new event" 363 <<
"====================================================\n" 367 int PU_NumInteractions(-1);
371 event.getByToken(pileupinfo_Token, puinfoH);
372 for (std::vector<PileupSummaryInfo>::const_iterator puInfoIt = puinfoH->begin(); puInfoIt != puinfoH->end();
374 if (puInfoIt->getBunchCrossing() == 0) {
375 PU_NumInteractions = puInfoIt->getPU_NumInteractions();
383 event.getByToken(_simHitTpMapTag, simHitsTPAssoc);
384 cosmicParametersDefinerTP_->initEvent(simHitsTPAssoc);
385 cosmictpSelector.initEvent(simHitsTPAssoc);
394 event.getByToken(tp_refvector_Token, TPCollectionRefVector_H);
395 ptr_TPrefV = TPCollectionRefVector_H.
product();
397 event.getByToken(tp_Token, TPCollection_H);
398 size_t nTP = TPCollection_H->size();
399 for (
size_t i = 0;
i < nTP; ++
i) {
402 ptr_TPrefV = &TPrefV;
407 bool bs_Available =
event.getByToken(bsSrc_Token, recoBeamSpotHandle);
410 bs = *recoBeamSpotHandle;
413 std::vector<const reco::TrackToTrackingParticleAssociator*>
associator;
423 for (
unsigned int ww = 0; ww <
associators.size(); ww++) {
424 for (
unsigned int www = 0; www <
label.size(); www++) {
429 unsigned int trackCollectionSize = 0;
435 if (!
event.getByToken(track_Collection_Token[www],
trackCollection) && ignoremissingtkcollection_) {
446 <<
"Analyzing " <<
label[www].process() <<
":" <<
label[www].label() <<
":" <<
label[www].instance()
449 LogTrace(
"MuonTrackValidator") <<
"Calling associateRecoToSim method" 452 LogTrace(
"MuonTrackValidator") <<
"Calling associateSimToReco method" 457 <<
"Analyzing " <<
label[www].process() <<
":" <<
label[www].label() <<
":" <<
label[www].instance()
462 event.getByToken(simToRecoCollection_Token, simtorecoCollectionH);
463 simRecColl = *simtorecoCollectionH.
product();
466 event.getByToken(recoToSimCollection_Token, recotosimCollectionH);
467 recSimColl = *recotosimCollectionH.
product();
478 for (
size_t i = 0;
i < tPC.
size();
i++) {
479 bool TP_is_matched =
false;
480 bool isChargeOK =
true;
494 LogTrace(
"MuonTrackValidator") <<
"TrackingParticle " <<
i;
497 momentumTP =
tp.momentum();
498 vertexTP =
tp.vertex();
509 momentumTP = cosmicParametersDefinerTP_->momentum(
event,
setup, tpr);
510 vertexTP = cosmicParametersDefinerTP_->vertex(
event,
setup, tpr);
518 nSimHits = tpr.
get()->numberOfHits();
520 nSimHits = tpr.
get()->numberOfHits() - tpr.
get()->numberOfTrackerHits();
522 nSimHits = tpr.
get()->numberOfTrackerHits();
525 edm::LogVerbatim(
"MuonTrackValidator") <<
"--------------------Selected TrackingParticle #" << tpr.
key()
526 <<
" (N counted simhits = " << nSimHits <<
")";
528 <<
"momentumTP: pt = " <<
sqrt(momentumTP.perp2()) <<
", pz = " << momentumTP.z()
529 <<
", \t vertexTP: radius = " <<
sqrt(vertexTP.perp2()) <<
", z = " << vertexTP.z();
532 double TPeta = momentumTP.eta();
533 double xTPeta =
getEta(TPeta);
534 double TPpt =
sqrt(momentumTP.perp2());
535 double xTPpt = getPt(TPpt);
536 double TPphi = momentumTP.phi();
537 double TPrpos =
sqrt(vertexTP.perp2());
538 double TPzpos = vertexTP.z();
540 int assoc_recoTrack_NValidHits = 0;
541 if (simRecColl.
find(tpr) != simRecColl.
end()) {
542 auto const&
rt = simRecColl[tpr];
545 TP_is_matched =
true;
547 if (assoc_recoTrack->
charge() != tpr->charge())
551 edm::LogVerbatim(
"MuonTrackValidator") <<
"-----------------------------associated to Track #" 552 << assoc_recoTrack.
key() <<
" with quality:" <<
quality <<
"\n";
556 <<
"TrackingParticle #" << tpr.
key() <<
" with pt,eta,phi: " <<
sqrt(momentumTP.perp2()) <<
" , " 557 << momentumTP.eta() <<
" , " << momentumTP.phi() <<
" , " 558 <<
" NOT associated to any reco::Track" 563 fillPlotNoFlow(h_simuleta[
w], xTPeta);
565 fillPlotNoFlow(h_assoceta[
w], xTPeta);
567 fillPlotNoFlow(h_misideta[
w], xTPeta);
571 fillPlotNoFlow(h_simulphi[
w], TPphi);
573 fillPlotNoFlow(h_assocphi[
w], TPphi);
575 fillPlotNoFlow(h_misidphi[
w], TPphi);
579 fillPlotNoFlow(h_simulpT[
w], xTPpt);
581 fillPlotNoFlow(h_assocpT[
w], xTPpt);
583 fillPlotNoFlow(h_misidpT[
w], xTPpt);
587 fillPlotNoFlow(h_simuldxy[
w], dxySim);
589 fillPlotNoFlow(h_assocdxy[
w], dxySim);
591 fillPlotNoFlow(h_misiddxy[
w], dxySim);
595 fillPlotNoFlow(h_simuldz[
w], dzSim);
597 fillPlotNoFlow(h_assocdz[
w], dzSim);
599 fillPlotNoFlow(h_misiddz[
w], dzSim);
603 fillPlotNoFlow(h_simulRpos[
w], TPrpos);
605 fillPlotNoFlow(h_assocRpos[
w], TPrpos);
608 fillPlotNoFlow(h_simulZpos[
w], TPzpos);
610 fillPlotNoFlow(h_assocZpos[
w], TPzpos);
613 fillPlotNoFlow(h_simulhit[
w], nSimHits);
615 fillPlotNoFlow(h_assochit[
w], nSimHits);
616 nRecHits_vs_nSimHits[
w]->Fill(nSimHits, assoc_recoTrack_NValidHits);
623 fillPlotNoFlow(h_simulpu[
w], PU_NumInteractions);
625 fillPlotNoFlow(h_assocpu[
w], PU_NumInteractions);
627 fillPlotNoFlow(h_misidpu[
w], PU_NumInteractions);
636 <<
"\n# of reco::Tracks with " <<
label[www].process() <<
":" <<
label[www].label() <<
":" 637 <<
label[www].instance() <<
": " << trackCollectionSize <<
"\n";
642 bool Track_is_matched =
false;
643 bool isChargeOK =
true;
645 int nRecHits =
track->numberOfValidHits();
648 std::vector<std::pair<TrackingParticleRef, double> >
tp;
653 edm::LogVerbatim(
"MuonTrackValidator") <<
"----------------------------------------Track #" <<
track.key()
654 <<
" (N valid rechits = " << nRecHits <<
")";
659 tpr =
tp.begin()->first;
661 if (simRecColl.
find(tpr) != simRecColl.
end()) {
662 auto const& assoc_track_checkback = simRecColl[tpr].
begin()->first;
664 if (assoc_track_checkback.key() ==
track.key()) {
665 Track_is_matched =
true;
667 if (
track->charge() != tpr->charge())
669 double Purity =
tp.begin()->second;
672 <<
"with pt=" <<
track->pt() <<
" associated with purity:" << Purity <<
" to TrackingParticle #" 673 << tpr.
key() <<
"\n";
675 h_PurityVsQuality[
w]->Fill(
Quality, Purity);
681 if (!Track_is_matched)
683 <<
"with pt=" <<
track->pt() <<
" NOT associated to any TrackingParticle" 691 tpr =
tp.begin()->first;
692 Track_is_matched =
true;
694 if (
track->charge() != tpr->charge())
697 <<
" associated with quality:" <<
tp.begin()->second <<
"\n";
701 <<
" NOT associated to any TrackingParticle" 706 double etaRec =
track->eta();
707 double xetaRec =
getEta(etaRec);
709 double ptRec =
track->pt();
710 double xptRec = getPt(ptRec);
712 double qoverpRec =
track->qoverp();
713 double phiRec =
track->phi();
714 double thetaRec =
track->theta();
715 double dxyRec =
track->dxy(
bs.position());
716 double dzRec =
track->dz(
bs.position());
718 double qoverpError =
track->qoverpError();
719 double ptError =
track->ptError();
720 double thetaError =
track->thetaError();
722 double dxyError =
track->dxyError();
723 double dzError =
track->dzError();
726 fillPlotNoFlow(h_recoeta[
w], xetaRec);
727 if (Track_is_matched) {
728 fillPlotNoFlow(h_assoc2eta[
w], xetaRec);
732 fillPlotNoFlow(h_recophi[
w], phiRec);
733 if (Track_is_matched) {
734 fillPlotNoFlow(h_assoc2phi[
w], phiRec);
738 fillPlotNoFlow(h_recopT[
w], xptRec);
739 if (Track_is_matched) {
740 fillPlotNoFlow(h_assoc2pT[
w], xptRec);
744 fillPlotNoFlow(h_recodxy[
w], dxyRec);
745 if (Track_is_matched) {
746 fillPlotNoFlow(h_assoc2dxy[
w], dxyRec);
750 fillPlotNoFlow(h_recodz[
w], dzRec);
751 if (Track_is_matched) {
752 fillPlotNoFlow(h_assoc2dz[
w], dzRec);
756 fillPlotNoFlow(h_recohit[
w], nRecHits);
757 if (Track_is_matched) {
758 fillPlotNoFlow(h_assoc2hit[
w], nRecHits);
761 fillPlotNoFlow(h_misidhit[
w], nRecHits);
765 fillPlotNoFlow(h_recopu[
w], PU_NumInteractions);
766 if (Track_is_matched) {
767 fillPlotNoFlow(h_assoc2pu[
w], PU_NumInteractions);
782 vertexTP = lhcParametersDefinerTP_->vertex(
event,
setup, tpr);
786 if (!(Track_is_matched && cosmictpSelector(tpr, &
bs,
event,
setup)))
789 momentumTP = cosmicParametersDefinerTP_->momentum(
event,
setup, tpr);
790 vertexTP = cosmicParametersDefinerTP_->vertex(
event,
setup, tpr);
796 double assocChi2 = -
tp.begin()->second;
797 h_assochi2[www]->Fill(assocChi2);
798 h_assochi2_prob[www]->Fill(TMath::Prob((assocChi2)*5, 5));
799 }
else if (
associators[ww] ==
"trackAssociatorByHits") {
801 h_assocFraction[www]->Fill(
fraction);
802 h_assocSharedHit[www]->Fill(
fraction * nRecHits);
805 h_charge[
w]->Fill(
track->charge());
808 h_nhits[
w]->Fill(nRecHits);
809 nhits_vs_eta[
w]->Fill(xetaRec, nRecHits);
810 nhits_vs_phi[
w]->Fill(phiRec, nRecHits);
813 nDThits_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().numberOfValidMuonDTHits());
814 nCSChits_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().numberOfValidMuonCSCHits());
815 nRPChits_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().numberOfValidMuonRPCHits());
817 nGEMhits_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().numberOfValidMuonGEMHits());
819 nME0hits_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().numberOfValidMuonME0Hits());
823 nTRK_LayersWithMeas_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().trackerLayersWithMeasurement());
824 nPixel_LayersWithMeas_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().pixelLayersWithMeasurement());
825 h_nlosthits[
w]->Fill(
track->numberOfLostHits());
828 nlosthits_vs_eta[
w]->Fill(xetaRec,
track->numberOfLostHits());
832 h_nchi2[
w]->Fill(
track->normalizedChi2());
833 h_nchi2_prob[
w]->Fill(TMath::Prob(
track->chi2(), (
int)
track->ndof()));
834 chi2_vs_nhits[
w]->Fill(nRecHits,
track->normalizedChi2());
835 chi2_vs_eta[
w]->Fill(xetaRec,
track->normalizedChi2());
836 chi2_vs_phi[
w]->Fill(phiRec,
track->normalizedChi2());
838 double ptSim =
sqrt(momentumTP.perp2());
839 double xptSim = getPt(ptSim);
840 double qoverpSim = tpr->charge() /
sqrt(momentumTP.x() * momentumTP.x() + momentumTP.y() * momentumTP.y() +
841 momentumTP.z() * momentumTP.z());
842 double etaSim = momentumTP.eta();
843 double thetaSim = momentumTP.theta();
844 double phiSim = momentumTP.phi();
848 double etares = etaRec - etaSim;
849 double ptRelRes = (ptRec - ptSim) / ptSim;
850 double ptPull = (ptRec - ptSim) / ptError;
851 double qoverpPull = (qoverpRec - qoverpSim) / qoverpError;
852 double thetaPull = (thetaRec - thetaSim) / thetaError;
853 double phiDiff = phiRec - phiSim;
856 phiDiff = phiDiff - 2. *
M_PI;
858 phiDiff = phiDiff + 2. *
M_PI;
860 double phiPull = phiDiff /
phiError;
861 double dxyPull = (dxyRec - dxySim) / dxyError;
862 double dzPull = (dzRec - dzSim) / dzError;
864 h_etaRes[
w]->Fill(etares);
865 etares_vs_eta[
w]->Fill(xetaRec, etares);
867 ptres_vs_eta[
w]->Fill(xetaRec, ptRelRes);
868 ptres_vs_pt[
w]->Fill(xptSim, ptRelRes);
869 ptres_vs_phi[
w]->Fill(phiRec, ptRelRes);
870 h_ptpull[
w]->Fill(ptPull);
871 ptpull_vs_eta[
w]->Fill(xetaRec, ptPull);
872 ptpull_vs_phi[
w]->Fill(phiRec, ptPull);
873 h_qoverppull[
w]->Fill(qoverpPull);
875 thetaCotres_vs_eta[
w]->Fill(xetaRec,
cos(thetaRec) /
sin(thetaRec) -
cos(thetaSim) /
sin(thetaSim));
876 thetaCotres_vs_pt[
w]->Fill(xptSim,
cos(thetaRec) /
sin(thetaRec) -
cos(thetaSim) /
sin(thetaSim));
877 h_thetapull[
w]->Fill(thetaPull);
878 thetapull_vs_eta[
w]->Fill(xetaRec, thetaPull);
879 thetapull_vs_phi[
w]->Fill(phiRec, thetaPull);
881 phires_vs_eta[
w]->Fill(xetaRec, phiDiff);
882 phires_vs_pt[
w]->Fill(xptSim, phiDiff);
883 phires_vs_phi[
w]->Fill(phiRec, phiDiff);
884 h_phipull[
w]->Fill(phiPull);
885 phipull_vs_eta[
w]->Fill(xetaRec, phiPull);
886 phipull_vs_phi[
w]->Fill(phiRec, phiPull);
888 dxyres_vs_eta[
w]->Fill(xetaRec, dxyRec - dxySim);
889 dxyres_vs_pt[
w]->Fill(xptSim, dxyRec - dxySim);
890 h_dxypull[
w]->Fill(dxyPull);
891 dxypull_vs_eta[
w]->Fill(xetaRec, dxyPull);
893 dzres_vs_eta[
w]->Fill(xetaRec, dzRec - dzSim);
894 dzres_vs_pt[
w]->Fill(xptSim, dzRec - dzSim);
895 h_dzpull[
w]->Fill(dzPull);
896 dzpull_vs_eta[
w]->Fill(xetaRec, dzPull);
898 double contrib_Qoverp = qoverpPull * qoverpPull / 5;
899 double contrib_dxy = dxyPull * dxyPull / 5;
900 double contrib_dz = dzPull * dzPull / 5;
901 double contrib_theta = thetaPull * thetaPull / 5;
902 double contrib_phi = phiPull * phiPull / 5;
903 double assoChi2 = contrib_Qoverp + contrib_dxy + contrib_dz + contrib_theta + contrib_phi;
905 LogTrace(
"MuonTrackValidator") <<
"normalized Chi2 (track 5-dofs matching) = " << assoChi2 <<
"\n" 906 <<
"\t contrib_Qoverp = " << contrib_Qoverp <<
"\n" 907 <<
"\t contrib_theta = " << contrib_theta <<
"\n" 908 <<
"\t contrib_phi = " << contrib_phi <<
"\n" 909 <<
"\t contrib_dxy = " << contrib_dxy <<
"\n" 910 <<
"\t contrib_dz = " << contrib_dz <<
"\n";
912 LogTrace(
"MuonTrackValidator") <<
"ptRec = " << ptRec <<
"\n" 913 <<
"etaRec = " << etaRec <<
"\n" 914 <<
"qoverpRec = " << qoverpRec <<
"\n" 915 <<
"thetaRec = " << thetaRec <<
"\n" 916 <<
"phiRec = " << phiRec <<
"\n" 917 <<
"dxyRec = " << dxyRec <<
"\n" 918 <<
"dzRec = " << dzRec <<
"\n" 921 <<
"qoverpError = " << qoverpError <<
"\n" 922 <<
"thetaError = " << thetaError <<
"\n" 923 <<
"phiError = " <<
phiError <<
"\n" 924 <<
"dxyError = " << dxyError <<
"\n" 925 <<
"dzError = " << dzError <<
"\n" 928 <<
"ptSim = " << ptSim <<
"\n" 929 <<
"etaSim = " << etaSim <<
"\n" 930 <<
"qoverpSim = " << qoverpSim <<
"\n" 931 <<
"thetaSim = " << thetaSim <<
"\n" 932 <<
"phiSim = " << phiSim <<
"\n" 933 <<
"dxySim = " << dxySim <<
"\n" 934 <<
"dzSim = " << dzSim <<
"\n";
937 h_tracks[
w]->Fill(at);
938 h_fakes[
w]->Fill(rT - at);
940 <<
"Total Associated (simToReco): " << ats <<
"\n" 941 <<
"Total Reconstructed: " << rT <<
"\n" 942 <<
"Total Associated (recoToSim): " << at <<
"\n" 943 <<
"Total Fakes: " << rT - at <<
"\n";
Log< level::Info, true > LogVerbatim
Vector momentum() const
spatial momentum vector
unsigned short numberOfValidHits() const
number of valid hits found
virtual void setCurrentFolder(std::string const &fullpath)
constexpr uint32_t maxLayers
Sin< T >::type sin(const T &t)
T const * product() const
def replace(string, replacements)
float getEta(float r, float z)
key_type key() const
Accessor for product key.
const_iterator find(const key_type &k) const
find element with specified reference key
const_iterator end() const
last iterator over the map (read only)
math::XYZPointD Point
point in the space
BiDirectional_RecoToSim_association
int charge() const
track electric charge
auto dz(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
void post_insert()
post insert action
Cos< T >::type cos(const T &t)
Abs< T >::type abs(const T &t)
Log< level::Info, false > LogInfo
size_type size() const
Size of the RefVector.
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void bookHistograms(DQMEDAnalyzer::DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
const_iterator begin() const
first iterator over the map (read only)
auto dxy(const T_Vertex &vertex, const T_Momentum &momentum, const T_Point &point)
T const * get() const
Returns C++ pointer to the item.
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
void analyze(const edm::Event &, const edm::EventSetup &) override
Monte Carlo truth information used for tracking validation.
math::XYZVectorD Vector
point in the space
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
edm::Ref< TrackingParticleCollection > TrackingParticleRef