3131#include " SimDataFormats/Associations/interface/TrackToTrackingParticleAssociator.h"
3232#include " SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h"
3333#include " SimDataFormats/TrackingAnalysis/interface/TrackingVertexContainer.h"
34+
3435#include " TrackingTools/TransientTrack/interface/TransientTrackBuilder.h"
3536#include " TrackingTools/Records/interface/TransientTrackRecord.h"
3637#include " RecoVertex/PrimaryVertexProducer/interface/HITrackFilterForPVFinding.h"
@@ -258,6 +259,7 @@ class Primary4DVertexValidation : public DQMEDAnalyzer {
258259 const bool trkRecSel (const reco::TrackBase&);
259260
260261 // ----------member data ---------------------------
262+
261263 const edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> theTTBToken;
262264 TrackFilterForPVFindingBase* theTrackFilter;
263265 const std::string folder_;
@@ -291,8 +293,7 @@ class Primary4DVertexValidation : public DQMEDAnalyzer {
291293
292294 bool use_only_charged_tracks_;
293295 bool optionalPlots_;
294- bool use3dNoTime_;
295-
296+ bool use3dNoTime_;
296297 const double minProbHeavy_;
297298 const double trackweightTh_;
298299 const double mvaTh_;
@@ -302,7 +303,8 @@ class Primary4DVertexValidation : public DQMEDAnalyzer {
302303 edm::EDGetTokenT<reco::TrackCollection> RecTrackToken_;
303304
304305 edm::EDGetTokenT<std::vector<PileupSummaryInfo>> vecPileupSummaryInfoToken_;
305- edm::EDGetTokenT<reco::TrackCollection> trkToken;
306+
307+ edm::EDGetTokenT<reco::TrackCollection> trkToken;
306308 edm::EDGetTokenT<TrackingParticleCollection> trackingParticleCollectionToken_;
307309 edm::EDGetTokenT<TrackingVertexCollection> trackingVertexCollectionToken_;
308310 edm::EDGetTokenT<reco::SimToRecoCollection> simToRecoAssociationToken_;
@@ -529,7 +531,7 @@ class Primary4DVertexValidation : public DQMEDAnalyzer {
529531// constructors and destructor
530532Primary4DVertexValidation::Primary4DVertexValidation (const edm::ParameterSet& iConfig)
531533 : theTTBToken(esConsumes(edm::ESInputTag(" " , " TransientTrackBuilder" ))),
532- folder_(iConfig.getParameter<std::string>(" folder" )),
534+ folder_(iConfig.getParameter<std::string>(" folder" )),
533535 use_only_charged_tracks_(iConfig.getParameter<bool >(" useOnlyChargedTracks" )),
534536 optionalPlots_(iConfig.getUntrackedParameter<bool >(" optionalPlots" )),
535537 use3dNoTime_(iConfig.getParameter<bool >(" use3dNoTime" )),
@@ -687,11 +689,11 @@ void Primary4DVertexValidation::bookHistograms(DQMStore::IBooker& ibook,
687689 mePUvsRealV_ =
688690 ibook.bookProfile (" PUvsReal" , " #PU vertices vs #real matched vertices;#PU;#real " , 100 , 0 , 300 , 100 , 0 , 200 );
689691 mePUvsFakeV_ =
690- ibook.bookProfile (" PUvsFake" , " #PU vertices vs #fake matched vertices;#PU;#fake " , 100 , 0 , 300 , 300 , 0 , 300 );
692+ ibook.bookProfile (" PUvsFake" , " #PU vertices vs #fake matched vertices;#PU;#fake " , 100 , 0 , 300 , 100 , 0 , 20 );
691693 mePUvsOtherFakeV_ = ibook.bookProfile (
692- " PUvsOtherFake" , " #PU vertices vs #other fake matched vertices;#PU;#other fake " , 100 , 0 , 300 , 300 , 0 , 300 );
694+ " PUvsOtherFake" , " #PU vertices vs #other fake matched vertices;#PU;#other fake " , 100 , 0 , 300 , 100 , 0 , 20 );
693695 mePUvsSplitV_ =
694- ibook.bookProfile (" PUvsSplit" , " #PU vertices vs #split matched vertices;#PU;#split " , 100 , 0 , 300 , 300 , 0 , 300 );
696+ ibook.bookProfile (" PUvsSplit" , " #PU vertices vs #split matched vertices;#PU;#split " , 100 , 0 , 300 , 100 , 0 , 20 );
695697 meMatchQual_ = ibook.book1D (" MatchQuality" , " RECO-SIM vertex match quality; " , 8 , 0 , 8 .);
696698 meDeltaZrealreal_ = ibook.book1D (" DeltaZrealreal" , " #Delta Z real-real; |#Delta Z (r-r)| [cm]" , 100 , 0 , 0.5 );
697699 meDeltaZfakefake_ = ibook.book1D (" DeltaZfakefake" , " #Delta Z fake-fake; |#Delta Z (f-f)| [cm]" , 100 , 0 , 0.5 );
@@ -1494,7 +1496,7 @@ void Primary4DVertexValidation::observablesFromJets(const std::vector<reco::Trac
14941496 fjInputs_.clear ();
14951497 size_t countScale0 = 0 ;
14961498 for (size_t i = 0 ; i < reco_Tracks.size (); i++) {
1497- const auto recotr = reco_Tracks[i];
1499+ const auto & recotr = reco_Tracks[i];
14981500 const auto mass = mass_Tracks[i];
14991501 float scale = 1 .;
15001502 if (recotr.charge () == 0 ) {
@@ -2037,6 +2039,7 @@ void Primary4DVertexValidation::analyze(const edm::Event& iEvent, const edm::Eve
20372039 r2s_ = recoToSimH.product ();
20382040 else
20392041 edm::LogWarning (" Primary4DVertexValidation" ) << " recoToSimH is not valid" ;
2042+
20402043 reco::BeamSpot beamSpot;
20412044 edm::Handle<reco::BeamSpot> BeamSpotH;
20422045 iEvent.getByToken (RecBeamSpotToken_, BeamSpotH);
@@ -2685,7 +2688,6 @@ void Primary4DVertexValidation::analyze(const edm::Event& iEvent, const edm::Eve
26852688 LogTrace (" Primary4DVertexValidation" ) << " is_fake: " << fake;
26862689 LogTrace (" Primary4DVertexValidation" ) << " split_from: " << split;
26872690 LogTrace (" Primary4DVertexValidation" ) << " other fake: " << other_fake;
2688- std::cout<<" Fake: " <<fake<<" Real: " <<real <<" other fake: " <<other_fake<<" split: " <<split<<std::endl;
26892691 mePUvsRealV_->Fill (simpv.size (), real);
26902692 mePUvsFakeV_->Fill (simpv.size (), fake);
26912693 mePUvsOtherFakeV_->Fill (simpv.size (), other_fake);
0 commit comments