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()) {
140 std::map<unsigned int, double>
wos;
141 std::map<unsigned int, double>
wnt;
194 std::vector<simPrimaryVertex>&,
213 static constexpr
double c_ = 2.99792458e1;
214 static constexpr
double mvaL_ = 0.5;
215 static constexpr
double mvaH_ = 0.8;
227 static constexpr
double tol_ = 1.e-4;
369 use_only_charged_tracks_(iConfig.getParameter<
bool>(
"useOnlyChargedTracks")),
370 debug_(iConfig.getUntrackedParameter<
bool>(
"debug")),
371 optionalPlots_(iConfig.getUntrackedParameter<
bool>(
"optionalPlots")),
372 minProbHeavy_(iConfig.getParameter<double>(
"minProbHeavy")),
373 trackweightTh_(iConfig.getParameter<double>(
"trackweightTh")),
374 mvaTh_(iConfig.getParameter<double>(
"mvaTh")),
375 lineDensityPar_(iConfig.getParameter<
std::
vector<double>>(
"lineDensityPar")) {
417 ibook.
book1D(
"MVAMatchedEffPtTot",
"Pt of tracks associated to LV matched to TP; track pt [GeV] ", 110, 0., 11.);
419 "MVAMatchedEffPtMtd",
"Pt of tracks associated to LV matched to TP with time; track pt [GeV] ", 110, 0., 11.);
421 ibook.
book1D(
"MVAMatchedEffEtaTot",
"Pt of tracks associated to LV matched to TP; track eta ", 66, 0., 3.3);
423 "MVAMatchedEffEtaMtd",
"Pt of tracks associated to LV matched to TP with time; track eta ", 66, 0., 3.3);
425 "MVATrackRes",
"t_{rec} - t_{sim} for tracks from LV MVA sel.; t_{rec} - t_{sim} [ns] ", 120, -0.15, 0.15);
426 meTrackResTot_ = ibook.
book1D(
"TrackRes",
"t_{rec} - t_{sim} for tracks; t_{rec} - t_{sim} [ns] ", 120, -0.15, 0.15);
428 "TrackRes-LowMVA",
"t_{rec} - t_{sim} for tracks with MVA < 0.5; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
430 "TrackRes-MediumMVA",
"t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
432 "TrackRes-HighMVA",
"t_{rec} - t_{sim} for tracks with MVA > 0.8; t_{rec} - t_{sim} [ns] ", 100, -1., 1.);
435 "TrackResMass-LowMVA",
"t_{rec} - t_{est} for tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ", 100, -1., 1.);
437 "t_{rec} - t_{est} for tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
442 "TrackResMass-HighMVA",
"t_{rec} - t_{est} for tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ", 100, -1., 1.);
444 "TrackResMassTrue-LowMVA",
"t_{est} - t_{sim} for tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ", 100, -1., 1.);
446 "t_{est} - t_{sim} for tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
451 "t_{est} - t_{sim} for tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
457 ibook.
book1D(
"MVATrackPull",
"Pull for tracks from LV MAV sel.; (t_{rec}-t_{sim})/#sigma_{t}", 50, -5., 5.);
458 meTrackPullTot_ = ibook.
book1D(
"TrackPull",
"Pull for tracks; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
460 ibook.
book1D(
"TrackPull-LowMVA",
"Pull for tracks with MVA < 0.5; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
462 "TrackPull-MediumMVA",
"Pull for tracks with 0.5 < MVA < 0.8; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
464 ibook.
book1D(
"TrackPull-HighMVA",
"Pull for tracks with MVA > 0.8; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
466 "MVATrackZposResTot",
"Z_{PCA} - Z_{sim} for tracks from LV MVA sel.;Z_{PCA} - Z_{sim} [cm] ", 50, -0.1, 0.1);
468 ibook.
book1D(
"TrackZposResTot",
"Z_{PCA} - Z_{sim} for tracks;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
470 "TrackZposRes-LowMVA",
"Z_{PCA} - Z_{sim} for tracks with MVA < 0.5;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
472 "Z_{PCA} - Z_{sim} for tracks with 0.5 < MVA < 0.8 ;Z_{PCA} - Z_{sim} [cm] ",
477 "TrackZposRes-HighMVA",
"Z_{PCA} - Z_{sim} for tracks with MVA > 0.8 ;Z_{PCA} - Z_{sim} [cm] ", 50, -0.5, 0.5);
479 ibook.
book1D(
"Track3DposRes-LowMVA",
480 "3dPos_{PCA} - 3dPos_{sim} for tracks with MVA < 0.5 ;3dPos_{PCA} - 3dPos_{sim} [cm] ",
485 ibook.
book1D(
"Track3DposRes-MediumMVA",
486 "3dPos_{PCA} - 3dPos_{sim} for tracks with 0.5 < MVA < 0.8 ;3dPos_{PCA} - 3dPos_{sim} [cm] ",
491 ibook.
book1D(
"Track3DposRes-HighMVA",
492 "3dPos_{PCA} - 3dPos_{sim} for tracks with MVA > 0.8;3dPos_{PCA} - 3dPos_{sim} [cm] ",
496 meTimeRes_ = ibook.
book1D(
"TimeRes",
"t_{rec} - t_{sim} ;t_{rec} - t_{sim} [ns] ", 40, -0.2, 0.2);
497 meTimePull_ = ibook.
book1D(
"TimePull",
"Pull; t_{rec} - t_{sim}/#sigma_{t rec}", 100, -10., 10.);
499 ibook.
book1D(
"TimeSignalRes",
"t_{rec} - t_{sim} for signal ;t_{rec} - t_{sim} [ns] ", 40, -0.2, 0.2);
501 ibook.
book1D(
"TimeSignalPull",
"Pull for signal; t_{rec} - t_{sim}/#sigma_{t rec}", 100, -10., 10.);
503 ibook.
bookProfile(
"PUvsReal",
"#PU vertices vs #real matched vertices;#PU;#real ", 100, 0, 300, 100, 0, 200);
505 "PUvsOtherFake",
"#PU vertices vs #other fake matched vertices;#PU;#other fake ", 100, 0, 300, 100, 0, 20);
507 ibook.
bookProfile(
"PUvsSplit",
"#PU vertices vs #split matched vertices;#PU;#split ", 100, 0, 300, 100, 0, 20);
508 meMatchQual_ = ibook.
book1D(
"MatchQuality",
"RECO-SIM vertex match quality; ", 8, 0, 8.);
512 meDeltaTrealreal_ = ibook.
book1D(
"DeltaTrealreal",
"#Delta T real-real; |#Delta T (r-r)| [sigma]", 60, 0., 30.);
513 meDeltaTfakefake_ = ibook.
book1D(
"DeltaTfakefake",
"#Delta T fake-fake; |#Delta T (f-f)| [sigma]", 60, 0., 30.);
514 meDeltaTfakereal_ = ibook.
book1D(
"DeltaTfakereal",
"#Delta T fake-real; |#Delta T (f-r)| [sigma]", 60, 0., 30.);
517 "RecoPosInSimCollection",
"Sim signal vertex index associated to Reco signal vertex; Sim PV index", 200, 0, 200);
519 ibook.
book1D(
"RecoPosInRecoOrigCollection",
"Reco signal index in OrigCollection; Reco index", 200, 0, 200);
521 ibook.
book1D(
"SimPosInSimOrigCollection",
"Sim signal index in OrigCollection; Sim index", 200, 0, 200);
524 ibook.
book1D(
"RecoPVPosSignal",
"Position in reco collection of PV associated to sim signal", 200, 0, 200);
526 ibook.
book1D(
"RecoPVPosSignalNotHighestPt",
527 "Position in reco collection of PV associated to sim signal not highest Pt",
532 ibook.
book1D(
"RecoVtxVsLineDensity",
"#Reco vertices/mm/event; line density [#vtx/mm/event]", 160, 0., 4.);
533 meRecVerNumber_ = ibook.
book1D(
"RecVerNumber",
"RECO Vertex Number: Number of vertices", 50, 0, 250);
534 meRecPVZ_ = ibook.
book1D(
"recPVZ",
"Weighted #Rec vertices/mm", 400, -20., 20.);
535 meRecPVT_ = ibook.
book1D(
"recPVT",
"#Rec vertices/10 ps", 200, -1., 1.);
536 meSimPVZ_ = ibook.
book1D(
"simPVZ",
"Weighted #Sim vertices/mm", 400, -20., 20.);
540 "TrackResLowP",
"t_{rec} - t_{sim} for tracks with p < 2 GeV; t_{rec} - t_{sim} [ns] ", 70, -0.15, 0.15);
542 ibook.
book1D(
"TrackResLowP-LowMVA",
543 "t_{rec} - t_{sim} for tracks with MVA < 0.5 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
548 ibook.
book1D(
"TrackResLowP-MediumMVA",
549 "t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
554 ibook.
book1D(
"TrackResLowP-HighMVA",
555 "t_{rec} - t_{sim} for tracks with MVA > 0.8 and p < 2 GeV; t_{rec} - t_{sim} [ns] ",
560 "TrackResHighP",
"t_{rec} - t_{sim} for tracks with p > 2 GeV; t_{rec} - t_{sim} [ns] ", 70, -0.15, 0.15);
562 ibook.
book1D(
"TrackResHighP-LowMVA",
563 "t_{rec} - t_{sim} for tracks with MVA < 0.5 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
568 ibook.
book1D(
"TrackResHighP-MediumMVA",
569 "t_{rec} - t_{sim} for tracks with 0.5 < MVA < 0.8 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
574 ibook.
book1D(
"TrackResHighP-HighMVA",
575 "t_{rec} - t_{sim} for tracks with MVA > 0.8 and p > 2 GeV; t_{rec} - t_{sim} [ns] ",
580 ibook.
book1D(
"TrackPullLowP",
"Pull for tracks with p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
582 "Pull for tracks with MVA < 0.5 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
587 "Pull for tracks with 0.5 < MVA < 0.8 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
592 "Pull for tracks with MVA > 0.8 and p < 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
597 ibook.
book1D(
"TrackPullHighP",
"Pull for tracks with p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}", 100, -10., 10.);
599 "Pull for tracks with MVA < 0.5 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
604 ibook.
book1D(
"TrackPullHighP-MediumMVA",
605 "Pull for tracks with 0.5 < MVA < 0.8 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
610 "Pull for tracks with MVA > 0.8 and p > 2 GeV; (t_{rec}-t_{sim})/#sigma_{t}",
616 ibook.
book1D(
"TrackResMass-Protons-LowMVA",
617 "t_{rec} - t_{est} for proton tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ",
622 ibook.
book1D(
"TrackResMass-Protons-MediumMVA",
623 "t_{rec} - t_{est} for proton tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
628 ibook.
book1D(
"TrackResMass-Protons-HighMVA",
629 "t_{rec} - t_{est} for proton tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ",
634 ibook.
book1D(
"TrackResMassTrue-Protons-LowMVA",
635 "t_{est} - t_{sim} for proton tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ",
640 ibook.
book1D(
"TrackResMassTrue-Protons-MediumMVA",
641 "t_{est} - t_{sim} for proton tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
646 ibook.
book1D(
"TrackResMassTrue-Protons-HighMVA",
647 "t_{est} - t_{sim} for proton tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
653 "t_{rec} - t_{est} for pion tracks with MVA < 0.5; t_{rec} - t_{est} [ns] ",
658 ibook.
book1D(
"TrackResMass-Pions-MediumMVA",
659 "t_{rec} - t_{est} for pion tracks with 0.5 < MVA < 0.8; t_{rec} - t_{est} [ns] ",
664 "t_{rec} - t_{est} for pion tracks with MVA > 0.8; t_{rec} - t_{est} [ns] ",
669 ibook.
book1D(
"TrackResMassTrue-Pions-LowMVA",
670 "t_{est} - t_{sim} for pion tracks with MVA < 0.5; t_{est} - t_{sim} [ns] ",
675 ibook.
book1D(
"TrackResMassTrue-Pions-MediumMVA",
676 "t_{est} - t_{sim} for pion tracks with 0.5 < MVA < 0.8; t_{est} - t_{sim} [ns] ",
681 ibook.
book1D(
"TrackResMassTrue-Pions-HighMVA",
682 "t_{est} - t_{sim} for pion tracks with MVA > 0.8; t_{est} - t_{sim} [ns] ",
688 meBarrelPIDp_ = ibook.
book1D(
"BarrelPIDp",
"PID track MTD momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
689 meEndcapPIDp_ = ibook.
book1D(
"EndcapPIDp",
"PID track with MTD momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
698 ibook.
book1D(
"BarrelTruePiNoPID",
"True pi NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
700 ibook.
book1D(
"BarrelTrueKNoPID",
"True k NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
702 ibook.
book1D(
"BarrelTruePNoPID",
"True p NoPID momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
704 ibook.
book1D(
"EndcapTruePiNoPID",
"True NoPIDpi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
706 ibook.
book1D(
"EndcapTrueKNoPID",
"True k NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
708 ibook.
book1D(
"EndcapTruePNoPID",
"True p NoPID momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
711 ibook.
book1D(
"BarrelTruePiAsPi",
"True pi as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
713 ibook.
book1D(
"BarrelTruePiAsK",
"True pi as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
715 ibook.
book1D(
"BarrelTruePiAsP",
"True pi as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
717 ibook.
book1D(
"EndcapTruePiAsPi",
"True pi as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
719 ibook.
book1D(
"EndcapTruePiAsK",
"True pi as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
721 ibook.
book1D(
"EndcapTruePiAsP",
"True pi as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
724 ibook.
book1D(
"BarrelTrueKAsPi",
"True k as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
725 meBarrelTrueKAsK_ = ibook.
book1D(
"BarrelTrueKAsK",
"True k as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
726 meBarrelTrueKAsP_ = ibook.
book1D(
"BarrelTrueKAsP",
"True k as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
728 ibook.
book1D(
"EndcapTrueKAsPi",
"True k as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
729 meEndcapTrueKAsK_ = ibook.
book1D(
"EndcapTrueKAsK",
"True k as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
730 meEndcapTrueKAsP_ = ibook.
book1D(
"EndcapTrueKAsP",
"True k as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
733 ibook.
book1D(
"BarrelTruePAsPi",
"True p as pi momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
734 meBarrelTruePAsK_ = ibook.
book1D(
"BarrelTruePAsK",
"True p as k momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
735 meBarrelTruePAsP_ = ibook.
book1D(
"BarrelTruePAsP",
"True p as p momentum spectrum, |eta| < 1.5;p [GeV]", 25, 0., 10.);
737 ibook.
book1D(
"EndcapTruePAsPi",
"True p as pi momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
738 meEndcapTruePAsK_ = ibook.
book1D(
"EndcapTruePAsK",
"True p as k momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
739 meEndcapTruePAsP_ = ibook.
book1D(
"EndcapTruePAsP",
"True p as p momentum spectrum, |eta| > 1.6;p [GeV]", 25, 0., 10.);
750 for (
const auto&
tp :
found->val) {
751 if (
tp.first->eventId().bunchCrossing() == 0 &&
tp.first->eventId().event() == 0)
768 for (
const auto&
tp :
found->val) {
769 if (std::find_if(vsim->daughterTracks_begin(), vsim->daughterTracks_end(), [&](
const TrackingParticleRef& vtp) {
770 return tp.first == vtp;
771 }) != vsim->daughterTracks_end())
780 if (
time > 0 && pathlength > 0 &&
mass > 0) {
781 double gammasq = 1. + momentum * momentum / (
mass *
mass);
783 double t_est =
time - (pathlength /
v);
815 std::vector<Primary4DVertexValidation::simPrimaryVertex> simpv;
816 int current_event = -1;
818 for (TrackingVertexCollection::const_iterator
v = tVC->begin();
v != tVC->end(); ++
v) {
820 if (
v->eventId().bunchCrossing() != 0)
822 if (
v->eventId().event() != current_event) {
823 current_event =
v->eventId().event();
833 sv.eventId =
v->eventId();
835 sv.OriginalIndex =
s;
839 assert((**iTrack).eventId().bunchCrossing() == 0);
842 for (std::vector<simPrimaryVertex>::iterator
v0 = simpv.begin();
v0 != simpv.end();
v0++) {
857 auto momentum = (*(*iTP)).momentum();
858 const reco::Track* matched_best_reco_track =
nullptr;
859 double match_quality = -1;
863 matched_best_reco_track = (*s2r_)[*iTP][0].first.get();
864 match_quality = (*s2r_)[*iTP][0].second;
867 vp->
ptot.setPx(vp->
ptot.x() + momentum.x());
868 vp->
ptot.setPy(vp->
ptot.y() + momentum.y());
869 vp->
ptot.setPz(vp->
ptot.z() + momentum.z());
870 vp->
ptot.setE(vp->
ptot.e() + (**iTP).energy());
871 vp->
ptsq += ((**iTP).pt() * (**iTP).pt());
873 if (matched_best_reco_track) {
893 auto prev_z = simpv.back().z;
895 vsim.closest_vertex_distance_z =
std::abs(vsim.z - prev_z);
899 for (std::vector<simPrimaryVertex>::iterator vsim = simpv.begin(); vsim != simpv.end(); vsim++) {
900 std::vector<simPrimaryVertex>::iterator vsim2 = vsim;
902 for (; vsim2 != simpv.end(); vsim2++) {
905 vsim->closest_vertex_distance_z =
std::min(vsim->closest_vertex_distance_z,
distance);
906 vsim2->closest_vertex_distance_z =
std::min(vsim2->closest_vertex_distance_z,
distance);
916 std::vector<Primary4DVertexValidation::recoPrimaryVertex> recopv;
918 for (
auto v = tVC->begin();
v != tVC->end(); ++
v) {
923 if (
v->isFake() || !
v->isValid())
930 sv.OriginalIndex =
r;
932 recopv.push_back(
sv);
936 for (
auto iTrack =
v->tracks_begin(); iTrack !=
v->tracks_end(); ++iTrack) {
937 auto momentum = (*(*iTrack)).innerMomentum();
938 if (momentum.mag2() == 0)
939 momentum = (*(*iTrack)).momentum();
941 vp->
ptsq += (momentum.perp2());
958 auto prev_z = recopv.back().z;
960 vreco.closest_vertex_distance_z =
std::abs(vreco.z - prev_z);
963 for (std::vector<recoPrimaryVertex>::iterator vreco = recopv.begin(); vreco != recopv.end(); vreco++) {
964 std::vector<recoPrimaryVertex>::iterator vreco2 = vreco;
966 for (; vreco2 != recopv.end(); vreco2++) {
969 vreco->closest_vertex_distance_z =
std::min(vreco->closest_vertex_distance_z,
distance);
970 vreco2->closest_vertex_distance_z =
std::min(vreco2->closest_vertex_distance_z,
distance);
978 std::vector<simPrimaryVertex>& simpv,
982 for (
auto vv : simpv) {
986 for (
auto rv : recopv) {
991 for (
unsigned int iv = 0;
iv < recopv.size();
iv++) {
994 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1001 for (
auto iTrack =
vertex->tracks_begin(); iTrack !=
vertex->tracks_end(); ++iTrack) {
1002 double pt = (*iTrack)->pt();
1006 if (MVA[(*iTrack)] <
mvaTh_)
1010 if (tp_info !=
nullptr) {
1011 double dz2_beam =
pow((*BS).BeamWidthX() *
cos((*iTrack)->phi()) /
tan((*iTrack)->theta()), 2) +
1012 pow((*BS).BeamWidthY() *
sin((*iTrack)->phi()) /
tan((*iTrack)->theta()), 2);
1013 double dz2 =
pow((*iTrack)->dzError(), 2) + dz2_beam +
1015 wos =
vertex->trackWeight(*iTrack) / dz2;
1018 if (sigmat0[(*iTrack)] > 0) {
1019 double sigmaZ = (*BS).sigmaZ();
1021 wos = wos / erf(sigmat0[(*iTrack)] / sigmaT);
1023 simpv.at(
iev).addTrack(
iv, wos, wnt);
1024 recopv.at(
iv).addTrack(
iev, wos, wnt);
1032 if ((evwos > 0) && (evwos > recopv.at(
iv).maxwos) && (evnt > 1)) {
1033 recopv.at(
iv).wosmatch =
iev;
1034 recopv.at(
iv).maxwos = evwos;
1035 recopv.at(
iv).maxwosnt = evnt;
1037 simpv.at(
iev).wos_dominated_recv.push_back(
iv);
1038 simpv.at(
iev).nwosmatch++;
1042 if ((evnt > 0) && (evwnt > recopv.at(
iv).maxwnt)) {
1043 recopv.at(
iv).wntmatch =
iev;
1044 recopv.at(
iv).maxwnt = evwnt;
1051 for (
auto& vrec : recopv) {
1053 vrec.matchQuality = 0;
1055 unsigned int iev = 0;
1056 for (
auto& vv : simpv) {
1059 edm::LogPrint(
"Primary4DVertexValidation") <<
"wos_dominated_recv.size: " << vv.wos_dominated_recv.size();
1061 for (
unsigned int i = 0;
i < vv.wos_dominated_recv.size();
i++) {
1062 auto recov = vv.wos_dominated_recv.at(
i);
1065 <<
"index of reco vertex: " << recov <<
" that has a wos: " << vv.wos.at(recov) <<
" at position " <<
i;
1069 vv.matchQuality = 0;
1073 for (
unsigned int rank = 1; rank <
maxRank_; rank++) {
1074 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1077 if (simpv.at(
iev).nwosmatch == 0)
1079 if (simpv.at(
iev).nwosmatch > rank)
1082 for (
unsigned int k = 0;
k < simpv.at(
iev).wos_dominated_recv.size();
k++) {
1083 unsigned int rec = simpv.at(
iev).wos_dominated_recv.at(
k);
1084 auto vrec = recopv.at(rec);
1095 recopv.at(
iv).sim =
iev;
1096 simpv.at(
iev).rec =
iv;
1097 recopv.at(
iv).matchQuality = rank;
1098 simpv.at(
iev).matchQuality = rank;
1105 unsigned int ntry = 0;
1107 unsigned nmatch = 0;
1108 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1113 for (
auto rv : simpv.at(
iev).wos) {
1114 if ((rec ==
NOT_MATCHED) || (rv.second > simpv.at(
iev).wos.at(rec))) {
1120 for (
auto rv : simpv.at(
iev).wnt) {
1121 if ((rec ==
NOT_MATCHED) || (rv.second > simpv.at(
iev).wnt.at(rec))) {
1134 for (
auto sv : recopv.at(rec).wos) {
1137 if ((rec2sim ==
NOT_MATCHED) || (
sv.second > recopv.at(rec).wos.at(rec2sim))) {
1141 if (
iev == rec2sim) {
1143 recopv.at(rec).sim =
iev;
1144 recopv.at(rec).matchQuality =
maxRank_;
1145 simpv.at(
iev).rec = rec;
1162 using namespace reco;
1164 std::vector<float> pileUpInfo_z;
1169 for (
auto const& pu_info : *puinfoH.
product()) {
1170 if (pu_info.getBunchCrossing() == 0) {
1171 pileUpInfo_z = pu_info.getPU_zpositions();
1180 edm::LogWarning(
"Primary4DVertexValidation") <<
"TPCollectionH is not valid";
1185 edm::LogWarning(
"Primary4DVertexValidation") <<
"TVCollectionH is not valid";
1192 edm::LogWarning(
"Primary4DVertexValidation") <<
"simToRecoH is not valid";
1199 edm::LogWarning(
"Primary4DVertexValidation") <<
"recoToSimH is not valid";
1204 edm::LogWarning(
"Primary4DVertexValidation") <<
"BeamSpotH is not valid";
1206 std::vector<simPrimaryVertex> simpv;
1209 bool signal_is_highest_pt =
1211 return lhs.
ptsq < rhs.ptsq;
1212 }) == simpv.begin();
1214 std::vector<recoPrimaryVertex> recopv;
1218 edm::LogWarning(
"Primary4DVertexValidation") <<
"recVtxs is not valid";
1238 matchReco2Sim(recopv, simpv, sigmat0Safe, mtdQualMVA, BeamSpotH);
1241 for (
unsigned int iv = 0;
iv < recopv.size();
iv++) {
1244 for (
unsigned int iev = 0;
iev < simpv.size();
iev++) {
1245 auto vsim = simpv.at(
iev).sim_vertex;
1247 bool selectedVtxMatching = recopv.at(
iv).sim ==
iev && simpv.at(
iev).rec ==
iv &&
1248 simpv.at(
iev).eventId.bunchCrossing() == 0 && simpv.at(
iev).eventId.event() == 0 &&
1249 recopv.at(
iv).OriginalIndex == 0;
1250 if (selectedVtxMatching && !recopv.at(
iv).is_signal()) {
1252 <<
"Reco vtx leading match inconsistent: BX/ID " << simpv.at(
iev).eventId.bunchCrossing() <<
" " 1253 << simpv.at(
iev).eventId.event();
1255 double vzsim = simpv.at(
iev).z;
1258 for (
auto iTrack =
vertex->tracks_begin(); iTrack !=
vertex->tracks_end(); ++iTrack) {
1259 if (trackAssoc[*iTrack] == -1) {
1260 LogTrace(
"mtdTracks") <<
"Extended track not associated";
1269 bool selectRecoTrk =
mvaRecSel(**iTrack, *
vertex, t0Safe[*iTrack], sigmat0Safe[*iTrack]);
1270 if (selectedVtxMatching && selectRecoTrk) {
1278 if (tp_info !=
nullptr) {
1279 double mass = (*tp_info)->mass();
1280 double tsim = (*tp_info)->parentVertex()->position().t() *
simUnit_;
1283 double xsim = (*tp_info)->parentVertex()->position().x();
1284 double ysim = (*tp_info)->parentVertex()->position().y();
1285 double zsim = (*tp_info)->parentVertex()->position().z();
1286 double xPCA = (*iTrack)->vx();
1287 double yPCA = (*iTrack)->vy();
1288 double zPCA = (*iTrack)->vz();
1290 double dZ = zPCA - zsim;
1291 double d3D =
std::sqrt((xPCA - xsim) * (xPCA - xsim) + (yPCA - ysim) * (yPCA - ysim) +
dZ *
dZ);
1293 if ((xPCA - xsim) * ((*tp_info)->px()) + (yPCA - ysim) * ((*tp_info)->py()) +
dZ * ((*tp_info)->pz()) < 0.) {
1297 bool selectTP =
mvaTPSel(**tp_info);
1299 if (selectedVtxMatching && selectRecoTrk && selectTP) {
1307 if (sigmat0Safe[*iTrack] == -1)
1310 if (selectedVtxMatching && selectRecoTrk && selectTP) {
1318 unsigned int noPIDtype = 0;
1319 if (probPi[*iTrack] == -1) {
1321 }
else if (
isnan(probPi[*iTrack])) {
1323 }
else if (probPi[*iTrack] == 1 && probK[*iTrack] == 0 && probP[*iTrack] == 0) {
1326 bool noPID = noPIDtype > 0;
1328 bool isK = !noPID && !isPi && probK[*iTrack] > probP[*iTrack];
1329 bool isP = !noPID && !isPi && !isK;
1331 if ((isPi &&
std::abs(tMtd[*iTrack] - tofPi[*iTrack] - t0Pid[*iTrack]) >
tol_) ||
1332 (isK &&
std::abs(tMtd[*iTrack] - tofK[*iTrack] - t0Pid[*iTrack]) >
tol_) ||
1333 (isP &&
std::abs(tMtd[*iTrack] - tofP[*iTrack] - t0Pid[*iTrack]) >
tol_)) {
1335 <<
"No match between mass hyp. and time: " <<
std::abs((*tp_info)->pdgId()) <<
" mass hyp pi/k/p " 1336 << isPi <<
" " << isK <<
" " << isP <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " << t0Safe[*iTrack]
1337 <<
" tMtd - tof pi/K/p " << tMtd[*iTrack] - tofPi[*iTrack] <<
" " << tMtd[*iTrack] - tofK[*iTrack]
1338 <<
" " << tMtd[*iTrack] - tofP[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack]
1339 <<
" " << probP[*iTrack];
1345 if (
std::abs((*tp_info)->pdgId()) == 211) {
1356 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1357 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1360 }
else if (
std::abs((*tp_info)->pdgId()) == 321) {
1371 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1372 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1375 }
else if (
std::abs((*tp_info)->pdgId()) == 2212) {
1386 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1387 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1394 if (
std::abs((*tp_info)->pdgId()) == 211) {
1405 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1406 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1409 }
else if (
std::abs((*tp_info)->pdgId()) == 321) {
1420 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1421 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1424 }
else if (
std::abs((*tp_info)->pdgId()) == 2212) {
1435 <<
"No PID class: " <<
std::abs((*tp_info)->pdgId()) <<
" t0/t0safe " << t0Pid[*iTrack] <<
" " 1436 << t0Safe[*iTrack] <<
" Prob pi/K/p " << probPi[*iTrack] <<
" " << probK[*iTrack] <<
" " 1445 if ((*iTrack)->p() <= 2) {
1453 if (mtdQualMVA[(*iTrack)] <
mvaL_) {
1464 if ((*iTrack)->p() <= 2) {
1467 }
else if ((*iTrack)->p() > 2) {
1473 if (
std::abs((*tp_info)->pdgId()) == 2212) {
1476 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
1482 }
else if (mtdQualMVA[(*iTrack)] >
mvaL_ && mtdQualMVA[(*iTrack)] <
mvaH_) {
1493 if ((*iTrack)->p() <= 2) {
1496 }
else if ((*iTrack)->p() > 2) {
1502 if (
std::abs((*tp_info)->pdgId()) == 2212) {
1505 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
1511 }
else if (mtdQualMVA[(*iTrack)] >
mvaH_) {
1522 if ((*iTrack)->p() <= 2) {
1525 }
else if ((*iTrack)->p() > 2) {
1531 if (
std::abs((*tp_info)->pdgId()) == 2212) {
1534 }
else if (
std::abs((*tp_info)->pdgId()) == 211) {
1550 auto puLineDensity = [&](
double z) {
1557 for (
unsigned int ir = 0; ir < recopv.size(); ir++) {
1559 meRecPVZ_->
Fill(recopv.at(ir).z, 1. / puLineDensity(recopv.at(ir).z));
1560 if (recopv.at(ir).recVtx->tError() > 0.) {
1564 edm::LogPrint(
"Primary4DVertexValidation") <<
"************* IR: " << ir;
1566 <<
"z: " << recopv.at(ir).z <<
" corresponding to line density: " << puLineDensity(recopv.at(ir).z);
1567 edm::LogPrint(
"Primary4DVertexValidation") <<
"is_real: " << recopv.at(ir).is_real();
1568 edm::LogPrint(
"Primary4DVertexValidation") <<
"is_fake: " << recopv.at(ir).is_fake();
1569 edm::LogPrint(
"Primary4DVertexValidation") <<
"is_signal: " << recopv.at(ir).is_signal();
1570 edm::LogPrint(
"Primary4DVertexValidation") <<
"split_from: " << recopv.at(ir).split_from();
1571 edm::LogPrint(
"Primary4DVertexValidation") <<
"other fake: " << recopv.at(ir).other_fake();
1573 if (recopv.at(ir).is_real())
1575 if (recopv.at(ir).is_fake())
1577 if (recopv.at(ir).other_fake())
1579 if (recopv.at(ir).split_from() != -1) {
1585 edm::LogPrint(
"Primary4DVertexValidation") <<
"is_real: " << real;
1586 edm::LogPrint(
"Primary4DVertexValidation") <<
"is_fake: " << fake;
1588 edm::LogPrint(
"Primary4DVertexValidation") <<
"other fake: " << other_fake;
1592 for (
unsigned int is = 0; is < simpv.size(); is++) {
1593 meSimPVZ_->
Fill(simpv.at(is).z, 1. / puLineDensity(simpv.at(is).z));
1600 edm::LogPrint(
"Primary4DVertexValidation") <<
"sim vertex: " << is <<
" is not matched with any reco";
1605 for (
unsigned int ir = 0; ir < recopv.size(); ir++) {
1606 if (recopv.at(ir).sim == is && simpv.at(is).rec == ir) {
1616 recopv.at(ir).recVtx->tError());
1622 if (simpv.at(is).eventId.bunchCrossing() == 0 && simpv.at(is).eventId.event() == 0) {
1623 if (!recopv.at(ir).is_signal()) {
1625 <<
"Reco vtx leading match inconsistent: BX/ID " << simpv.at(is).eventId.bunchCrossing() <<
" " 1626 << simpv.at(is).eventId.event();
1629 recopv.at(ir).OriginalIndex);
1630 if (!signal_is_highest_pt) {
1632 recopv.at(ir).OriginalIndex);
1637 edm::LogPrint(
"Primary4DVertexValidation") <<
"*** Matching RECO: " << ir <<
"with SIM: " << is <<
" ***";
1638 edm::LogPrint(
"Primary4DVertexValidation") <<
"Match Quality is " << recopv.at(ir).matchQuality;
1646 for (
unsigned int iv = 0;
iv < recVtxs->size() - 1;
iv++) {
1648 double mindistance_realreal = 1e10;
1650 for (
unsigned int jv =
iv; jv < recVtxs->size(); jv++) {
1651 if ((!(jv ==
iv)) &&
select(recVtxs->at(jv))) {
1652 double dz = recVtxs->at(
iv).z() - recVtxs->at(jv).z();
1653 double dtsigma =
std::sqrt(recVtxs->at(
iv).covariance(3, 3) + recVtxs->at(jv).covariance(3, 3));
1655 ? (recVtxs->at(
iv).t() - recVtxs->at(jv).t()) / dtsigma
1657 if (recopv.at(
iv).is_real() && recopv.at(jv).is_real()) {
1663 mindistance_realreal =
dz;
1665 }
else if (recopv.at(
iv).is_fake() && recopv.at(jv).is_fake()) {
1674 double mindistance_fakereal = 1e10;
1675 double mindistance_realfake = 1e10;
1676 for (
unsigned int jv = 0; jv < recVtxs->size(); jv++) {
1677 if ((!(jv ==
iv)) &&
select(recVtxs->at(jv))) {
1678 double dz = recVtxs->at(
iv).z() - recVtxs->at(jv).z();
1679 double dtsigma =
std::sqrt(recVtxs->at(
iv).covariance(3, 3) + recVtxs->at(jv).covariance(3, 3));
1681 ? (recVtxs->at(
iv).t() - recVtxs->at(jv).t()) / dtsigma
1683 if (recopv.at(
iv).is_fake() && recopv.at(jv).is_real()) {
1689 mindistance_fakereal =
dz;
1693 if (recopv.at(
iv).is_real() && recopv.at(jv).is_fake() && (
std::abs(
dz) <
std::abs(mindistance_realfake))) {
1694 mindistance_realfake =
dz;
1713 ->setComment(
"Association between General and MTD Extended tracks");
1729 desc.add<
bool>(
"useOnlyChargedTracks",
true);
1730 desc.addUntracked<
bool>(
"debug",
false);
1731 desc.addUntracked<
bool>(
"optionalPlots",
false);
1732 desc.add<
double>(
"trackweightTh", 0.5);
1733 desc.add<
double>(
"mvaTh", 0.01);
1734 desc.add<
double>(
"minProbHeavy", 0.75);
1738 std::vector<double> lDP;
1739 lDP.push_back(1.87);
1741 lDP.push_back(42.5);
1742 desc.add<std::vector<double>>(
"lineDensityPar", lDP);
1743 descriptions.
add(
"vertices4DValid",
desc);
1748 if (
tp.status() != 1) {
1758 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_
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_
HitContainer const *__restrict__ TkSoA const *__restrict__ Quality const *__restrict__ CAHitNtupletGeneratorKernelsGPU::HitToTuple const *__restrict__ int32_t int32_t int iev
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_
Power< A, B >::type pow(const A &a, const B &b)
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_