51 #include "CLHEP/Units/PhysicalConstants.h" 92 std::map<unsigned int, double>
wnt;
93 std::map<unsigned int, double>
wos;
99 void addTrack(
unsigned int irecv,
double twos,
double twt) {
101 if (
wnt.find(irecv) ==
wnt.end()) {
108 if (
wos.find(irecv) ==
wos.end()) {
142 std::map<unsigned int, double>
wos;
143 std::map<unsigned int, double>
wnt;
196 std::vector<simPrimaryVertex>&,
215 static constexpr
double c_ = 2.99792458e1;
216 static constexpr
double mvaL_ = 0.5;
217 static constexpr
double mvaH_ = 0.8;
229 static constexpr
double tol_ = 1.e-4;
371 use_only_charged_tracks_(iConfig.getParameter<
bool>(
"useOnlyChargedTracks")),
372 debug_(iConfig.getUntrackedParameter<
bool>(
"debug")),
373 optionalPlots_(iConfig.getUntrackedParameter<
bool>(
"optionalPlots")),
374 minProbHeavy_(iConfig.getParameter<double>(
"minProbHeavy")),
375 trackweightTh_(iConfig.getParameter<double>(
"trackweightTh")),
376 mvaTh_(iConfig.getParameter<double>(
"mvaTh")),
377 lineDensityPar_(iConfig.getParameter<
std::
vector<double>>(
"lineDensityPar")) {
419 ibook.
book1D(
"MVAMatchedEffPtTot",
"Pt of tracks associated to LV matched to TP; track pt [GeV] ", 110, 0., 11.);
421 "MVAMatchedEffPtMtd",
"Pt of tracks associated to LV matched to TP with time; track pt [GeV] ", 110, 0., 11.);
423 ibook.
book1D(
"MVAMatchedEffEtaTot",
"Pt of tracks associated to LV matched to TP; track eta ", 66, 0., 3.3);
425 "MVAMatchedEffEtaMtd",
"Pt of tracks associated to LV matched to TP with time; track eta ", 66, 0., 3.3);
427 "MVATrackRes",
"t_{rec} - t_{sim} for tracks from LV MVA sel.; t_{rec} - t_{sim} [ns] ", 120, -0.15, 0.15);
428 meTrackResTot_ = ibook.
book1D(
"TrackRes",
"t_{rec} - t_{sim} for tracks; t_{rec} - t_{sim} [ns] ", 120, -0.15, 0.15);
430 "TrackRes-LowMVA",
"t_{rec} - t_{sim} for tracks with MVA < 0.5; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
432 "TrackRes-MediumMVA",
"t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
434 "TrackRes-HighMVA",
"t_{rec} - t_{sim} for tracks with MVA > 0.8; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
437 "TrackResMass-LowMVA",
"t_{rec} - t_{est} for tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ", 100, -1., 1.);
439 "t_{rec} - t_{est} for tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
444 "TrackResMass-HighMVA",
"t_{rec} - t_{est} for tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ", 100, -1., 1.);
446 "TrackResMassTrue-LowMVA",
"t_{est} - t_{sim} for tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ", 100, -1., 1.);
448 "t_{est} - t_{sim} for tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
453 "t_{est} - t_{sim} for tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
459 ibook.
book1D(
"MVATrackPull",
"Pull for tracks from LV MAV sel.; (t_{rec}-t_{sim})/#sigma_{t}", 50, -5., 5.);
460 meTrackPullTot_ = ibook.
book1D(
"TrackPull",
"Pull for tracks; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
462 ibook.
book1D(
"TrackPull-LowMVA",
"Pull for tracks with MVA < 0.5; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
464 "TrackPull-MediumMVA",
"Pull for tracks with 0.5 < MVA < 0.8; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
466 ibook.
book1D(
"TrackPull-HighMVA",
"Pull for tracks with MVA > 0.8; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
468 "MVATrackZposResTot",
"Z_{PCA} - Z_{sim} for tracks from LV MVA sel.;Z_{PCA} - Z_{sim} [cm] ", 50, -0.1, 0.1);
470 ibook.
book1D(
"TrackZposResTot",
"Z_{PCA} - Z_{sim} for tracks;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
472 "TrackZposRes-LowMVA",
"Z_{PCA} - Z_{sim} for tracks with MVA < 0.5;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
474 "Z_{PCA} - Z_{sim} for tracks with 0.5 < MVA < 0.8 ;Z_{PCA} - Z_{sim} [cm] ",
479 "TrackZposRes-HighMVA",
"Z_{PCA} - Z_{sim} for tracks with MVA > 0.8 ;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
481 ibook.
book1D(
"Track3DposRes-LowMVA",
482 "3dPos_{PCA} - 3dPos_{sim} for tracks with MVA < 0.5 ;3dPos_{PCA} - 3dPos_{sim} [cm] ",
487 ibook.
book1D(
"Track3DposRes-MediumMVA",
488 "3dPos_{PCA} - 3dPos_{sim} for tracks with 0.5 < MVA < 0.8 ;3dPos_{PCA} - 3dPos_{sim} [cm] ",
493 ibook.
book1D(
"Track3DposRes-HighMVA",
494 "3dPos_{PCA} - 3dPos_{sim} for tracks with MVA > 0.8;3dPos_{PCA} - 3dPos_{sim} [cm] ",
498 meTimeRes_ = ibook.
book1D(
"TimeRes",
"t_{rec} - t_{sim} ;t_{rec} - t_{sim} [ns] ", 40, -0.2, 0.2);
499 meTimePull_ = ibook.
book1D(
"TimePull",
"Pull; t_{rec} - t_{sim}/#sigma_{t rec}", 100, -10., 10.);
501 ibook.
book1D(
"TimeSignalRes",
"t_{rec} - t_{sim} for signal ;t_{rec} - t_{sim} [ns] ", 40, -0.2, 0.2);
503 ibook.
book1D(
"TimeSignalPull",
"Pull for signal; t_{rec} - t_{sim}/#sigma_{t rec}", 100, -10., 10.);
505 ibook.
bookProfile(
"PUvsReal",
"#PU vertices vs #real matched vertices;#PU;#real ", 100, 0, 300, 100, 0, 200);
507 "PUvsOtherFake",
"#PU vertices vs #other fake matched vertices;#PU;#other fake ", 100, 0, 300, 100, 0, 20);
509 ibook.
bookProfile(
"PUvsSplit",
"#PU vertices vs #split matched vertices;#PU;#split ", 100, 0, 300, 100, 0, 20);
510 meMatchQual_ = ibook.
book1D(
"MatchQuality",
"RECO-SIM vertex match quality; ", 8, 0, 8.);
514 meDeltaTrealreal_ = ibook.
book1D(
"DeltaTrealreal",
"#Delta T real-real; |#Delta T (r-r)| [sigma]", 60, 0., 30.);
515 meDeltaTfakefake_ = ibook.
book1D(
"DeltaTfakefake",
"#Delta T fake-fake; |#Delta T (f-f)| [sigma]", 60, 0., 30.);
516 meDeltaTfakereal_ = ibook.
book1D(
"DeltaTfakereal",
"#Delta T fake-real; |#Delta T (f-r)| [sigma]", 60, 0., 30.);
519 "RecoPosInSimCollection",
"Sim signal vertex index associated to Reco signal vertex; Sim PV index", 200, 0, 200);
521 ibook.
book1D(
"RecoPosInRecoOrigCollection",
"Reco signal index in OrigCollection; Reco index", 200, 0, 200);
523 ibook.
book1D(
"SimPosInSimOrigCollection",
"Sim signal index in OrigCollection; Sim index", 200, 0, 200);
526 ibook.
book1D(
"RecoPVPosSignal",
"Position in reco collection of PV associated to sim signal", 200, 0, 200);
528 ibook.
book1D(
"RecoPVPosSignalNotHighestPt",
529 "Position in reco collection of PV associated to sim signal not highest Pt",
534 ibook.
book1D(
"RecoVtxVsLineDensity",
"#Reco vertices/mm/event; line density [#vtx/mm/event]", 160, 0., 4.);
535 meRecVerNumber_ = ibook.
book1D(
"RecVerNumber",
"RECO Vertex Number: Number of vertices", 50, 0, 250);
536 meRecPVZ_ = ibook.
book1D(
"recPVZ",
"Weighted #Rec vertices/mm", 400, -20., 20.);
537 meRecPVT_ = ibook.
book1D(
"recPVT",
"#Rec vertices/10 ps", 200, -1., 1.);
538 meSimPVZ_ = ibook.
book1D(
"simPVZ",
"Weighted #Sim vertices/mm", 400, -20., 20.);
542 "TrackResLowP",
"t_{rec} - t_{sim} for tracks with p < 2 GeV; t_{rec} - t_{sim} [ns] ", 70, -0.15, 0.15);
544 ibook.
book1D(
"TrackResLowP-LowMVA",
545 "t_{rec} - t_{sim} for tracks with MVA < 0.5 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
550 ibook.
book1D(
"TrackResLowP-MediumMVA",
551 "t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
556 ibook.
book1D(
"TrackResLowP-HighMVA",
557 "t_{rec} - t_{sim} for tracks with MVA > 0.8 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
562 "TrackResHighP",
"t_{rec} - t_{sim} for tracks with p > 2 GeV; t_{rec} - t_{sim} [ns] ", 70, -0.15, 0.15);
564 ibook.
book1D(
"TrackResHighP-LowMVA",
565 "t_{rec} - t_{sim} for tracks with MVA < 0.5 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
570 ibook.
book1D(
"TrackResHighP-MediumMVA",
571 "t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
576 ibook.
book1D(
"TrackResHighP-HighMVA",
577 "t_{rec} - t_{sim} for tracks with MVA > 0.8 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
582 ibook.
book1D(
"TrackPullLowP",
"Pull for tracks with p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
584 "Pull for tracks with MVA < 0.5 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
589 "Pull for tracks with 0.5 < MVA < 0.8 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
594 "Pull for tracks with MVA > 0.8 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
599 ibook.
book1D(
"TrackPullHighP",
"Pull for tracks with p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
601 "Pull for tracks with MVA < 0.5 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
606 ibook.
book1D(
"TrackPullHighP-MediumMVA",
607 "Pull for tracks with 0.5 < MVA < 0.8 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
612 "Pull for tracks with MVA > 0.8 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
618 ibook.
book1D(
"TrackResMass-Protons-LowMVA",
619 "t_{rec} - t_{est} for proton tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ",
624 ibook.
book1D(
"TrackResMass-Protons-MediumMVA",
625 "t_{rec} - t_{est} for proton tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
630 ibook.
book1D(
"TrackResMass-Protons-HighMVA",
631 "t_{rec} - t_{est} for proton tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ",
636 ibook.
book1D(
"TrackResMassTrue-Protons-LowMVA",
637 "t_{est} - t_{sim} for proton tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ",
642 ibook.
book1D(
"TrackResMassTrue-Protons-MediumMVA",
643 "t_{est} - t_{sim} for proton tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
648 ibook.
book1D(
"TrackResMassTrue-Protons-HighMVA",
649 "t_{est} - t_{sim} for proton tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
655 "t_{rec} - t_{est} for pion tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ",
660 ibook.
book1D(
"TrackResMass-Pions-MediumMVA",
661 "t_{rec} - t_{est} for pion tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
666 "t_{rec} - t_{est} for pion tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ",
671 ibook.
book1D(
"TrackResMassTrue-Pions-LowMVA",
672 "t_{est} - t_{sim} for pion tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ",
677 ibook.
book1D(
"TrackResMassTrue-Pions-MediumMVA",
678 "t_{est} - t_{sim} for pion tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
683 ibook.
book1D(
"TrackResMassTrue-Pions-HighMVA",
684 "t_{est} - t_{sim} for pion tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
690 meBarrelPIDp_ = ibook.
book1D(
"BarrelPIDp",
"PID track MTD momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
691 meEndcapPIDp_ = ibook.
book1D(
"EndcapPIDp",
"PID track with MTD momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
700 ibook.
book1D(
"BarrelTruePiNoPID",
"True pi NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
702 ibook.
book1D(
"BarrelTrueKNoPID",
"True k NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
704 ibook.
book1D(
"BarrelTruePNoPID",
"True p NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
706 ibook.
book1D(
"EndcapTruePiNoPID",
"True NoPIDpi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
708 ibook.
book1D(
"EndcapTrueKNoPID",
"True k NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
710 ibook.
book1D(
"EndcapTruePNoPID",
"True p NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
713 ibook.
book1D(
"BarrelTruePiAsPi",
"True pi as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
715 ibook.
book1D(
"BarrelTruePiAsK",
"True pi as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
717 ibook.
book1D(
"BarrelTruePiAsP",
"True pi as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
719 ibook.
book1D(
"EndcapTruePiAsPi",
"True pi as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
721 ibook.
book1D(
"EndcapTruePiAsK",
"True pi as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
723 ibook.
book1D(
"EndcapTruePiAsP",
"True pi as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
726 ibook.
book1D(
"BarrelTrueKAsPi",
"True k as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
727 meBarrelTrueKAsK_ = ibook.
book1D(
"BarrelTrueKAsK",
"True k as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
728 meBarrelTrueKAsP_ = ibook.
book1D(
"BarrelTrueKAsP",
"True k as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
730 ibook.
book1D(
"EndcapTrueKAsPi",
"True k as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
731 meEndcapTrueKAsK_ = ibook.
book1D(
"EndcapTrueKAsK",
"True k as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
732 meEndcapTrueKAsP_ = ibook.
book1D(
"EndcapTrueKAsP",
"True k as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
735 ibook.
book1D(
"BarrelTruePAsPi",
"True p as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
736 meBarrelTruePAsK_ = ibook.
book1D(
"BarrelTruePAsK",
"True p as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
737 meBarrelTruePAsP_ = ibook.
book1D(
"BarrelTruePAsP",
"True p as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
739 ibook.
book1D(
"EndcapTruePAsPi",
"True p as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
740 meEndcapTruePAsK_ = ibook.
book1D(
"EndcapTruePAsK",
"True p as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
741 meEndcapTruePAsP_ = ibook.
book1D(
"EndcapTruePAsP",
"True p as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
752 for (
const auto&
tp :
found->val) {
753 if (
tp.first->eventId().bunchCrossing() == 0 &&
tp.first->eventId().event() == 0)
770 for (
const auto&
tp :
found->val) {
771 if (std::find_if(vsim->daughterTracks_begin(), vsim->daughterTracks_end(), [&](
const TrackingParticleRef& vtp) {
772 return tp.first == vtp;
773 }) != vsim->daughterTracks_end())
782 if (
time > 0 && pathlength > 0 &&
mass > 0) {
783 double gammasq = 1. + momentum * momentum / (
mass *
mass);
785 double t_est =
time - (pathlength /
v);
817 std::vector<Primary4DVertexValidation::simPrimaryVertex> simpv;
818 int current_event = -1;
820 for (TrackingVertexCollection::const_iterator
v = tVC->begin();
v != tVC->end(); ++
v) {
822 if (
v->eventId().bunchCrossing() != 0)
824 if (
v->eventId().event() != current_event) {
825 current_event =
v->eventId().event();
835 sv.eventId =
v->eventId();
837 sv.OriginalIndex =
s;
841 assert((**iTrack).eventId().bunchCrossing() == 0);
844 for (std::vector<simPrimaryVertex>::iterator
v0 = simpv.begin();
v0 != simpv.end();
v0++) {
859 auto momentum = (*(*iTP)).momentum();
860 const reco::Track* matched_best_reco_track =
nullptr;
861 double match_quality = -1;
865 matched_best_reco_track = (*s2r_)[*iTP][0].first.get();
866 match_quality = (*s2r_)[*iTP][0].second;
869 vp->
ptot.setPx(vp->
ptot.x() + momentum.x());
870 vp->
ptot.setPy(vp->
ptot.y() + momentum.y());
871 vp->
ptot.setPz(vp->
ptot.z() + momentum.z());
872 vp->
ptot.setE(vp->
ptot.e() + (**iTP).energy());
873 vp->
ptsq += ((**iTP).pt() * (**iTP).pt());
875 if (matched_best_reco_track) {
895 auto prev_z = simpv.back().z;
897 vsim.closest_vertex_distance_z =
std::abs(vsim.z - prev_z);
901 for (std::vector<simPrimaryVertex>::iterator vsim = simpv.begin(); vsim != simpv.end(); vsim++) {
902 std::vector<simPrimaryVertex>::iterator vsim2 = vsim;
904 for (; vsim2 != simpv.end(); vsim2++) {
907 vsim->closest_vertex_distance_z =
std::min(vsim->closest_vertex_distance_z,
distance);
908 vsim2->closest_vertex_distance_z =
std::min(vsim2->closest_vertex_distance_z,
distance);
918 std::vector<Primary4DVertexValidation::recoPrimaryVertex> recopv;
920 for (
auto v = tVC->begin();
v != tVC->end(); ++
v) {
925 if (
v->isFake() || !
v->isValid())
932 sv.OriginalIndex =
r;
935 recopv.push_back(
sv);
939 for (
auto iTrack =
v->tracks_begin(); iTrack !=
v->tracks_end(); ++iTrack) {
940 auto momentum = (*(*iTrack)).innerMomentum();
941 if (momentum.mag2() == 0)
942 momentum = (*(*iTrack)).momentum();
944 vp->
ptsq += (momentum.perp2());
961 auto prev_z = recopv.back().z;
963 vreco.closest_vertex_distance_z =
std::abs(vreco.z - prev_z);
966 for (std::vector<recoPrimaryVertex>::iterator vreco = recopv.begin(); vreco != recopv.end(); vreco++) {
967 std::vector<recoPrimaryVertex>::iterator vreco2 = vreco;
969 for (; vreco2 != recopv.end(); vreco2++) {
972 vreco->closest_vertex_distance_z =
std::min(vreco->closest_vertex_distance_z,
distance);
973 vreco2->closest_vertex_distance_z =
std::min(vreco2->closest_vertex_distance_z,
distance);
981 std::vector<simPrimaryVertex>& simpv,
985 for (
auto vv : simpv) {
989 for (
auto rv : recopv) {
994 for (
unsigned int iv = 0;
iv < recopv.size();
iv++) {
997 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1004 for (
auto iTrack =
vertex->tracks_begin(); iTrack !=
vertex->tracks_end(); ++iTrack) {
1005 double pt = (*iTrack)->pt();
1009 if (MVA[(*iTrack)] <
mvaTh_)
1013 if (tp_info !=
nullptr) {
1014 double dz2_beam =
pow((*BS).BeamWidthX() *
cos((*iTrack)->phi()) /
tan((*iTrack)->theta()), 2) +
1015 pow((*BS).BeamWidthY() *
sin((*iTrack)->phi()) /
tan((*iTrack)->theta()), 2);
1016 double dz2 =
pow((*iTrack)->dzError(), 2) + dz2_beam +
1018 wos =
vertex->trackWeight(*iTrack) / dz2;
1021 if (sigmat0[(*iTrack)] > 0) {
1022 double sigmaZ = (*BS).sigmaZ();
1024 wos = wos / erf(sigmat0[(*iTrack)] / sigmaT);
1026 simpv.at(
iev).addTrack(
iv, wos, wnt);
1027 recopv.at(
iv).addTrack(
iev, wos, wnt);
1035 if ((evwos > 0) && (evwos > recopv.at(
iv).maxwos) && (evnt > 1)) {
1036 recopv.at(
iv).wosmatch =
iev;
1037 recopv.at(
iv).maxwos = evwos;
1038 recopv.at(
iv).maxwosnt = evnt;
1040 simpv.at(
iev).wos_dominated_recv.push_back(
iv);
1041 simpv.at(
iev).nwosmatch++;
1045 if ((evnt > 0) && (evwnt > recopv.at(
iv).maxwnt)) {
1046 recopv.at(
iv).wntmatch =
iev;
1047 recopv.at(
iv).maxwnt = evwnt;
1054 for (
auto& vrec : recopv) {
1056 vrec.matchQuality = 0;
1058 unsigned int iev = 0;
1059 for (
auto& vv : simpv) {
1062 edm::LogPrint(
"Primary4DVertexValidation") <<
"wos_dominated_recv.size: " << vv.wos_dominated_recv.size();
1064 for (
unsigned int i = 0;
i < vv.wos_dominated_recv.size();
i++) {
1065 auto recov = vv.wos_dominated_recv.at(
i);
1068 <<
"index of reco vertex: " << recov <<
" that has a wos: " << vv.wos.at(recov) <<
" at position " <<
i;
1072 vv.matchQuality = 0;
1076 for (
unsigned int rank = 1; rank <
maxRank_; rank++) {
1077 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1080 if (simpv.at(
iev).nwosmatch == 0)
1082 if (simpv.at(
iev).nwosmatch > rank)
1085 for (
unsigned int k = 0;
k < simpv.at(
iev).wos_dominated_recv.size();
k++) {
1086 unsigned int rec = simpv.at(
iev).wos_dominated_recv.at(
k);
1087 auto vrec = recopv.at(rec);
1098 recopv.at(
iv).sim =
iev;
1099 simpv.at(
iev).rec =
iv;
1100 recopv.at(
iv).matchQuality = rank;
1101 simpv.at(
iev).matchQuality = rank;
1108 unsigned int ntry = 0;
1110 unsigned nmatch = 0;
1111 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1116 for (
auto rv : simpv.at(
iev).wos) {
1117 if ((rec ==
NOT_MATCHED) || (rv.second > simpv.at(
iev).wos.at(rec))) {
1123 for (
auto rv : simpv.at(
iev).wnt) {
1124 if ((rec ==
NOT_MATCHED) || (rv.second > simpv.at(
iev).wnt.at(rec))) {
1137 for (
auto sv : recopv.at(rec).wos) {
1140 if ((rec2sim ==
NOT_MATCHED) || (
sv.second > recopv.at(rec).wos.at(rec2sim))) {
1144 if (
iev == rec2sim) {
1146 recopv.at(rec).sim =
iev;
1147 recopv.at(rec).matchQuality =
maxRank_;
1148 simpv.at(
iev).rec = rec;
1165 using namespace reco;
1167 std::vector<float> pileUpInfo_z;
1172 for (
auto const& pu_info : *puinfoH.
product()) {
1173 if (pu_info.getBunchCrossing() == 0) {
1174 pileUpInfo_z = pu_info.getPU_zpositions();
1183 edm::LogWarning(
"Primary4DVertexValidation") <<
"TPCollectionH is not valid";
1188 edm::LogWarning(
"Primary4DVertexValidation") <<
"TVCollectionH is not valid";
1195 edm::LogWarning(
"Primary4DVertexValidation") <<
"simToRecoH is not valid";
1202 edm::LogWarning(
"Primary4DVertexValidation") <<
"recoToSimH is not valid";
1207 edm::LogWarning(
"Primary4DVertexValidation") <<
"BeamSpotH is not valid";
1209 std::vector<simPrimaryVertex> simpv;
1212 bool signal_is_highest_pt =
1214 return lhs.
ptsq < rhs.ptsq;
1215 }) == simpv.begin();
1217 std::vector<recoPrimaryVertex> recopv;
1221 edm::LogWarning(
"Primary4DVertexValidation") <<
"recVtxs is not valid";
1241 matchReco2Sim(recopv, simpv, sigmat0Safe, mtdQualMVA, BeamSpotH);
1244 for (
unsigned int iv = 0;
iv < recopv.size();
iv++) {
1248 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1249 auto vsim = simpv.at(
iev).sim_vertex;
1251 bool selectedVtxMatching = recopv.at(
iv).sim ==
iev && simpv.at(
iev).rec ==
iv &&
1252 simpv.at(
iev).eventId.bunchCrossing() == 0 && simpv.at(
iev).eventId.event() == 0 &&
1253 recopv.at(
iv).OriginalIndex == 0;
1254 if (selectedVtxMatching && !recopv.at(
iv).is_signal()) {
1256 <<
"Reco vtx leading match inconsistent: BX/ID " << simpv.at(
iev).eventId.bunchCrossing() <<
" " 1257 << simpv.at(
iev).eventId.event();
1259 double vzsim = simpv.at(
iev).z;
1262 for (
auto iTrack =
vertex->tracks_begin(); iTrack !=
vertex->tracks_end(); ++iTrack) {
1263 if (trackAssoc[*iTrack] == -1) {
1264 LogTrace(
"mtdTracks") <<
"Extended track not associated";
1273 bool selectRecoTrk =
mvaRecSel(**iTrack, *
vertex, t0Safe[*iTrack], sigmat0Safe[*iTrack]);
1274 if (selectedVtxMatching && selectRecoTrk) {
1282 if (tp_info !=
nullptr) {
1283 double mass = (*tp_info)->mass();
1284 double tsim = (*tp_info)->parentVertex()->position().t() *
simUnit_;
1287 double xsim = (*tp_info)->parentVertex()->position().x();
1288 double ysim = (*tp_info)->parentVertex()->position().y();
1289 double zsim = (*tp_info)->parentVertex()->position().z();
1290 double xPCA = (*iTrack)->vx();
1291 double yPCA = (*iTrack)->vy();
1292 double zPCA = (*iTrack)->vz();
1294 double dZ = zPCA - zsim;
1295 double d3D =
std::sqrt((xPCA - xsim) * (xPCA - xsim) + (yPCA - ysim) * (yPCA - ysim) +
dZ *
dZ);
1297 if ((xPCA - xsim) * ((*tp_info)->px()) + (yPCA - ysim) * ((*tp_info)->py()) +
dZ * ((*tp_info)->pz()) <
1302 bool selectTP =
mvaTPSel(**tp_info);
1304 if (selectedVtxMatching && selectRecoTrk && selectTP) {
1312 if (sigmat0Safe[*iTrack] == -1)
1315 if (selectedVtxMatching && selectRecoTrk && selectTP) {
1323 unsigned int noPIDtype = 0;
1324 if (probPi[*iTrack] == -1) {
1328 }
else if (probPi[*iTrack] == 1 && probK[*iTrack] == 0 && probP[*iTrack] == 0) {
1331 bool noPID = noPIDtype > 0;
1333 bool isK = !noPID && !isPi && probK[*iTrack] > probP[*iTrack];
1334 bool isP = !noPID && !isPi && !isK;
1336 if ((isPi &&
std::abs(tMtd[*iTrack] - tofPi[*iTrack] - t0Pid[*iTrack]) >
tol_) ||
1337 (isK &&
std::abs(tMtd[*iTrack] - tofK[*iTrack] - t0Pid[*iTrack]) >
tol_) ||
1338 (isP &&
std::abs(tMtd[*iTrack] - tofP[*iTrack] - t0Pid[*iTrack]) >
tol_)) {
1340 <<
"No match between mass hyp. and time: " <<
std::abs((*tp_info)->pdgId()) <<
" mass hyp pi/k/p " 1341 << isPi <<
" " << isK <<
" " << isP <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " << t0Safe[*iTrack]
1342 <<
" tMtd - tof pi/K/p " << tMtd[*iTrack] - tofPi[*iTrack] <<
" " << tMtd[*iTrack] - tofK[*iTrack]
1343 <<
" " << tMtd[*iTrack] - tofP[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " 1344 << probK[*iTrack] <<
" " << probP[*iTrack];
1350 if (
std::abs((*tp_info)->pdgId()) == 211) {
1361 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1362 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1365 }
else if (
std::abs((*tp_info)->pdgId()) == 321) {
1376 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1377 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1380 }
else if (
std::abs((*tp_info)->pdgId()) == 2212) {
1391 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1392 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1399 if (
std::abs((*tp_info)->pdgId()) == 211) {
1410 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1411 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1414 }
else if (
std::abs((*tp_info)->pdgId()) == 321) {
1425 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1426 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1429 }
else if (
std::abs((*tp_info)->pdgId()) == 2212) {
1440 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1441 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1450 if ((*iTrack)->p() <= 2) {
1458 if (mtdQualMVA[(*iTrack)] <
mvaL_) {
1469 if ((*iTrack)->p() <= 2) {
1472 }
else if ((*iTrack)->p() > 2) {
1478 if (
std::abs((*tp_info)->pdgId()) == 2212) {
1481 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
1487 }
else if (mtdQualMVA[(*iTrack)] >
mvaL_ && mtdQualMVA[(*iTrack)] <
mvaH_) {
1498 if ((*iTrack)->p() <= 2) {
1501 }
else if ((*iTrack)->p() > 2) {
1507 if (
std::abs((*tp_info)->pdgId()) == 2212) {
1510 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
1516 }
else if (mtdQualMVA[(*iTrack)] >
mvaH_) {
1527 if ((*iTrack)->p() <= 2) {
1530 }
else if ((*iTrack)->p() > 2) {
1536 if (
std::abs((*tp_info)->pdgId()) == 2212) {
1539 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
1556 auto puLineDensity = [&](
double z) {
1563 for (
unsigned int ir = 0; ir < recopv.size(); ir++) {
1564 if (recopv.at(ir).ndof >
selNdof_) {
1566 meRecPVZ_->
Fill(recopv.at(ir).z, 1. / puLineDensity(recopv.at(ir).z));
1567 if (recopv.at(ir).recVtx->tError() > 0.) {
1571 edm::LogPrint(
"Primary4DVertexValidation") <<
"************* IR: " << ir;
1573 <<
"z: " << recopv.at(ir).z <<
" corresponding to line density: " << puLineDensity(recopv.at(ir).z);
1574 edm::LogPrint(
"Primary4DVertexValidation") <<
"is_real: " << recopv.at(ir).is_real();
1575 edm::LogPrint(
"Primary4DVertexValidation") <<
"is_fake: " << recopv.at(ir).is_fake();
1576 edm::LogPrint(
"Primary4DVertexValidation") <<
"is_signal: " << recopv.at(ir).is_signal();
1577 edm::LogPrint(
"Primary4DVertexValidation") <<
"split_from: " << recopv.at(ir).split_from();
1578 edm::LogPrint(
"Primary4DVertexValidation") <<
"other fake: " << recopv.at(ir).other_fake();
1580 if (recopv.at(ir).is_real())
1582 if (recopv.at(ir).is_fake())
1584 if (recopv.at(ir).other_fake())
1586 if (recopv.at(ir).split_from() != -1) {
1593 edm::LogPrint(
"Primary4DVertexValidation") <<
"is_real: " << real;
1594 edm::LogPrint(
"Primary4DVertexValidation") <<
"is_fake: " << fake;
1596 edm::LogPrint(
"Primary4DVertexValidation") <<
"other fake: " << other_fake;
1603 for (
unsigned int is = 0; is < simpv.size(); is++) {
1605 if (std::isinf(1. / puLineDensity(simpv.at(is).z))) {
1608 meSimPVZ_->
Fill(simpv.at(is).z, 1. / puLineDensity(simpv.at(is).z));
1615 edm::LogPrint(
"Primary4DVertexValidation") <<
"sim vertex: " << is <<
" is not matched with any reco";
1620 for (
unsigned int ir = 0; ir < recopv.size(); ir++) {
1621 if (recopv.at(ir).ndof >
selNdof_) {
1622 if (recopv.at(ir).sim == is && simpv.at(is).rec == ir) {
1629 recopv.at(ir).recVtx->tError());
1635 if (simpv.at(is).eventId.bunchCrossing() == 0 && simpv.at(is).eventId.event() == 0) {
1636 if (!recopv.at(ir).is_signal()) {
1638 <<
"Reco vtx leading match inconsistent: BX/ID " << simpv.at(is).eventId.bunchCrossing() <<
" " 1639 << simpv.at(is).eventId.event();
1642 recopv.at(ir).OriginalIndex);
1643 if (!signal_is_highest_pt) {
1645 recopv.at(ir).OriginalIndex);
1650 edm::LogPrint(
"Primary4DVertexValidation") <<
"*** Matching RECO: " << ir <<
"with SIM: " << is <<
" ***";
1651 edm::LogPrint(
"Primary4DVertexValidation") <<
"Match Quality is " << recopv.at(ir).matchQuality;
1660 for (
unsigned int iv = 0;
iv < recVtxs->size() - 1;
iv++) {
1662 double mindistance_realreal = 1e10;
1664 for (
unsigned int jv =
iv; jv < recVtxs->size(); jv++) {
1665 if ((!(jv ==
iv)) &&
select(recVtxs->at(jv))) {
1666 double dz = recVtxs->at(
iv).z() - recVtxs->at(jv).z();
1667 double dtsigma =
std::sqrt(recVtxs->at(
iv).covariance(3, 3) + recVtxs->at(jv).covariance(3, 3));
1669 ? (recVtxs->at(
iv).t() - recVtxs->at(jv).t()) / dtsigma
1671 if (recopv.at(
iv).is_real() && recopv.at(jv).is_real()) {
1677 mindistance_realreal =
dz;
1679 }
else if (recopv.at(
iv).is_fake() && recopv.at(jv).is_fake()) {
1688 double mindistance_fakereal = 1e10;
1689 double mindistance_realfake = 1e10;
1690 for (
unsigned int jv = 0; jv < recVtxs->size(); jv++) {
1691 if ((!(jv ==
iv)) &&
select(recVtxs->at(jv))) {
1692 double dz = recVtxs->at(
iv).z() - recVtxs->at(jv).z();
1693 double dtsigma =
std::sqrt(recVtxs->at(
iv).covariance(3, 3) + recVtxs->at(jv).covariance(3, 3));
1695 ? (recVtxs->at(
iv).t() - recVtxs->at(jv).t()) / dtsigma
1697 if (recopv.at(
iv).is_fake() && recopv.at(jv).is_real()) {
1703 mindistance_fakereal =
dz;
1707 if (recopv.at(
iv).is_real() && recopv.at(jv).is_fake() && (
std::abs(
dz) <
std::abs(mindistance_realfake))) {
1708 mindistance_realfake =
dz;
1727 ->setComment(
"Association between General and MTD Extended tracks");
1743 desc.add<
bool>(
"useOnlyChargedTracks",
true);
1744 desc.addUntracked<
bool>(
"debug",
false);
1745 desc.addUntracked<
bool>(
"optionalPlots",
false);
1746 desc.add<
double>(
"trackweightTh", 0.5);
1747 desc.add<
double>(
"mvaTh", 0.01);
1748 desc.add<
double>(
"minProbHeavy", 0.75);
1752 std::vector<double> lDP;
1753 lDP.push_back(1.87);
1755 lDP.push_back(42.5);
1756 desc.add<std::vector<double>>(
"lineDensityPar", lDP);
1757 descriptions.
add(
"vertices4DValid",
desc);
1762 if (
tp.status() != 1) {
1772 const double& st0) {
MonitorElement * meTrackResLowPTot_
MonitorElement * meBarrelPIDp_
static constexpr double trackMaxBtlEta_
MonitorElement * meMatchQual_
MonitorElement * meEndcapTruePiAsPi_
edm::EDGetTokenT< edm::View< reco::Vertex > > Rec4DVerToken_
MonitorElement * meRecoPVPosSignal_
std::vector< unsigned int > wos_dominated_recv
MonitorElement * meMVATrackEffEtaTot_
MonitorElement * meRecPVT_
MonitorElement * meBarrelNoPIDtype_
T getParameter(std::string const &) const
edm::EDGetTokenT< TrackingVertexCollection > trackingVertexCollectionToken_
const bool mvaTPSel(const TrackingParticle &)
MonitorElement * meMVATrackMatchedEffEtaTot_
static constexpr double trackMaxEtlEta_
double closest_vertex_distance_z
static constexpr double etacutREC_
MonitorElement * meTrackResTot_
MonitorElement * mePUvsRealV_
MonitorElement * meTrackResLowP_[3]
MonitorElement * meTimeRes_
MonitorElement * meEndcapTruePiAsP_
MonitorElement * meDeltaTrealreal_
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleCollectionToken_
TrackingVertexRef sim_vertex
virtual void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< edm::ValueMap< float > > sigmat0SafePidToken_
static constexpr double selNdof_
std::vector< Primary4DVertexValidation::simPrimaryVertex > getSimPVs(const edm::Handle< TrackingVertexCollection > &)
MonitorElement * meTimeSignalRes_
edm::EDGetTokenT< reco::BeamSpot > RecBeamSpotToken_
MonitorElement * meTrackPullTot_
static constexpr double pTcut_
int num_matched_sim_tracks
bool select(const reco::Vertex &, int level=0)
MonitorElement * meBarrelTrueKAsPi_
void matchReco2Sim(std::vector< recoPrimaryVertex > &, std::vector< simPrimaryVertex > &, const edm::ValueMap< float > &, const edm::ValueMap< float > &, const edm::Handle< reco::BeamSpot > &)
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
static constexpr double etacutGEN_
MonitorElement * meEndcapTruePAsPi_
MonitorElement * meEndcapTruePiNoPID_
MonitorElement * meTrackZposRes_[3]
static constexpr double tol_
MonitorElement * meEndcapTrueKAsK_
MonitorElement * meSimPVZ_
const std::string folder_
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< edm::ValueMap< float > > timeToken_
std::vector< Primary4DVertexValidation::recoPrimaryVertex > getRecoPVs(const edm::Handle< edm::View< reco::Vertex >> &)
static constexpr double trackMinEtlEta_
MonitorElement * meTrackZposResTot_
const_iterator find(const key_type &k) const
find element with specified reference key
MonitorElement * meEndcapTruePNoPID_
MonitorElement * meTrackResMassProtons_[3]
MonitorElement * meTrackResMassTrueProtons_[3]
std::map< unsigned int, double > wnt
MonitorElement * meBarrelTruePNoPID_
const_iterator end() const
last iterator over the map (read only)
MonitorElement * meRecoPosInSimCollection_
std::map< unsigned int, double > wos
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
MonitorElement * meRecoPVPosSignalNotHighestPt_
double pt() const
track transverse momentum
MonitorElement * meMVATrackEffPtTot_
static constexpr double simUnit_
double timeFromTrueMass(double, double, double, double)
unsigned int matchQuality
math::XYZTLorentzVector LorentzVector
double vz() const
z coordinate of the reference point on track
static constexpr double c_
MonitorElement * meEndcapTrueKAsP_
void addTrack(unsigned int irecv, double twos, double twt)
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())
MonitorElement * meBarrelTruePAsK_
MonitorElement * meMVATrackMatchedEffPtMtd_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * meEndcapTrueKAsPi_
MonitorElement * meMVATrackResTot_
MonitorElement * meTrackResHighPTot_
Primary4DVertexValidation(const edm::ParameterSet &)
MonitorElement * meTrackPull_[3]
Cos< T >::type cos(const T &t)
MonitorElement * meTrackPullHighPTot_
MonitorElement * meBarrelTrueKAsP_
edm::EDGetTokenT< edm::ValueMap< float > > probPiToken_
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< edm::ValueMap< float > > probPToken_
bool use_only_charged_tracks_
#define DEFINE_FWK_MODULE(type)
MonitorElement * meTimePull_
edm::EDGetTokenT< edm::ValueMap< float > > momentumToken_
MonitorElement * meDeltaZrealreal_
MonitorElement * meTrackResMassTruePions_[3]
unsigned int matchQuality
MonitorElement * meEndcapNoPIDtype_
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 * meMVATrackMatchedEffPtTot_
const std::vector< double > lineDensityPar_
Log< level::Warning, true > LogPrint
const reco::RecoToSimCollection * r2s_
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > vecPileupSummaryInfoToken_
simPrimaryVertex(double x1, double y1, double z1, double t1)
static constexpr double deltaZcut_
MonitorElement * meEndcapTruePiAsK_
const reco::Vertex * recVtx
const bool mvaRecSel(const reco::TrackBase &, const reco::Vertex &, const double &, const double &)
MonitorElement * meEndcapTruePAsK_
edm::EDGetTokenT< edm::ValueMap< float > > t0PidToken_
def split(sequence, size)
edm::Ref< TrackingVertexCollection > TrackingVertexRef
MonitorElement * meRecoPosInRecoOrigCollection_
MonitorElement * meMVATrackZposResTot_
MonitorElement * meTrackResMassTrue_[3]
MonitorElement * meEndcapPIDp_
static constexpr unsigned int NOT_MATCHED
MonitorElement * meBarrelTruePiAsPi_
double eta() const
pseudorapidity of momentum vector
MonitorElement * meRecPVZ_
edm::EDGetTokenT< reco::SimToRecoCollection > simToRecoAssociationToken_
edm::EDGetTokenT< edm::ValueMap< int > > trackAssocToken_
static constexpr double mvaH_
MonitorElement * meMVATrackMatchedEffEtaMtd_
int num_matched_reco_tracks
constexpr NumType convertMmToCm(NumType millimeters)
std::map< unsigned int, double > wnt
static constexpr double mvaL_
std::map< unsigned int, double > wos
float average_match_quality
const edm::Ref< std::vector< TrackingParticle > > * getMatchedTP(const reco::TrackBaseRef &, const TrackingVertexRef &)
reco::VertexBaseRef recVtxRef
static constexpr double maxRank_
~Primary4DVertexValidation() override
MonitorElement * meSimPosInSimOrigCollection_
MonitorElement * meTrack3DposRes_[3]
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MonitorElement * meEndcapTruePAsP_
const double trackweightTh_
MonitorElement * meBarrelTruePAsP_
void addTrack(unsigned int iev, double twos, double wt)
MonitorElement * meEndcapTrueKNoPID_
double closest_vertex_distance_z
MonitorElement * meTrackPullLowPTot_
MonitorElement * meBarrelTruePiNoPID_
MonitorElement * meDeltaZfakefake_
MonitorElement * meBarrelTruePiAsP_
const reco::SimToRecoCollection * s2r_
MonitorElement * meBarrelTrueKAsK_
static constexpr float c_cm_ns
edm::EDGetTokenT< edm::ValueMap< float > > tofPiToken_
MonitorElement * meMVATrackPullTot_
MonitorElement * meBarrelTruePAsPi_
Monte Carlo truth information used for tracking validation.
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 * meTrackRes_[3]
Log< level::Warning, false > LogWarning
MonitorElement * meTrackResMassPions_[3]
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_
const double minProbHeavy_
MonitorElement * meTrackResHighP_[3]
MonitorElement * meTrackResMass_[3]
MonitorElement * meBarrelTruePiAsK_
edm::EDGetTokenT< edm::ValueMap< float > > tofPToken_
MonitorElement * meTrackPullHighP_[3]
MonitorElement * mePUvsSplitV_
MonitorElement * meRecVerNumber_
MonitorElement * mePUvsOtherFakeV_
edm::EDGetTokenT< edm::ValueMap< float > > trackMVAQualToken_
MonitorElement * meTrackPullLowP_[3]
edm::EDGetTokenT< edm::ValueMap< float > > pathLengthToken_
MonitorElement * meDeltaTfakereal_
MonitorElement * meDeltaTfakefake_