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&);
527 use_only_charged_tracks_(iConfig.getParameter<
bool>(
"useOnlyChargedTracks")),
528 optionalPlots_(iConfig.getUntrackedParameter<
bool>(
"optionalPlots")),
529 use3dNoTime_(iConfig.getParameter<
bool>(
"use3dNoTime")),
530 minProbHeavy_(iConfig.getParameter<double>(
"minProbHeavy")),
531 trackweightTh_(iConfig.getParameter<double>(
"trackweightTh")),
532 mvaTh_(iConfig.getParameter<double>(
"mvaTh")),
573 meTrackEffPtTot_ = ibook.
book1D(
"EffPtTot",
"Pt of tracks associated to LV; track pt [GeV] ", 110, 0., 11.);
576 ibook.
book1D(
"MatchedTPEffPtTot",
"Pt of tracks associated to LV matched to TP; track pt [GeV] ", 110, 0., 11.);
578 "MatchedTPEffPtMtd",
"Pt of tracks associated to LV matched to TP with time; track pt [GeV] ", 110, 0., 11.);
580 ibook.
book1D(
"MatchedTPEffEtaTot",
"Eta of tracks associated to LV matched to TP; track eta ", 66, 0., 3.3);
582 "MatchedTPEffEtaMtd",
"Eta of tracks associated to LV matched to TP with time; track eta ", 66, 0., 3.3);
584 ibook.
book1D(
"MatchedTPTrackRes",
585 "t_{rec} - t_{sim} for tracks associated to LV matched to TP; t_{rec} - t_{sim} [ns] ",
589 meTrackResTot_ = ibook.
book1D(
"TrackRes",
"t_{rec} - t_{sim} for tracks; t_{rec} - t_{sim} [ns] ", 120, -0.15, 0.15);
591 "TrackRes-LowMVA",
"t_{rec} - t_{sim} for tracks with MVA < 0.5; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
593 "TrackRes-MediumMVA",
"t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
595 "TrackRes-HighMVA",
"t_{rec} - t_{sim} for tracks with MVA > 0.8; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
598 "TrackResMass-LowMVA",
"t_{rec} - t_{est} for tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ", 100, -1., 1.);
600 "t_{rec} - t_{est} for tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
605 "TrackResMass-HighMVA",
"t_{rec} - t_{est} for tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ", 100, -1., 1.);
607 "TrackResMassTrue-LowMVA",
"t_{est} - t_{sim} for tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ", 100, -1., 1.);
609 "t_{est} - t_{sim} for tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
614 "t_{est} - t_{sim} for tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
620 "MatchedTPTrackPull",
"Pull for tracks associated to LV matched to TP; (t_{rec}-t_{sim})/#sigma_{t}", 50, -5., 5.);
621 meTrackPullTot_ = ibook.
book1D(
"TrackPull",
"Pull for tracks; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
623 ibook.
book1D(
"TrackPull-LowMVA",
"Pull for tracks with MVA < 0.5; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
625 "TrackPull-MediumMVA",
"Pull for tracks with 0.5 < MVA < 0.8; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
627 ibook.
book1D(
"TrackPull-HighMVA",
"Pull for tracks with MVA > 0.8; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
629 ibook.
book1D(
"MatchedTPTrackZposResTot",
630 "Z_{PCA} - Z_{sim} for tracks associated to LV matched to TP;Z_{PCA} - Z_{sim} [cm] ",
635 ibook.
book1D(
"TrackZposResTot",
"Z_{PCA} - Z_{sim} for tracks;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
637 "TrackZposRes-LowMVA",
"Z_{PCA} - Z_{sim} for tracks with MVA < 0.5;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
639 "Z_{PCA} - Z_{sim} for tracks with 0.5 < MVA < 0.8 ;Z_{PCA} - Z_{sim} [cm] ",
644 "TrackZposRes-HighMVA",
"Z_{PCA} - Z_{sim} for tracks with MVA > 0.8 ;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
646 ibook.
book1D(
"Track3DposRes-LowMVA",
647 "3dPos_{PCA} - 3dPos_{sim} for tracks with MVA < 0.5 ;3dPos_{PCA} - 3dPos_{sim} [cm] ",
652 ibook.
book1D(
"Track3DposRes-MediumMVA",
653 "3dPos_{PCA} - 3dPos_{sim} for tracks with 0.5 < MVA < 0.8 ;3dPos_{PCA} - 3dPos_{sim} [cm] ",
658 ibook.
book1D(
"Track3DposRes-HighMVA",
659 "3dPos_{PCA} - 3dPos_{sim} for tracks with MVA > 0.8;3dPos_{PCA} - 3dPos_{sim} [cm] ",
663 meTimeRes_ = ibook.
book1D(
"TimeRes",
"t_{rec} - t_{sim} ;t_{rec} - t_{sim} [ns] ", 100, -0.2, 0.2);
664 meTimePull_ = ibook.
book1D(
"TimePull",
"Pull; t_{rec} - t_{sim}/#sigma_{t rec}", 100, -10., 10.);
666 ibook.
book1D(
"TimeSignalRes",
"t_{rec} - t_{sim} for signal ;t_{rec} - t_{sim} [ns] ", 50, -0.1, 0.1);
668 ibook.
book1D(
"TimeSignalPull",
"Pull for signal; t_{rec} - t_{sim}/#sigma_{t rec}", 100, -10., 10.);
670 ibook.
bookProfile(
"PUvsReal",
"#PU vertices vs #real matched vertices;#PU;#real ", 100, 0, 300, 100, 0, 200);
672 ibook.
bookProfile(
"PUvsFake",
"#PU vertices vs #fake matched vertices;#PU;#fake ", 100, 0, 300, 100, 0, 20);
674 "PUvsOtherFake",
"#PU vertices vs #other fake matched vertices;#PU;#other fake ", 100, 0, 300, 100, 0, 20);
676 ibook.
bookProfile(
"PUvsSplit",
"#PU vertices vs #split matched vertices;#PU;#split ", 100, 0, 300, 100, 0, 20);
677 meMatchQual_ = ibook.
book1D(
"MatchQuality",
"RECO-SIM vertex match quality; ", 8, 0, 8.);
681 meDeltaTrealreal_ = ibook.
book1D(
"DeltaTrealreal",
"#Delta T real-real; |#Delta T (r-r)| [sigma]", 60, 0., 30.);
682 meDeltaTfakefake_ = ibook.
book1D(
"DeltaTfakefake",
"#Delta T fake-fake; |#Delta T (f-f)| [sigma]", 60, 0., 30.);
683 meDeltaTfakereal_ = ibook.
book1D(
"DeltaTfakereal",
"#Delta T fake-real; |#Delta T (f-r)| [sigma]", 60, 0., 30.);
686 "RecoPosInSimCollection",
"Sim signal vertex index associated to Reco signal vertex; Sim PV index", 200, 0, 200);
688 ibook.
book1D(
"RecoPosInRecoOrigCollection",
"Reco signal index in OrigCollection; Reco index", 200, 0, 200);
690 ibook.
book1D(
"SimPosInSimOrigCollection",
"Sim signal index in OrigCollection; Sim index", 200, 0, 200);
693 ibook.
book1D(
"RecoPVPosSignal",
"Position in reco collection of PV associated to sim signal", 20, 0, 20);
695 ibook.
book1D(
"RecoPVPosSignalNotHighestPt",
696 "Position in reco collection of PV associated to sim signal not highest Pt",
700 meRecVerNumber_ = ibook.
book1D(
"RecVerNumber",
"RECO Vertex Number: Number of vertices", 50, 0, 250);
702 meRecPVZ_ = ibook.
book1D(
"recPVZ",
"#Rec vertices/10 mm", 30, -15., 15.);
703 meRecPVT_ = ibook.
book1D(
"recPVT",
"#Rec vertices/50 ps", 30, -0.75, 0.75);
704 meSimPVZ_ = ibook.
book1D(
"simPVZ",
"#Sim vertices/10 mm", 30, -15., 15.);
705 meSimPVT_ = ibook.
book1D(
"simPVT",
"#Sim vertices/50 ps", 30, -0.75, 0.75);
712 ibook.
book1D(
"VtxTrackRecLVMult",
"Log10(Vertex track multiplicity) for matched LV", 80, 0.5, 2.5);
717 "PUTrackRelMult",
"Relative multiplicity of PU tracks for matched vertices; #PUTrks/#Trks", 50, 0., 1.);
719 "FakeTrackRelMult",
"Relative multiplicity of fake tracks for matched vertices; #fakeTrks/#Trks", 50, 0., 1.);
721 ibook.
book1D(
"PUTrackRelSumWnt",
722 "Relative Sum of wnt of PU tracks for matched vertices; PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
727 "PUTrackRelSumWos",
"Relative Sum of wos of PU tracks for matched vertices; PUSumWos/SumWos", 50, 0., 1.);
729 ibook.
book1D(
"SecTrackRelSumWos",
730 "Relative Sum of wos of tracks from secondary vtx for matched vertices; SecSumWos/SumWos",
735 "FakeTrackRelSumWos",
"Relative Sum of wos of fake tracks for matched vertices; FakeSumWos/SumWos", 50, 0., 1.);
737 "PUTrackRelSumPt",
"Relative Sum of Pt of PU tracks for matched vertices; PUSumPt/SumPt", 50, 0., 1.);
739 "PUTrackRelSumPt2",
"Relative Sum of Pt2 for PU tracks for matched vertices; PUSumPt2/SumPt2", 50, 0., 1.);
741 "PUTrackRecLVRelMult",
"Relative multiplicity of PU tracks for matched LV; #PUTrks/#Trks", 50, 0., 1.);
743 "FakeTrackRecLVRelMult",
"Relative multiplicity of fake tracks for matched LV; #FakeTrks/#Trks", 50, 0., 1.);
745 ibook.
book1D(
"PUTrackRecLVRelSumWnt",
746 "Relative Sum of Wnt of PU tracks for matched LV; PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
751 "PUTrackRecLVRelSumWos",
"Relative Sum of Wos of PU tracks for matched LV; PUSumWos/SumWos", 50, 0., 1.);
753 ibook.
book1D(
"SecTrackRecLVRelSumWos",
754 "Relative Sum of wos of tracks from secondary vtx for matched LV; SecSumWos/SumWos",
759 "FakeTrackRecLVRelSumWos",
"Relative Sum of wos of fake tracks for matched LV; FakeSumWos/SumWos", 50, 0., 1.);
761 ibook.
book1D(
"PUTrackRecLVRelSumPt",
"Relative Sum of Pt of PU tracks for matched LV; PUSumPt/SumPt", 50, 0., 1.);
763 "PUTrackRecLVRelSumPt2",
"Relative Sum of Pt2 of PU tracks for matched LV; PUSumPt2/SumPt2", 50, 0., 1.);
766 mePUTrackMult_ = ibook.
book1D(
"PUTrackMult",
"Number of PU tracks for matched vertices; #PUTrks", 50, 0., 100.);
767 mePUTrackWnt_ = ibook.
book1D(
"PUTrackWnt",
"Wnt of PU tracks for matched vertices; PUTrkW*min(Pt, 1.)", 50, 0., 1.);
769 "PUTrackSumWnt",
"Sum of wnt of PU tracks for matched vertices; log10(PUSumW*min(Pt, 1.))", 50, -2., 3.);
771 ibook.
book1D(
"PUTrackSumWos",
"Sum of wos of PU tracks for matched vertices; log10(PUSumWos)", 50, -1., 7.);
773 "SecTrackSumWos",
"Sum of wos of tracks from secondary vtx for matched vertices; log10(SecSumWos)", 50, -1., 7.);
775 ibook.
book1D(
"PUTrackSumPt",
"Sum of Pt of PU tracks for matched vertices; log10(PUSumPt)", 50, -2., 3.);
777 ibook.
book1D(
"PUTrackSumPt2",
"Sum of Pt2 of PU tracks for matched vertices; log10(PUSumPt2)", 50, -3., 3.);
781 "Relative PU multiplicity vs Number of tracks for matched vertices; #Trks; #PUTrks/#Trks",
789 "FakeTrackRelMultvsMult",
790 "Relative multiplicity of fake tracks vs Number of tracks for matched vertices; #Trks; #FakeTrks/#Trks",
799 "Relative PU Sum of Wnt vs Sum of Wnt of tracks for matched vertices; log10(SumW*min(Pt, " 800 "1.)); PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
808 "PUTrackRelSumWosvsSumWos",
809 "Relative PU Sum of Wos vs Sum of Wos of tracks for matched vertices; log10(SumWos); PUSumWos/SumWos",
817 "Relative Sum of Wos of tracks from secondary vtx vs Sum of Wos " 818 "of tracks for matched vertices; log10(SumWos); SecSumWos/SumWos",
826 "Relative Sum of Wos of fake tracks vs Sum of Wos of tracks for " 827 "matched vertices; log10(SumWos); FakeSumWos/SumWos",
835 "PUTrackRelSumPtvsSumPt",
836 "Relative PU Sum of Pt vs Sum of Pt of tracks for matched vertices; log10(SumPt); PUSumPt/SumPt",
844 "PUTrackRelSumPt2vsSumPt2",
845 "Relative PU Sum of Pt2 vs Sum of Pt2 of tracks for matched vertices; log10(SumPt2); PUSumPt2/SumPt2",
855 ibook.
book1D(
"PUTrackRecLVWnt",
"Wnt of PU tracks for matched LV; PUTrkW*min(Pt, 1.)", 50, 0., 1.);
857 "PUTrackRecLVSumWnt",
"Sum of wnt of PU tracks for matched LV; log10(PUSumW*min(Pt, 1.))", 50, -2., 3.);
859 ibook.
book1D(
"PUTrackRecLVSumWos",
"Sum of wos of PU tracks for matched LV; log10(PUSumWos)", 50, -1., 7.);
861 "SecTrackRecLVSumWos",
"Sum of wos of tracks from secondary vtx for matched LV; log10(SecSumWos)", 50, -1., 7.);
863 ibook.
book1D(
"PUTrackRecLVSumPt",
"Sum of Pt of PU tracks for matched LV; log10(PUSumPt)", 50, -2., 3.);
865 ibook.
book1D(
"PUTrackRecLVSumPt2",
"Sum of Pt2 of PU tracks for matched LV; log10(PUSumPt2)", 50, -3., 3.);
869 "Relative PU multiplicity vs Number of tracks for matched LV; #Trks; #PUTrks/#Trks",
877 "FakeTrackRecLVRelMultvsMult",
878 "Relative multiplicity of fake tracks vs Number of tracks for matched LV; #Trks; #FakeTrks/#Trks",
887 "Relative PU Sum of Wnt vs Sum of Wnt of tracks for matched LV; log10(SumW*min(Pt, 1.)); " 888 "PUSumW*min(Pt, 1.)/SumW*min(Pt, 1.)",
896 "PUTrackRecLVRelSumWosvsSumWos",
897 "Relative PU Sum of Wos vs Sum of Wos of tracks for matched vertices; log10(SumWos); PUSumWos/SumWos",
905 ibook.
bookProfile(
"SecTrackRecLVRelSumWosvsSumWos",
906 "Relative Sum of Wos of tracks from secondary vtx vs Sum of Wos of tracks for matched " 907 "vertices; log10(SumWos); SecSumWos/SumWos",
915 "Relative Sum of Wos of fake tracks vs Sum of Wos of tracks " 916 "for matched vertices; log10(SumWos); FakeSumWos/SumWos",
925 "Relative PU Sum of Pt vs Sum of Pt of tracks for matched LV; log10(SumPt); PUSumPt/SumPt",
934 "Relative PU Sum of Pt2 vs Sum of tracks for matched LV; log10(SumPt2); PUSumPt2/SumPt2",
944 ibook.
book1D(
"JetsPURelMult",
945 "Relative contribution of PU to jet multiplicity for matched vertices; (#Jets-#JetsNoPU)/#Jets",
950 ibook.
book1D(
"JetsPURelHt",
951 "Relative contribution of PU to scalar sum of Et of jets for matched vertices; (Ht-HtNoPU)/HT",
956 ibook.
book1D(
"JetsPURelSumPt2",
957 "Relative contribution of PU to sum of Pt2 of jets for matched vertices; (SumPt2-SumPt2NoPU)/SumPt2",
963 "Relative contribution of fake tracks to sum of Pt2 of jets for matched vertices; (SumPt2-SumPt2NoFake)/SumPt2",
968 ibook.
book1D(
"JetsPURelMetPt",
969 "Relative contribution of PU to Missing Transverse Energy for matched vertices; (Met-MetNoPU)/Met",
974 ibook.
book1D(
"JetsPURelSumPz",
975 "Relative contribution of PU to sum of Pz of jets for matched vertices; (SumPz-SumPzNoPU)/SumPz",
981 ibook.
book1D(
"JetsRecLVPURelMult",
982 "Relative contribution of PU to jet multiplicity for matched LV; (#Jets-#JetsNoPU)/#Jets",
987 ibook.
book1D(
"JetsRecLVPURelHt",
988 "Relative contribution of PU to scalar sum of Et of jets for matched LV; (Ht-HtNoPU)/HT",
993 ibook.
book1D(
"JetsRecLVPURelSumPt2",
994 "Relative contribution of PU to sum of Pt2 of jets for matched LV; (SumPt2-SumPt2NoPU)/SumPt2",
999 "JetsRecLVFakeRelSumPt2",
1000 "Relative contribution of fake tracks to sum of Pt2 of jets for matched LV; (SumPt2-SumPt2NoFake)/SumPt2",
1005 ibook.
book1D(
"JetsRecLVPURelMetPt",
1006 "Relative contribution of PU to Missing Transverse Energy for matched LV; (Met-MetNoPU)/Met",
1011 ibook.
book1D(
"JetsRecLVPURelSumPz",
1012 "Relative contribution of PU to sum of Pz of jets for matched LV; (SumPz-SumPzNoPU)/SumPz",
1019 "JetsPUMult",
"Contribution of PU to jet multiplicity for matched vertices; #Jets-#JetsNoPU", 50, 0., 100.);
1021 "Contribution of PU to scalar sum of Et of jets for matched vertices; log10(Ht-HtNoPU)",
1026 ibook.
book1D(
"JetsPUSumPt2",
1027 "Contribution of PU to sum of Pt2 of jets for matched vertices; log10(sumPt2-SumPt2NoPU)",
1032 ibook.
book1D(
"JetsPUMetPt",
1033 "Contribution of PU to Missing Transverse Energy for matched vertices; log10(Met-MetNoPU)",
1038 ibook.
book1D(
"JetsPUSumPz",
1039 "Contribution of PU to sum of Pz of jets for matched vertices; log10(abs(SumPz-SumPzNoPU))",
1045 "Relative contribution of PU to jet multiplicity vs number of jets for " 1046 "matched vertices; #Jets; (#Jets-#JetsNoPU)/#Jets",
1054 "Relative contribution of PU to scalar sum of Et of jets vs scalar sum of " 1055 "Et for matched vertices; log10(Ht); (Ht-HtNoPU)/HT",
1063 "Relative contribution of PU to sum of Pt2 of jets vs sum of Pt2 " 1064 "for matched vertices; log10(SumPt2); (SumPt2-SumPt2NoPU)/SumPt2",
1073 "Relative contribution of fake tracks to sum of Pt2 of jets vs sum of Pt2 for matched " 1074 "vertices; log10(SumPt2); (SumPt2-SumPt2NoFake)/SumPt2",
1082 "Relative contribution of PU to Missing Transverse Energy vs MET for " 1083 "matched vertices; log10(Met); (Met-MetNoPU)/Met",
1091 "Relative contribution of PU to sum of Pz of jets vs Sum of Pz for " 1092 "matched vertices; log10(abs SumPz); (SumPz-SumPzNoPU)/SumPz",
1101 "JetsRecLVPUMult",
"Contribution of PU to jet multiplicity for matched LV; #Jets-#JetsNoPU", 50, 0., 100.);
1103 "JetsRecLVPUHt",
"Contribution of PU to scalar sum of Et of jets for matched LV; log10(Ht-HtNoPU)", 50, -2., 3.);
1105 ibook.
book1D(
"JetsRecLVPUSumPt2",
1106 "Contribution of PU to sum of Pt2 of jets for matched LV; log10(sumPt2-SumPt2NoPU)",
1111 ibook.
book1D(
"JetsRecLVPUMetPt",
1112 "Contribution of PU to Missing Transverse Energy for matched LV; log10(Met-MetNoPU)",
1117 ibook.
book1D(
"JetsRecLVPUSumPz",
1118 "Contribution of PU to sum of Pz of jets for matched LV; log10(abs(SumPz-SumPzNoPU))",
1124 "Relative contribution of PU to jet multiplicity vs number of jets " 1125 "for matched vertices; #Jets; (#Jets-#JetsNoPU)/#Jets",
1133 "Relative contribution of PU to scalar sum of Et of jets vs scalar sum " 1134 "of Et for matched vertices; log10(Ht); (Ht-HtNoPU)/HT",
1143 "Relative contribution of PU to sum of Pt2 of jets vs sum of Pt2 for matched vertices; " 1144 "log10(SumPt2); (SumPt2-SumPt2NoPU)/SumPt2",
1152 ibook.
bookProfile(
"JetsRecLVFakeRelSumPt2vsSumPt2",
1153 "Relative contribution of fake tracks to sum of Pt2 of jets vs sum of Pt2 for matched " 1154 "vertices; log10(SumPt2); (SumPt2-SumPt2NoFake)/SumPt2",
1162 "Relative contribution of PU to Missing Transverse Energy vs MET " 1163 "for matched vertices; log10(Met); (Met-MetNoPU)/Met",
1171 "Relative contribution of PU to sum of Pz of jets vs Sum of Pz " 1172 "for matched vertices; log10(abs SumPz); (SumPz-SumPzNoPU)/SumPz",
1183 "TrackResLowP",
"t_{rec} - t_{sim} for tracks with p < 2 GeV; t_{rec} - t_{sim} [ns] ", 70, -0.15, 0.15);
1185 ibook.
book1D(
"TrackResLowP-LowMVA",
1186 "t_{rec} - t_{sim} for tracks with MVA < 0.5 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
1191 ibook.
book1D(
"TrackResLowP-MediumMVA",
1192 "t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
1197 ibook.
book1D(
"TrackResLowP-HighMVA",
1198 "t_{rec} - t_{sim} for tracks with MVA > 0.8 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
1203 "TrackResHighP",
"t_{rec} - t_{sim} for tracks with p > 2 GeV; t_{rec} - t_{sim} [ns] ", 70, -0.15, 0.15);
1205 ibook.
book1D(
"TrackResHighP-LowMVA",
1206 "t_{rec} - t_{sim} for tracks with MVA < 0.5 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
1211 ibook.
book1D(
"TrackResHighP-MediumMVA",
1212 "t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
1217 ibook.
book1D(
"TrackResHighP-HighMVA",
1218 "t_{rec} - t_{sim} for tracks with MVA > 0.8 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
1223 ibook.
book1D(
"TrackPullLowP",
"Pull for tracks with p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
1225 "Pull for tracks with MVA < 0.5 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1230 "Pull for tracks with 0.5 < MVA < 0.8 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1235 "Pull for tracks with MVA > 0.8 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1240 ibook.
book1D(
"TrackPullHighP",
"Pull for tracks with p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
1242 "Pull for tracks with MVA < 0.5 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1247 ibook.
book1D(
"TrackPullHighP-MediumMVA",
1248 "Pull for tracks with 0.5 < MVA < 0.8 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1253 "Pull for tracks with MVA > 0.8 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
1259 ibook.
book1D(
"TrackResMass-Protons-LowMVA",
1260 "t_{rec} - t_{est} for proton tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ",
1265 ibook.
book1D(
"TrackResMass-Protons-MediumMVA",
1266 "t_{rec} - t_{est} for proton tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
1271 ibook.
book1D(
"TrackResMass-Protons-HighMVA",
1272 "t_{rec} - t_{est} for proton tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ",
1277 ibook.
book1D(
"TrackResMassTrue-Protons-LowMVA",
1278 "t_{est} - t_{sim} for proton tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ",
1283 ibook.
book1D(
"TrackResMassTrue-Protons-MediumMVA",
1284 "t_{est} - t_{sim} for proton tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
1289 ibook.
book1D(
"TrackResMassTrue-Protons-HighMVA",
1290 "t_{est} - t_{sim} for proton tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
1296 "t_{rec} - t_{est} for pion tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ",
1301 ibook.
book1D(
"TrackResMass-Pions-MediumMVA",
1302 "t_{rec} - t_{est} for pion tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
1307 "t_{rec} - t_{est} for pion tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ",
1312 ibook.
book1D(
"TrackResMassTrue-Pions-LowMVA",
1313 "t_{est} - t_{sim} for pion tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ",
1318 ibook.
book1D(
"TrackResMassTrue-Pions-MediumMVA",
1319 "t_{est} - t_{sim} for pion tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
1324 ibook.
book1D(
"TrackResMassTrue-Pions-HighMVA",
1325 "t_{est} - t_{sim} for pion tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
1331 meBarrelPIDp_ = ibook.
book1D(
"BarrelPIDp",
"PID track MTD momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1332 meEndcapPIDp_ = ibook.
book1D(
"EndcapPIDp",
"PID track with MTD momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1338 ibook.
book1D(
"BarrelTruePiNoPID",
"True pi NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1340 ibook.
book1D(
"BarrelTrueKNoPID",
"True k NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1342 ibook.
book1D(
"BarrelTruePNoPID",
"True p NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1344 ibook.
book1D(
"EndcapTruePiNoPID",
"True pi NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1346 ibook.
book1D(
"EndcapTrueKNoPID",
"True k NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1348 ibook.
book1D(
"EndcapTruePNoPID",
"True p NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1351 ibook.
book1D(
"BarrelTruePiAsPi",
"True pi as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1353 ibook.
book1D(
"BarrelTruePiAsK",
"True pi as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1355 ibook.
book1D(
"BarrelTruePiAsP",
"True pi as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1357 ibook.
book1D(
"EndcapTruePiAsPi",
"True pi as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1359 ibook.
book1D(
"EndcapTruePiAsK",
"True pi as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1361 ibook.
book1D(
"EndcapTruePiAsP",
"True pi as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1364 ibook.
book1D(
"BarrelTrueKAsPi",
"True k as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1365 meBarrelTrueKAsK_ = ibook.
book1D(
"BarrelTrueKAsK",
"True k as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1366 meBarrelTrueKAsP_ = ibook.
book1D(
"BarrelTrueKAsP",
"True k as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1368 ibook.
book1D(
"EndcapTrueKAsPi",
"True k as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1369 meEndcapTrueKAsK_ = ibook.
book1D(
"EndcapTrueKAsK",
"True k as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1370 meEndcapTrueKAsP_ = ibook.
book1D(
"EndcapTrueKAsP",
"True k as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1373 ibook.
book1D(
"BarrelTruePAsPi",
"True p as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1374 meBarrelTruePAsK_ = ibook.
book1D(
"BarrelTruePAsK",
"True p as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1375 meBarrelTruePAsP_ = ibook.
book1D(
"BarrelTruePAsP",
"True p as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
1377 ibook.
book1D(
"EndcapTruePAsPi",
"True p as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1378 meEndcapTruePAsK_ = ibook.
book1D(
"EndcapTruePAsK",
"True p as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1379 meEndcapTruePAsP_ = ibook.
book1D(
"EndcapTruePAsP",
"True p as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
1390 for (
const auto&
tp :
found->val) {
1391 if (
tp.first->eventId().bunchCrossing() == 0 &&
tp.first->eventId().event() == 0)
1405 return std::make_pair(
nullptr, -1);
1408 for (
const auto&
tp :
found->val) {
1409 if (std::find_if(vsim->daughterTracks_begin(), vsim->daughterTracks_end(), [&](
const TrackingParticleRef& vtp) {
1410 return tp.first == vtp;
1411 }) != vsim->daughterTracks_end())
1412 return std::make_pair(&
tp.first, 0);
1414 else if (
tp.first->eventId().bunchCrossing() == vsim->eventId().bunchCrossing() &&
1415 tp.first->eventId().event() == vsim->eventId().event()) {
1416 return std::make_pair(&
tp.first, 1);
1420 return std::make_pair(&
tp.first, 2);
1425 return std::make_pair(
nullptr, -1);
1429 if (
time > 0 && pathlength > 0 &&
mass > 0) {
1430 double gammasq = 1. + momentum * momentum / (
mass *
mass);
1432 double t_est =
time - (pathlength /
v);
1460 const std::vector<double>& mass_Tracks,
1461 const std::vector<int>& category_Tracks,
1463 unsigned int& n_Jets,
1465 double& sum_Pt2Jets,
1467 double& sum_PzJets) {
1468 double sum_PtJets = 0;
1475 std::vector<fastjet::PseudoJet> fjInputs_;
1477 size_t countScale0 = 0;
1478 for (
size_t i = 0;
i < reco_Tracks.size();
i++) {
1479 const auto recotr = reco_Tracks[
i];
1480 const auto mass = mass_Tracks[
i];
1482 if (recotr.charge() == 0) {
1486 if (skip_Tracks ==
"skip_PU" && category_Tracks[
i] == 2) {
1490 if (skip_Tracks ==
"skip_Fake" && category_Tracks[
i] == -1) {
1493 if (recotr.pt() != 0) {
1494 scale = (recotr.pt() - recotr.ptError()) / recotr.pt();
1497 edm::LogWarning(
"Primary4DVertexValidation") <<
"Scaling is NAN ignoring this recotrack" << std::endl;
1505 fjInputs_.push_back(fastjet::PseudoJet(recotr.px() *
scale,
1506 recotr.py() *
scale,
1507 recotr.pz() *
scale,
1511 fastjet::ClusterSequence sequence(fjInputs_, fastjet::JetDefinition(fastjet::antikt_algorithm, 0.4));
1512 auto jets = fastjet::sorted_by_pt(sequence.inclusive_jets(0));
1513 for (
const auto& pj :
jets) {
1515 sum_EtJets +=
std::sqrt(p4.e() * p4.e() - p4.P() * p4.P() + p4.pt() * p4.pt());
1516 sum_PtJets += p4.pt();
1517 sum_Pt2Jets += (p4.pt() * p4.pt() * 0.8 * 0.8);
1519 sum_PzJets += p4.pz();
1523 double metAbove = met_Pt - 2 *
std::sqrt(sum_PtJets);
1525 sum_Pt2Jets += (metAbove * metAbove);
1527 if (countScale0 == reco_Tracks.size()) {
1528 sum_Pt2Jets = countScale0 * 0.01;
1538 unsigned int& no_PIDtype,
1548 if (probPi[recoTrack] == -1) {
1552 }
else if (probPi[recoTrack] == 1 && probK[recoTrack] == 0 && probP[recoTrack] == 0 &&
1553 sigmat0[recoTrack] < sigmat0Safe[recoTrack]) {
1556 no_PID = no_PIDtype > 0;
1558 is_K = !no_PID && !is_Pi && probK[recoTrack] > probP[recoTrack];
1559 is_P = !no_PID && !is_Pi && !is_K;
1569 double dz2_beam =
pow((*BS).BeamWidthX() *
cos(recoTrk->
phi()) /
tan(recoTrk->
theta()), 2) +
1578 if (sigmat0[recoTrk] > 0 && mtdQualMVA[recoTrk] >
mvaTh_) {
1579 double sigmaZ = (*BS).sigmaZ();
1581 wos = wos / erf(sigmat0[recoTrk] / sigmaT);
1590 std::vector<Primary4DVertexValidation::simPrimaryVertex> simpv;
1591 int current_event = -1;
1593 for (TrackingVertexCollection::const_iterator
v = tVC->begin();
v != tVC->end(); ++
v) {
1595 if (
v->eventId().bunchCrossing() != 0)
1597 if (
v->eventId().event() != current_event) {
1598 current_event =
v->eventId().event();
1608 sv.eventId =
v->eventId();
1610 sv.OriginalIndex =
s;
1614 assert((**iTrack).eventId().bunchCrossing() == 0);
1617 for (std::vector<simPrimaryVertex>::iterator
v0 = simpv.begin();
v0 != simpv.end();
v0++) {
1626 simpv.push_back(
sv);
1632 auto momentum = (*(*iTP)).momentum();
1633 const reco::Track* matched_best_reco_track =
nullptr;
1634 double match_quality = -1;
1638 matched_best_reco_track = (*s2r_)[*iTP][0].first.get();
1639 match_quality = (*s2r_)[*iTP][0].second;
1642 vp->
ptot.setPx(vp->
ptot.x() + momentum.x());
1643 vp->
ptot.setPy(vp->
ptot.y() + momentum.y());
1644 vp->
ptot.setPz(vp->
ptot.z() + momentum.z());
1645 vp->
ptot.setE(vp->
ptot.e() + (**iTP).energy());
1646 vp->
pt += (**iTP).pt();
1647 vp->
ptsq += ((**iTP).pt() * (**iTP).pt());
1650 if (matched_best_reco_track) {
1658 LogTrace(
"Primary4DVertexValidation")
1669 auto prev_z = simpv.back().z;
1671 vsim.closest_vertex_distance_z =
std::abs(vsim.z - prev_z);
1675 for (std::vector<simPrimaryVertex>::iterator vsim = simpv.begin(); vsim != simpv.end(); vsim++) {
1676 std::vector<simPrimaryVertex>::iterator vsim2 = vsim;
1678 for (; vsim2 != simpv.end(); vsim2++) {
1681 vsim->closest_vertex_distance_z =
std::min(vsim->closest_vertex_distance_z,
distance);
1682 vsim2->closest_vertex_distance_z =
std::min(vsim2->closest_vertex_distance_z,
distance);
1692 std::vector<Primary4DVertexValidation::recoPrimaryVertex> recopv;
1694 for (
auto v = tVC->begin();
v != tVC->end(); ++
v) {
1699 if (
v->isFake() || !
v->isValid())
1706 sv.OriginalIndex =
r;
1707 sv.ndof =
v->ndof();
1709 recopv.push_back(
sv);
1713 for (
auto iTrack =
v->tracks_begin(); iTrack !=
v->tracks_end(); ++iTrack) {
1714 auto momentum = (*(*iTrack)).innerMomentum();
1715 if (momentum.mag2() == 0)
1716 momentum = (*(*iTrack)).momentum();
1718 vp->
ptsq += (momentum.perp2());
1735 auto prev_z = recopv.back().z;
1737 vreco.closest_vertex_distance_z =
std::abs(vreco.z - prev_z);
1740 for (std::vector<recoPrimaryVertex>::iterator vreco = recopv.begin(); vreco != recopv.end(); vreco++) {
1741 std::vector<recoPrimaryVertex>::iterator vreco2 = vreco;
1743 for (; vreco2 != recopv.end(); vreco2++) {
1746 vreco->closest_vertex_distance_z =
std::min(vreco->closest_vertex_distance_z,
distance);
1747 vreco2->closest_vertex_distance_z =
std::min(vreco2->closest_vertex_distance_z,
distance);
1755 std::vector<simPrimaryVertex>& simpv,
1760 for (
auto vv : simpv) {
1764 for (
auto rv : recopv) {
1770 for (
unsigned int iv = 0;
iv < recopv.size();
iv++) {
1772 LogTrace(
"Primary4DVertexValidation") <<
"iv (rec): " <<
iv;
1774 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1779 unsigned int evnt = 0;
1781 for (
auto iTrack =
vertex->tracks_begin(); iTrack !=
vertex->tracks_end(); ++iTrack) {
1789 if (tp_info !=
nullptr && matchCategory == 0) {
1791 simpv.at(
iev).addTrack(
iv, wos, wnt);
1792 recopv.at(
iv).addTrack(
iev, wos, wnt);
1800 if ((evwos > 0) && (evwos > recopv.at(
iv).maxwos) && (evnt > 1)) {
1801 recopv.at(
iv).wosmatch =
iev;
1802 recopv.at(
iv).maxwos = evwos;
1803 recopv.at(
iv).maxwosnt = evnt;
1804 LogTrace(
"Primary4DVertexValidation") <<
"dominating sim event (iev): " <<
iev <<
" evwos = " << evwos;
1808 if ((evnt > 0) && (evwnt > recopv.at(
iv).maxwnt)) {
1809 recopv.at(
iv).wntmatch =
iev;
1810 recopv.at(
iv).maxwnt = evwnt;
1813 if (recopv.at(
iv).maxwos > 0) {
1814 simpv.at(recopv.at(
iv).wosmatch).wos_dominated_recv.push_back(
iv);
1815 simpv.at(recopv.at(
iv).wosmatch).nwosmatch++;
1818 LogTrace(
"Primary4DVertexValidation") <<
"largest contribution to wos: wosmatch (iev) = " << recopv.at(
iv).wosmatch
1819 <<
" maxwos = " << recopv.at(
iv).maxwos;
1820 if (recopv.at(
iv).maxwnt > 0) {
1821 simpv.at(recopv.at(
iv).wntmatch).nwntmatch++;
1826 for (
auto& vrec : recopv) {
1828 vrec.matchQuality = 0;
1830 unsigned int iev = 0;
1831 for (
auto& vv : simpv) {
1832 LogTrace(
"Primary4DVertexValidation") <<
"iev (sim): " <<
iev;
1833 LogTrace(
"Primary4DVertexValidation") <<
"wos_dominated_recv.size: " << vv.wos_dominated_recv.size();
1834 for (
unsigned int i = 0;
i < vv.wos_dominated_recv.size();
i++) {
1835 auto recov = vv.wos_dominated_recv.at(
i);
1836 LogTrace(
"Primary4DVertexValidation")
1837 <<
"index of reco vertex: " << recov <<
" that has a wos: " << vv.wos.at(recov) <<
" at position " <<
i;
1840 vv.matchQuality = 0;
1845 for (
unsigned int rank = 1; rank <
maxRank_; rank++) {
1846 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1850 if (simpv.at(
iev).nwosmatch == 0) {
1853 if (simpv.at(
iev).nwosmatch > rank) {
1857 for (
unsigned int k = 0;
k < simpv.at(
iev).wos_dominated_recv.size();
k++) {
1858 unsigned int rec = simpv.at(
iev).wos_dominated_recv.at(
k);
1859 auto vrec = recopv.at(rec);
1873 recopv.at(
iv).sim =
iev;
1874 simpv.at(
iev).rec =
iv;
1875 recopv.at(
iv).matchQuality = rank;
1876 simpv.at(
iev).matchQuality = rank;
1885 unsigned int ntry = 0;
1887 unsigned nmatch = 0;
1888 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1894 for (
auto rv : simpv.at(
iev).wos) {
1895 if ((rec ==
NOT_MATCHED) || (rv.second > simpv.at(
iev).wos.at(rec))) {
1901 for (
auto rv : simpv.at(
iev).wnt) {
1902 if ((rec ==
NOT_MATCHED) || (rv.second > simpv.at(
iev).wnt.at(rec))) {
1917 for (
auto sv : recopv.at(rec).wos) {
1921 if ((rec2sim ==
NOT_MATCHED) || (
sv.second > recopv.at(rec).wos.at(rec2sim))) {
1925 if (
iev == rec2sim) {
1927 recopv.at(rec).sim =
iev;
1928 recopv.at(rec).matchQuality =
maxRank_;
1929 simpv.at(
iev).rec = rec;
1941 unsigned int nmatch_tot = 0, n_dzgtsz = 0;
1942 unsigned int n_rank1 = 0, n_rank2 = 0, n_rank3 = 0, n_rank8 = 0;
1944 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1946 unsigned int rec = simpv.at(
iev).rec;
1947 unsigned int wosmatch = recopv.at(rec).wosmatch;
1948 LogTrace(
"Primary4DVertexValidation")
1949 <<
"Final match: iev (sim) = " << std::setw(4) <<
iev <<
" sim.rec = " << std::setw(4) << rec
1950 <<
" rec.wosmatch = " << std::setw(5) << wosmatch <<
" dZ/sigmaZ = " << std::setw(6) << std::setprecision(2)
1951 <<
std::abs((recopv.at(rec).z - simpv.at(
iev).z) / recopv.at(rec).recVtx->zError())
1952 <<
" match qual = " << std::setw(1) << recopv.at(rec).matchQuality;
1954 if (
std::abs((recopv.at(rec).z - simpv.at(
iev).z) / recopv.at(rec).recVtx->zError()) > 3.) {
1957 if (recopv.at(rec).matchQuality == 1) {
1960 if (recopv.at(rec).matchQuality == 2) {
1963 if (recopv.at(rec).matchQuality == 3) {
1966 if (recopv.at(rec).matchQuality == 8) {
1971 LogTrace(
"Primary4DVertexValidation") <<
"n_sim = " << simpv.size() <<
" n_rec = " << recopv.size()
1972 <<
" nmatch_tot = " << nmatch_tot <<
" n(dZ>sigmaZ) = " << n_dzgtsz
1973 <<
" n_rank1 = " << n_rank1 <<
" n_rank2 = " << n_rank2
1974 <<
" n_rank3 = " << n_rank3 <<
" n_rank8 = " << n_rank8;
1984 using namespace reco;
1986 std::vector<float> pileUpInfo_z;
1991 for (
auto const& pu_info : *puinfoH.
product()) {
1992 if (pu_info.getBunchCrossing() == 0) {
1993 pileUpInfo_z = pu_info.getPU_zpositions();
2002 edm::LogWarning(
"Primary4DVertexValidation") <<
"TPCollectionH is not valid";
2007 edm::LogWarning(
"Primary4DVertexValidation") <<
"TVCollectionH is not valid";
2014 edm::LogWarning(
"Primary4DVertexValidation") <<
"simToRecoH is not valid";
2021 edm::LogWarning(
"Primary4DVertexValidation") <<
"recoToSimH is not valid";
2026 edm::LogWarning(
"Primary4DVertexValidation") <<
"BeamSpotH is not valid";
2028 std::vector<simPrimaryVertex> simpv;
2031 bool signal_is_highest_pt =
2033 return lhs.
ptsq < rhs.ptsq;
2034 }) == simpv.begin();
2036 std::vector<recoPrimaryVertex> recopv;
2040 edm::LogWarning(
"Primary4DVertexValidation") <<
"recVtxs is not valid";
2062 matchReco2Sim(recopv, simpv, sigmat0Safe, mtdQualMVA, BeamSpotH);
2065 for (
unsigned int iv = 0;
iv < recopv.size();
iv++) {
2069 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
2070 auto vsim = simpv.at(
iev).sim_vertex;
2072 bool selectedVtxMatching = recopv.at(
iv).sim ==
iev && simpv.at(
iev).rec ==
iv;
2073 bool selectedLV = simpv.at(
iev).eventId.bunchCrossing() == 0 && simpv.at(
iev).eventId.event() == 0 &&
2074 recopv.at(
iv).OriginalIndex == 0;
2075 bool selectedLVMatching = selectedVtxMatching && selectedLV;
2076 if (selectedLVMatching && !recopv.at(
iv).is_signal()) {
2078 <<
"Reco vtx leading match inconsistent: BX/ID " << simpv.at(
iev).eventId.bunchCrossing() <<
" " 2079 << simpv.at(
iev).eventId.event();
2082 if (selectedLVMatching) {
2086 double vzsim = simpv.at(
iev).z;
2089 double wnt = 0, wos = 0;
2090 double PUsumWnt = 0, PUsumWos = 0, SecsumWos = 0, FakesumWos = 0, PUsumPt = 0, PUsumPt2 = 0;
2091 double sumWnt = 0, sumWos = 0,
sumPt = 0, sumPt2 = 0;
2092 unsigned int nt = 0, PUnt = 0, Fakent = 0;
2094 std::vector<double> massVector;
2095 std::vector<reco::Track> recotracks;
2096 std::vector<int> categoryVector;
2097 double sumEtJets = 0, sumPt2Jets = 0, metPt = 0, sumPzJets = 0;
2098 double sumEtJetsnoPU = 0, sumPt2JetsnoPU = 0, metPtnoPU = 0, sumPzJetsnoPU = 0;
2099 double sumEtJetsnoFake = 0, sumPt2JetsnoFake = 0, metPtnoFake = 0, sumPzJetsnoFake = 0;
2100 unsigned int nJets = 0, nJetsnoPU = 0, nJetsnoFake = 0;
2101 for (
auto iTrack =
vertex->tracks_begin(); iTrack !=
vertex->tracks_end(); ++iTrack) {
2102 if (trackAssoc[*iTrack] == -1) {
2108 if (selectedVtxMatching) {
2119 bool selectRecoTrk =
trkRecSel(**iTrack);
2120 if (selectedLVMatching && selectRecoTrk) {
2128 int matchCategory =
getMatchedTP(*iTrack, vsim).second;
2131 if (selectedVtxMatching) {
2132 unsigned int no_PIDtype = 0;
2133 bool no_PID, is_Pi, is_K, is_P;
2135 isParticle(*iTrack, sigmat0, sigmat0Safe, probPi, probK, probP, no_PIDtype, no_PID, is_Pi, is_K, is_P);
2137 if (no_PID || is_Pi) {
2146 double mass = PData->mass().value();
2147 massVector.push_back(
mass);
2148 recotracks.push_back(**iTrack);
2149 getWosWnt(*
vertex, *iTrack, sigmat0Safe, mtdQualMVA, BeamSpotH, wos, wnt);
2155 if (tp_info !=
nullptr) {
2162 if (matchCategory == 1) {
2163 categoryVector.push_back(matchCategory);
2167 if (matchCategory == 2) {
2176 PUsumPt += (*iTrack)->pt();
2177 PUsumPt2 += ((*iTrack)->pt() * (*iTrack)->pt());
2179 categoryVector.push_back(2);
2184 categoryVector.push_back(matchCategory);
2191 sumPt += (*iTrack)->pt();
2192 sumPt2 += ((*iTrack)->pt() * (*iTrack)->pt());
2196 if (tp_info !=
nullptr && matchCategory == 0) {
2197 categoryVector.push_back(matchCategory);
2198 double mass = (*tp_info)->mass();
2199 double tsim = (*tp_info)->parentVertex()->position().t() *
simUnit_;
2202 double xsim = (*tp_info)->parentVertex()->position().x();
2203 double ysim = (*tp_info)->parentVertex()->position().y();
2204 double zsim = (*tp_info)->parentVertex()->position().z();
2205 double xPCA = (*iTrack)->vx();
2206 double yPCA = (*iTrack)->vy();
2207 double zPCA = (*iTrack)->vz();
2209 double dZ = zPCA - zsim;
2210 double d3D =
std::sqrt((xPCA - xsim) * (xPCA - xsim) + (yPCA - ysim) * (yPCA - ysim) +
dZ *
dZ);
2212 if ((xPCA - xsim) * ((*tp_info)->px()) + (yPCA - ysim) * ((*tp_info)->py()) +
dZ * ((*tp_info)->pz()) <
2220 if (selectedLVMatching && selectRecoTrk && selectTP) {
2228 if (sigmat0Safe[*iTrack] == -1)
2231 if (selectedLVMatching && selectRecoTrk && selectTP) {
2239 unsigned int noPIDtype = 0;
2240 bool noPID =
false, isPi =
false, isK =
false, isP =
false;
2241 isParticle(*iTrack, sigmat0, sigmat0Safe, probPi, probK, probP, noPIDtype, noPID, isPi, isK, isP);
2243 if ((isPi &&
std::abs(tMtd[*iTrack] - tofPi[*iTrack] - t0Pid[*iTrack]) >
tol_) ||
2244 (isK &&
std::abs(tMtd[*iTrack] - tofK[*iTrack] - t0Pid[*iTrack]) >
tol_) ||
2245 (isP &&
std::abs(tMtd[*iTrack] - tofP[*iTrack] - t0Pid[*iTrack]) >
tol_)) {
2247 <<
"No match between mass hyp. and time: " <<
std::abs((*tp_info)->pdgId()) <<
" mass hyp pi/k/p " 2248 << isPi <<
" " << isK <<
" " << isP <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " << t0Safe[*iTrack]
2249 <<
" tMtd - tof pi/K/p " << tMtd[*iTrack] - tofPi[*iTrack] <<
" " << tMtd[*iTrack] - tofK[*iTrack]
2250 <<
" " << tMtd[*iTrack] - tofP[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " 2251 << probK[*iTrack] <<
" " << probP[*iTrack];
2257 if (
std::abs((*tp_info)->pdgId()) == 211) {
2268 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2269 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2272 }
else if (
std::abs((*tp_info)->pdgId()) == 321) {
2283 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2284 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2287 }
else if (
std::abs((*tp_info)->pdgId()) == 2212) {
2298 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2299 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2306 if (
std::abs((*tp_info)->pdgId()) == 211) {
2317 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2318 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2321 }
else if (
std::abs((*tp_info)->pdgId()) == 321) {
2332 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2333 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2336 }
else if (
std::abs((*tp_info)->pdgId()) == 2212) {
2347 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 2348 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 2357 if ((*iTrack)->p() <= 2) {
2365 if (mtdQualMVA[(*iTrack)] <
mvaL_) {
2376 if ((*iTrack)->p() <= 2) {
2379 }
else if ((*iTrack)->p() > 2) {
2385 if (
std::abs((*tp_info)->pdgId()) == 2212) {
2388 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
2394 }
else if (mtdQualMVA[(*iTrack)] >
mvaL_ && mtdQualMVA[(*iTrack)] <
mvaH_) {
2405 if ((*iTrack)->p() <= 2) {
2408 }
else if ((*iTrack)->p() > 2) {
2414 if (
std::abs((*tp_info)->pdgId()) == 2212) {
2417 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
2423 }
else if (mtdQualMVA[(*iTrack)] >
mvaH_) {
2434 if ((*iTrack)->p() <= 2) {
2437 }
else if ((*iTrack)->p() > 2) {
2443 if (
std::abs((*tp_info)->pdgId()) == 2212) {
2446 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
2454 if (selectedVtxMatching) {
2466 recotracks, massVector, categoryVector,
"use_allTracks",
nJets, sumEtJets, sumPt2Jets, metPt, sumPzJets);
2519 (sumPt2Jets - sumPt2JetsnoPU) / sumPt2Jets);
2521 (sumPt2Jets - sumPt2JetsnoFake) / sumPt2Jets);
2524 (sumPzJets - sumPzJetsnoPU) / sumPzJets);
2544 LogTrace(
"Primary4DVertexValidation")
2545 <<
"#PUTrks = " << PUnt <<
" #Trks = " <<
nt <<
" PURelMult = " << std::setprecision(3)
2546 <<
static_cast<double>(PUnt) /
nt;
2547 LogTrace(
"Primary4DVertexValidation")
2548 <<
"PUsumWnt = " << std::setprecision(3) << PUsumWnt <<
" sumWnt = " << std::setprecision(3) << sumWnt
2549 <<
" PURelsumWnt = " << std::setprecision(3) << PUsumWnt / sumWnt;
2550 LogTrace(
"Primary4DVertexValidation")
2551 <<
"PUsumWos = " << std::setprecision(3) << PUsumWos <<
" sumWos = " << std::setprecision(3) << sumWos
2552 <<
" PURelsumWos = " << std::setprecision(3) << PUsumWos / sumWos;
2553 LogTrace(
"Primary4DVertexValidation")
2554 <<
"PuSumPt = " << std::setprecision(3) << PUsumPt <<
" SumPt = " << std::setprecision(4) <<
sumPt 2555 <<
" PURelSumPt = " << std::setprecision(3) << PUsumPt /
sumPt;
2556 LogTrace(
"Primary4DVertexValidation")
2557 <<
"PuSumPt2 = " << std::setprecision(3) << PUsumPt2 <<
" SumPt2 = " << std::setprecision(4) << sumPt2
2558 <<
" PURelSumPt2 = " << std::setprecision(3) << PUsumPt2 / sumPt2;
2584 (sumEtJets - sumEtJetsnoPU) / sumEtJets);
2586 (sumPt2Jets - sumPt2JetsnoPU) / sumPt2Jets);
2588 (sumPt2Jets - sumPt2JetsnoFake) / sumPt2Jets);
2591 (sumPzJets - sumPzJetsnoPU) / sumPzJets);
2605 for (
unsigned int ir = 0; ir < recopv.size(); ir++) {
2606 if (recopv.at(ir).ndof >
selNdof_) {
2608 if (recopv.at(ir).recVtx->tError() > 0.) {
2611 LogTrace(
"Primary4DVertexValidation") <<
"************* IR: " << ir;
2612 LogTrace(
"Primary4DVertexValidation") <<
"is_real: " << recopv.at(ir).is_real();
2613 LogTrace(
"Primary4DVertexValidation") <<
"is_fake: " << recopv.at(ir).is_fake();
2614 LogTrace(
"Primary4DVertexValidation") <<
"is_signal: " << recopv.at(ir).is_signal();
2615 LogTrace(
"Primary4DVertexValidation") <<
"split_from: " << recopv.at(ir).split_from();
2616 LogTrace(
"Primary4DVertexValidation") <<
"other fake: " << recopv.at(ir).other_fake();
2617 if (recopv.at(ir).is_real()) {
2620 if (recopv.at(ir).is_fake()) {
2623 if (recopv.at(ir).other_fake()) {
2626 if (recopv.at(ir).split_from() != -1) {
2632 LogTrace(
"Primary4DVertexValidation") <<
"is_real: " << real;
2633 LogTrace(
"Primary4DVertexValidation") <<
"is_fake: " << fake;
2634 LogTrace(
"Primary4DVertexValidation") <<
"split_from: " <<
split;
2635 LogTrace(
"Primary4DVertexValidation") <<
"other fake: " << other_fake;
2643 for (
unsigned int is = 0; is < simpv.size(); is++) {
2652 LogTrace(
"Primary4DVertexValidation") <<
"sim vertex: " << is <<
" is not matched with any reco";
2656 for (
unsigned int ir = 0; ir < recopv.size(); ir++) {
2657 if (recopv.at(ir).ndof >
selNdof_) {
2658 if (recopv.at(ir).sim == is && simpv.at(is).rec == ir) {
2665 recopv.at(ir).recVtx->tError());
2671 if (simpv.at(is).eventId.bunchCrossing() == 0 && simpv.at(is).eventId.event() == 0) {
2672 if (!recopv.at(ir).is_signal()) {
2674 <<
"Reco vtx leading match inconsistent: BX/ID " << simpv.at(is).eventId.bunchCrossing() <<
" " 2675 << simpv.at(is).eventId.event();
2678 recopv.at(ir).OriginalIndex);
2679 if (!signal_is_highest_pt) {
2681 recopv.at(ir).OriginalIndex);
2684 LogTrace(
"Primary4DVertexValidation") <<
"*** Matching RECO: " << ir <<
"with SIM: " << is <<
" ***";
2685 LogTrace(
"Primary4DVertexValidation") <<
"Match Quality is " << recopv.at(ir).matchQuality;
2686 LogTrace(
"Primary4DVertexValidation") <<
"****";
2693 for (
unsigned int iv = 0;
iv < recVtxs->size() - 1;
iv++) {
2695 double mindistance_realreal = 1e10;
2697 for (
unsigned int jv =
iv; jv < recVtxs->size(); jv++) {
2698 if ((!(jv ==
iv)) &&
select(recVtxs->at(jv))) {
2699 double dz = recVtxs->at(
iv).z() - recVtxs->at(jv).z();
2700 double dtsigma =
std::sqrt(recVtxs->at(
iv).covariance(3, 3) + recVtxs->at(jv).covariance(3, 3));
2702 ? (recVtxs->at(
iv).t() - recVtxs->at(jv).t()) / dtsigma
2704 if (recopv.at(
iv).is_real() && recopv.at(jv).is_real()) {
2710 mindistance_realreal =
dz;
2712 }
else if (recopv.at(
iv).is_fake() && recopv.at(jv).is_fake()) {
2721 double mindistance_fakereal = 1e10;
2722 double mindistance_realfake = 1e10;
2723 for (
unsigned int jv = 0; jv < recVtxs->size(); jv++) {
2724 if ((!(jv ==
iv)) &&
select(recVtxs->at(jv))) {
2725 double dz = recVtxs->at(
iv).z() - recVtxs->at(jv).z();
2726 double dtsigma =
std::sqrt(recVtxs->at(
iv).covariance(3, 3) + recVtxs->at(jv).covariance(3, 3));
2728 ? (recVtxs->at(
iv).t() - recVtxs->at(jv).t()) / dtsigma
2730 if (recopv.at(
iv).is_fake() && recopv.at(jv).is_real()) {
2736 mindistance_fakereal =
dz;
2740 if (recopv.at(
iv).is_real() && recopv.at(jv).is_fake() && (
std::abs(
dz) <
std::abs(mindistance_realfake))) {
2741 mindistance_realfake =
dz;
2760 ->setComment(
"Association between General and MTD Extended tracks");
2777 desc.add<
bool>(
"useOnlyChargedTracks",
true);
2778 desc.addUntracked<
bool>(
"optionalPlots",
false);
2779 desc.add<
bool>(
"use3dNoTime",
false);
2780 desc.add<
double>(
"trackweightTh", 0.5);
2781 desc.add<
double>(
"mvaTh", 0.8);
2782 desc.add<
double>(
"minProbHeavy", 0.75);
2783 descriptions.
add(
"vertices4DValid",
desc);
2789 const unsigned int& categ) {
2793 strTrk =
"Reco_Track:";
2796 strTrk =
"SecRecoTrk:";
2799 strTrk =
"PU_RecoTrk:";
2802 LogTrace(
"Primary4DVertexValidation") << strTrk <<
" w =" << std::setw(6) << std::setprecision(2)
2803 <<
vtx.trackWeight(trk) <<
" pt =" << std::setw(6) << std::setprecision(2)
2804 << trk->
pt() <<
" eta =" << std::setw(6) << std::setprecision(2) << trk->
eta()
2805 <<
" MatchedTP: Pt =" << std::setw(6) << std::setprecision(2) <<
tp->pt()
2806 <<
" eta =" << std::setw(6) << std::setprecision(2) <<
tp->eta()
2807 <<
" Parent vtx: z =" << std::setw(8) << std::setprecision(4)
2808 <<
tp->parentVertex()->position().z() <<
" t =" << std::setw(8)
2809 << std::setprecision(4) <<
tp->parentVertex()->position().t() *
simUnit_ 2810 <<
" BX =" <<
tp->parentVertex()->eventId().bunchCrossing()
2811 <<
" ev =" <<
tp->parentVertex()->eventId().event() << std::endl;
2817 LogTrace(
"Primary4DVertexValidation") <<
"Sim vtx (x,y,z,t) = (" << std::setprecision(4) << simpVtx.
x <<
"," 2818 << std::setprecision(4) << simpVtx.
y <<
"," << std::setprecision(4) << simpVtx.
z 2819 <<
"," << std::setprecision(4) << simpVtx.
t *
simUnit_ <<
")" 2820 <<
" Simvtx.rec = " << simpVtx.
rec;
2821 LogTrace(
"Primary4DVertexValidation") <<
"Sim vtx: pt = " << std::setprecision(4) << simpVtx.
pt 2822 <<
" ptsq = " << std::setprecision(6) << simpVtx.
ptsq 2823 <<
" nGenTrk = " << simpVtx.
nGenTrk 2825 LogTrace(
"Primary4DVertexValidation") <<
"Reco vtx (x,y,z) = (" << std::setprecision(4) << recopVtx.
x <<
"," 2826 << std::setprecision(4) << recopVtx.
y <<
"," << std::setprecision(4)
2827 << recopVtx.
z <<
")" 2828 <<
" Recovtx.sim = " << recopVtx.
sim;
2829 LogTrace(
"Primary4DVertexValidation") <<
"Reco vtx: pt = " << std::setprecision(4) << recopVtx.
pt 2830 <<
" ptsq = " << std::setprecision(6) << recopVtx.
ptsq 2831 <<
" nrecotrks = " << recopVtx.
nRecoTrk 2833 LogTrace(
"Primary4DVertexValidation") <<
"wnt " << recopVtx.
sumwnt <<
" wos = " << recopVtx.
sumwos;
2834 for (
auto iTP = simpVtx.
sim_vertex->daughterTracks_begin(); iTP != simpVtx.
sim_vertex->daughterTracks_end(); ++iTP) {
2838 LogTrace(
"Primary4DVertexValidation")
2839 <<
"Daughter track of sim vertex: pt =" << std::setw(6) << std::setprecision(2) << (*iTP)->pt()
2840 <<
" eta =" << std::setw(6) << std::setprecision(2) << (*iTP)->eta();
2846 if (
tp.status() != 1) {
2850 auto x_pv =
tp.parentVertex()->position().x();
2851 auto y_pv =
tp.parentVertex()->position().y();
2852 auto z_pv =
tp.parentVertex()->position().z();
2854 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)
MonitorElement * meSimPVTvsZ_
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 * meSimPVT_
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_
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_
MonitorElement * meSimVerNumber_
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_