diff --git a/DQM/SiPixelPhase1Heterogeneous/plugins/BuildFile.xml b/DQM/SiPixelHeterogeneous/plugins/BuildFile.xml similarity index 100% rename from DQM/SiPixelPhase1Heterogeneous/plugins/BuildFile.xml rename to DQM/SiPixelHeterogeneous/plugins/BuildFile.xml diff --git a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1CompareRecHitsSoA.cc b/DQM/SiPixelHeterogeneous/plugins/SiPixelCompareRecHitsSoA.cc similarity index 86% rename from DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1CompareRecHitsSoA.cc rename to DQM/SiPixelHeterogeneous/plugins/SiPixelCompareRecHitsSoA.cc index 71abb95dbb4d1..9e054ecd17898 100644 --- a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1CompareRecHitsSoA.cc +++ b/DQM/SiPixelHeterogeneous/plugins/SiPixelCompareRecHitsSoA.cc @@ -1,8 +1,8 @@ // -*- C++ -*- -// Package: SiPixelPhase1CompareRecHitsSoA -// Class: SiPixelPhase1CompareRecHitsSoA +// Package: SiPixelCompareRecHitsSoA +// Class: SiPixelCompareRecHitsSoA // -/**\class SiPixelPhase1CompareRecHitsSoA SiPixelPhase1CompareRecHitsSoA.cc +/**\class SiPixelCompareRecHitsSoA SiPixelCompareRecHitsSoA.cc */ // // Author: Suvankar Roy Chowdhury, Alessandro Rossi @@ -27,13 +27,14 @@ #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" -class SiPixelPhase1CompareRecHitsSoA : public DQMEDAnalyzer { +template +class SiPixelCompareRecHitsSoA : public DQMEDAnalyzer { public: - using HitSoA = TrackingRecHit2DSOAViewT; - using HitsOnCPU = TrackingRecHit2DCPUT; + using HitSoA = TrackingRecHit2DSOAViewT; + using HitsOnCPU = TrackingRecHit2DCPUT; - explicit SiPixelPhase1CompareRecHitsSoA(const edm::ParameterSet&); - ~SiPixelPhase1CompareRecHitsSoA() override = default; + explicit SiPixelCompareRecHitsSoA(const edm::ParameterSet&); + ~SiPixelCompareRecHitsSoA() override = default; void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override; void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; @@ -51,16 +52,16 @@ class SiPixelPhase1CompareRecHitsSoA : public DQMEDAnalyzer { const TrackerGeometry* tkGeom_ = nullptr; const TrackerTopology* tTopo_ = nullptr; MonitorElement* hnHits_; - MonitorElement* hBchargeL_[4]; + MonitorElement* hBchargeL_[4]; // max 4 barrel hits MonitorElement* hBsizexL_[4]; MonitorElement* hBsizeyL_[4]; MonitorElement* hBposxL_[4]; MonitorElement* hBposyL_[4]; - MonitorElement* hFchargeD_[2][3]; - MonitorElement* hFsizexD_[2][3]; - MonitorElement* hFsizeyD_[2][3]; - MonitorElement* hFposxD_[2][3]; - MonitorElement* hFposyD_[2][3]; + MonitorElement* hFchargeD_[2][12]; // max 12 endcap disks + MonitorElement* hFsizexD_[2][12]; + MonitorElement* hFsizeyD_[2][12]; + MonitorElement* hFposxD_[2][12]; + MonitorElement* hFposyD_[2][12]; //differences MonitorElement* hBchargeDiff_; MonitorElement* hFchargeDiff_; @@ -77,7 +78,8 @@ class SiPixelPhase1CompareRecHitsSoA : public DQMEDAnalyzer { // constructors // -SiPixelPhase1CompareRecHitsSoA::SiPixelPhase1CompareRecHitsSoA(const edm::ParameterSet& iConfig) +template +SiPixelCompareRecHitsSoA::SiPixelCompareRecHitsSoA(const edm::ParameterSet& iConfig) : geomToken_(esConsumes()), topoToken_(esConsumes()), tokenSoAHitsCPU_(consumes(iConfig.getParameter("pixelHitsSrcCPU"))), @@ -87,7 +89,8 @@ SiPixelPhase1CompareRecHitsSoA::SiPixelPhase1CompareRecHitsSoA(const edm::Parame // // Begin Run // -void SiPixelPhase1CompareRecHitsSoA::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) { +template +void SiPixelCompareRecHitsSoA::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) { tkGeom_ = &iSetup.getData(geomToken_); tTopo_ = &iSetup.getData(topoToken_); } @@ -95,11 +98,12 @@ void SiPixelPhase1CompareRecHitsSoA::dqmBeginRun(const edm::Run& iRun, const edm // // -- Analyze // -void SiPixelPhase1CompareRecHitsSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { +template +void SiPixelCompareRecHitsSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { const auto& rhsoaHandleCPU = iEvent.getHandle(tokenSoAHitsCPU_); const auto& rhsoaHandleGPU = iEvent.getHandle(tokenSoAHitsGPU_); if (not rhsoaHandleCPU or not rhsoaHandleGPU) { - edm::LogWarning out("SiPixelPhase1CompareRecHitSoA"); + edm::LogWarning out("SiPixelCompareRecHitSoA"); if (not rhsoaHandleCPU) { out << "reference (cpu) rechits not found; "; } @@ -184,9 +188,10 @@ void SiPixelPhase1CompareRecHitsSoA::analyze(const edm::Event& iEvent, const edm // // -- Book Histograms // -void SiPixelPhase1CompareRecHitsSoA::bookHistograms(DQMStore::IBooker& iBook, - edm::Run const& iRun, - edm::EventSetup const& iSetup) { +template +void SiPixelCompareRecHitsSoA::bookHistograms(DQMStore::IBooker& iBook, + edm::Run const& iRun, + edm::EventSetup const& iSetup) { iBook.cd(); iBook.setCurrentFolder(topFolderName_); @@ -226,7 +231,8 @@ void SiPixelPhase1CompareRecHitsSoA::bookHistograms(DQMStore::IBooker& iBook, hFposYDiff_ = iBook.book1D("rechitsposYDiffFpix","y-position difference of rechits in FPix; rechit y-pos difference (CPU - GPU)", 1000, -10, 10); } -void SiPixelPhase1CompareRecHitsSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { +template +void SiPixelCompareRecHitsSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { // monitorpixelRecHitsSoA edm::ParameterSetDescription desc; desc.add("pixelHitsSrcCPU", edm::InputTag("siPixelRecHitsPreSplittingSoA@cpu")); @@ -235,4 +241,9 @@ void SiPixelPhase1CompareRecHitsSoA::fillDescriptions(edm::ConfigurationDescript desc.add("minD2cut", 0.0001); descriptions.addWithDefaultLabel(desc); } + +using SiPixelPhase1CompareRecHitsSoA = SiPixelCompareRecHitsSoA; +using SiPixelPhase2CompareRecHitsSoA = SiPixelCompareRecHitsSoA; + DEFINE_FWK_MODULE(SiPixelPhase1CompareRecHitsSoA); +DEFINE_FWK_MODULE(SiPixelPhase2CompareRecHitsSoA); diff --git a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1CompareTrackSoA.cc b/DQM/SiPixelHeterogeneous/plugins/SiPixelCompareTrackSoA.cc similarity index 87% rename from DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1CompareTrackSoA.cc rename to DQM/SiPixelHeterogeneous/plugins/SiPixelCompareTrackSoA.cc index 915c2ac1399f5..d02df3d788696 100644 --- a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1CompareTrackSoA.cc +++ b/DQM/SiPixelHeterogeneous/plugins/SiPixelCompareTrackSoA.cc @@ -1,8 +1,8 @@ // -*- C++ -*- -// Package: SiPixelPhase1CompareTrackSoA -// Class: SiPixelPhase1CompareTrackSoA +// Package: SiPixelCompareTrackSoA +// Class: SiPixelCompareTrackSoA // -/**\class SiPixelPhase1CompareTrackSoA SiPixelPhase1CompareTrackSoA.cc +/**\class SiPixelCompareTrackSoA SiPixelCompareTrackSoA.cc */ // // Author: Suvankar Roy Chowdhury @@ -62,19 +62,20 @@ namespace { } } // namespace -class SiPixelPhase1CompareTrackSoA : public DQMEDAnalyzer { +template +class SiPixelCompareTrackSoA : public DQMEDAnalyzer { public: - using PixelTrackSoAPhase1 = PixelTrackHeterogeneousT; + using PixelTrackSoA = PixelTrackHeterogeneousT; - explicit SiPixelPhase1CompareTrackSoA(const edm::ParameterSet&); - ~SiPixelPhase1CompareTrackSoA() override = default; + explicit SiPixelCompareTrackSoA(const edm::ParameterSet&); + ~SiPixelCompareTrackSoA() override = default; void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override; void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - const edm::EDGetTokenT tokenSoATrackCPU_; - const edm::EDGetTokenT tokenSoATrackGPU_; + const edm::EDGetTokenT tokenSoATrackCPU_; + const edm::EDGetTokenT tokenSoATrackGPU_; const std::string topFolderName_; const bool useQualityCut_; const pixelTrack::Quality minQuality_; @@ -114,9 +115,10 @@ class SiPixelPhase1CompareTrackSoA : public DQMEDAnalyzer { // constructors // -SiPixelPhase1CompareTrackSoA::SiPixelPhase1CompareTrackSoA(const edm::ParameterSet& iConfig) - : tokenSoATrackCPU_(consumes(iConfig.getParameter("pixelTrackSrcCPU"))), - tokenSoATrackGPU_(consumes(iConfig.getParameter("pixelTrackSrcGPU"))), +template +SiPixelCompareTrackSoA::SiPixelCompareTrackSoA(const edm::ParameterSet& iConfig) + : tokenSoATrackCPU_(consumes(iConfig.getParameter("pixelTrackSrcCPU"))), + tokenSoATrackGPU_(consumes(iConfig.getParameter("pixelTrackSrcGPU"))), topFolderName_(iConfig.getParameter("topFolderName")), useQualityCut_(iConfig.getParameter("useQualityCut")), minQuality_(pixelTrack::qualityByName(iConfig.getParameter("minQuality"))), @@ -125,11 +127,12 @@ SiPixelPhase1CompareTrackSoA::SiPixelPhase1CompareTrackSoA(const edm::ParameterS // // -- Analyze // -void SiPixelPhase1CompareTrackSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { +template +void SiPixelCompareTrackSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { const auto& tsoaHandleCPU = iEvent.getHandle(tokenSoATrackCPU_); const auto& tsoaHandleGPU = iEvent.getHandle(tokenSoATrackGPU_); if (not tsoaHandleCPU or not tsoaHandleGPU) { - edm::LogWarning out("SiPixelPhase1CompareTrackSoA"); + edm::LogWarning out("SiPixelCompareTrackSoA"); if (not tsoaHandleCPU) { out << "reference (cpu) tracks not found; "; } @@ -224,9 +227,10 @@ void SiPixelPhase1CompareTrackSoA::analyze(const edm::Event& iEvent, const edm:: // // -- Book Histograms // -void SiPixelPhase1CompareTrackSoA::bookHistograms(DQMStore::IBooker& iBook, - edm::Run const& iRun, - edm::EventSetup const& iSetup) { +template +void SiPixelCompareTrackSoA::bookHistograms(DQMStore::IBooker& iBook, + edm::Run const& iRun, + edm::EventSetup const& iSetup) { iBook.cd(); iBook.setCurrentFolder(topFolderName_); @@ -267,7 +271,8 @@ void SiPixelPhase1CompareTrackSoA::bookHistograms(DQMStore::IBooker& iBook, } -void SiPixelPhase1CompareTrackSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { +template +void SiPixelCompareTrackSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { // monitorpixelTrackSoA edm::ParameterSetDescription desc; desc.add("pixelTrackSrcCPU", edm::InputTag("pixelTracksSoA@cpu")); @@ -278,4 +283,9 @@ void SiPixelPhase1CompareTrackSoA::fillDescriptions(edm::ConfigurationDescriptio desc.add("deltaR2cut", 0.04); descriptions.addWithDefaultLabel(desc); } + +using SiPixelPhase1CompareTrackSoA = SiPixelCompareTrackSoA; +using SiPixelPhase2CompareTrackSoA = SiPixelCompareTrackSoA; + DEFINE_FWK_MODULE(SiPixelPhase1CompareTrackSoA); +DEFINE_FWK_MODULE(SiPixelPhase2CompareTrackSoA); diff --git a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1CompareVertexSoA.cc b/DQM/SiPixelHeterogeneous/plugins/SiPixelCompareVertexSoA.cc similarity index 83% rename from DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1CompareVertexSoA.cc rename to DQM/SiPixelHeterogeneous/plugins/SiPixelCompareVertexSoA.cc index 0113ea50973d8..52e8396a49022 100644 --- a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1CompareVertexSoA.cc +++ b/DQM/SiPixelHeterogeneous/plugins/SiPixelCompareVertexSoA.cc @@ -1,8 +1,8 @@ // -*- C++ -*- -// Package: SiPixelPhase1CompareVertexSoA -// Class: SiPixelPhase1CompareVertexSoA +// Package: SiPixelCompareVertexSoA +// Class: SiPixelCompareVertexSoA // -/**\class SiPixelPhase1CompareVertexSoA SiPixelPhase1CompareVertexSoA.cc +/**\class SiPixelCompareVertexSoA SiPixelCompareVertexSoA.cc */ // // Author: Suvankar Roy Chowdhury @@ -21,11 +21,11 @@ #include "CUDADataFormats/Vertex/interface/ZVertexHeterogeneous.h" #include "DataFormats/BeamSpot/interface/BeamSpot.h" -class SiPixelPhase1CompareVertexSoA : public DQMEDAnalyzer { +class SiPixelCompareVertexSoA : public DQMEDAnalyzer { public: using IndToEdm = std::vector; - explicit SiPixelPhase1CompareVertexSoA(const edm::ParameterSet&); - ~SiPixelPhase1CompareVertexSoA() override = default; + explicit SiPixelCompareVertexSoA(const edm::ParameterSet&); + ~SiPixelCompareVertexSoA() override = default; void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override; void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); @@ -53,7 +53,7 @@ class SiPixelPhase1CompareVertexSoA : public DQMEDAnalyzer { // constructors // -SiPixelPhase1CompareVertexSoA::SiPixelPhase1CompareVertexSoA(const edm::ParameterSet& iConfig) +SiPixelCompareVertexSoA::SiPixelCompareVertexSoA(const edm::ParameterSet& iConfig) : tokenSoAVertexCPU_(consumes(iConfig.getParameter("pixelVertexSrcCPU"))), tokenSoAVertexGPU_(consumes(iConfig.getParameter("pixelVertexSrcGPU"))), tokenBeamSpot_(consumes(iConfig.getParameter("beamSpotSrc"))), @@ -63,11 +63,11 @@ SiPixelPhase1CompareVertexSoA::SiPixelPhase1CompareVertexSoA(const edm::Paramete // // -- Analyze // -void SiPixelPhase1CompareVertexSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { +void SiPixelCompareVertexSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { const auto& vsoaHandleCPU = iEvent.getHandle(tokenSoAVertexCPU_); const auto& vsoaHandleGPU = iEvent.getHandle(tokenSoAVertexGPU_); if (not vsoaHandleCPU or not vsoaHandleGPU) { - edm::LogWarning out("SiPixelPhase1CompareTrackSoA"); + edm::LogWarning out("SiPixelCompareVertexSoA"); if (not vsoaHandleCPU) { out << "reference (cpu) tracks not found; "; } @@ -86,7 +86,7 @@ void SiPixelPhase1CompareVertexSoA::analyze(const edm::Event& iEvent, const edm: auto bsHandle = iEvent.getHandle(tokenBeamSpot_); float x0 = 0., y0 = 0., z0 = 0., dxdz = 0., dydz = 0.; if (!bsHandle.isValid()) { - edm::LogWarning("PixelVertexProducer") << "No beamspot found. returning vertexes with (0,0,Z) "; + edm::LogWarning("SiPixelCompareVertexSoA") << "No beamspot found. returning vertexes with (0,0,Z) "; } else { const reco::BeamSpot& bs = *bsHandle; x0 = bs.x0(); @@ -149,21 +149,21 @@ void SiPixelPhase1CompareVertexSoA::analyze(const edm::Event& iEvent, const edm: // // -- Book Histograms // -void SiPixelPhase1CompareVertexSoA::bookHistograms(DQMStore::IBooker& ibooker, - edm::Run const& iRun, - edm::EventSetup const& iSetup) { +void SiPixelCompareVertexSoA::bookHistograms(DQMStore::IBooker& ibooker, + edm::Run const& iRun, + edm::EventSetup const& iSetup) { ibooker.cd(); ibooker.setCurrentFolder(topFolderName_); // FIXME: all the 2D correlation plots are quite heavy in terms of memory consumption, so a as soon as DQM supports either TH2I or THnSparse // these should be moved to a less resource consuming format - hnVertex_ = ibooker.book2I("nVertex", "# of Vertex;CPU;GPU", 101, -0.5, 100.5, 101, -0.5, 100.5); + hnVertex_ = ibooker.book2I("nVertex", "# of Vertices;CPU;GPU", 101, -0.5, 100.5, 101, -0.5, 100.5); hx_ = ibooker.book2I("vx", "Vertez x - Beamspot x;CPU;GPU", 50, -0.1, 0.1, 50, -0.1, 0.1); hy_ = ibooker.book2I("vy", "Vertez y - Beamspot y;CPU;GPU", 50, -0.1, 0.1, 50, -0.1, 0.1); hz_ = ibooker.book2I("vz", "Vertez z;CPU;GPU", 30, -30., 30., 30, -30., 30.); hchi2_ = ibooker.book2I("chi2", "Vertex chi-squared;CPU;GPU", 40, 0., 20., 40, 0., 20.); hchi2oNdof_ = ibooker.book2I("chi2oNdof", "Vertex chi-squared/Ndof;CPU;GPU", 40, 0., 20., 40, 0., 20.); - hptv2_ = ibooker.book2I("ptsq", "Vertex p_T squared;CPU;GPU", 200, 0., 200., 200, 0., 200.); + hptv2_ = ibooker.book2I("ptsq", "Vertex #sum (p_{T})^{2};CPU;GPU", 200, 0., 200., 200, 0., 200.); hntrks_ = ibooker.book2I("ntrk", "#tracks associated;CPU;GPU", 100, -0.5, 99.5, 100, -0.5, 99.5); hntrks_ = ibooker.book2I("ntrk", "#tracks associated;CPU;GPU", 100, -0.5, 99.5, 100, -0.5, 99.5); hxdiff_ = ibooker.book1D("vxdiff", ";Vertex x difference (CPU - GPU);#entries", 100, -0.001, 0.001); @@ -171,7 +171,7 @@ void SiPixelPhase1CompareVertexSoA::bookHistograms(DQMStore::IBooker& ibooker, hzdiff_ = ibooker.book1D("vzdiff", ";Vertex z difference (CPU - GPU);#entries", 100, -2.5, 2.5); } -void SiPixelPhase1CompareVertexSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { +void SiPixelCompareVertexSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { // monitorpixelVertexSoA edm::ParameterSetDescription desc; desc.add("pixelVertexSrcCPU", edm::InputTag("pixelVerticesSoA@cpu")); @@ -181,4 +181,7 @@ void SiPixelPhase1CompareVertexSoA::fillDescriptions(edm::ConfigurationDescripti desc.add("dzCut", 1.); descriptions.addWithDefaultLabel(desc); } +DEFINE_FWK_MODULE(SiPixelCompareVertexSoA); + +using SiPixelPhase1CompareVertexSoA = SiPixelCompareVertexSoA; DEFINE_FWK_MODULE(SiPixelPhase1CompareVertexSoA); diff --git a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1MonitorRecHitsSoA.cc b/DQM/SiPixelHeterogeneous/plugins/SiPixelMonitorRecHitsSoA.cc similarity index 83% rename from DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1MonitorRecHitsSoA.cc rename to DQM/SiPixelHeterogeneous/plugins/SiPixelMonitorRecHitsSoA.cc index 231186f88e53f..ba68a8182e261 100644 --- a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1MonitorRecHitsSoA.cc +++ b/DQM/SiPixelHeterogeneous/plugins/SiPixelMonitorRecHitsSoA.cc @@ -1,9 +1,9 @@ // -*- C++ -*- ///bookLayer -// Package: SiPixelPhase1MonitorRecHitsSoA -// Class: SiPixelPhase1MonitorRecHitsSoA +// Package: SiPixelMonitorRecHitsSoA +// Class: SiPixelMonitorRecHitsSoA // -/**\class SiPixelPhase1MonitorRecHitsSoA SiPixelPhase1MonitorRecHitsSoA.cc +/**\class SiPixelMonitorRecHitsSoA SiPixelMonitorRecHitsSoA.cc */ // // Author: Suvankar Roy Chowdhury, Alessandro Rossi @@ -28,13 +28,14 @@ #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" -class SiPixelPhase1MonitorRecHitsSoA : public DQMEDAnalyzer { +template +class SiPixelMonitorRecHitsSoA : public DQMEDAnalyzer { public: - using HitSoA = TrackingRecHit2DSOAViewT; - using HitsOnCPU = TrackingRecHit2DCPUT; + using HitSoA = TrackingRecHit2DSOAViewT; + using HitsOnCPU = TrackingRecHit2DCPUT; - explicit SiPixelPhase1MonitorRecHitsSoA(const edm::ParameterSet&); - ~SiPixelPhase1MonitorRecHitsSoA() override = default; + explicit SiPixelMonitorRecHitsSoA(const edm::ParameterSet&); + ~SiPixelMonitorRecHitsSoA() override = default; void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override; void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override; void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; @@ -55,7 +56,7 @@ class SiPixelPhase1MonitorRecHitsSoA : public DQMEDAnalyzer { MonitorElement* hBcharge; MonitorElement* hBsizex; MonitorElement* hBsizey; - MonitorElement* hBposZPL[4]; + MonitorElement* hBposZPL[4]; // max 4 barrel hits MonitorElement* hBchargeL[4]; MonitorElement* hBsizexL[4]; MonitorElement* hBsizeyL[4]; @@ -64,7 +65,7 @@ class SiPixelPhase1MonitorRecHitsSoA : public DQMEDAnalyzer { MonitorElement* hFcharge; MonitorElement* hFsizex; MonitorElement* hFsizey; - MonitorElement* hFposXYD[2][12]; + MonitorElement* hFposXYD[2][12]; // max 12 endcap disks MonitorElement* hFchargeD[2][12]; MonitorElement* hFsizexD[2][12]; MonitorElement* hFsizeyD[2][12]; @@ -74,7 +75,8 @@ class SiPixelPhase1MonitorRecHitsSoA : public DQMEDAnalyzer { // constructors // -SiPixelPhase1MonitorRecHitsSoA::SiPixelPhase1MonitorRecHitsSoA(const edm::ParameterSet& iConfig) +template +SiPixelMonitorRecHitsSoA::SiPixelMonitorRecHitsSoA(const edm::ParameterSet& iConfig) : geomToken_(esConsumes()), topoToken_(esConsumes()), tokenSoAHitsCPU_(consumes(iConfig.getParameter("pixelHitsSrc"))), @@ -82,7 +84,8 @@ SiPixelPhase1MonitorRecHitsSoA::SiPixelPhase1MonitorRecHitsSoA(const edm::Parame // // Begin Run // -void SiPixelPhase1MonitorRecHitsSoA::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) { +template +void SiPixelMonitorRecHitsSoA::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) { tkGeom_ = &iSetup.getData(geomToken_); tTopo_ = &iSetup.getData(topoToken_); } @@ -90,10 +93,11 @@ void SiPixelPhase1MonitorRecHitsSoA::dqmBeginRun(const edm::Run& iRun, const edm // // -- Analyze // -void SiPixelPhase1MonitorRecHitsSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { +template +void SiPixelMonitorRecHitsSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { const auto& rhsoaHandle = iEvent.getHandle(tokenSoAHitsCPU_); if (!rhsoaHandle.isValid()) { - edm::LogWarning("SiPixelPhase1MonitorRecHitsSoA") << "No RecHits SoA found \n returning!" << std::endl; + edm::LogWarning("SiPixelMonitorRecHitsSoA") << "No RecHits SoA found \n returning!" << std::endl; return; } auto const& rhsoa = *rhsoaHandle; @@ -145,9 +149,10 @@ void SiPixelPhase1MonitorRecHitsSoA::analyze(const edm::Event& iEvent, const edm // // -- Book Histograms // -void SiPixelPhase1MonitorRecHitsSoA::bookHistograms(DQMStore::IBooker& iBook, - edm::Run const& iRun, - edm::EventSetup const& iSetup) { +template +void SiPixelMonitorRecHitsSoA::bookHistograms(DQMStore::IBooker& iBook, + edm::Run const& iRun, + edm::EventSetup const& iSetup) { iBook.cd(); iBook.setCurrentFolder(topFolderName_); @@ -187,11 +192,17 @@ void SiPixelPhase1MonitorRecHitsSoA::bookHistograms(DQMStore::IBooker& iBook, } } -void SiPixelPhase1MonitorRecHitsSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { +template +void SiPixelMonitorRecHitsSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { // monitorpixelRecHitsSoA edm::ParameterSetDescription desc; desc.add("pixelHitsSrc", edm::InputTag("siPixelRecHitsPreSplittingSoA")); desc.add("TopFolderName", "SiPixelHeterogeneous/PixelRecHitsSoA"); descriptions.addWithDefaultLabel(desc); } + +using SiPixelPhase1MonitorRecHitsSoA = SiPixelMonitorRecHitsSoA; +using SiPixelPhase2MonitorRecHitsSoA = SiPixelMonitorRecHitsSoA; + DEFINE_FWK_MODULE(SiPixelPhase1MonitorRecHitsSoA); +DEFINE_FWK_MODULE(SiPixelPhase2MonitorRecHitsSoA); diff --git a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1MonitorTrackSoA.cc b/DQM/SiPixelHeterogeneous/plugins/SiPixelMonitorTrackSoA.cc similarity index 80% rename from DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1MonitorTrackSoA.cc rename to DQM/SiPixelHeterogeneous/plugins/SiPixelMonitorTrackSoA.cc index 5d2545b6cdc9f..491c8f1be238a 100644 --- a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1MonitorTrackSoA.cc +++ b/DQM/SiPixelHeterogeneous/plugins/SiPixelMonitorTrackSoA.cc @@ -1,9 +1,8 @@ // -*- C++ -*- -///bookLayer -// Package: SiPixelPhase1MonitorTrackSoA -// Class: SiPixelPhase1MonitorTrackSoA +// Package: SiPixelMonitorTrackSoA +// Class: SiPixelMonitorTrackSoA // -/**\class SiPixelPhase1MonitorTrackSoA SiPixelPhase1MonitorTrackSoA.cc +/**\class SiPixelMonitorTrackSoA SiPixelMonitorTrackSoA.cc */ // // Author: Suvankar Roy Chowdhury @@ -25,17 +24,18 @@ // for string manipulations #include -class SiPixelPhase1MonitorTrackSoA : public DQMEDAnalyzer { +template +class SiPixelMonitorTrackSoA : public DQMEDAnalyzer { public: - using PixelTrackHeterogeneousPhase1 = PixelTrackHeterogeneousT; - explicit SiPixelPhase1MonitorTrackSoA(const edm::ParameterSet&); - ~SiPixelPhase1MonitorTrackSoA() override = default; + using PixelTrackHeterogeneous = PixelTrackHeterogeneousT; + explicit SiPixelMonitorTrackSoA(const edm::ParameterSet&); + ~SiPixelMonitorTrackSoA() override = default; void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override; void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); private: - edm::EDGetTokenT tokenSoATrack_; + edm::EDGetTokenT tokenSoATrack_; std::string topFolderName_; bool useQualityCut_; pixelTrack::Quality minQuality_; @@ -62,8 +62,9 @@ class SiPixelPhase1MonitorTrackSoA : public DQMEDAnalyzer { // constructors // -SiPixelPhase1MonitorTrackSoA::SiPixelPhase1MonitorTrackSoA(const edm::ParameterSet& iConfig) { - tokenSoATrack_ = consumes(iConfig.getParameter("pixelTrackSrc")); +template +SiPixelMonitorTrackSoA::SiPixelMonitorTrackSoA(const edm::ParameterSet& iConfig) { + tokenSoATrack_ = consumes(iConfig.getParameter("pixelTrackSrc")); topFolderName_ = iConfig.getParameter("topFolderName"); //"SiPixelHeterogeneous/PixelTrackSoA"; useQualityCut_ = iConfig.getParameter("useQualityCut"); minQuality_ = pixelTrack::qualityByName(iConfig.getParameter("minQuality")); @@ -72,10 +73,11 @@ SiPixelPhase1MonitorTrackSoA::SiPixelPhase1MonitorTrackSoA(const edm::ParameterS // // -- Analyze // -void SiPixelPhase1MonitorTrackSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { +template +void SiPixelMonitorTrackSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { const auto& tsoaHandle = iEvent.getHandle(tokenSoATrack_); if (!tsoaHandle.isValid()) { - edm::LogWarning("SiPixelPhase1MonitorTrackSoA") << "No Track SoA found \n returning!" << std::endl; + edm::LogWarning("SiPixelMonitorTrackSoA") << "No Track SoA found \n returning!" << std::endl; return; } @@ -132,9 +134,10 @@ void SiPixelPhase1MonitorTrackSoA::analyze(const edm::Event& iEvent, const edm:: // // -- Book Histograms // -void SiPixelPhase1MonitorTrackSoA::bookHistograms(DQMStore::IBooker& iBook, - edm::Run const& iRun, - edm::EventSetup const& iSetup) { +template +void SiPixelMonitorTrackSoA::bookHistograms(DQMStore::IBooker& iBook, + edm::Run const& iRun, + edm::EventSetup const& iSetup) { iBook.cd(); iBook.setCurrentFolder(topFolderName_); @@ -172,7 +175,8 @@ void SiPixelPhase1MonitorTrackSoA::bookHistograms(DQMStore::IBooker& iBook, } } -void SiPixelPhase1MonitorTrackSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { +template +void SiPixelMonitorTrackSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { // monitorpixelTrackSoA edm::ParameterSetDescription desc; desc.add("pixelTrackSrc", edm::InputTag("pixelTracksSoA")); @@ -181,4 +185,9 @@ void SiPixelPhase1MonitorTrackSoA::fillDescriptions(edm::ConfigurationDescriptio desc.add("minQuality", "loose"); descriptions.addWithDefaultLabel(desc); } + +using SiPixelPhase1MonitorTrackSoA = SiPixelMonitorTrackSoA; +using SiPixelPhase2MonitorTrackSoA = SiPixelMonitorTrackSoA; + DEFINE_FWK_MODULE(SiPixelPhase1MonitorTrackSoA); +DEFINE_FWK_MODULE(SiPixelPhase2MonitorTrackSoA); diff --git a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1MonitorVertexSoA.cc b/DQM/SiPixelHeterogeneous/plugins/SiPixelMonitorVertexSoA.cc similarity index 74% rename from DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1MonitorVertexSoA.cc rename to DQM/SiPixelHeterogeneous/plugins/SiPixelMonitorVertexSoA.cc index 6324cee4372d8..13cf991b54c82 100644 --- a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1MonitorVertexSoA.cc +++ b/DQM/SiPixelHeterogeneous/plugins/SiPixelMonitorVertexSoA.cc @@ -1,9 +1,9 @@ // -*- C++ -*- ///bookLayer -// Package: SiPixelPhase1MonitorVertexSoA -// Class: SiPixelPhase1MonitorVertexSoA +// Package: SiPixelMonitorVertexSoA +// Class: SiPixelMonitorVertexSoA // -/**\class SiPixelPhase1MonitorVertexSoA SiPixelPhase1MonitorVertexSoA.cc +/**\class SiPixelMonitorVertexSoA SiPixelMonitorVertexSoA.cc */ // // Author: Suvankar Roy Chowdhury @@ -24,11 +24,11 @@ #include "CUDADataFormats/Vertex/interface/ZVertexHeterogeneous.h" #include "DataFormats/BeamSpot/interface/BeamSpot.h" -class SiPixelPhase1MonitorVertexSoA : public DQMEDAnalyzer { +class SiPixelMonitorVertexSoA : public DQMEDAnalyzer { public: using IndToEdm = std::vector; - explicit SiPixelPhase1MonitorVertexSoA(const edm::ParameterSet&); - ~SiPixelPhase1MonitorVertexSoA() override = default; + explicit SiPixelMonitorVertexSoA(const edm::ParameterSet&); + ~SiPixelMonitorVertexSoA() override = default; void bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& iRun, edm::EventSetup const& iSetup) override; void analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); @@ -51,7 +51,7 @@ class SiPixelPhase1MonitorVertexSoA : public DQMEDAnalyzer { // constructors // -SiPixelPhase1MonitorVertexSoA::SiPixelPhase1MonitorVertexSoA(const edm::ParameterSet& iConfig) { +SiPixelMonitorVertexSoA::SiPixelMonitorVertexSoA(const edm::ParameterSet& iConfig) { tokenSoAVertex_ = consumes(iConfig.getParameter("pixelVertexSrc")); tokenBeamSpot_ = consumes(iConfig.getParameter("beamSpotSrc")); topFolderName_ = iConfig.getParameter("topFolderName"); @@ -60,10 +60,10 @@ SiPixelPhase1MonitorVertexSoA::SiPixelPhase1MonitorVertexSoA(const edm::Paramete // // -- Analyze // -void SiPixelPhase1MonitorVertexSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { +void SiPixelMonitorVertexSoA::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { const auto& vsoaHandle = iEvent.getHandle(tokenSoAVertex_); if (!vsoaHandle.isValid()) { - edm::LogWarning("SiPixelPhase1MonitorTrackSoA") << "No Vertex SoA found \n returning!" << std::endl; + edm::LogWarning("SiPixelMonitorVertexSoA") << "No Vertex SoA found \n returning!" << std::endl; return; } @@ -72,7 +72,7 @@ void SiPixelPhase1MonitorVertexSoA::analyze(const edm::Event& iEvent, const edm: auto bsHandle = iEvent.getHandle(tokenBeamSpot_); float x0 = 0., y0 = 0., z0 = 0., dxdz = 0., dydz = 0.; if (!bsHandle.isValid()) { - edm::LogWarning("PixelVertexProducer") << "No beamspot found. returning vertexes with (0,0,Z) "; + edm::LogWarning("SiPixelMonitorVertexSoA") << "No beamspot found. returning vertexes with (0,0,Z) "; } else { const reco::BeamSpot& bs = *bsHandle; x0 = bs.x0(); @@ -104,23 +104,23 @@ void SiPixelPhase1MonitorVertexSoA::analyze(const edm::Event& iEvent, const edm: // // -- Book Histograms // -void SiPixelPhase1MonitorVertexSoA::bookHistograms(DQMStore::IBooker& ibooker, - edm::Run const& iRun, - edm::EventSetup const& iSetup) { +void SiPixelMonitorVertexSoA::bookHistograms(DQMStore::IBooker& ibooker, + edm::Run const& iRun, + edm::EventSetup const& iSetup) { //std::string top_folder = ""// ibooker.cd(); ibooker.setCurrentFolder(topFolderName_); - hnVertex = ibooker.book1D("nVertex", ";# of Vertex;#entries", 101, -0.5, 100.5); + hnVertex = ibooker.book1D("nVertex", ";# of Vertices;#entries", 101, -0.5, 100.5); hx = ibooker.book1D("vx", ";Vertex x;#entries", 10, -5., 5.); hy = ibooker.book1D("vy", ";Vertex y;#entries", 10, -5., 5.); hz = ibooker.book1D("vz", ";Vertex z;#entries", 30, -30., 30); hchi2 = ibooker.book1D("chi2", ";Vertex chi-squared;#entries", 40, 0., 20.); hchi2oNdof = ibooker.book1D("chi2oNdof", ";Vertex chi-squared/Ndof;#entries", 40, 0., 20.); - hptv2 = ibooker.book1D("ptsq", ";Vertex p_T squared;#entries", 200, 0., 200.); + hptv2 = ibooker.book1D("ptsq", ";Vertex #sum (p_{T})^{2};#entries", 200, 0., 200.); hntrks = ibooker.book1D("ntrk", ";#tracks associated;#entries", 100, -0.5, 99.5); } -void SiPixelPhase1MonitorVertexSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { +void SiPixelMonitorVertexSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { // monitorpixelVertexSoA edm::ParameterSetDescription desc; desc.add("pixelVertexSrc", edm::InputTag("pixelVerticesSoA")); @@ -128,4 +128,7 @@ void SiPixelPhase1MonitorVertexSoA::fillDescriptions(edm::ConfigurationDescripti desc.add("topFolderName", "SiPixelHeterogeneous/PixelVertexSoA"); descriptions.addWithDefaultLabel(desc); } +DEFINE_FWK_MODULE(SiPixelMonitorVertexSoA); + +using SiPixelPhase1MonitorVertexSoA = SiPixelMonitorVertexSoA; DEFINE_FWK_MODULE(SiPixelPhase1MonitorVertexSoA); diff --git a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1TrackComparisonHarvester.cc b/DQM/SiPixelHeterogeneous/plugins/SiPixelTrackComparisonHarvester.cc similarity index 75% rename from DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1TrackComparisonHarvester.cc rename to DQM/SiPixelHeterogeneous/plugins/SiPixelTrackComparisonHarvester.cc index 7e8b773360f7d..8d6d10111986a 100644 --- a/DQM/SiPixelPhase1Heterogeneous/plugins/SiPixelPhase1TrackComparisonHarvester.cc +++ b/DQM/SiPixelHeterogeneous/plugins/SiPixelTrackComparisonHarvester.cc @@ -7,10 +7,10 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/Framework/interface/MakerMacros.h" -class SiPixelPhase1TrackComparisonHarvester : public DQMEDHarvester { +class SiPixelTrackComparisonHarvester : public DQMEDHarvester { public: - explicit SiPixelPhase1TrackComparisonHarvester(const edm::ParameterSet&); - ~SiPixelPhase1TrackComparisonHarvester() override = default; + explicit SiPixelTrackComparisonHarvester(const edm::ParameterSet&); + ~SiPixelTrackComparisonHarvester() override = default; void dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) override; static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); @@ -20,10 +20,10 @@ class SiPixelPhase1TrackComparisonHarvester : public DQMEDHarvester { const std::string topFolder_; }; -SiPixelPhase1TrackComparisonHarvester::SiPixelPhase1TrackComparisonHarvester(const edm::ParameterSet& iConfig) +SiPixelTrackComparisonHarvester::SiPixelTrackComparisonHarvester(const edm::ParameterSet& iConfig) : topFolder_(iConfig.getParameter("topFolderName")) {} -void SiPixelPhase1TrackComparisonHarvester::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) { +void SiPixelTrackComparisonHarvester::dqmEndJob(DQMStore::IBooker& ibooker, DQMStore::IGetter& igetter) { MonitorElement* hpt_eta_tkAllCPU = igetter.get(topFolder_ + "/ptetatrkAllCPU"); MonitorElement* hpt_eta_tkAllCPUmatched = igetter.get(topFolder_ + "/ptetatrkAllCPUmatched"); MonitorElement* hphi_z_tkAllCPU = igetter.get(topFolder_ + "/phiztrkAllCPU"); @@ -31,7 +31,7 @@ void SiPixelPhase1TrackComparisonHarvester::dqmEndJob(DQMStore::IBooker& ibooker if (hpt_eta_tkAllCPU == nullptr or hpt_eta_tkAllCPUmatched == nullptr or hphi_z_tkAllCPU == nullptr or hphi_z_tkAllCPUmatched == nullptr) { - edm::LogError("SiPixelPhase1TrackComparisonHarvester") + edm::LogError("SiPixelTrackComparisonHarvester") << "MEs needed for this module are not found in the input file. Skipping."; return; } @@ -49,11 +49,11 @@ void SiPixelPhase1TrackComparisonHarvester::dqmEndJob(DQMStore::IBooker& ibooker #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" #include "FWCore/ParameterSet/interface/ParameterSetDescription.h" -void SiPixelPhase1TrackComparisonHarvester::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { +void SiPixelTrackComparisonHarvester::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; desc.add("topFolderName", "SiPixelHeterogeneous/PixelTrackCompareGPUvsCPU/"); - descriptions.add("siPixelPhase1TrackComparisonHarvester", desc); + descriptions.addWithDefaultLabel(desc); } //define this as a plug-in -DEFINE_FWK_MODULE(SiPixelPhase1TrackComparisonHarvester); +DEFINE_FWK_MODULE(SiPixelTrackComparisonHarvester); diff --git a/DQM/SiPixelHeterogeneous/python/SiPixelHeterogenousDQMHarvesting_cff.py b/DQM/SiPixelHeterogeneous/python/SiPixelHeterogenousDQMHarvesting_cff.py new file mode 100644 index 0000000000000..24c26e9d99c0b --- /dev/null +++ b/DQM/SiPixelHeterogeneous/python/SiPixelHeterogenousDQMHarvesting_cff.py @@ -0,0 +1,11 @@ +import FWCore.ParameterSet.Config as cms +siPixelHeterogeneousDQMHarvesting = cms.Sequence() # empty sequence if not both CPU and GPU recos are run + +from DQM.SiPixelHeterogeneous.siPixelTrackComparisonHarvester_cfi import * +siPixelHeterogeneousDQMComparisonHarvesting = cms.Sequence(siPixelTrackComparisonHarvester) + +# add the harvester in case of the validation modifier is active +from Configuration.ProcessModifiers.gpuValidationPixel_cff import gpuValidationPixel +gpuValidationPixel.toReplaceWith(siPixelHeterogeneousDQMHarvesting,siPixelHeterogeneousDQMComparisonHarvesting) + + diff --git a/DQM/SiPixelHeterogeneous/python/SiPixelHeterogenousDQM_FirstStep_cff.py b/DQM/SiPixelHeterogeneous/python/SiPixelHeterogenousDQM_FirstStep_cff.py new file mode 100644 index 0000000000000..1385e7425c49b --- /dev/null +++ b/DQM/SiPixelHeterogeneous/python/SiPixelHeterogenousDQM_FirstStep_cff.py @@ -0,0 +1,102 @@ +import FWCore.ParameterSet.Config as cms +from DQM.SiPixelHeterogeneous.siPixelPhase1MonitorRecHitsSoA_cfi import * +from DQM.SiPixelHeterogeneous.siPixelPhase2MonitorRecHitsSoA_cfi import * +from DQM.SiPixelHeterogeneous.siPixelPhase1MonitorTrackSoA_cfi import * +from DQM.SiPixelHeterogeneous.siPixelPhase2MonitorTrackSoA_cfi import * +from DQM.SiPixelHeterogeneous.siPixelMonitorVertexSoA_cfi import * + +# Run-3 sequence +monitorpixelSoASource = cms.Sequence(siPixelPhase1MonitorRecHitsSoA * siPixelPhase1MonitorTrackSoA * siPixelMonitorVertexSoA) + +# Phase-2 sequence +from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker +_monitorpixelSoARecHitsSource = cms.Sequence(siPixelPhase2MonitorRecHitsSoA * siPixelPhase2MonitorTrackSoA * siPixelMonitorVertexSoA) +phase2_tracker.toReplaceWith(monitorpixelSoASource, _monitorpixelSoARecHitsSource) + +#Define the sequence for GPU vs CPU validation +#This should run:- individual monitor for the 2 collections + comparison module +from DQM.SiPixelHeterogeneous.siPixelPhase1CompareRecHitsSoA_cfi import * +from DQM.SiPixelHeterogeneous.siPixelPhase2CompareRecHitsSoA_cfi import * +from DQM.SiPixelHeterogeneous.siPixelPhase1CompareTrackSoA_cfi import * +from DQM.SiPixelHeterogeneous.siPixelPhase2CompareTrackSoA_cfi import * +from DQM.SiPixelHeterogeneous.siPixelCompareVertexSoA_cfi import * + +## rechits +siPixelPhase1MonitorRecHitsSoACPU = siPixelPhase1MonitorRecHitsSoA.clone( + pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cpu", + TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoACPU" +) + +siPixelPhase1MonitorRecHitsSoAGPU = siPixelPhase1MonitorRecHitsSoA.clone( + pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cuda", + TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoAGPU" +) + +siPixelPhase2MonitorRecHitsSoACPU = siPixelPhase2MonitorRecHitsSoA.clone( + pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cpu", + TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoACPU" +) + +siPixelPhase2MonitorRecHitsSoAGPU = siPixelPhase2MonitorRecHitsSoA.clone( + pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cuda", + TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoAGPU" +) + +## tracks +siPixelPhase1MonitorTrackSoACPU = siPixelPhase1MonitorTrackSoA.clone( + pixelTrackSrc = 'pixelTracksSoA@cpu', + topFolderName = 'SiPixelHeterogeneous/PixelTrackSoACPU', +) + +siPixelPhase1MonitorTrackSoAGPU = siPixelPhase1MonitorTrackSoA.clone( + pixelTrackSrc = 'pixelTracksSoA@cuda', + topFolderName = 'SiPixelHeterogeneous/PixelTrackSoAGPU', +) + +siPixelPhase2MonitorTrackSoACPU = siPixelPhase2MonitorTrackSoA.clone( + pixelTrackSrc = 'pixelTracksSoA@cpu', + topFolderName = 'SiPixelHeterogeneous/PixelTrackSoACPU', +) + +siPixelPhase2MonitorTrackSoAGPU = siPixelPhase2MonitorTrackSoA.clone( + pixelTrackSrc = 'pixelTracksSoA@cuda', + topFolderName = 'SiPixelHeterogeneous/PixelTrackSoAGPU', +) + +## vertices +siPixelMonitorVertexSoACPU = siPixelMonitorVertexSoA.clone( + pixelVertexSrc = 'pixelVerticesSoA@cpu', + topFolderName = 'SiPixelHeterogeneous/PixelVertexSoACPU', +) + +siPixelMonitorVertexSoAGPU = siPixelMonitorVertexSoA.clone( + pixelVertexSrc = 'pixelVerticesSoA@cuda', + topFolderName = 'SiPixelHeterogeneous/PixelVertexSoAGPU', +) + +# Run-3 sequence +monitorpixelSoACompareSource = cms.Sequence(siPixelPhase1MonitorRecHitsSoACPU * + siPixelPhase1MonitorRecHitsSoAGPU * + siPixelPhase1CompareRecHitsSoA * + siPixelPhase1MonitorTrackSoAGPU * + siPixelPhase1MonitorTrackSoACPU * + siPixelPhase1CompareTrackSoA * + siPixelMonitorVertexSoACPU * + siPixelMonitorVertexSoAGPU * + siPixelCompareVertexSoA) + +# Phase-2 sequence +_monitorpixelSoACompareSource = cms.Sequence(siPixelPhase2MonitorRecHitsSoACPU * + siPixelPhase2MonitorRecHitsSoAGPU * + siPixelPhase2CompareRecHitsSoA * + siPixelPhase2MonitorTrackSoAGPU * + siPixelPhase2MonitorTrackSoACPU * + siPixelPhase2CompareTrackSoA * + siPixelMonitorVertexSoACPU * + siPixelMonitorVertexSoAGPU * + siPixelCompareVertexSoA) + +phase2_tracker.toReplaceWith(monitorpixelSoACompareSource,_monitorpixelSoACompareSource) + +from Configuration.ProcessModifiers.gpuValidationPixel_cff import gpuValidationPixel +gpuValidationPixel.toReplaceWith(monitorpixelSoASource, monitorpixelSoACompareSource) diff --git a/DQM/SiPixelPhase1Heterogeneous/python/SiPixelPhase1HeterogenousDQMHarvesting_cff.py b/DQM/SiPixelPhase1Heterogeneous/python/SiPixelPhase1HeterogenousDQMHarvesting_cff.py deleted file mode 100644 index a68508f296be1..0000000000000 --- a/DQM/SiPixelPhase1Heterogeneous/python/SiPixelPhase1HeterogenousDQMHarvesting_cff.py +++ /dev/null @@ -1,11 +0,0 @@ -import FWCore.ParameterSet.Config as cms -siPixelPhase1HeterogenousDQMHarvesting = cms.Sequence() # empty sequence if not both CPU and GPU recos are run - -from DQM.SiPixelPhase1Heterogeneous.siPixelPhase1TrackComparisonHarvester_cfi import * -siPixelPhase1HeterogenousDQMComparisonHarvesting = cms.Sequence(siPixelPhase1TrackComparisonHarvester) - -# add the harvester in case of the validation modifier is active -from Configuration.ProcessModifiers.gpuValidationPixel_cff import gpuValidationPixel -gpuValidationPixel.toReplaceWith(siPixelPhase1HeterogenousDQMHarvesting,siPixelPhase1HeterogenousDQMComparisonHarvesting) - - diff --git a/DQM/SiPixelPhase1Heterogeneous/python/SiPixelPhase1HeterogenousDQM_FirstStep_cff.py b/DQM/SiPixelPhase1Heterogeneous/python/SiPixelPhase1HeterogenousDQM_FirstStep_cff.py deleted file mode 100644 index 129eb690d965d..0000000000000 --- a/DQM/SiPixelPhase1Heterogeneous/python/SiPixelPhase1HeterogenousDQM_FirstStep_cff.py +++ /dev/null @@ -1,66 +0,0 @@ -import FWCore.ParameterSet.Config as cms -from DQM.SiPixelPhase1Heterogeneous.siPixelPhase1MonitorTrackSoA_cfi import * -from DQM.SiPixelPhase1Heterogeneous.siPixelPhase1MonitorVertexSoA_cfi import * -from DQM.SiPixelPhase1Heterogeneous.siPixelPhase1MonitorRecHitsSoA_cfi import * - -monitorpixelSoASource = cms.Sequence(siPixelPhase1MonitorRecHitsSoA * siPixelPhase1MonitorTrackSoA * siPixelPhase1MonitorVertexSoA) - -from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker -_monitorpixelSoARecHitsSource = cms.Sequence(siPixelPhase1MonitorRecHitsSoA) -phase2_tracker.toReplaceWith(monitorpixelSoASource, _monitorpixelSoARecHitsSource) - -#Define the sequence for GPU vs CPU validation -#This should run:- individual monitor for the 2 collections + comparison module -from DQM.SiPixelPhase1Heterogeneous.siPixelPhase1CompareTrackSoA_cfi import * -from DQM.SiPixelPhase1Heterogeneous.siPixelPhase1CompareVertexSoA_cfi import * -from DQM.SiPixelPhase1Heterogeneous.siPixelPhase1CompareRecHitsSoA_cfi import * - -siPixelPhase1MonitorTrackSoACPU = siPixelPhase1MonitorTrackSoA.clone( - pixelTrackSrc = 'pixelTracksSoA@cpu', - topFolderName = 'SiPixelHeterogeneous/PixelTrackSoACPU', -) - -siPixelPhase1MonitorTrackSoAGPU = siPixelPhase1MonitorTrackSoA.clone( - pixelTrackSrc = 'pixelTracksSoA@cuda', - topFolderName = 'SiPixelHeterogeneous/PixelTrackSoAGPU', -) - -siPixelPhase1MonitorVertexSoACPU = siPixelPhase1MonitorVertexSoA.clone( - pixelVertexSrc = 'pixelVerticesSoA@cpu', - topFolderName = 'SiPixelHeterogeneous/PixelVertexSoACPU', -) - -siPixelPhase1MonitorVertexSoAGPU = siPixelPhase1MonitorVertexSoA.clone( - pixelVertexSrc = 'pixelVerticesSoA@cuda', - topFolderName = 'SiPixelHeterogeneous/PixelVertexSoAGPU', -) - -siPixelPhase1MonitorRecHitsSoACPU = siPixelPhase1MonitorRecHitsSoA.clone( - pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cpu", - TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoACPU" -) - -siPixelPhase1MonitorRecHitsSoAGPU = siPixelPhase1MonitorRecHitsSoA.clone( - pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cuda", - TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoAGPU" -) - -monitorpixelSoACompareSource = cms.Sequence(siPixelPhase1MonitorRecHitsSoACPU * - siPixelPhase1MonitorRecHitsSoAGPU * - siPixelPhase1CompareRecHitsSoA * - siPixelPhase1MonitorTrackSoAGPU * - siPixelPhase1MonitorTrackSoACPU * - siPixelPhase1CompareTrackSoA * - siPixelPhase1MonitorVertexSoACPU * - siPixelPhase1MonitorVertexSoAGPU * - siPixelPhase1CompareVertexSoA) - -monitorpixelSoACompareSourceNoTracking = cms.Sequence(siPixelPhase1MonitorRecHitsSoACPU * - siPixelPhase1MonitorRecHitsSoAGPU * - siPixelPhase1CompareRecHitsSoA) - -from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker -phase2_tracker.toReplaceWith(monitorpixelSoACompareSource,monitorpixelSoACompareSourceNoTracking) - -from Configuration.ProcessModifiers.gpuValidationPixel_cff import gpuValidationPixel -gpuValidationPixel.toReplaceWith(monitorpixelSoASource, monitorpixelSoACompareSource) diff --git a/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py b/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py index 68a2611628bbe..db82a56e0bce5 100644 --- a/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py @@ -16,7 +16,7 @@ from DQMServices.Components.DQMFEDIntegrityClient_cff import * from DQMOffline.L1Trigger.L1TriggerDqmOffline_cff import * from DQM.SiTrackerPhase2.Phase2TrackerDQMHarvesting_cff import * -from DQM.SiPixelPhase1Heterogeneous.SiPixelPhase1HeterogenousDQMHarvesting_cff import * +from DQM.SiPixelHeterogeneous.SiPixelHeterogenousDQMHarvesting_cff import * DQMNone = cms.Sequence() @@ -188,7 +188,7 @@ DQMHarvestPixelTracking = cms.Sequence( pixelTrackingEffFromHitPattern * pixelVertexResolutionClient * - siPixelPhase1HeterogenousDQMHarvesting ) + siPixelHeterogeneousDQMHarvesting ) DQMHarvestOuterTracker = cms.Sequence( OuterTrackerClient * diff --git a/DQMOffline/Configuration/python/DQMOffline_cff.py b/DQMOffline/Configuration/python/DQMOffline_cff.py index 80bbde7e7504f..68bdb8aa880d3 100644 --- a/DQMOffline/Configuration/python/DQMOffline_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_cff.py @@ -18,7 +18,7 @@ from DQM.CastorMonitor.castor_dqm_sourceclient_offline_cff import * from DQM.CTPPS.ctppsDQM_cff import * from DQM.SiTrackerPhase2.Phase2TrackerDQMFirstStep_cff import * -from DQM.SiPixelPhase1Heterogeneous.SiPixelPhase1HeterogenousDQM_FirstStep_cff import * +from DQM.SiPixelHeterogeneous.SiPixelHeterogenousDQM_FirstStep_cff import * DQMNone = cms.Sequence() @@ -276,4 +276,4 @@ from PhysicsTools.NanoAOD.nanogenDQM_cff import nanogenDQM DQMOfflineNanoGen = cms.Sequence(nanogenDQM) from PhysicsTools.NanoAOD.nanojmeDQM_cff import nanojmeDQM -DQMOfflineNanoJME = cms.Sequence(nanojmeDQM) \ No newline at end of file +DQMOfflineNanoJME = cms.Sequence(nanojmeDQM) diff --git a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py index b778daa63677f..b9151d39259eb 100644 --- a/HLTrigger/Configuration/python/customizeHLTforCMSSW.py +++ b/HLTrigger/Configuration/python/customizeHLTforCMSSW.py @@ -239,6 +239,15 @@ def customizeHLTfor38761(process): return process +def customizeHLTfor40264(process): + for producer in producers_by_type(process, "SiPixelPhase1MonitorVertexSoA"): + producer._TypedParameterizable__type = "SiPixelMonitorVertexSoA" + + for producer in producers_by_type(process, "SiPixelPhase1CompareVertexSoA"): + producer._TypedParameterizable__type = "SiPixelCompareVertexSoA" + + return process + # CMSSW version specific customizations def customizeHLTforCMSSW(process, menuType="GRun"): @@ -248,7 +257,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"): # process = customiseFor12718(process) process = customizeHLTfor38761(process) - - + process = customizeHLTfor40264(process) return process