@@ -334,7 +334,9 @@ class Primary4DVertexValidation : public DQMEDAnalyzer {
334334
335335 // histogram declaration
336336 MonitorElement* meUnAssocTracks_;
337+ MonitorElement* meUnAssocTracksFake_;
337338 MonitorElement* meFractionUnAssocTracks_;
339+ MonitorElement* meFractionUnAssocTracksFake_;
338340 MonitorElement* meTrackEffPtTot_;
339341 MonitorElement* meTrackMatchedTPEffPtTot_;
340342 MonitorElement* meTrackMatchedTPEffPtMtd_;
@@ -383,6 +385,7 @@ class Primary4DVertexValidation : public DQMEDAnalyzer {
383385 MonitorElement* meSimPVTvsZ_;
384386
385387 MonitorElement* meVtxTrackMult_;
388+ MonitorElement* meVtxTrackMultAllVtx_;
386389 MonitorElement* meVtxTrackW_;
387390 MonitorElement* meVtxTrackWnt_;
388391 MonitorElement* meVtxTrackRecLVMult_;
@@ -590,7 +593,10 @@ void Primary4DVertexValidation::bookHistograms(DQMStore::IBooker& ibook,
590593 ibook.setCurrentFolder (folder_);
591594 // --- histograms booking
592595 meUnAssocTracks_ = ibook.book1D (" UnAssocTracks" , " Unassociated tracks" , 160 , 0.5 , 4.5 );
596+ meUnAssocTracksFake_ = ibook.book1D (" UnAssocTracksFake" , " Unassociated fake tracks" , 160 , 0.5 , 4.5 );
593597 meFractionUnAssocTracks_ = ibook.book1D (" FractionUnAssocTracks" , " Fraction Unassociated tracks" , 160 , 0.0 , 1 .);
598+ meFractionUnAssocTracksFake_ =
599+ ibook.book1D (" FractionUnAssocTracksFake" , " Fraction Unassociated fake tracks" , 160 , 0.0 , 1 .);
594600 meTrackEffPtTot_ = ibook.book1D (" EffPtTot" , " Pt of tracks associated to LV; track pt [GeV] " , 110 , 0 ., 11 .);
595601 meTrackEffEtaTot_ = ibook.book1D (" EffEtaTot" , " Eta of tracks associated to LV; track eta " , 66 , 0 ., 3.3 );
596602 meTrackMatchedTPEffPtTot_ =
@@ -727,6 +733,7 @@ void Primary4DVertexValidation::bookHistograms(DQMStore::IBooker& ibook,
727733 meSimPVTvsZ_ = ibook.bookProfile (" simPVTvsZ" , " PV Time vs Z" , 30 , -15 ., 15 ., 30 , -0.75 , 0.75 );
728734
729735 meVtxTrackMult_ = ibook.book1D (" VtxTrackMult" , " Log10(Vertex track multiplicity)" , 80 , 0.5 , 2.5 );
736+ meVtxTrackMultAllVtx_ = ibook.book1D (" VtxTrackMultAllVtx" , " Log10(Vertex track multiplicity all vtx)" , 80 , 0.5 , 2.5 );
730737 meVtxTrackW_ = ibook.book1D (" VtxTrackW" , " Vertex track weight (all)" , 50 , 0 ., 1 .);
731738 meVtxTrackWnt_ = ibook.book1D (" VtxTrackWnt" , " Vertex track Wnt" , 50 , 0 ., 1 .);
732739 meVtxTrackRecLVMult_ =
@@ -2095,6 +2102,7 @@ void Primary4DVertexValidation::analyze(const edm::Event& iEvent, const edm::Eve
20952102 std::vector<reco::TransientTrack>&& seltks = theTrackFilter->select (t_tks);
20962103
20972104 int unassociatedCount = 0 ;
2105+ int unassociatedCountFake = 0 ;
20982106 for (std::vector<reco::TransientTrack>::const_iterator itk = seltks.begin (); itk != seltks.end (); itk++) {
20992107 reco::TrackBaseRef trackref = (*itk).trackBaseRef ();
21002108 bool isAssociated = false ;
@@ -2112,12 +2120,19 @@ void Primary4DVertexValidation::analyze(const edm::Event& iEvent, const edm::Eve
21122120
21132121 if (!isAssociated) {
21142122 unassociatedCount++;
2123+ auto found = r2s_->find (trackref);
2124+ if (found == r2s_->end ())
2125+ unassociatedCountFake++;
21152126 }
21162127 }
21172128 double fraction = double (unassociatedCount) / (seltks.size ());
21182129 meUnAssocTracks_->Fill (log10 (unassociatedCount));
21192130 meFractionUnAssocTracks_->Fill (fraction);
21202131
2132+ double fractionFake = double (unassociatedCountFake) / (seltks.size ());
2133+ meUnAssocTracksFake_->Fill (log10 (unassociatedCountFake));
2134+ meFractionUnAssocTracksFake_->Fill (fractionFake);
2135+
21212136 // Loop on tracks
21222137 for (unsigned int iv = 0 ; iv < recopv.size (); iv++) {
21232138 if (recopv.at (iv).ndof > selNdof_) {
@@ -2662,6 +2677,17 @@ void Primary4DVertexValidation::analyze(const edm::Event& iEvent, const edm::Eve
26622677 for (unsigned int ir = 0 ; ir < recopv.size (); ir++) {
26632678 if (recopv.at (ir).ndof > selNdof_) {
26642679 meRecPVZ_->Fill (recopv.at (ir).z );
2680+ const reco::Vertex* vertex = recopv.at (ir).recVtx ;
2681+ unsigned int nt = 0 ;
2682+ for (auto iTrack = vertex->tracks_begin (); iTrack != vertex->tracks_end (); ++iTrack) {
2683+ if (trackAssoc[*iTrack] == -1 ) {
2684+ edm::LogWarning (" mtdTracks" ) << " Extended track not associated" ;
2685+ continue ;
2686+ }
2687+ nt++;
2688+ }
2689+ meVtxTrackMultAllVtx_->Fill (log10 (nt));
2690+
26652691 if (recopv.at (ir).recVtx ->tError () > 0 .) {
26662692 meRecPVT_->Fill (recopv.at (ir).recVtx ->t ());
26672693 }
0 commit comments