36 #include <fastjet/internal/base.hh> 37 #include "fastjet/PseudoJet.hh" 38 #include "fastjet/JetDefinition.hh" 39 #include "fastjet/ClusterSequence.hh" 40 #include "fastjet/Selector.hh" 63 #include "CLHEP/Units/PhysicalConstants.h" 106 std::map<unsigned int, double>
wnt;
107 std::map<unsigned int, double>
wos;
113 void addTrack(
unsigned int irecv,
double twos,
double twt) {
115 if (
wnt.find(irecv) ==
wnt.end()) {
122 if (
wos.find(irecv) ==
wos.end()) {
156 std::map<unsigned int, double>
wos;
157 std::map<unsigned int, double>
wnt;
210 std::vector<simPrimaryVertex>&,
220 const std::vector<double>&,
221 const std::vector<int>&,
252 const unsigned int&);
525 use_only_charged_tracks_(iConfig.getParameter<
bool>(
"useOnlyChargedTracks")),
526 optionalPlots_(iConfig.getUntrackedParameter<
bool>(
"optionalPlots")),
527 use3dNoTime_(iConfig.getParameter<
bool>(
"use3dNoTime")),
528 minProbHeavy_(iConfig.getParameter<double>(
"minProbHeavy")),
529 trackweightTh_(iConfig.getParameter<double>(
"trackweightTh")),
530 mvaTh_(iConfig.getParameter<double>(
"mvaTh")),
531 lineDensityPar_(iConfig.getParameter<
std::
vector<double>>(
"lineDensityPar")),
572 meTrackEffPtTot_ = ibook.
book1D(
"EffPtTot",
"Pt of tracks associated to LV; track pt [GeV] ", 110, 0., 11.);
575 ibook.
book1D(
"MatchedTPEffPtTot",
"Pt of tracks associated to LV matched to TP; track pt [GeV] ", 110, 0., 11.);
577 "MatchedTPEffPtMtd",
"Pt of tracks associated to LV matched to TP with time; track pt [GeV] ", 110, 0., 11.);
579 ibook.
book1D(
"MatchedTPEffEtaTot",
"Eta of tracks associated to LV matched to TP; track eta ", 66, 0., 3.3);
581 "MatchedTPEffEtaMtd",
"Eta of tracks associated to LV matched to TP with time; track eta ", 66, 0., 3.3);
583 ibook.
book1D(
"MatchedTPTrackRes",
584 "t_{rec} - t_{sim} for tracks associated to LV matched to TP; t_{rec} - t_{sim} [ns] ",
588 meTrackResTot_ = ibook.
book1D(
"TrackRes",
"t_{rec} - t_{sim} for tracks; t_{rec} - t_{sim} [ns] ", 120, -0.15, 0.15);
590 "TrackRes-LowMVA",
"t_{rec} - t_{sim} for tracks with MVA < 0.5; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
592 "TrackRes-MediumMVA",
"t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
594 "TrackRes-HighMVA",
"t_{rec} - t_{sim} for tracks with MVA > 0.8; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
597 "TrackResMass-LowMVA",
"t_{rec} - t_{est} for tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ", 100, -1., 1.);
599 "t_{rec} - t_{est} for tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
604 "TrackResMass-HighMVA",
"t_{rec} - t_{est} for tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ", 100, -1., 1.);
606 "TrackResMassTrue-LowMVA",
"t_{est} - t_{sim} for tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ", 100, -1., 1.);
608 "t_{est} - t_{sim} for tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
613 "t_{est} - t_{sim} for tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
619 "MatchedTPTrackPull",
"Pull for tracks associated to LV matched to TP; (t_{rec}-t_{sim})/#sigma_{t}", 50, -5., 5.);
620 meTrackPullTot_ = ibook.
book1D(
"TrackPull",
"Pull for tracks; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
622 ibook.
book1D(
"TrackPull-LowMVA",
"Pull for tracks with MVA < 0.5; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
624 "TrackPull-MediumMVA",
"Pull for tracks with 0.5 < MVA < 0.8; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
626 ibook.
book1D(
"TrackPull-HighMVA",
"Pull for tracks with MVA > 0.8; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
628 ibook.
book1D(
"MatchedTPTrackZposResTot",
629 "Z_{PCA} - Z_{sim} for tracks associated to LV matched to TP;Z_{PCA} - Z_{sim} [cm] ",
634 ibook.
book1D(
"TrackZposResTot",
"Z_{PCA} - Z_{sim} for tracks;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
636 "TrackZposRes-LowMVA",
"Z_{PCA} - Z_{sim} for tracks with MVA < 0.5;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
638 "Z_{PCA} - Z_{sim} for tracks with 0.5 < MVA < 0.8 ;Z_{PCA} - Z_{sim} [cm] ",
643 "TrackZposRes-HighMVA",
"Z_{PCA} - Z_{sim} for tracks with MVA > 0.8 ;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
645 ibook.
book1D(
"Track3DposRes-LowMVA",
646 "3dPos_{PCA} - 3dPos_{sim} for tracks with MVA < 0.5 ;3dPos_{PCA} - 3dPos_{sim} [cm] ",
651 ibook.
book1D(
"Track3DposRes-MediumMVA",
652 "3dPos_{PCA} - 3dPos_{sim} for tracks with 0.5 < MVA < 0.8 ;3dPos_{PCA} - 3dPos_{sim} [cm] ",
657 ibook.
book1D(
"Track3DposRes-HighMVA",
658 "3dPos_{PCA} - 3dPos_{sim} for tracks with MVA > 0.8;3dPos_{PCA} - 3dPos_{sim} [cm] ",
662 meTimeRes_ = ibook.
book1D(
"TimeRes",
"t_{rec} - t_{sim} ;t_{rec} - t_{sim} [ns] ", 40, -0.2, 0.2);
663 meTimePull_ = ibook.
book1D(
"TimePull",
"Pull; t_{rec} - t_{sim}/#sigma_{t rec}", 100, -10., 10.);
665 ibook.
book1D(
"TimeSignalRes",
"t_{rec} - t_{sim} for signal ;t_{rec} - t_{sim} [ns] ", 40, -0.2, 0.2);
667 ibook.
book1D(
"TimeSignalPull",
"Pull for signal; t_{rec} - t_{sim}/#sigma_{t rec}", 100, -10., 10.);
669 ibook.
bookProfile(
"PUvsReal",
"#PU vertices vs #real matched vertices;#PU;#real ", 100, 0, 300, 100, 0, 200);
671 ibook.
bookProfile(
"PUvsFake",
"#PU vertices vs #fake matched vertices;#PU;#fake ", 100, 0, 300, 100, 0, 20);
673 "PUvsOtherFake",
"#PU vertices vs #other fake matched vertices;#PU;#other fake ", 100, 0, 300, 100, 0, 20);
675 ibook.
bookProfile(
"PUvsSplit",
"#PU vertices vs #split matched vertices;#PU;#split ", 100, 0, 300, 100, 0, 20);
676 meMatchQual_ = ibook.
book1D(
"MatchQuality",
"RECO-SIM vertex match quality; ", 8, 0, 8.);
680 meDeltaTrealreal_ = ibook.
book1D(
"DeltaTrealreal",
"#Delta T real-real; |#Delta T (r-r)| [sigma]", 60, 0., 30.);
681 meDeltaTfakefake_ = ibook.
book1D(
"DeltaTfakefake",
"#Delta T fake-fake; |#Delta T (f-f)| [sigma]", 60, 0., 30.);
682 meDeltaTfakereal_ = ibook.
book1D(
"DeltaTfakereal",
"#Delta T fake-real; |#Delta T (f-r)| [sigma]", 60, 0., 30.);
685 "RecoPosInSimCollection",
"Sim signal vertex index associated to Reco signal vertex; Sim PV index", 200, 0, 200);
687 ibook.
book1D(
"RecoPosInRecoOrigCollection",
"Reco signal index in OrigCollection; Reco index", 200, 0, 200);
689 ibook.
book1D(
"SimPosInSimOrigCollection",
"Sim signal index in OrigCollection; Sim index", 200, 0, 200);
692 ibook.
book1D(
"RecoPVPosSignal",
"Position in reco collection of PV associated to sim signal", 20, 0, 20);
694 ibook.
book1D(
"RecoPVPosSignalNotHighestPt",
695 "Position in reco collection of PV associated to sim signal not highest Pt",
700 ibook.
book1D(
"RecoVtxVsLineDensity",
"#Reco vertices/mm/event; line density [#vtx/mm/event]", 160, 0., 4.);
701 meRecVerNumber_ = ibook.
book1D(
"RecVerNumber",
"RECO Vertex Number: Number of vertices", 50, 0, 250);
702 meRecPVZ_ = ibook.
book1D(
"recPVZ",
"Weighted #Rec vertices/mm", 400, -20., 20.);
703 meRecPVT_ = ibook.
book1D(
"recPVT",
"#Rec vertices/10 ps", 200, -1., 1.);
704 meSimPVZ_ = ibook.
book1D(
"simPVZ",
"Weighted #Sim vertices/mm", 400, -20., 20.);
710 ibook.
book1D(
"VtxTrackRecLVMult",
"Log10(Vertex track multiplicity) for matched LV", 80, 0.5, 2.5);
715 "PUTrackRelMult",
"Relative multiplicity of PU tracks for matched vertices; #PUTrks/#Trks", 50, 0., 1.);
717 "FakeTrackRelMult",
"Relative multiplicity of fake tracks for matched vertices; #fakeTrks/#Trks", 50, 0., 1.);
719 ibook.
book1D(
"PUTrackRelSumWnt",
720 "Relative Sum of wnt of PU tracks for matched vertices; PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
725 "PUTrackRelSumWos",
"Relative Sum of wos of PU tracks for matched vertices; PUSumWos/SumWos", 50, 0., 1.);
727 ibook.
book1D(
"SecTrackRelSumWos",
728 "Relative Sum of wos of tracks from secondary vtx for matched vertices; SecSumWos/SumWos",
733 "FakeTrackRelSumWos",
"Relative Sum of wos of fake tracks for matched vertices; FakeSumWos/SumWos", 50, 0., 1.);
735 "PUTrackRelSumPt",
"Relative Sum of Pt of PU tracks for matched vertices; PUSumPt/SumPt", 50, 0., 1.);
737 "PUTrackRelSumPt2",
"Relative Sum of Pt2 for PU tracks for matched vertices; PUSumPt2/SumPt2", 50, 0., 1.);
739 "PUTrackRecLVRelMult",
"Relative multiplicity of PU tracks for matched LV; #PUTrks/#Trks", 50, 0., 1.);
741 "FakeTrackRecLVRelMult",
"Relative multiplicity of fake tracks for matched LV; #FakeTrks/#Trks", 50, 0., 1.);
743 ibook.
book1D(
"PUTrackRecLVRelSumWnt",
744 "Relative Sum of Wnt of PU tracks for matched LV; PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
749 "PUTrackRecLVRelSumWos",
"Relative Sum of Wos of PU tracks for matched LV; PUSumWos/SumWos", 50, 0., 1.);
751 ibook.
book1D(
"SecTrackRecLVRelSumWos",
752 "Relative Sum of wos of tracks from secondary vtx for matched LV; SecSumWos/SumWos",
757 "FakeTrackRecLVRelSumWos",
"Relative Sum of wos of fake tracks for matched LV; FakeSumWos/SumWos", 50, 0., 1.);
759 ibook.
book1D(
"PUTrackRecLVRelSumPt",
"Relative Sum of Pt of PU tracks for matched LV; PUSumPt/SumPt", 50, 0., 1.);
761 "PUTrackRecLVRelSumPt2",
"Relative Sum of Pt2 of PU tracks for matched LV; PUSumPt2/SumPt2", 50, 0., 1.);
764 mePUTrackMult_ = ibook.
book1D(
"PUTrackMult",
"Number of PU tracks for matched vertices; #PUTrks", 50, 0., 100.);
765 mePUTrackWnt_ = ibook.
book1D(
"PUTrackWnt",
"Wnt of PU tracks for matched vertices; PUTrkW*min(Pt, 1.)", 50, 0., 1.);
767 "PUTrackSumWnt",
"Sum of wnt of PU tracks for matched vertices; log10(PUSumW*min(Pt, 1.))", 50, -2., 3.);
769 ibook.
book1D(
"PUTrackSumWos",
"Sum of wos of PU tracks for matched vertices; log10(PUSumWos)", 50, -1., 7.);
771 "SecTrackSumWos",
"Sum of wos of tracks from secondary vtx for matched vertices; log10(SecSumWos)", 50, -1., 7.);
773 ibook.
book1D(
"PUTrackSumPt",
"Sum of Pt of PU tracks for matched vertices; log10(PUSumPt)", 50, -2., 3.);
775 ibook.
book1D(
"PUTrackSumPt2",
"Sum of Pt2 of PU tracks for matched vertices; log10(PUSumPt2)", 50, -3., 3.);
779 "Relative PU multiplicity vs Number of tracks for matched vertices; #Trks; #PUTrks/#Trks",
787 "FakeTrackRelMultvsMult",
788 "Relative multiplicity of fake tracks vs Number of tracks for matched vertices; #Trks; #FakeTrks/#Trks",
797 "Relative PU Sum of Wnt vs Sum of Wnt of tracks for matched vertices; log10(SumW*min(Pt, " 798 "1.)); PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
806 "PUTrackRelSumWosvsSumWos",
807 "Relative PU Sum of Wos vs Sum of Wos of tracks for matched vertices; log10(SumWos); PUSumWos/SumWos",
815 "Relative Sum of Wos of tracks from secondary vtx vs Sum of Wos " 816 "of tracks for matched vertices; log10(SumWos); SecSumWos/SumWos",
824 "Relative Sum of Wos of fake tracks vs Sum of Wos of tracks for " 825 "matched vertices; log10(SumWos); FakeSumWos/SumWos",
833 "PUTrackRelSumPtvsSumPt",
834 "Relative PU Sum of Pt vs Sum of Pt of tracks for matched vertices; log10(SumPt); PUSumPt/SumPt",
842 "PUTrackRelSumPt2vsSumPt2",
843 "Relative PU Sum of Pt2 vs Sum of Pt2 of tracks for matched vertices; log10(SumPt2); PUSumPt2/SumPt2",
853 ibook.
book1D(
"PUTrackRecLVWnt",
"Wnt of PU tracks for matched LV; PUTrkW*min(Pt, 1.)", 50, 0., 1.);
855 "PUTrackRecLVSumWnt",
"Sum of wnt of PU tracks for matched LV; log10(PUSumW*min(Pt, 1.))", 50, -2., 3.);
857 ibook.
book1D(
"PUTrackRecLVSumWos",
"Sum of wos of PU tracks for matched LV; log10(PUSumWos)", 50, -1., 7.);
859 "SecTrackRecLVSumWos",
"Sum of wos of tracks from secondary vtx for matched LV; log10(SecSumWos)", 50, -1., 7.);
861 ibook.
book1D(
"PUTrackRecLVSumPt",
"Sum of Pt of PU tracks for matched LV; log10(PUSumPt)", 50, -2., 3.);
863 ibook.
book1D(
"PUTrackRecLVSumPt2",
"Sum of Pt2 of PU tracks for matched LV; log10(PUSumPt2)", 50, -3., 3.);
867 "Relative PU multiplicity vs Number of tracks for matched LV; #Trks; #PUTrks/#Trks",
875 "FakeTrackRecLVRelMultvsMult",
876 "Relative multiplicity of fake tracks vs Number of tracks for matched LV; #Trks; #FakeTrks/#Trks",
885 "Relative PU Sum of Wnt vs Sum of Wnt of tracks for matched LV; log10(SumW*min(Pt, 1.)); " 886 "PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
894 "PUTrackRecLVRelSumWosvsSumWos",
895 "Relative PU Sum of Wos vs Sum of Wos of tracks for matched vertices; log10(SumWos); PUSumWos/SumWos",
903 ibook.
bookProfile(
"SecTrackRecLVRelSumWosvsSumWos",
904 "Relative Sum of Wos of tracks from secondary vtx vs Sum of Wos of tracks for matched " 905 "vertices; log10(SumWos); SecSumWos/SumWos",
913 "Relative Sum of Wos of fake tracks vs Sum of Wos of tracks " 914 "for matched vertices; log10(SumWos); FakeSumWos/SumWos",
923 "Relative PU Sum of Pt vs Sum of Pt of tracks for matched LV; log10(SumPt); PUSumPt/SumPt",
932 "Relative PU Sum of Pt2 vs Sum of tracks for matched LV; log10(SumPt2); PUSumPt2/SumPt2",
942 ibook.
book1D(
"JetsPURelMult",
943 "Relative contribution of PU to jet multiplicity for matched vertices; (#Jets-#JetsNoPU)/#Jets",
948 ibook.
book1D(
"JetsPURelHt",
949 "Relative contribution of PU to scalar sum of Et of jets for matched vertices; (Ht-HtNoPU)/HT",
954 ibook.
book1D(
"JetsPURelSumPt2",
955 "Relative contribution of PU to sum of Pt2 of jets for matched vertices; (SumPt2-SumPt2NoPU)/SumPt2",
961 "Relative contribution of fake tracks to sum of Pt2 of jets for matched vertices; (SumPt2-SumPt2NoFake)/SumPt2",
966 ibook.
book1D(
"JetsPURelMetPt",
967 "Relative contribution of PU to Missing Transverse Energy for matched vertices; (Met-MetNoPU)/Met",
972 ibook.
book1D(
"JetsPURelSumPz",
973 "Relative contribution of PU to sum of Pz of jets for matched vertices; (SumPz-SumPzNoPU)/SumPz",
979 ibook.
book1D(
"JetsRecLVPURelMult",
980 "Relative contribution of PU to jet multiplicity for matched LV; (#Jets-#JetsNoPU)/#Jets",
985 ibook.
book1D(
"JetsRecLVPURelHt",
986 "Relative contribution of PU to scalar sum of Et of jets for matched LV; (Ht-HtNoPU)/HT",
991 ibook.
book1D(
"JetsRecLVPURelSumPt2",
992 "Relative contribution of PU to sum of Pt2 of jets for matched LV; (SumPt2-SumPt2NoPU)/SumPt2",
997 "JetsRecLVFakeRelSumPt2",
998 "Relative contribution of fake tracks to sum of Pt2 of jets for matched LV; (SumPt2-SumPt2NoFake)/SumPt2",
1003 ibook.
book1D(
"JetsRecLVPURelMetPt",
1004 "Relative contribution of PU to Missing Transverse Energy for matched LV; (Met-MetNoPU)/Met",
1009 ibook.
book1D(
"JetsRecLVPURelSumPz",
1010 "Relative contribution of PU to sum of Pz of jets for matched LV; (SumPz-SumPzNoPU)/SumPz",
1017 "JetsPUMult",
"Contribution of PU to jet multiplicity for matched vertices; #Jets-#JetsNoPU", 50, 0., 100.);
1019 "Contribution of PU to scalar sum of Et of jets for matched vertices; log10(Ht-HtNoPU)",
1024 ibook.
book1D(
"JetsPUSumPt2",
1025 "Contribution of PU to sum of Pt2 of jets for matched vertices; log10(sumPt2-SumPt2NoPU)",
1030 ibook.
book1D(
"JetsPUMetPt",
1031 "Contribution of PU to Missing Transverse Energy for matched vertices; log10(Met-MetNoPU)",
1036 ibook.
book1D(
"JetsPUSumPz",
1037 "Contribution of PU to sum of Pz of jets for matched vertices; log10(abs(SumPz-SumPzNoPU))",
1043 "Relative contribution of PU to jet multiplicity vs number of jets for " 1044 "matched vertices; #Jets; (#Jets-#JetsNoPU)/#Jets",
1052 "Relative contribution of PU to scalar sum of Et of jets vs scalar sum of " 1053 "Et for matched vertices; log10(Ht); (Ht-HtNoPU)/HT",
1061 "Relative contribution of PU to sum of Pt2 of jets vs sum of Pt2 " 1062 "for matched vertices; log10(SumPt2); (SumPt2-SumPt2NoPU)/SumPt2",
1071 "Relative contribution of fake tracks to sum of Pt2 of jets vs sum of Pt2 for matched " 1072 "vertices; log10(SumPt2); (SumPt2-SumPt2NoFake)/SumPt2",
1080 "Relative contribution of PU to Missing Transverse Energy vs MET for " 1081 "matched vertices; log10(Met); (Met-MetNoPU)/Met",
1089 "Relative contribution of PU to sum of Pz of jets vs Sum of Pz for " 1090 "matched vertices; log10(abs SumPz); (SumPz-SumPzNoPU)/SumPz",
1099 "JetsRecLVPUMult",
"Contribution of PU to jet multiplicity for matched LV; #Jets-#JetsNoPU", 50, 0., 100.);
1101 "JetsRecLVPUHt",
"Contribution of PU to scalar sum of Et of jets for matched LV; log10(Ht-HtNoPU)", 50, -2., 3.);
1103 ibook.
book1D(
"JetsRecLVPUSumPt2",
1104 "Contribution of PU to sum of Pt2 of jets for matched LV; log10(sumPt2-SumPt2NoPU)",
1109 ibook.
book1D(
"JetsRecLVPUMetPt",
1110 "Contribution of PU to Missing Transverse Energy for matched LV; log10(Met-MetNoPU)",
1115 ibook.
book1D(
"JetsRecLVPUSumPz",
1116 "Contribution of PU to sum of Pz of jets for matched LV; log10(abs(SumPz-SumPzNoPU))",
1122 "Relative contribution of PU to jet multiplicity vs number of jets " 1123 "for matched vertices; #Jets; (#Jets-#JetsNoPU)/#Jets",
1131 "Relative contribution of PU to scalar sum of Et of jets vs scalar sum " 1132 "of Et for matched vertices; log10(Ht); (Ht-HtNoPU)/HT",
1141 "Relative contribution of PU to sum of Pt2 of jets vs sum of Pt2 for matched vertices; " 1142 "log10(SumPt2); (SumPt2-SumPt2NoPU)/SumPt2",
1150 ibook.
bookProfile(
"JetsRecLVFakeRelSumPt2vsSumPt2",
1151 "Relative contribution of fake tracks to sum of Pt2 of jets vs sum of Pt2 for matched " 1152 "vertices; log10(SumPt2); (SumPt2-SumPt2NoFake)/SumPt2",
1160 "Relative contribution of PU to Missing Transverse Energy vs MET " 1161 "for matched vertices; log10(Met); (Met-MetNoPU)/Met",
1169 "Relative contribution of PU to sum of Pz of jets vs Sum of Pz " 1170 "for matched vertices; log10(abs SumPz); (SumPz-SumPzNoPU)/SumPz",
1181 "TrackResLowP",
"t_{rec} - t_{sim} for tracks with p < 2 GeV; t_{rec} - t_{sim} [ns] ", 70, -0.15, 0.15);
1183 ibook.
book1D(
"TrackResLowP-LowMVA",
1184 "t_{rec} - t_{sim} for tracks with MVA < 0.5 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
1189 ibook.
book1D(
"TrackResLowP-MediumMVA",
1190 "t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
1195 ibook.
book1D(
"TrackResLowP-HighMVA",
1196 "t_{rec} - t_{sim} for tracks with MVA > 0.8 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
1201 "TrackResHighP",
"t_{rec} - t_{sim} for tracks with p > 2 GeV; t_{rec} - t_{sim} [ns] ", 70, -0.15, 0.15);
1203 ibook.
book1D(
"TrackResHighP-LowMVA",
1204 "t_{rec} - t_{sim} for tracks with MVA < 0.5 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
1209 ibook.
book1D(
"TrackResHighP-MediumMVA",
1210 "t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
1215 ibook.
book1D(
"TrackResHighP-HighMVA",
1216 "t_{rec} - t_{sim} for tracks with MVA > 0.8 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
1221 ibook.
book1D(
"TrackPullLowP",
"Pull for tracks with p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
1223 "Pull for tracks with MVA < 0.5 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1228 "Pull for tracks with 0.5 < MVA < 0.8 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1233 "Pull for tracks with MVA > 0.8 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1238 ibook.
book1D(
"TrackPullHighP",
"Pull for tracks with p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
1240 "Pull for tracks with MVA < 0.5 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1245 ibook.
book1D(
"TrackPullHighP-MediumMVA",
1246 "Pull for tracks with 0.5 < MVA < 0.8 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1251 "Pull for tracks with MVA > 0.8 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1257 ibook.
book1D(
"TrackResMass-Protons-LowMVA",
1258 "t_{rec} - t_{est} for proton tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ",
1263 ibook.
book1D(
"TrackResMass-Protons-MediumMVA",
1264 "t_{rec} - t_{est} for proton tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
1269 ibook.
book1D(
"TrackResMass-Protons-HighMVA",
1270 "t_{rec} - t_{est} for proton tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ",
1275 ibook.
book1D(
"TrackResMassTrue-Protons-LowMVA",
1276 "t_{est} - t_{sim} for proton tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ",
1281 ibook.
book1D(
"TrackResMassTrue-Protons-MediumMVA",
1282 "t_{est} - t_{sim} for proton tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
1287 ibook.
book1D(
"TrackResMassTrue-Protons-HighMVA",
1288 "t_{est} - t_{sim} for proton tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
1294 "t_{rec} - t_{est} for pion tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ",
1299 ibook.
book1D(
"TrackResMass-Pions-MediumMVA",
1300 "t_{rec} - t_{est} for pion tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
1305 "t_{rec} - t_{est} for pion tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ",
1310 ibook.
book1D(
"TrackResMassTrue-Pions-LowMVA",
1311 "t_{est} - t_{sim} for pion tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ",
1316 ibook.
book1D(
"TrackResMassTrue-Pions-MediumMVA",
1317 "t_{est} - t_{sim} for pion tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
1322 ibook.
book1D(
"TrackResMassTrue-Pions-HighMVA",
1323 "t_{est} - t_{sim} for pion tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
1329 meBarrelPIDp_ = ibook.
book1D(
"BarrelPIDp",
"PID track MTD momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1330 meEndcapPIDp_ = ibook.
book1D(
"EndcapPIDp",
"PID track with MTD momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1336 ibook.
book1D(
"BarrelTruePiNoPID",
"True pi NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1338 ibook.
book1D(
"BarrelTrueKNoPID",
"True k NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1340 ibook.
book1D(
"BarrelTruePNoPID",
"True p NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1342 ibook.
book1D(
"EndcapTruePiNoPID",
"True pi NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1344 ibook.
book1D(
"EndcapTrueKNoPID",
"True k NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1346 ibook.
book1D(
"EndcapTruePNoPID",
"True p NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1349 ibook.
book1D(
"BarrelTruePiAsPi",
"True pi as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1351 ibook.
book1D(
"BarrelTruePiAsK",
"True pi as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1353 ibook.
book1D(
"BarrelTruePiAsP",
"True pi as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1355 ibook.
book1D(
"EndcapTruePiAsPi",
"True pi as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1357 ibook.
book1D(
"EndcapTruePiAsK",
"True pi as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1359 ibook.
book1D(
"EndcapTruePiAsP",
"True pi as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1362 ibook.
book1D(
"BarrelTrueKAsPi",
"True k as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1363 meBarrelTrueKAsK_ = ibook.
book1D(
"BarrelTrueKAsK",
"True k as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1364 meBarrelTrueKAsP_ = ibook.
book1D(
"BarrelTrueKAsP",
"True k as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1366 ibook.
book1D(
"EndcapTrueKAsPi",
"True k as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1367 meEndcapTrueKAsK_ = ibook.
book1D(
"EndcapTrueKAsK",
"True k as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1368 meEndcapTrueKAsP_ = ibook.
book1D(
"EndcapTrueKAsP",
"True k as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1371 ibook.
book1D(
"BarrelTruePAsPi",
"True p as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1372 meBarrelTruePAsK_ = ibook.
book1D(
"BarrelTruePAsK",
"True p as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1373 meBarrelTruePAsP_ = ibook.
book1D(
"BarrelTruePAsP",
"True p as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1375 ibook.
book1D(
"EndcapTruePAsPi",
"True p as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1376 meEndcapTruePAsK_ = ibook.
book1D(
"EndcapTruePAsK",
"True p as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1377 meEndcapTruePAsP_ = ibook.
book1D(
"EndcapTruePAsP",
"True p as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1388 for (
const auto&
tp :
found->val) {
1389 if (
tp.first->eventId().bunchCrossing() == 0 &&
tp.first->eventId().event() == 0)
1403 return std::make_pair(
nullptr, -1);
1406 for (
const auto&
tp :
found->val) {
1407 if (std::find_if(vsim->daughterTracks_begin(), vsim->daughterTracks_end(), [&](
const TrackingParticleRef& vtp) {
1408 return tp.first == vtp;
1409 }) != vsim->daughterTracks_end())
1410 return std::make_pair(&
tp.first, 0);
1412 else if (
tp.first->eventId().bunchCrossing() == vsim->eventId().bunchCrossing() &&
1413 tp.first->eventId().event() == vsim->eventId().event()) {
1414 return std::make_pair(&
tp.first, 1);
1418 return std::make_pair(&
tp.first, 2);
1423 return std::make_pair(
nullptr, -1);
1427 if (
time > 0 && pathlength > 0 &&
mass > 0) {
1428 double gammasq = 1. + momentum * momentum / (
mass *
mass);
1430 double t_est =
time - (pathlength /
v);
1458 const std::vector<double>& mass_Tracks,
1459 const std::vector<int>& category_Tracks,
1461 unsigned int& n_Jets,
1463 double& sum_Pt2Jets,
1465 double& sum_PzJets) {
1466 double sum_PtJets = 0;
1473 std::vector<fastjet::PseudoJet> fjInputs_;
1475 size_t countScale0 = 0;
1476 for (
size_t i = 0;
i < reco_Tracks.size();
i++) {
1477 const auto recotr = reco_Tracks[
i];
1478 const auto mass = mass_Tracks[
i];
1480 if (recotr.charge() == 0) {
1484 if (skip_Tracks ==
"skip_PU" && category_Tracks[
i] == 2) {
1488 if (skip_Tracks ==
"skip_Fake" && category_Tracks[
i] == -1) {
1491 if (recotr.pt() != 0) {
1492 scale = (recotr.pt() - recotr.ptError()) / recotr.pt();
1495 edm::LogWarning(
"Primary4DVertexValidation") <<
"Scaling is NAN ignoring this recotrack" << std::endl;
1503 fjInputs_.push_back(fastjet::PseudoJet(recotr.px() *
scale,
1504 recotr.py() *
scale,
1505 recotr.pz() *
scale,
1509 fastjet::ClusterSequence sequence(fjInputs_, fastjet::JetDefinition(fastjet::antikt_algorithm, 0.4));
1510 auto jets = fastjet::sorted_by_pt(sequence.inclusive_jets(0));
1511 for (
const auto& pj :
jets) {
1513 sum_EtJets +=
std::sqrt(p4.e() * p4.e() - p4.P() * p4.P() + p4.pt() * p4.pt());
1514 sum_PtJets += p4.pt();
1515 sum_Pt2Jets += (p4.pt() * p4.pt() * 0.8 * 0.8);
1517 sum_PzJets += p4.pz();
1521 double metAbove = met_Pt - 2 *
std::sqrt(sum_PtJets);
1523 sum_Pt2Jets += (metAbove * metAbove);
1525 if (countScale0 == reco_Tracks.size()) {
1526 sum_Pt2Jets = countScale0 * 0.01;
1536 unsigned int& no_PIDtype,
1546 if (probPi[recoTrack] == -1) {
1550 }
else if (probPi[recoTrack] == 1 && probK[recoTrack] == 0 && probP[recoTrack] == 0 &&
1551 sigmat0[recoTrack] < sigmat0Safe[recoTrack]) {
1554 no_PID = no_PIDtype > 0;
1556 is_K = !no_PID && !is_Pi && probK[recoTrack] > probP[recoTrack];
1557 is_P = !no_PID && !is_Pi && !is_K;
1567 double dz2_beam =
pow((*BS).BeamWidthX() *
cos(recoTrk->
phi()) /
tan(recoTrk->
theta()), 2) +
1576 if (sigmat0[recoTrk] > 0 && mtdQualMVA[recoTrk] >
mvaTh_) {
1577 double sigmaZ = (*BS).sigmaZ();
1579 wos = wos / erf(sigmat0[recoTrk] / sigmaT);
1588 std::vector<Primary4DVertexValidation::simPrimaryVertex> simpv;
1589 int current_event = -1;
1591 for (TrackingVertexCollection::const_iterator
v = tVC->begin();
v != tVC->end(); ++
v) {
1593 if (
v->eventId().bunchCrossing() != 0)
1595 if (
v->eventId().event() != current_event) {
1596 current_event =
v->eventId().event();
1606 sv.eventId =
v->eventId();
1608 sv.OriginalIndex =
s;
1612 assert((**iTrack).eventId().bunchCrossing() == 0);
1615 for (std::vector<simPrimaryVertex>::iterator
v0 = simpv.begin();
v0 != simpv.end();
v0++) {
1624 simpv.push_back(
sv);
1630 auto momentum = (*(*iTP)).momentum();
1631 const reco::Track* matched_best_reco_track =
nullptr;
1632 double match_quality = -1;
1636 matched_best_reco_track = (*s2r_)[*iTP][0].first.get();
1637 match_quality = (*s2r_)[*iTP][0].second;
1640 vp->
ptot.setPx(vp->
ptot.x() + momentum.x());
1641 vp->
ptot.setPy(vp->
ptot.y() + momentum.y());
1642 vp->
ptot.setPz(vp->
ptot.z() + momentum.z());
1643 vp->
ptot.setE(vp->
ptot.e() + (**iTP).energy());
1644 vp->
pt += (**iTP).pt();
1645 vp->
ptsq += ((**iTP).pt() * (**iTP).pt());
1648 if (matched_best_reco_track) {
1656 LogTrace(
"Primary4DVertexValidation")
1667 auto prev_z = simpv.back().z;
1669 vsim.closest_vertex_distance_z =
std::abs(vsim.z - prev_z);
1673 for (std::vector<simPrimaryVertex>::iterator vsim = simpv.begin(); vsim != simpv.end(); vsim++) {
1674 std::vector<simPrimaryVertex>::iterator vsim2 = vsim;
1676 for (; vsim2 != simpv.end(); vsim2++) {
1679 vsim->closest_vertex_distance_z =
std::min(vsim->closest_vertex_distance_z,
distance);
1680 vsim2->closest_vertex_distance_z =
std::min(vsim2->closest_vertex_distance_z,
distance);
1690 std::vector<Primary4DVertexValidation::recoPrimaryVertex> recopv;
1692 for (
auto v = tVC->begin();
v != tVC->end(); ++
v) {
1697 if (
v->isFake() || !
v->isValid())
1704 sv.OriginalIndex =
r;
1705 sv.ndof =
v->ndof();
1707 recopv.push_back(
sv);
1711 for (
auto iTrack =
v->tracks_begin(); iTrack !=
v->tracks_end(); ++iTrack) {
1712 auto momentum = (*(*iTrack)).innerMomentum();
1713 if (momentum.mag2() == 0)
1714 momentum = (*(*iTrack)).momentum();
1716 vp->
ptsq += (momentum.perp2());
1733 auto prev_z = recopv.back().z;
1735 vreco.closest_vertex_distance_z =
std::abs(vreco.z - prev_z);
1738 for (std::vector<recoPrimaryVertex>::iterator vreco = recopv.begin(); vreco != recopv.end(); vreco++) {
1739 std::vector<recoPrimaryVertex>::iterator vreco2 = vreco;
1741 for (; vreco2 != recopv.end(); vreco2++) {
1744 vreco->closest_vertex_distance_z =
std::min(vreco->closest_vertex_distance_z,
distance);
1745 vreco2->closest_vertex_distance_z =
std::min(vreco2->closest_vertex_distance_z,
distance);
1753 std::vector<simPrimaryVertex>& simpv,
1758 for (
auto vv : simpv) {
1762 for (
auto rv : recopv) {
1768 for (
unsigned int iv = 0;
iv < recopv.size();
iv++) {
1770 LogTrace(
"Primary4DVertexValidation") <<
"iv (rec): " <<
iv;
1772 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1777 unsigned int evnt = 0;
1779 for (
auto iTrack =
vertex->tracks_begin(); iTrack !=
vertex->tracks_end(); ++iTrack) {
1787 if (tp_info !=
nullptr && matchCategory == 0) {
1789 simpv.at(
iev).addTrack(
iv, wos, wnt);
1790 recopv.at(
iv).addTrack(
iev, wos, wnt);
1798 if ((evwos > 0) && (evwos > recopv.at(
iv).maxwos) && (evnt > 1)) {
1799 recopv.at(
iv).wosmatch =
iev;
1800 recopv.at(
iv).maxwos = evwos;
1801 recopv.at(
iv).maxwosnt = evnt;
1802 LogTrace(
"Primary4DVertexValidation") <<
"dominating sim event (iev): " <<
iev <<
" evwos = " << evwos;
1806 if ((evnt > 0) && (evwnt > recopv.at(
iv).maxwnt)) {
1807 recopv.at(
iv).wntmatch =
iev;
1808 recopv.at(
iv).maxwnt = evwnt;
1811 if (recopv.at(
iv).maxwos > 0) {
1812 simpv.at(recopv.at(
iv).wosmatch).wos_dominated_recv.push_back(
iv);
1813 simpv.at(recopv.at(
iv).wosmatch).nwosmatch++;
1816 LogTrace(
"Primary4DVertexValidation") <<
"largest contribution to wos: wosmatch (iev) = " << recopv.at(
iv).wosmatch
1817 <<
" maxwos = " << recopv.at(
iv).maxwos;
1818 if (recopv.at(
iv).maxwnt > 0) {
1819 simpv.at(recopv.at(
iv).wntmatch).nwntmatch++;
1824 for (
auto& vrec : recopv) {
1826 vrec.matchQuality = 0;
1828 unsigned int iev = 0;
1829 for (
auto& vv : simpv) {
1830 LogTrace(
"Primary4DVertexValidation") <<
"iev (sim): " <<
iev;
1831 LogTrace(
"Primary4DVertexValidation") <<
"wos_dominated_recv.size: " << vv.wos_dominated_recv.size();
1832 for (
unsigned int i = 0;
i < vv.wos_dominated_recv.size();
i++) {
1833 auto recov = vv.wos_dominated_recv.at(
i);
1834 LogTrace(
"Primary4DVertexValidation")
1835 <<
"index of reco vertex: " << recov <<
" that has a wos: " << vv.wos.at(recov) <<
" at position " <<
i;
1838 vv.matchQuality = 0;
1843 for (
unsigned int rank = 1; rank <
maxRank_; rank++) {
1844 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1848 if (simpv.at(
iev).nwosmatch == 0) {
1851 if (simpv.at(
iev).nwosmatch > rank) {
1855 for (
unsigned int k = 0;
k < simpv.at(
iev).wos_dominated_recv.size();
k++) {
1856 unsigned int rec = simpv.at(
iev).wos_dominated_recv.at(
k);
1857 auto vrec = recopv.at(rec);
1871 recopv.at(
iv).sim =
iev;
1872 simpv.at(
iev).rec =
iv;
1873 recopv.at(
iv).matchQuality = rank;
1874 simpv.at(
iev).matchQuality = rank;
1883 unsigned int ntry = 0;
1885 unsigned nmatch = 0;
1886 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1892 for (
auto rv : simpv.at(
iev).wos) {
1893 if ((rec ==
NOT_MATCHED) || (rv.second > simpv.at(
iev).wos.at(rec))) {
1899 for (
auto rv : simpv.at(
iev).wnt) {
1900 if ((rec ==
NOT_MATCHED) || (rv.second > simpv.at(
iev).wnt.at(rec))) {
1915 for (
auto sv : recopv.at(rec).wos) {
1919 if ((rec2sim ==
NOT_MATCHED) || (
sv.second > recopv.at(rec).wos.at(rec2sim))) {
1923 if (
iev == rec2sim) {
1925 recopv.at(rec).sim =
iev;
1926 recopv.at(rec).matchQuality =
maxRank_;
1927 simpv.at(
iev).rec = rec;
1939 unsigned int nmatch_tot = 0, n_dzgtsz = 0;
1940 unsigned int n_rank1 = 0, n_rank2 = 0, n_rank3 = 0, n_rank8 = 0;
1942 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1944 unsigned int rec = simpv.at(
iev).rec;
1945 unsigned int wosmatch = recopv.at(rec).wosmatch;
1946 LogTrace(
"Primary4DVertexValidation")
1947 <<
"Final match: iev (sim) = " << std::setw(4) <<
iev <<
" sim.rec = " << std::setw(4) << rec
1948 <<
" rec.wosmatch = " << std::setw(5) << wosmatch <<
" dZ/sigmaZ = " << std::setw(6) << std::setprecision(2)
1949 <<
std::abs((recopv.at(rec).z - simpv.at(
iev).z) / recopv.at(rec).recVtx->zError())
1950 <<
" match qual = " << std::setw(1) << recopv.at(rec).matchQuality;
1952 if (
std::abs((recopv.at(rec).z - simpv.at(
iev).z) / recopv.at(rec).recVtx->zError()) > 3.) {
1955 if (recopv.at(rec).matchQuality == 1) {
1958 if (recopv.at(rec).matchQuality == 2) {
1961 if (recopv.at(rec).matchQuality == 3) {
1964 if (recopv.at(rec).matchQuality == 8) {
1969 LogTrace(
"Primary4DVertexValidation") <<
"n_sim = " << simpv.size() <<
" n_rec = " << recopv.size()
1970 <<
" nmatch_tot = " << nmatch_tot <<
" n(dZ>sigmaZ) = " << n_dzgtsz
1971 <<
" n_rank1 = " << n_rank1 <<
" n_rank2 = " << n_rank2
1972 <<
" n_rank3 = " << n_rank3 <<
" n_rank8 = " << n_rank8;
1982 using namespace reco;
1984 std::vector<float> pileUpInfo_z;
1989 for (
auto const& pu_info : *puinfoH.
product()) {
1990 if (pu_info.getBunchCrossing() == 0) {
1991 pileUpInfo_z = pu_info.getPU_zpositions();
2000 edm::LogWarning(
"Primary4DVertexValidation") <<
"TPCollectionH is not valid";
2005 edm::LogWarning(
"Primary4DVertexValidation") <<
"TVCollectionH is not valid";
2012 edm::LogWarning(
"Primary4DVertexValidation") <<
"simToRecoH is not valid";
2019 edm::LogWarning(
"Primary4DVertexValidation") <<
"recoToSimH is not valid";
2024 edm::LogWarning(
"Primary4DVertexValidation") <<
"BeamSpotH is not valid";
2026 std::vector<simPrimaryVertex> simpv;
2029 bool signal_is_highest_pt =
2031 return lhs.
ptsq < rhs.ptsq;
2032 }) == simpv.begin();
2034 std::vector<recoPrimaryVertex> recopv;
2038 edm::LogWarning(
"Primary4DVertexValidation") <<
"recVtxs is not valid";
2060 matchReco2Sim(recopv, simpv, sigmat0Safe, mtdQualMVA, BeamSpotH);
2063 for (
unsigned int iv = 0;
iv < recopv.size();
iv++) {
2067 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
2068 auto vsim = simpv.at(
iev).sim_vertex;
2070 bool selectedVtxMatching = recopv.at(
iv).sim ==
iev && simpv.at(
iev).rec ==
iv;
2071 bool selectedLV = simpv.at(
iev).eventId.bunchCrossing() == 0 && simpv.at(
iev).eventId.event() == 0 &&
2072 recopv.at(
iv).OriginalIndex == 0;
2073 bool selectedLVMatching = selectedVtxMatching && selectedLV;
2074 if (selectedLVMatching && !recopv.at(
iv).is_signal()) {
2076 <<
"Reco vtx leading match inconsistent: BX/ID " << simpv.at(
iev).eventId.bunchCrossing() <<
" " 2077 << simpv.at(
iev).eventId.event();
2080 if (selectedLVMatching) {
2084 double vzsim = simpv.at(
iev).z;
2087 double wnt = 0, wos = 0;
2088 double PUsumWnt = 0, PUsumWos = 0, SecsumWos = 0, FakesumWos = 0, PUsumPt = 0, PUsumPt2 = 0;
2089 double sumWnt = 0, sumWos = 0,
sumPt = 0, sumPt2 = 0;
2090 unsigned int nt = 0, PUnt = 0, Fakent = 0;
2092 std::vector<double> massVector;
2093 std::vector<reco::Track> recotracks;
2094 std::vector<int> categoryVector;
2095 double sumEtJets = 0, sumPt2Jets = 0, metPt = 0, sumPzJets = 0;
2096 double sumEtJetsnoPU = 0, sumPt2JetsnoPU = 0, metPtnoPU = 0, sumPzJetsnoPU = 0;
2097 double sumEtJetsnoFake = 0, sumPt2JetsnoFake = 0, metPtnoFake = 0, sumPzJetsnoFake = 0;
2098 unsigned int nJets = 0, nJetsnoPU = 0, nJetsnoFake = 0;
2099 for (
auto iTrack =
vertex->tracks_begin(); iTrack !=
vertex->tracks_end(); ++iTrack) {
2100 if (trackAssoc[*iTrack] == -1) {
2106 if (selectedVtxMatching) {
2117 bool selectRecoTrk =
trkRecSel(**iTrack);
2118 if (selectedLVMatching && selectRecoTrk) {
2126 int matchCategory =
getMatchedTP(*iTrack, vsim).second;
2129 if (selectedVtxMatching) {
2130 unsigned int no_PIDtype = 0;
2131 bool no_PID, is_Pi, is_K, is_P;
2133 isParticle(*iTrack, sigmat0, sigmat0Safe, probPi, probK, probP, no_PIDtype, no_PID, is_Pi, is_K, is_P);
2135 if (no_PID || is_Pi) {
2144 double mass = PData->mass().value();
2145 massVector.push_back(
mass);
2146 recotracks.push_back(**iTrack);
2147 getWosWnt(*
vertex, *iTrack, sigmat0Safe, mtdQualMVA, BeamSpotH, wos, wnt);
2153 if (tp_info !=
nullptr) {
2160 if (matchCategory == 1) {
2161 categoryVector.push_back(matchCategory);
2165 if (matchCategory == 2) {
2174 PUsumPt += (*iTrack)->pt();
2175 PUsumPt2 += ((*iTrack)->pt() * (*iTrack)->pt());
2177 categoryVector.push_back(2);
2182 categoryVector.push_back(matchCategory);
2189 sumPt += (*iTrack)->pt();
2190 sumPt2 += ((*iTrack)->pt() * (*iTrack)->pt());
2194 if (tp_info !=
nullptr && matchCategory == 0) {
2195 categoryVector.push_back(matchCategory);
2196 double mass = (*tp_info)->mass();
2197 double tsim = (*tp_info)->parentVertex()->position().t() *
simUnit_;
2200 double xsim = (*tp_info)->parentVertex()->position().x();
2201 double ysim = (*tp_info)->parentVertex()->position().y();
2202 double zsim = (*tp_info)->parentVertex()->position().z();
2203 double xPCA = (*iTrack)->vx();
2204 double yPCA = (*iTrack)->vy();
2205 double zPCA = (*iTrack)->vz();
2207 double dZ = zPCA - zsim;
2208 double d3D =
std::sqrt((xPCA - xsim) * (xPCA - xsim) + (yPCA - ysim) * (yPCA - ysim) +
dZ *
dZ);
2210 if ((xPCA - xsim) * ((*tp_info)->px()) + (yPCA - ysim) * ((*tp_info)->py()) +
dZ * ((*tp_info)->pz()) <
2218 if (selectedLVMatching && selectRecoTrk && selectTP) {
2226 if (sigmat0Safe[*iTrack] == -1)
2229 if (selectedLVMatching && selectRecoTrk && selectTP) {
2237 unsigned int noPIDtype = 0;
2238 bool noPID =
false, isPi =
false, isK =
false, isP =
false;
2239 isParticle(*iTrack, sigmat0, sigmat0Safe, probPi, probK, probP, noPIDtype, noPID, isPi, isK, isP);
2241 if ((isPi &&
std::abs(tMtd[*iTrack] - tofPi[*iTrack] - t0Pid[*iTrack]) >
tol_) ||
2242 (isK &&
std::abs(tMtd[*iTrack] - tofK[*iTrack] - t0Pid[*iTrack]) >
tol_) ||
2243 (isP &&
std::abs(tMtd[*iTrack] - tofP[*iTrack] - t0Pid[*iTrack]) >
tol_)) {
2245 <<
"No match between mass hyp. and time: " <<
std::abs((*tp_info)->pdgId()) <<
" mass hyp pi/k/p " 2246 << isPi <<
" " << isK <<
" " << isP <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " << t0Safe[*iTrack]
2247 <<
" tMtd - tof pi/K/p " << tMtd[*iTrack] - tofPi[*iTrack] <<
" " << tMtd[*iTrack] - tofK[*iTrack]
2248 <<
" " << tMtd[*iTrack] - tofP[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " 2249 << probK[*iTrack] <<
" " << probP[*iTrack];
2255 if (
std::abs((*tp_info)->pdgId()) == 211) {
2266 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2267 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2270 }
else if (
std::abs((*tp_info)->pdgId()) == 321) {
2281 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2282 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2285 }
else if (
std::abs((*tp_info)->pdgId()) == 2212) {
2296 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2297 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2304 if (
std::abs((*tp_info)->pdgId()) == 211) {
2315 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2316 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2319 }
else if (
std::abs((*tp_info)->pdgId()) == 321) {
2330 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2331 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2334 }
else if (
std::abs((*tp_info)->pdgId()) == 2212) {
2345 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2346 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2355 if ((*iTrack)->p() <= 2) {
2363 if (mtdQualMVA[(*iTrack)] <
mvaL_) {
2374 if ((*iTrack)->p() <= 2) {
2377 }
else if ((*iTrack)->p() > 2) {
2383 if (
std::abs((*tp_info)->pdgId()) == 2212) {
2386 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
2392 }
else if (mtdQualMVA[(*iTrack)] >
mvaL_ && mtdQualMVA[(*iTrack)] <
mvaH_) {
2403 if ((*iTrack)->p() <= 2) {
2406 }
else if ((*iTrack)->p() > 2) {
2412 if (
std::abs((*tp_info)->pdgId()) == 2212) {
2415 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
2421 }
else if (mtdQualMVA[(*iTrack)] >
mvaH_) {
2432 if ((*iTrack)->p() <= 2) {
2435 }
else if ((*iTrack)->p() > 2) {
2441 if (
std::abs((*tp_info)->pdgId()) == 2212) {
2444 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
2452 if (selectedVtxMatching) {
2464 recotracks, massVector, categoryVector,
"use_allTracks",
nJets, sumEtJets, sumPt2Jets, metPt, sumPzJets);
2517 (sumPt2Jets - sumPt2JetsnoPU) / sumPt2Jets);
2519 (sumPt2Jets - sumPt2JetsnoFake) / sumPt2Jets);
2522 (sumPzJets - sumPzJetsnoPU) / sumPzJets);
2542 LogTrace(
"Primary4DVertexValidation")
2543 <<
"#PUTrks = " << PUnt <<
" #Trks = " <<
nt <<
" PURelMult = " << std::setprecision(3)
2544 <<
static_cast<double>(PUnt) /
nt;
2545 LogTrace(
"Primary4DVertexValidation")
2546 <<
"PUsumWnt = " << std::setprecision(3) << PUsumWnt <<
" sumWnt = " << std::setprecision(3) << sumWnt
2547 <<
" PURelsumWnt = " << std::setprecision(3) << PUsumWnt / sumWnt;
2548 LogTrace(
"Primary4DVertexValidation")
2549 <<
"PUsumWos = " << std::setprecision(3) << PUsumWos <<
" sumWos = " << std::setprecision(3) << sumWos
2550 <<
" PURelsumWos = " << std::setprecision(3) << PUsumWos / sumWos;
2551 LogTrace(
"Primary4DVertexValidation")
2552 <<
"PuSumPt = " << std::setprecision(3) << PUsumPt <<
" SumPt = " << std::setprecision(4) <<
sumPt 2553 <<
" PURelSumPt = " << std::setprecision(3) << PUsumPt /
sumPt;
2554 LogTrace(
"Primary4DVertexValidation")
2555 <<
"PuSumPt2 = " << std::setprecision(3) << PUsumPt2 <<
" SumPt2 = " << std::setprecision(4) << sumPt2
2556 <<
" PURelSumPt2 = " << std::setprecision(3) << PUsumPt2 / sumPt2;
2582 (sumEtJets - sumEtJetsnoPU) / sumEtJets);
2584 (sumPt2Jets - sumPt2JetsnoPU) / sumPt2Jets);
2586 (sumPt2Jets - sumPt2JetsnoFake) / sumPt2Jets);
2589 (sumPzJets - sumPzJetsnoPU) / sumPzJets);
2602 auto puLineDensity = [&](
double z) {
2609 for (
unsigned int ir = 0; ir < recopv.size(); ir++) {
2610 if (recopv.at(ir).ndof >
selNdof_) {
2612 meRecPVZ_->
Fill(recopv.at(ir).z, 1. / puLineDensity(recopv.at(ir).z));
2613 if (recopv.at(ir).recVtx->tError() > 0.) {
2616 LogTrace(
"Primary4DVertexValidation") <<
"************* IR: " << ir;
2617 LogTrace(
"Primary4DVertexValidation")
2618 <<
"z: " << recopv.at(ir).z <<
" corresponding to line density: " << puLineDensity(recopv.at(ir).z);
2619 LogTrace(
"Primary4DVertexValidation") <<
"is_real: " << recopv.at(ir).is_real();
2620 LogTrace(
"Primary4DVertexValidation") <<
"is_fake: " << recopv.at(ir).is_fake();
2621 LogTrace(
"Primary4DVertexValidation") <<
"is_signal: " << recopv.at(ir).is_signal();
2622 LogTrace(
"Primary4DVertexValidation") <<
"split_from: " << recopv.at(ir).split_from();
2623 LogTrace(
"Primary4DVertexValidation") <<
"other fake: " << recopv.at(ir).other_fake();
2624 if (recopv.at(ir).is_real()) {
2627 if (recopv.at(ir).is_fake()) {
2630 if (recopv.at(ir).other_fake()) {
2633 if (recopv.at(ir).split_from() != -1) {
2639 LogTrace(
"Primary4DVertexValidation") <<
"is_real: " << real;
2640 LogTrace(
"Primary4DVertexValidation") <<
"is_fake: " << fake;
2641 LogTrace(
"Primary4DVertexValidation") <<
"split_from: " <<
split;
2642 LogTrace(
"Primary4DVertexValidation") <<
"other fake: " << other_fake;
2649 for (
unsigned int is = 0; is < simpv.size(); is++) {
2654 meSimPVZ_->
Fill(simpv.at(is).z, 1. / puLineDensity(simpv.at(is).z));
2660 LogTrace(
"Primary4DVertexValidation") <<
"sim vertex: " << is <<
" is not matched with any reco";
2664 for (
unsigned int ir = 0; ir < recopv.size(); ir++) {
2665 if (recopv.at(ir).ndof >
selNdof_) {
2666 if (recopv.at(ir).sim == is && simpv.at(is).rec == ir) {
2673 recopv.at(ir).recVtx->tError());
2679 if (simpv.at(is).eventId.bunchCrossing() == 0 && simpv.at(is).eventId.event() == 0) {
2680 if (!recopv.at(ir).is_signal()) {
2682 <<
"Reco vtx leading match inconsistent: BX/ID " << simpv.at(is).eventId.bunchCrossing() <<
" " 2683 << simpv.at(is).eventId.event();
2686 recopv.at(ir).OriginalIndex);
2687 if (!signal_is_highest_pt) {
2689 recopv.at(ir).OriginalIndex);
2692 LogTrace(
"Primary4DVertexValidation") <<
"*** Matching RECO: " << ir <<
"with SIM: " << is <<
" ***";
2693 LogTrace(
"Primary4DVertexValidation") <<
"Match Quality is " << recopv.at(ir).matchQuality;
2694 LogTrace(
"Primary4DVertexValidation") <<
"****";
2701 for (
unsigned int iv = 0;
iv < recVtxs->size() - 1;
iv++) {
2703 double mindistance_realreal = 1e10;
2705 for (
unsigned int jv =
iv; jv < recVtxs->size(); jv++) {
2706 if ((!(jv ==
iv)) &&
select(recVtxs->at(jv))) {
2707 double dz = recVtxs->at(
iv).z() - recVtxs->at(jv).z();
2708 double dtsigma =
std::sqrt(recVtxs->at(
iv).covariance(3, 3) + recVtxs->at(jv).covariance(3, 3));
2710 ? (recVtxs->at(
iv).t() - recVtxs->at(jv).t()) / dtsigma
2712 if (recopv.at(
iv).is_real() && recopv.at(jv).is_real()) {
2718 mindistance_realreal =
dz;
2720 }
else if (recopv.at(
iv).is_fake() && recopv.at(jv).is_fake()) {
2729 double mindistance_fakereal = 1e10;
2730 double mindistance_realfake = 1e10;
2731 for (
unsigned int jv = 0; jv < recVtxs->size(); jv++) {
2732 if ((!(jv ==
iv)) &&
select(recVtxs->at(jv))) {
2733 double dz = recVtxs->at(
iv).z() - recVtxs->at(jv).z();
2734 double dtsigma =
std::sqrt(recVtxs->at(
iv).covariance(3, 3) + recVtxs->at(jv).covariance(3, 3));
2736 ? (recVtxs->at(
iv).t() - recVtxs->at(jv).t()) / dtsigma
2738 if (recopv.at(
iv).is_fake() && recopv.at(jv).is_real()) {
2744 mindistance_fakereal =
dz;
2748 if (recopv.at(
iv).is_real() && recopv.at(jv).is_fake() && (
std::abs(
dz) <
std::abs(mindistance_realfake))) {
2749 mindistance_realfake =
dz;
2768 ->setComment(
"Association between General and MTD Extended tracks");
2785 desc.add<
bool>(
"useOnlyChargedTracks",
true);
2786 desc.addUntracked<
bool>(
"optionalPlots",
false);
2787 desc.add<
bool>(
"use3dNoTime",
false);
2788 desc.add<
double>(
"trackweightTh", 0.5);
2789 desc.add<
double>(
"mvaTh", 0.8);
2790 desc.add<
double>(
"minProbHeavy", 0.75);
2794 std::vector<double> lDP;
2795 lDP.push_back(1.87);
2797 lDP.push_back(42.5);
2798 desc.add<std::vector<double>>(
"lineDensityPar", lDP);
2799 descriptions.
add(
"vertices4DValid",
desc);
2805 const unsigned int& categ) {
2809 strTrk =
"Reco_Track:";
2812 strTrk =
"SecRecoTrk:";
2815 strTrk =
"PU_RecoTrk:";
2818 LogTrace(
"Primary4DVertexValidation") << strTrk <<
" w =" << std::setw(6) << std::setprecision(2)
2819 <<
vtx.trackWeight(trk) <<
" pt =" << std::setw(6) << std::setprecision(2)
2820 << trk->
pt() <<
" eta =" << std::setw(6) << std::setprecision(2) << trk->
eta()
2821 <<
" MatchedTP: Pt =" << std::setw(6) << std::setprecision(2) <<
tp->pt()
2822 <<
" eta =" << std::setw(6) << std::setprecision(2) <<
tp->eta()
2823 <<
" Parent vtx: z =" << std::setw(8) << std::setprecision(4)
2824 <<
tp->parentVertex()->position().z() <<
" t =" << std::setw(8)
2825 << std::setprecision(4) <<
tp->parentVertex()->position().t() *
simUnit_ 2826 <<
" BX =" <<
tp->parentVertex()->eventId().bunchCrossing()
2827 <<
" ev =" <<
tp->parentVertex()->eventId().event() << std::endl;
2833 LogTrace(
"Primary4DVertexValidation") <<
"Sim vtx (x,y,z,t) = (" << std::setprecision(4) << simpVtx.
x <<
"," 2834 << std::setprecision(4) << simpVtx.
y <<
"," << std::setprecision(4) << simpVtx.
z 2835 <<
"," << std::setprecision(4) << simpVtx.
t *
simUnit_ <<
")" 2836 <<
" Simvtx.rec = " << simpVtx.
rec;
2837 LogTrace(
"Primary4DVertexValidation") <<
"Sim vtx: pt = " << std::setprecision(4) << simpVtx.
pt 2838 <<
" ptsq = " << std::setprecision(6) << simpVtx.
ptsq 2839 <<
" nGenTrk = " << simpVtx.
nGenTrk 2841 LogTrace(
"Primary4DVertexValidation") <<
"Reco vtx (x,y,z) = (" << std::setprecision(4) << recopVtx.
x <<
"," 2842 << std::setprecision(4) << recopVtx.
y <<
"," << std::setprecision(4)
2843 << recopVtx.
z <<
")" 2844 <<
" Recovtx.sim = " << recopVtx.
sim;
2845 LogTrace(
"Primary4DVertexValidation") <<
"Reco vtx: pt = " << std::setprecision(4) << recopVtx.
pt 2846 <<
" ptsq = " << std::setprecision(6) << recopVtx.
ptsq 2847 <<
" nrecotrks = " << recopVtx.
nRecoTrk 2849 LogTrace(
"Primary4DVertexValidation") <<
"wnt " << recopVtx.
sumwnt <<
" wos = " << recopVtx.
sumwos;
2850 for (
auto iTP = simpVtx.
sim_vertex->daughterTracks_begin(); iTP != simpVtx.
sim_vertex->daughterTracks_end(); ++iTP) {
2854 LogTrace(
"Primary4DVertexValidation")
2855 <<
"Daughter track of sim vertex: pt =" << std::setw(6) << std::setprecision(2) << (*iTP)->pt()
2856 <<
" eta =" << std::setw(6) << std::setprecision(2) << (*iTP)->eta();
2862 if (
tp.status() != 1) {
2866 auto x_pv =
tp.parentVertex()->position().x();
2867 auto y_pv =
tp.parentVertex()->position().y();
2868 auto z_pv =
tp.parentVertex()->position().z();
2870 auto r_pv =
std::sqrt(x_pv * x_pv + y_pv * y_pv);
MonitorElement * meTrackResLowPTot_
MonitorElement * meBarrelPIDp_
static constexpr double trackMaxBtlEta_
MonitorElement * meJetsRecLVPUSumPt2_
MonitorElement * meMatchQual_
MonitorElement * meEndcapTruePiAsPi_
MonitorElement * meJetsRecLVPUMetPt_
edm::EDGetTokenT< edm::View< reco::Vertex > > Rec4DVerToken_
MonitorElement * meRecoPVPosSignal_
std::vector< unsigned int > wos_dominated_recv
MonitorElement * meRecPVT_
MonitorElement * meBarrelNoPIDtype_
MonitorElement * meJetsPUSumPz_
T getParameter(std::string const &) const
edm::EDGetTokenT< TrackingVertexCollection > trackingVertexCollectionToken_
MonitorElement * meJetsRecLVPURelSumPt2_
static constexpr double trackMaxEtlEta_
MonitorElement * mePUTrackRecLVRelSumWos_
double closest_vertex_distance_z
static constexpr double etacutREC_
MonitorElement * meJetsPUMetPt_
MonitorElement * meTrackResTot_
MonitorElement * meJetsRecLVFakeRelSumPt2_
MonitorElement * mePUTrackSumPt_
MonitorElement * mePUvsRealV_
MonitorElement * meJetsPURelSumPt2vsSumPt2_
MonitorElement * meTrackResLowP_[3]
MonitorElement * meTimeRes_
MonitorElement * meEndcapTruePiAsP_
MonitorElement * mePUTrackMult_
MonitorElement * meDeltaTrealreal_
MonitorElement * mePUTrackSumWnt_
MonitorElement * mePUTrackRecLVRelSumWntvsSumWnt_
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleCollectionToken_
TrackingVertexRef sim_vertex
MonitorElement * meJetsRecLVPURelHtvsHt_
MonitorElement * mePUTrackRelSumPt2_
MonitorElement * meFakeTrackRelMultvsMult_
virtual void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< edm::ValueMap< float > > sigmat0SafePidToken_
static constexpr double selNdof_
HepPDT::ParticleDataTable ParticleDataTable
std::vector< Primary4DVertexValidation::simPrimaryVertex > getSimPVs(const edm::Handle< TrackingVertexCollection > &)
MonitorElement * meTimeSignalRes_
edm::EDGetTokenT< reco::BeamSpot > RecBeamSpotToken_
constexpr bool isNotFinite(T x)
MonitorElement * meTrackPullTot_
static constexpr double pTcut_
MonitorElement * mePUTrackRecLVSumWos_
const bool trkTPSelLV(const TrackingParticle &)
int num_matched_sim_tracks
MonitorElement * meFakeTrackRecLVRelSumWos_
const bool trkRecSel(const reco::TrackBase &)
bool select(const reco::Vertex &, int level=0)
MonitorElement * meBarrelTrueKAsPi_
MonitorElement * meSecTrackSumWos_
MonitorElement * meJetsRecLVPURelSumPz_
void matchReco2Sim(std::vector< recoPrimaryVertex > &, std::vector< simPrimaryVertex > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::Handle< reco::BeamSpot > &)
void observablesFromJets(const std::vector< reco::Track > &, const std::vector< double > &, const std::vector< int > &, const std::string &, unsigned int &, double &, double &, double &, double &)
edm::EDGetTokenT< edm::ValueMap< float > > probKToken_
Sin< T >::type sin(const T &t)
edm::RefToBase< reco::Vertex > VertexBaseRef
persistent reference to a Vertex, using views
T const * product() const
MonitorElement * meBarrelTrueKNoPID_
bool matchRecoTrack2SimSignal(const reco::TrackBaseRef &)
MonitorElement * meDeltaZfakereal_
TkSoAView< TrackerTraits > HitToTuple< TrackerTraits > const *__restrict__ int32_t int32_t int iev
MonitorElement * mePUTrackRecLVRelMultvsMult_
MonitorElement * mePUTrackRelMultvsMult_
static constexpr double etacutGEN_
edm::EDGetTokenT< edm::ValueMap< float > > sigmat0PidToken_
static constexpr double rBTL_
MonitorElement * meJetsRecLVPURelMetPtvsMetPt_
MonitorElement * meEndcapTruePAsPi_
MonitorElement * meFakeTrackRecLVRelMultvsMult_
MonitorElement * meEndcapTruePiNoPID_
MonitorElement * meTrackZposRes_[3]
static constexpr double tol_
static constexpr double minThrSumWos_
MonitorElement * meEndcapTrueKAsK_
MonitorElement * meFakeTrackRecLVRelSumWosvsSumWos_
MonitorElement * meJetsFakeRelSumPt2_
MonitorElement * meJetsPURelMetPtvsMetPt_
MonitorElement * meSimPVZ_
MonitorElement * mePUvsFakeV_
const std::string folder_
MonitorElement * meJetsRecLVPURelSumPt2vsSumPt2_
MonitorElement * meJetsFakeRelSumPt2vsSumPt2_
static constexpr int nJets
MonitorElement * mePUTrackRelSumPtvsSumPt_
MonitorElement * mePUTrackSumWos_
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * meSecTrackRecLVSumWos_
edm::EDGetTokenT< edm::ValueMap< float > > timeToken_
std::vector< Primary4DVertexValidation::recoPrimaryVertex > getRecoPVs(const edm::Handle< edm::View< reco::Vertex >> &)
MonitorElement * meFakeTrackRelSumWos_
static constexpr double trackMinEtlEta_
MonitorElement * meTrackZposResTot_
MonitorElement * meTrackMatchedTPResTot_
const_iterator find(const key_type &k) const
find element with specified reference key
MonitorElement * meEndcapTruePNoPID_
MonitorElement * meTrackMatchedTPEffEtaMtd_
MonitorElement * mePUTrackWnt_
MonitorElement * meTrackResMassProtons_[3]
MonitorElement * meTrackResMassTrueProtons_[3]
std::map< unsigned int, double > wnt
MonitorElement * meTrackEffEtaTot_
MonitorElement * meBarrelTruePNoPID_
const_iterator end() const
last iterator over the map (read only)
MonitorElement * meRecoPosInSimCollection_
std::map< unsigned int, double > wos
U second(std::pair< T, U > const &p)
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
MonitorElement * meRecoPVPosSignalNotHighestPt_
MonitorElement * meVtxTrackMult_
double pt() const
track transverse momentum
MonitorElement * meJetsPURelMult_
static constexpr double simUnit_
double timeFromTrueMass(double, double, double, double)
MonitorElement * meJetsPURelSumPz_
MonitorElement * mePUTrackRecLVWnt_
MonitorElement * mePUTrackRelMult_
unsigned int matchQuality
MonitorElement * meVtxTrackRecLVW_
math::XYZTLorentzVector LorentzVector
MonitorElement * meVtxTrackRecLVMult_
MonitorElement * meSecTrackRecLVRelSumWosvsSumWos_
static constexpr double c_
MonitorElement * meEndcapTrueKAsP_
void addTrack(unsigned int irecv, double twos, double twt)
MonitorElement * meTrackEffPtTot_
MonitorElement * mePUTrackRecLVRelSumPtvsSumPt_
MonitorElement * meJetsPURelHtvsHt_
MonitorElement * meVtxTrackRecLVWnt_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
double dzError() const
error on dz
MonitorElement * meBarrelTruePAsK_
MonitorElement * meJetsRecLVPURelMetPt_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * meEndcapTrueKAsPi_
MonitorElement * meJetsPURelSumPt2_
MonitorElement * meTrackResHighPTot_
Primary4DVertexValidation(const edm::ParameterSet &)
MonitorElement * mePUTrackRelSumPt2vsSumPt2_
MonitorElement * meJetsRecLVPURelSumPzvsSumPz_
MonitorElement * meTrackPull_[3]
Cos< T >::type cos(const T &t)
MonitorElement * meTrackPullHighPTot_
MonitorElement * meBarrelTrueKAsP_
MonitorElement * mePUTrackRelSumWntvsSumWnt_
float trackWeight(const TREF &r) const
returns the weight with which a Track has contributed to the vertex-fit.
edm::EDGetTokenT< edm::ValueMap< float > > probPiToken_
MonitorElement * mePUTrackRelSumWosvsSumWos_
MonitorElement * mePUTrackRecLVRelSumPt_
MonitorElement * meTrackMatchedTPEffPtTot_
static constexpr double minThrMetPt_
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
MonitorElement * mePUTrackRecLVRelSumPt2vsSumPt2_
edm::EDGetTokenT< edm::ValueMap< float > > probPToken_
MonitorElement * meJetsRecLVFakeRelSumPt2vsSumPt2_
bool use_only_charged_tracks_
double phi() const
azimuthal angle of momentum vector
MonitorElement * meJetsPUMult_
#define DEFINE_FWK_MODULE(type)
MonitorElement * meTimePull_
edm::EDGetTokenT< edm::ValueMap< float > > momentumToken_
MonitorElement * meDeltaZrealreal_
MonitorElement * meTrackResMassTruePions_[3]
unsigned int matchQuality
MonitorElement * meEndcapNoPIDtype_
MonitorElement * mePUTrackRecLVMult_
MonitorElement * meTimeSignalPull_
recoPrimaryVertex(double x1, double y1, double z1)
static constexpr double maxTry_
edm::EDGetTokenT< edm::ValueMap< float > > tofKToken_
edm::EDGetTokenT< reco::TrackCollection > RecTrackToken_
MonitorElement * meJetsPURelSumPzvsSumPz_
const std::vector< double > lineDensityPar_
HepPDT::ParticleData ParticleData
MonitorElement * meJetsRecLVPUMult_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const reco::RecoToSimCollection * r2s_
MonitorElement * mePUTrackRecLVRelSumPt2_
MonitorElement * mePUTrackRelSumWnt_
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > vecPileupSummaryInfoToken_
MonitorElement * meTrackMatchedTPPullTot_
simPrimaryVertex(double x1, double y1, double z1, double t1)
static constexpr double deltaZcut_
MonitorElement * meEndcapTruePiAsK_
MonitorElement * mePUTrackRecLVSumPt2_
const reco::Vertex * recVtx
MonitorElement * meEndcapTruePAsK_
edm::EDGetTokenT< edm::ValueMap< float > > t0PidToken_
def split(sequence, size)
MonitorElement * meFakeTrackRecLVRelMult_
edm::Ref< TrackingVertexCollection > TrackingVertexRef
MonitorElement * meRecoPosInRecoOrigCollection_
MonitorElement * meJetsRecLVPUSumPz_
MonitorElement * meSecTrackRecLVRelSumWos_
MonitorElement * meTrackResMassTrue_[3]
MonitorElement * meTrackMatchedTPZposResTot_
MonitorElement * meEndcapPIDp_
static constexpr unsigned int NOT_MATCHED
MonitorElement * meBarrelTruePiAsPi_
double eta() const
pseudorapidity of momentum vector
MonitorElement * meJetsPUSumPt2_
MonitorElement * meVtxTrackWnt_
MonitorElement * meRecPVZ_
edm::EDGetTokenT< reco::SimToRecoCollection > simToRecoAssociationToken_
edm::EDGetTokenT< edm::ValueMap< int > > trackAssocToken_
static constexpr double mvaH_
MonitorElement * mePUTrackRecLVRelSumWnt_
int num_matched_reco_tracks
constexpr NumType convertMmToCm(NumType millimeters)
std::map< unsigned int, double > wnt
static constexpr double mvaL_
MonitorElement * meJetsRecLVPURelMult_
std::map< unsigned int, double > wos
float average_match_quality
reco::VertexBaseRef recVtxRef
static constexpr double maxRank_
~Primary4DVertexValidation() override
static constexpr double minThrSumPz_
MonitorElement * meSimPosInSimOrigCollection_
MonitorElement * meFakeTrackRelSumWosvsSumWos_
MonitorElement * meJetsRecLVPURelMultvsMult_
MonitorElement * meJetsPURelHt_
MonitorElement * meJetsPURelMetPt_
MonitorElement * meTrack3DposRes_[3]
void isParticle(const reco::TrackBaseRef &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, unsigned int &, bool &, bool &, bool &, bool &)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * meEndcapTruePAsP_
static constexpr double minThrSumPt2_
const double trackweightTh_
MonitorElement * meBarrelTruePAsP_
MonitorElement * meSecTrackRelSumWosvsSumWos_
void addTrack(unsigned int iev, double twos, double wt)
MonitorElement * meEndcapTrueKNoPID_
double closest_vertex_distance_z
void printSimVtxRecoVtxInfo(const struct Primary4DVertexValidation::simPrimaryVertex &, const struct Primary4DVertexValidation::recoPrimaryVertex &)
MonitorElement * meTrackPullLowPTot_
MonitorElement * meTrackMatchedTPEffPtMtd_
double theta() const
polar angle
MonitorElement * meBarrelTruePiNoPID_
MonitorElement * meDeltaZfakefake_
std::pair< const edm::Ref< std::vector< TrackingParticle > > *, int > getMatchedTP(const reco::TrackBaseRef &, const TrackingVertexRef &)
MonitorElement * meBarrelTruePiAsP_
const reco::SimToRecoCollection * s2r_
MonitorElement * meBarrelTrueKAsK_
MonitorElement * mePUTrackRelSumWos_
static constexpr float c_cm_ns
edm::EDGetTokenT< edm::ValueMap< float > > tofPiToken_
MonitorElement * meJetsRecLVPUHt_
MonitorElement * mePUTrackRelSumPt_
MonitorElement * meBarrelTruePAsPi_
Monte Carlo truth information used for tracking validation.
MonitorElement * mePUTrackRecLVSumPt_
MonitorElement * meFakeTrackRelMult_
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< reco::RecoToSimCollection > recoToSimAssociationToken_
MonitorElement * meRecoVtxVsLineDensity_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
MonitorElement * mePUTrackSumPt2_
MonitorElement * meJetsPUHt_
MonitorElement * meVtxTrackW_
edm::ESGetToken< HepPDT::ParticleDataTable, edm::DefaultRecord > pdtToken_
MonitorElement * meTrackRes_[3]
Log< level::Warning, false > LogWarning
MonitorElement * meTrackResMassPions_[3]
static constexpr double zETL_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
edm::EDGetTokenT< edm::ValueMap< float > > t0SafePidToken_
edm::EDGetTokenT< edm::ValueMap< float > > tmtdToken_
static constexpr double zWosMatchMax_
MonitorElement * mePUTrackRecLVRelMult_
const double minProbHeavy_
MonitorElement * mePUTrackRecLVRelSumWosvsSumWos_
MonitorElement * meTrackResHighP_[3]
MonitorElement * meTrackResMass_[3]
MonitorElement * meBarrelTruePiAsK_
static constexpr double minThrSumPt_
MonitorElement * meJetsPURelMultvsMult_
MonitorElement * meSecTrackRelSumWos_
edm::EDGetTokenT< edm::ValueMap< float > > tofPToken_
MonitorElement * meTrackMatchedTPEffEtaTot_
Power< A, B >::type pow(const A &a, const B &b)
MonitorElement * meTrackPullHighP_[3]
MonitorElement * mePUvsSplitV_
static constexpr double minThrSumWnt_
MonitorElement * mePUTrackRecLVSumWnt_
void getWosWnt(const reco::Vertex &, const reco::TrackBaseRef &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::Handle< reco::BeamSpot > &, double &, double &)
MonitorElement * meRecVerNumber_
MonitorElement * mePUvsOtherFakeV_
edm::EDGetTokenT< edm::ValueMap< float > > trackMVAQualToken_
void printMatchedRecoTrackInfo(const reco::Vertex &, const reco::TrackBaseRef &, const TrackingParticleRef &, const unsigned int &)
MonitorElement * meTrackPullLowP_[3]
edm::EDGetTokenT< edm::ValueMap< float > > pathLengthToken_
MonitorElement * meJetsRecLVPURelHt_
MonitorElement * meDeltaTfakereal_
MonitorElement * meDeltaTfakefake_