From 616a54fb4074d384523a5a5c83b0bc9cdd686495 Mon Sep 17 00:00:00 2001 From: acmbulla Date: Fri, 11 Aug 2023 15:59:00 +0200 Subject: [PATCH] apply code format --- .../interface/TrackToTrackComparisonHists.h | 10 +++- .../src/TrackToTrackComparisonHists.cc | 50 +++++++++++-------- 2 files changed, 36 insertions(+), 24 deletions(-) diff --git a/DQM/TrackingMonitorSource/interface/TrackToTrackComparisonHists.h b/DQM/TrackingMonitorSource/interface/TrackToTrackComparisonHists.h index 0d2064490da7d..be671fbff0397 100644 --- a/DQM/TrackingMonitorSource/interface/TrackToTrackComparisonHists.h +++ b/DQM/TrackingMonitorSource/interface/TrackToTrackComparisonHists.h @@ -72,8 +72,14 @@ class TrackToTrackComparisonHists : public DQMEDAnalyzer { void book_generic_tracks_histos(DQMStore::IBooker& ibooker, generalME& mes, TString label, std::string& dir); void book_matching_tracks_histos(DQMStore::IBooker& ibooker, matchingME& mes, TString label, std::string& dir); - void fill_generic_tracks_histos( - generalME& mes, reco::Track* trk, reco::BeamSpot* bs, reco::Vertex* pv, unsigned int ls, double onlinelumi, double PU, bool requirePlateau = true); + void fill_generic_tracks_histos(generalME& mes, + reco::Track* trk, + reco::BeamSpot* bs, + reco::Vertex* pv, + unsigned int ls, + double onlinelumi, + double PU, + bool requirePlateau = true); void fill_matching_tracks_histos( matchingME& mes, reco::Track* mon, reco::Track* ref, reco::BeamSpot* bs, reco::Vertex* pv); diff --git a/DQM/TrackingMonitorSource/src/TrackToTrackComparisonHists.cc b/DQM/TrackingMonitorSource/src/TrackToTrackComparisonHists.cc index cfe869953b1e5..a9fbef6ec0b5a 100644 --- a/DQM/TrackingMonitorSource/src/TrackToTrackComparisonHists.cc +++ b/DQM/TrackingMonitorSource/src/TrackToTrackComparisonHists.cc @@ -37,7 +37,8 @@ TrackToTrackComparisonHists::TrackToTrackComparisonHists(const edm::ParameterSet monitoredPVToken_ = consumes(iConfig.getParameter("monitoredPrimaryVertices")); referencePVToken_ = consumes(iConfig.getParameter("referencePrimaryVertices")); lumiScalersToken_ = consumes(iConfig.getParameter("scalers")); - onlineMetaDataDigisToken_ = consumes(iConfig.getParameter("onlineMetaDataDigis")); + onlineMetaDataDigisToken_ = + consumes(iConfig.getParameter("onlineMetaDataDigis")); referenceTracksMEs_.label = referenceTrackInputTag_.label(); matchedReferenceTracksMEs_.label = referenceTrackInputTag_.label() + "_matched"; @@ -71,7 +72,6 @@ void TrackToTrackComparisonHists::analyze(const edm::Event& iEvent, const edm::E return; } - // // Get Lumi/LS Info // @@ -87,7 +87,7 @@ void TrackToTrackComparisonHists::analyze(const edm::Event& iEvent, const edm::E if (onlineMetaDataDigisHandle.isValid()) { onlinelumi = onlineMetaDataDigisHandle->instLumi(); PU = onlineMetaDataDigisHandle->avgPileUp(); - } else if ( lumiScalersHandle.isValid() and not lumiScalersHandle->empty() ){ + } else if (lumiScalersHandle.isValid() and not lumiScalersHandle->empty()) { edm::LogError("TrackToTrackComparisonHists") << "onlineMetaDataDigisHandle not found, trying SCAL"; auto const scalit = lumiScalersHandle->begin(); onlinelumi = scalit->instantLumi(); @@ -257,7 +257,8 @@ void TrackToTrackComparisonHists::analyze(const edm::Event& iEvent, const edm::E if (!matched) { nUnmatchedMonitoredTracks++; - fill_generic_tracks_histos(*&unMatchedMonitoredTracksMEs_, &track, &monitoredBS, &monitoredPV, ls, onlinelumi, PU); + fill_generic_tracks_histos( + *&unMatchedMonitoredTracksMEs_, &track, &monitoredBS, &monitoredPV, ls, onlinelumi, PU); (unMatchedMonitoredTracksMEs_.h_dRmin)->Fill(dRmin); (unMatchedMonitoredTracksMEs_.h_dRmin_l)->Fill(dRmin); } @@ -269,7 +270,6 @@ void TrackToTrackComparisonHists::analyze(const edm::Event& iEvent, const edm::E << "Total matched reference tracks: " << nMatchedReferenceTracks << "\n" << "Total monitored tracks: " << nMonitoredTracks << "\n" << "Total unMatched monitored tracks: " << nUnmatchedMonitoredTracks << "\n"; - } void TrackToTrackComparisonHists::bookHistograms(DQMStore::IBooker& ibooker, @@ -297,7 +297,6 @@ void TrackToTrackComparisonHists::bookHistograms(DQMStore::IBooker& ibooker, bookHistos(ibooker, unMatchedMonitoredTracksMEs_, "mon_unMatched", dir); book_matching_tracks_histos(ibooker, matchTracksMEs_, "matches", dir); - } // ------------ method fills 'descriptions' with the allowed parameters for the module ------------ @@ -331,7 +330,6 @@ void TrackToTrackComparisonHists::fillDescriptions(edm::ConfigurationDescription fillHistoPSetDescription(histoPSet); desc.add("histoPSet", histoPSet); - descriptions.add("trackToTrackComparisonHists", desc); } @@ -414,14 +412,17 @@ void TrackToTrackComparisonHists::book_generic_tracks_histos(DQMStore::IBooker& Pt_nbin, Pt_rangeMin, Pt_rangeMax); - + // counts of tracks vs lumi // for this moment, xmin,xmax and binning are hardcoded, maybe in future in a config file! // have to add (declare) this in the .h file as well - (mes.h_onlinelumi) = ibooker.book1D(label + "_onlinelumi", "number of tracks vs onlinelumi", onlinelumi_nbin, onlinelumi_rangeMin, onlinelumi_rangeMax); + (mes.h_onlinelumi) = ibooker.book1D(label + "_onlinelumi", + "number of tracks vs onlinelumi", + onlinelumi_nbin, + onlinelumi_rangeMin, + onlinelumi_rangeMax); (mes.h_ls) = ibooker.book1D(label + "_ls", "number of tracks vs ls", ls_nbin, ls_rangeMin, ls_rangeMax); (mes.h_PU) = ibooker.book1D(label + "_PU", "number of tracks vs PU", PU_nbin, PU_rangeMin, PU_rangeMax); - } void TrackToTrackComparisonHists::book_matching_tracks_histos(DQMStore::IBooker& ibooker, @@ -479,8 +480,14 @@ void TrackToTrackComparisonHists::book_matching_tracks_histos(DQMStore::IBooker& (mes.h_dHits) = ibooker.book1D(label + "_dHits", "#Delta track number of hits", 39, -19.5, 19.5); } -void TrackToTrackComparisonHists::fill_generic_tracks_histos( - generalME& mes, reco::Track* trk, reco::BeamSpot* bs, reco::Vertex* pv, unsigned int ls, double onlinelumi, double PU, bool requirePlateau) { +void TrackToTrackComparisonHists::fill_generic_tracks_histos(generalME& mes, + reco::Track* trk, + reco::BeamSpot* bs, + reco::Vertex* pv, + unsigned int ls, + double onlinelumi, + double PU, + bool requirePlateau) { float pt = trk->pt(); float eta = trk->eta(); float phi = trk->phi(); @@ -508,7 +515,6 @@ void TrackToTrackComparisonHists::fill_generic_tracks_histos( (mes.h_onlinelumi)->Fill(onlinelumi); (mes.h_ls)->Fill(ls); (mes.h_PU)->Fill(PU); - } if (pTOnPlateau || !requirePlateau) { @@ -654,15 +660,15 @@ void TrackToTrackComparisonHists::fillHistoPSetDescription(edm::ParameterSetDesc pset.add("dzRes_rangeMax", 0.05); pset.add("dzRes_nbin", 150); - pset.add("ls_rangeMin",0); - pset.add("ls_rangeMax",3000); - pset.add("ls_nbin",300); + pset.add("ls_rangeMin", 0); + pset.add("ls_rangeMax", 3000); + pset.add("ls_nbin", 300); - pset.add("onlinelumi_rangeMin",0.0); - pset.add("onlinelumi_rangeMax",20000.0); - pset.add("onlinelumi_nbin",200); + pset.add("onlinelumi_rangeMin", 0.0); + pset.add("onlinelumi_rangeMax", 20000.0); + pset.add("onlinelumi_nbin", 200); - pset.add("PU_rangeMin",0.0); - pset.add("PU_rangeMax",120.0); - pset.add("PU_nbin",120); + pset.add("PU_rangeMin", 0.0); + pset.add("PU_rangeMax", 120.0); + pset.add("PU_nbin", 120); }