27 for (
unsigned int ww = 0; ww <
associators.size(); ww++) {
28 for (
unsigned int www = 0; www <
label.size(); www++) {
33 auto setBinLogX = [
this](TH1* th1) {
39 if (!
algo.process().empty())
41 if (!
algo.label().empty())
43 if (!
algo.instance().empty())
52 if (
assoc.find(
"tpToTkmuTrackAssociation") <
assoc.length()) {
58 h_tracks.push_back(ibooker.
book1D(
"Ntracks",
"Number of reconstructed tracks", 100, -0.5, 99.5));
59 h_fakes.push_back(ibooker.
book1D(
"Nfakes",
"Number of fake reco tracks", 20, -0.5, 19.5));
60 h_charge.push_back(ibooker.
book1D(
"Ncharge",
"track charge", 3, -1.5, 1.5));
63 h_assoceta.push_back(ibooker.
book1D(
64 "num_assoSimToReco_eta",
"N of associated tracks (simToReco) vs eta",
nintEta,
minEta,
maxEta));
65 h_assoc2eta.push_back(ibooker.
book1D(
66 "num_assoRecoToSim_eta",
"N of associated (recoToSim) tracks vs eta",
nintEta,
minEta,
maxEta));
68 h_misideta.push_back(ibooker.
book1D(
"num_chargemisid_eta",
69 "N of associated (simToReco) tracks with charge misID vs eta",
74 h_recopT.push_back(ibooker.
book1D(
"num_reco_pT",
"N of reco track vs pT",
nintPt,
minPt,
maxPt, setBinLogX));
75 h_assocpT.push_back(ibooker.
book1D(
76 "num_assoSimToReco_pT",
"N of associated tracks (simToReco) vs pT",
nintPt,
minPt,
maxPt, setBinLogX));
77 h_assoc2pT.push_back(ibooker.
book1D(
78 "num_assoRecoToSim_pT",
"N of associated (recoToSim) tracks vs pT",
nintPt,
minPt,
maxPt, setBinLogX));
81 h_misidpT.push_back(ibooker.
book1D(
"num_chargemisid_pT",
82 "N of associated (simToReco) tracks with charge misID vs pT",
89 h_assocphi.push_back(ibooker.
book1D(
90 "num_assoSimToReco_phi",
"N of associated tracks (simToReco) vs phi",
nintPhi,
minPhi,
maxPhi));
91 h_assoc2phi.push_back(ibooker.
book1D(
92 "num_assoRecoToSim_phi",
"N of associated (recoToSim) tracks vs phi",
nintPhi,
minPhi,
maxPhi));
94 h_misidphi.push_back(ibooker.
book1D(
"num_chargemisid_phi",
95 "N of associated (simToReco) tracks with charge misID vs phi",
101 h_assochit.push_back(ibooker.
book1D(
103 h_assoc2hit.push_back(ibooker.
book1D(
105 h_simulhit.push_back(
107 h_misidhit.push_back(ibooker.
book1D(
"num_chargemisid_hit",
108 "N of associated (recoToSim) tracks with charge misID vs N RecHits",
114 h_assocdxy.push_back(ibooker.
book1D(
115 "num_assoSimToReco_dxy",
"N of associated tracks (simToReco) vs dxy",
nintDxy,
minDxy,
maxDxy));
116 h_assoc2dxy.push_back(ibooker.
book1D(
117 "num_assoRecoToSim_dxy",
"N of associated (recoToSim) tracks vs dxy",
nintDxy,
minDxy,
maxDxy));
119 h_misiddxy.push_back(ibooker.
book1D(
"num_chargemisid_dxy",
120 "N of associated (simToReco) tracks with charge misID vs dxy",
126 ibooker.
book1D(
"num_assoSimToReco_dz",
"N of associated tracks (simToReco) vs dz",
nintDz,
minDz,
maxDz));
127 h_assoc2dz.push_back(
128 ibooker.
book1D(
"num_assoRecoToSim_dz",
"N of associated (recoToSim) tracks vs dz",
nintDz,
minDz,
maxDz));
130 h_misiddz.push_back(ibooker.
book1D(
131 "num_chargemisid_dz",
"N of associated (simToReco) tracks with charge misID vs dz",
nintDz,
minDz,
maxDz));
133 h_assocRpos.push_back(ibooker.
book1D(
135 h_simulRpos.push_back(
138 h_assocZpos.push_back(ibooker.
book1D(
144 ibooker.
book1D(
"num_assoSimToReco_pu",
"N of associated tracks (simToReco) vs pu",
nintPU,
minPU,
maxPU));
145 h_assoc2pu.push_back(
146 ibooker.
book1D(
"num_assoRecoToSim_pu",
"N of associated (recoToSim) tracks vs pu",
nintPU,
minPU,
maxPU));
148 h_misidpu.push_back(ibooker.
book1D(
149 "num_chargemisid_pu",
"N of associated (simToReco) charge misIDed tracks vs pu",
nintPU,
minPU,
maxPU));
151 h_nchi2.push_back(ibooker.
book1D(
"chi2",
"Track normalized #chi^{2}", 80, 0., 20.));
152 h_nchi2_prob.push_back(ibooker.
book1D(
"chi2prob",
"Probability of track normalized #chi^{2}", 100, 0., 1.));
154 chi2_vs_nhits.push_back(
160 nhits_vs_eta.push_back(
162 nhits_vs_phi.push_back(
166 nDThits_vs_eta.push_back(ibooker.
book2D(
168 nCSChits_vs_eta.push_back(ibooker.
book2D(
170 nRPChits_vs_eta.push_back(ibooker.
book2D(
173 nGEMhits_vs_eta.push_back(ibooker.
book2D(
176 nME0hits_vs_eta.push_back(ibooker.
book2D(
181 nTRK_LayersWithMeas_vs_eta.push_back(ibooker.
book2D(
"nTRK_LayersWithMeas_vs_eta",
182 "# TRK Layers with measurement vs eta",
189 nPixel_LayersWithMeas_vs_eta.push_back(ibooker.
book2D(
"nPixel_LayersWithMeas_vs_eta",
190 "Number of Pixel Layers with measurement vs eta",
197 h_nmisslayers_inner.push_back(ibooker.
book1D(
199 h_nmisslayers_outer.push_back(ibooker.
book1D(
201 h_nlosthits.push_back(ibooker.
book1D(
"nlosthits",
"Number of lost hits per track", 6, -0.5, 5.5));
202 nlosthits_vs_eta.push_back(ibooker.
book2D(
203 "nlosthits_vs_eta",
"Number of lost hits per track vs eta",
nintEta,
minEta,
maxEta, 6, -0.5, 5.5));
206 ptres_vs_eta.push_back(ibooker.
book2D(
"ptres_vs_eta",
207 "p_{T} Relative Residual vs #eta",
214 ptres_vs_phi.push_back(ibooker.
book2D(
"ptres_vs_phi",
215 "p_{T} Relative Residual vs #phi",
222 ptres_vs_pt.push_back(ibooker.
book2D(
"ptres_vs_pt",
223 "p_{T} Relative Residual vs p_{T}",
231 h_ptpull.push_back(ibooker.
book1D(
"ptpull",
"p_{T} Pull", 100, -10., 10.));
232 ptpull_vs_eta.push_back(
234 ptpull_vs_phi.push_back(
236 h_qoverppull.push_back(ibooker.
book1D(
"qoverppull",
"q/p Pull", 100, -10., 10.));
239 etares_vs_eta.push_back(ibooker.
book2D(
"etares_vs_eta",
240 "#eta Residual vs #eta",
248 thetaCotres_vs_eta.push_back(ibooker.
book2D(
"thetaCotres_vs_eta",
249 "cot(#theta) Residual vs #eta",
256 thetaCotres_vs_pt.push_back(ibooker.
book2D(
"thetaCotres_vs_pt",
257 "cot(#theta) Residual vs p_{T}",
265 h_thetapull.push_back(ibooker.
book1D(
"thetapull",
"#theta Pull", 100, -10., 10.));
266 thetapull_vs_eta.push_back(
268 thetapull_vs_phi.push_back(
271 phires_vs_eta.push_back(ibooker.
book2D(
"phires_vs_eta",
272 "#phi Residual vs #eta",
279 phires_vs_pt.push_back(ibooker.
book2D(
"phires_vs_pt",
280 "#phi Residual vs p_{T}",
288 phires_vs_phi.push_back(ibooker.
book2D(
"phires_vs_phi",
289 "#phi Residual vs #phi",
296 h_phipull.push_back(ibooker.
book1D(
"phipull",
"#phi Pull", 100, -10., 10.));
297 phipull_vs_eta.push_back(
299 phipull_vs_phi.push_back(
302 dxyres_vs_eta.push_back(ibooker.
book2D(
"dxyres_vs_eta",
303 "dxy Residual vs #eta",
310 dxyres_vs_pt.push_back(ibooker.
book2D(
"dxyres_vs_pt",
311 "dxy Residual vs p_{T}",
319 h_dxypull.push_back(ibooker.
book1D(
"dxypull",
"dxy Pull", 100, -10., 10.));
320 dxypull_vs_eta.push_back(
323 dzres_vs_eta.push_back(ibooker.
book2D(
325 dzres_vs_pt.push_back(ibooker.
book2D(
"dzres_vs_pt",
326 "dz Residual vs p_{T}",
334 h_dzpull.push_back(ibooker.
book1D(
"dzpull",
"dz Pull", 100, -10., 10.));
335 dzpull_vs_eta.push_back(
338 nRecHits_vs_nSimHits.push_back(ibooker.
book2D(
342 h_PurityVsQuality.push_back(
343 ibooker.
book2D(
"PurityVsQuality",
"Purity vs Quality (MABH)", 20, 0.01, 1.01, 20, 0.01, 1.01));
347 h_assochi2.push_back(ibooker.
book1D(
"assocChi2",
"track association #chi^{2}", 1000, 0., 100.));
348 h_assochi2_prob.push_back(ibooker.
book1D(
"assocChi2_prob",
"probability of association #chi^{2}", 100, 0., 1.));
349 }
else if (
associators[ww] ==
"trackAssociatorByHits") {
350 h_assocFraction.push_back(ibooker.
book1D(
"assocFraction",
"fraction of shared hits", 22, 0., 1.1));
351 h_assocSharedHit.push_back(ibooker.
book1D(
"assocSharedHit",
"number of shared hits", 41, -0.5, 40.5));
359 using namespace reco;
361 edm::LogInfo(
"MuonTrackValidator") <<
"\n===================================================="
363 <<
"Analyzing new event"
365 <<
"====================================================\n"
369 int PU_NumInteractions(-1);
372 std::unique_ptr<ParametersDefinerForTP> Cosmic_parametersDefinerTP;
378 event.getByToken(pileupinfo_Token, puinfoH);
379 for (std::vector<PileupSummaryInfo>::const_iterator puInfoIt = puinfoH->begin(); puInfoIt != puinfoH->end();
381 if (puInfoIt->getBunchCrossing() == 0) {
382 PU_NumInteractions = puInfoIt->getPU_NumInteractions();
392 Cosmic_parametersDefinerTP = _Cosmic_parametersDefinerTP->
clone();
396 event.getByToken(_simHitTpMapTag, simHitsTPAssoc);
397 Cosmic_parametersDefinerTP->initEvent(simHitsTPAssoc);
398 cosmictpSelector.initEvent(simHitsTPAssoc);
405 event.getByToken(tp_effic_Token, TPCollectionHeff);
409 event.getByToken(tp_fake_Token, TPCollectionHfake);
412 event.getByToken(bsSrc_Token, recoBeamSpotHandle);
415 std::vector<const reco::TrackToTrackingParticleAssociator*>
associator;
425 for (
unsigned int ww = 0; ww <
associators.size(); ww++) {
426 for (
unsigned int www = 0; www <
label.size(); www++) {
431 unsigned int trackCollectionSize = 0;
437 if (!
event.getByToken(track_Collection_Token[www],
trackCollection) && ignoremissingtkcollection_) {
448 <<
"Analyzing " <<
label[www].process() <<
":" <<
label[www].label() <<
":" <<
label[www].instance()
451 LogTrace(
"MuonTrackValidator") <<
"Calling associateRecoToSim method"
454 LogTrace(
"MuonTrackValidator") <<
"Calling associateSimToReco method"
459 <<
"Analyzing " <<
label[www].process() <<
":" <<
label[www].label() <<
":" <<
label[www].instance()
464 event.getByToken(simToRecoCollection_Token, simtorecoCollectionH);
465 simRecColl = *simtorecoCollectionH.
product();
468 event.getByToken(recoToSimCollection_Token, recotosimCollectionH);
469 recSimColl = *recotosimCollectionH.
product();
476 edm::LogVerbatim(
"MuonTrackValidator") <<
"\n# of TrackingParticles: " << tPCeff.size() <<
"\n";
480 bool TP_is_matched =
false;
481 bool isChargeOK =
true;
495 LogTrace(
"MuonTrackValidator") <<
"TrackingParticle " <<
i;
498 momentumTP =
tp->momentum();
499 vertexTP =
tp->vertex();
510 momentumTP = Cosmic_parametersDefinerTP->momentum(
event,
setup, tpr);
511 vertexTP = Cosmic_parametersDefinerTP->vertex(
event,
setup, tpr);
515 edm::LogVerbatim(
"MuonTrackValidator") <<
"--------------------Selected TrackingParticle #" << tpr.
key();
517 <<
"momentumTP: pt = " <<
sqrt(momentumTP.perp2()) <<
", pz = " << momentumTP.z()
518 <<
", \t vertexTP: radius = " <<
sqrt(vertexTP.perp2()) <<
", z = " << vertexTP.z() <<
"\n";
521 double TPeta = momentumTP.eta();
522 double xTPeta = getEta(TPeta);
523 double TPpt =
sqrt(momentumTP.perp2());
524 double xTPpt = getPt(TPpt);
525 double TPphi = momentumTP.phi();
526 double TPrpos =
sqrt(vertexTP.perp2());
527 double TPzpos = vertexTP.z();
532 nSimHits = tpr.
get()->numberOfHits();
534 nSimHits = tpr.
get()->numberOfHits() - tpr.
get()->numberOfTrackerHits();
536 nSimHits = tpr.
get()->numberOfTrackerHits();
538 edm::LogVerbatim(
"MuonTrackValidator") <<
"\t N simhits = " << nSimHits <<
"\n";
540 int assoc_recoTrack_NValidHits = 0;
541 if (simRecColl.
find(tpr) != simRecColl.
end()) {
542 auto const&
rt = simRecColl[tpr];
546 <<
"-----------------------------associated Track #" << assoc_recoTrack.
key();
547 TP_is_matched =
true;
549 if (assoc_recoTrack->
charge() != tpr->charge())
554 <<
"TrackingParticle #" << tpr.
key() <<
" with pt=" <<
sqrt(momentumTP.perp2())
555 <<
" associated with quality:" <<
quality <<
"\n";
559 <<
"TrackingParticle #" << tpr.
key() <<
" with pt,eta,phi: " <<
sqrt(momentumTP.perp2()) <<
" , "
560 << momentumTP.eta() <<
" , " << momentumTP.phi() <<
" , "
561 <<
" NOT associated to any reco::Track"
567 fillPlotNoFlow(h_simuleta[
w], xTPeta);
569 fillPlotNoFlow(h_assoceta[
w], xTPeta);
571 fillPlotNoFlow(h_misideta[
w], xTPeta);
575 fillPlotNoFlow(h_simulphi[
w], TPphi);
577 fillPlotNoFlow(h_assocphi[
w], TPphi);
579 fillPlotNoFlow(h_misidphi[
w], TPphi);
583 fillPlotNoFlow(h_simulpT[
w], xTPpt);
585 fillPlotNoFlow(h_assocpT[
w], xTPpt);
587 fillPlotNoFlow(h_misidpT[
w], xTPpt);
591 fillPlotNoFlow(h_simuldxy[
w], dxySim);
593 fillPlotNoFlow(h_assocdxy[
w], dxySim);
595 fillPlotNoFlow(h_misiddxy[
w], dxySim);
599 fillPlotNoFlow(h_simuldz[
w], dzSim);
601 fillPlotNoFlow(h_assocdz[
w], dzSim);
603 fillPlotNoFlow(h_misiddz[
w], dzSim);
607 fillPlotNoFlow(h_simulRpos[
w], TPrpos);
609 fillPlotNoFlow(h_assocRpos[
w], TPrpos);
612 fillPlotNoFlow(h_simulZpos[
w], TPzpos);
614 fillPlotNoFlow(h_assocZpos[
w], TPzpos);
617 fillPlotNoFlow(h_simulhit[
w], nSimHits);
619 fillPlotNoFlow(h_assochit[
w], nSimHits);
620 nRecHits_vs_nSimHits[
w]->Fill(nSimHits, assoc_recoTrack_NValidHits);
627 fillPlotNoFlow(h_simulpu[
w], PU_NumInteractions);
629 fillPlotNoFlow(h_assocpu[
w], PU_NumInteractions);
631 fillPlotNoFlow(h_misidpu[
w], PU_NumInteractions);
640 <<
"\n# of reco::Tracks with " <<
label[www].process() <<
":" <<
label[www].label() <<
":"
641 <<
label[www].instance() <<
": " << trackCollectionSize <<
"\n";
646 bool Track_is_matched =
false;
647 bool isChargeOK =
true;
651 std::vector<std::pair<TrackingParticleRef, double> >
tp;
656 edm::LogVerbatim(
"MuonTrackValidator") <<
"----------------------------------------Track #" <<
track.key();
661 tpr =
tp.begin()->first;
663 if (simRecColl.
find(tpr) != simRecColl.
end()) {
664 auto const& assoc_track_checkback = simRecColl[tpr].
begin()->first;
666 if (assoc_track_checkback.key() ==
track.key()) {
668 <<
"------------------associated TrackingParticle #" << tpr.
key();
669 Track_is_matched =
true;
671 if (
track->charge() != tpr->charge())
673 double Purity =
tp.begin()->second;
676 <<
" associated with purity:" << Purity <<
"\n";
678 h_PurityVsQuality[
w]->Fill(
Quality, Purity);
684 if (!Track_is_matched)
686 <<
" NOT associated to any TrackingParticle"
694 tpr =
tp.begin()->first;
695 Track_is_matched =
true;
697 if (
track->charge() != tpr->charge())
700 <<
" associated with quality:" <<
tp.begin()->second <<
"\n";
704 <<
" NOT associated to any TrackingParticle"
710 int nRecHits =
track->numberOfValidHits();
711 edm::LogVerbatim(
"MuonTrackValidator") <<
"\t N valid rechits = " << nRecHits <<
"\n";
713 double etaRec =
track->eta();
714 double xetaRec = getEta(etaRec);
716 double ptRec =
track->pt();
717 double xptRec = getPt(ptRec);
719 double qoverpRec =
track->qoverp();
720 double phiRec =
track->phi();
721 double thetaRec =
track->theta();
722 double dxyRec =
track->dxy(
bs.position());
723 double dzRec =
track->dz(
bs.position());
725 double qoverpError =
track->qoverpError();
726 double ptError =
track->ptError();
727 double thetaError =
track->thetaError();
729 double dxyError =
track->dxyError();
730 double dzError =
track->dzError();
733 fillPlotNoFlow(h_recoeta[
w], xetaRec);
734 if (Track_is_matched) {
735 fillPlotNoFlow(h_assoc2eta[
w], xetaRec);
739 fillPlotNoFlow(h_recophi[
w], phiRec);
740 if (Track_is_matched) {
741 fillPlotNoFlow(h_assoc2phi[
w], phiRec);
745 fillPlotNoFlow(h_recopT[
w], xptRec);
746 if (Track_is_matched) {
747 fillPlotNoFlow(h_assoc2pT[
w], xptRec);
751 fillPlotNoFlow(h_recodxy[
w], dxyRec);
752 if (Track_is_matched) {
753 fillPlotNoFlow(h_assoc2dxy[
w], dxyRec);
757 fillPlotNoFlow(h_recodz[
w], dzRec);
758 if (Track_is_matched) {
759 fillPlotNoFlow(h_assoc2dz[
w], dzRec);
763 fillPlotNoFlow(h_recohit[
w], nRecHits);
764 if (Track_is_matched) {
765 fillPlotNoFlow(h_assoc2hit[
w], nRecHits);
768 fillPlotNoFlow(h_misidhit[
w], nRecHits);
772 fillPlotNoFlow(h_recopu[
w], PU_NumInteractions);
773 if (Track_is_matched) {
774 fillPlotNoFlow(h_assoc2pu[
w], PU_NumInteractions);
793 if (!(Track_is_matched && cosmictpSelector(tpr, &
bs,
event,
setup)))
796 momentumTP = Cosmic_parametersDefinerTP->momentum(
event,
setup, tpr);
797 vertexTP = Cosmic_parametersDefinerTP->vertex(
event,
setup, tpr);
803 double assocChi2 = -
tp.begin()->second;
804 h_assochi2[www]->Fill(assocChi2);
805 h_assochi2_prob[www]->Fill(TMath::Prob((assocChi2)*5, 5));
806 }
else if (
associators[ww] ==
"trackAssociatorByHits") {
808 h_assocFraction[www]->Fill(
fraction);
809 h_assocSharedHit[www]->Fill(
fraction * nRecHits);
812 h_charge[
w]->Fill(
track->charge());
815 h_nhits[
w]->Fill(nRecHits);
816 nhits_vs_eta[
w]->Fill(xetaRec, nRecHits);
817 nhits_vs_phi[
w]->Fill(phiRec, nRecHits);
820 nDThits_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().numberOfValidMuonDTHits());
821 nCSChits_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().numberOfValidMuonCSCHits());
822 nRPChits_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().numberOfValidMuonRPCHits());
824 nGEMhits_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().numberOfValidMuonGEMHits());
826 nME0hits_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().numberOfValidMuonME0Hits());
830 nTRK_LayersWithMeas_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().trackerLayersWithMeasurement());
831 nPixel_LayersWithMeas_vs_eta[
w]->Fill(xetaRec,
track->hitPattern().pixelLayersWithMeasurement());
832 h_nlosthits[
w]->Fill(
track->numberOfLostHits());
835 nlosthits_vs_eta[
w]->Fill(xetaRec,
track->numberOfLostHits());
839 h_nchi2[
w]->Fill(
track->normalizedChi2());
840 h_nchi2_prob[
w]->Fill(TMath::Prob(
track->chi2(), (
int)
track->ndof()));
841 chi2_vs_nhits[
w]->Fill(nRecHits,
track->normalizedChi2());
842 chi2_vs_eta[
w]->Fill(xetaRec,
track->normalizedChi2());
843 chi2_vs_phi[
w]->Fill(phiRec,
track->normalizedChi2());
845 double ptSim =
sqrt(momentumTP.perp2());
846 double xptSim = getPt(ptSim);
847 double qoverpSim = tpr->charge() /
sqrt(momentumTP.x() * momentumTP.x() + momentumTP.y() * momentumTP.y() +
848 momentumTP.z() * momentumTP.z());
849 double etaSim = momentumTP.eta();
850 double thetaSim = momentumTP.theta();
851 double phiSim = momentumTP.phi();
855 double etares = etaRec - etaSim;
856 double ptRelRes = (ptRec - ptSim) / ptSim;
857 double ptPull = (ptRec - ptSim) / ptError;
858 double qoverpPull = (qoverpRec - qoverpSim) / qoverpError;
859 double thetaPull = (thetaRec - thetaSim) / thetaError;
860 double phiDiff = phiRec - phiSim;
863 phiDiff = phiDiff - 2. *
M_PI;
865 phiDiff = phiDiff + 2. *
M_PI;
867 double phiPull = phiDiff /
phiError;
868 double dxyPull = (dxyRec - dxySim) / dxyError;
869 double dzPull = (dzRec - dzSim) / dzError;
871 h_etaRes[
w]->Fill(etares);
872 etares_vs_eta[
w]->Fill(xetaRec, etares);
874 ptres_vs_eta[
w]->Fill(xetaRec, ptRelRes);
875 ptres_vs_pt[
w]->Fill(xptSim, ptRelRes);
876 ptres_vs_phi[
w]->Fill(phiRec, ptRelRes);
877 h_ptpull[
w]->Fill(ptPull);
878 ptpull_vs_eta[
w]->Fill(xetaRec, ptPull);
879 ptpull_vs_phi[
w]->Fill(phiRec, ptPull);
880 h_qoverppull[
w]->Fill(qoverpPull);
882 thetaCotres_vs_eta[
w]->Fill(xetaRec,
cos(thetaRec) /
sin(thetaRec) -
cos(thetaSim) /
sin(thetaSim));
883 thetaCotres_vs_pt[
w]->Fill(xptSim,
cos(thetaRec) /
sin(thetaRec) -
cos(thetaSim) /
sin(thetaSim));
884 h_thetapull[
w]->Fill(thetaPull);
885 thetapull_vs_eta[
w]->Fill(xetaRec, thetaPull);
886 thetapull_vs_phi[
w]->Fill(phiRec, thetaPull);
888 phires_vs_eta[
w]->Fill(xetaRec, phiDiff);
889 phires_vs_pt[
w]->Fill(xptSim, phiDiff);
890 phires_vs_phi[
w]->Fill(phiRec, phiDiff);
891 h_phipull[
w]->Fill(phiPull);
892 phipull_vs_eta[
w]->Fill(xetaRec, phiPull);
893 phipull_vs_phi[
w]->Fill(phiRec, phiPull);
895 dxyres_vs_eta[
w]->Fill(xetaRec, dxyRec - dxySim);
896 dxyres_vs_pt[
w]->Fill(xptSim, dxyRec - dxySim);
897 h_dxypull[
w]->Fill(dxyPull);
898 dxypull_vs_eta[
w]->Fill(xetaRec, dxyPull);
900 dzres_vs_eta[
w]->Fill(xetaRec, dzRec - dzSim);
901 dzres_vs_pt[
w]->Fill(xptSim, dzRec - dzSim);
902 h_dzpull[
w]->Fill(dzPull);
903 dzpull_vs_eta[
w]->Fill(xetaRec, dzPull);
905 double contrib_Qoverp = qoverpPull * qoverpPull / 5;
906 double contrib_dxy = dxyPull * dxyPull / 5;
907 double contrib_dz = dzPull * dzPull / 5;
908 double contrib_theta = thetaPull * thetaPull / 5;
909 double contrib_phi = phiPull * phiPull / 5;
910 double assoChi2 = contrib_Qoverp + contrib_dxy + contrib_dz + contrib_theta + contrib_phi;
912 edm::LogVerbatim(
"MuonTrackValidator") <<
"normalized Chi2 (track 5-dofs matching) = " << assoChi2 <<
"\n"
913 <<
"\t contrib_Qoverp = " << contrib_Qoverp <<
"\n"
914 <<
"\t contrib_theta = " << contrib_theta <<
"\n"
915 <<
"\t contrib_phi = " << contrib_phi <<
"\n"
916 <<
"\t contrib_dxy = " << contrib_dxy <<
"\n"
917 <<
"\t contrib_dz = " << contrib_dz <<
"\n";
920 <<
"etaRec = " << etaRec <<
"\n"
921 <<
"qoverpRec = " << qoverpRec <<
"\n"
922 <<
"thetaRec = " << thetaRec <<
"\n"
923 <<
"phiRec = " << phiRec <<
"\n"
924 <<
"dxyRec = " << dxyRec <<
"\n"
925 <<
"dzRec = " << dzRec <<
"\n"
928 <<
"qoverpError = " << qoverpError <<
"\n"
929 <<
"thetaError = " << thetaError <<
"\n"
930 <<
"phiError = " <<
phiError <<
"\n"
931 <<
"dxyError = " << dxyError <<
"\n"
932 <<
"dzError = " << dzError <<
"\n"
935 <<
"ptSim = " << ptSim <<
"\n"
936 <<
"etaSim = " << etaSim <<
"\n"
937 <<
"qoverpSim = " << qoverpSim <<
"\n"
938 <<
"thetaSim = " << thetaSim <<
"\n"
939 <<
"phiSim = " << phiSim <<
"\n"
940 <<
"dxySim = " << dxySim <<
"\n"
941 <<
"dzSim = " << dzSim <<
"\n";
944 h_tracks[
w]->Fill(at);
945 h_fakes[
w]->Fill(rT - at);
947 <<
"Total Associated (simToReco): " << ats <<
"\n"
948 <<
"Total Reconstructed: " << rT <<
"\n"
949 <<
"Total Associated (recoToSim): " << at <<
"\n"
950 <<
"Total Fakes: " << rT - at <<
"\n";