diff --git a/Validation/SiPixelHeterogeneousV/plugins/BuildFile.xml b/Validation/SiPixelHeterogeneousV/plugins/BuildFile.xml
new file mode 100644
index 0000000000000..d4ecac01be770
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/plugins/BuildFile.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateDigiFromSoA.cc b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateDigiFromSoA.cc
new file mode 100644
index 0000000000000..ccc7b262849a1
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateDigiFromSoA.cc
@@ -0,0 +1,88 @@
+#include
+#include "CUDADataFormats/Common/interface/Product.h"
+#include "CUDADataFormats/Common/interface/HostProduct.h"
+#include "CUDADataFormats/SiPixelDigi/interface/SiPixelDigisCUDA.h"
+#include "DataFormats/SiPixelDigi/interface/SiPixelDigisSoA.h"
+#include "DataFormats/Common/interface/DetSetVectorNew.h"
+#include "DataFormats/Common/interface/Handle.h"
+#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
+#include "FWCore/Framework/interface/ESHandle.h"
+#include "FWCore/Framework/interface/Event.h"
+#include "FWCore/Framework/interface/EventSetup.h"
+#include "FWCore/Framework/interface/MakerMacros.h"
+#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
+#include "FWCore/ParameterSet/interface/ParameterSet.h"
+#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
+#include "FWCore/Utilities/interface/InputTag.h"
+#include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
+#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
+#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
+#include "Geometry/CommonTopologies/interface/GeomDetEnumerators.h"
+#include "HeterogeneousCore/CUDACore/interface/ScopedContext.h"
+#include "RecoLocalTracker/SiPixelRecHits/interface/pixelCPEforGPU.h"
+#include "DQMServices/Core/interface/DQMStore.h"
+#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
+#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
+
+class SiPixelValidateDigiFromSoA : public DQMEDAnalyzer {
+
+public:
+ explicit SiPixelValidateDigiFromSoA(const edm::ParameterSet& iConfig);
+ ~SiPixelValidateDigiFromSoA() override = default;
+ static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
+private:
+ void analyze(const edm::Event& iEvent, edm::EventSetup const& iSetup) override;
+ void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
+
+ edm::EDGetTokenT digisoaToken_;
+
+ std::string topFolderName_;
+ MonitorElement* hnDigis;
+ MonitorElement* hadc;
+};
+
+SiPixelValidateDigiFromSoA::SiPixelValidateDigiFromSoA(const edm::ParameterSet& iConfig)
+ : digisoaToken_(consumes(iConfig.getParameter("src")))
+{
+ topFolderName_ = "SiPixelHeterogeneousV/PixelDigisSoA";
+}
+
+void SiPixelValidateDigiFromSoA::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& run , edm::EventSetup const& es) {
+ ibooker.cd();
+ ibooker.setCurrentFolder(topFolderName_);
+ hnDigis = ibooker.book1D("nDigis", ";nDigis;#entries", 1000, 0, 1000000);
+ hadc = ibooker.book1D("adc", "Digi ADC values", 500, 0, 50000);
+}
+
+void SiPixelValidateDigiFromSoA::analyze(const edm::Event& iEvent, edm::EventSetup const& es) {
+ const auto& soadigis = iEvent.get(digisoaToken_);
+ const uint32_t nDigis = soadigis.size();
+
+ hnDigis->Fill(nDigis);
+
+ const std::vector& pdigiVec = soadigis.pdigiVector();
+ const std::vector& rawIdVec = soadigis.rawIdArrVector();
+ const std::vector& adcVec = soadigis.adcVector();
+ const std::vector& clus = soadigis.clusVector();
+
+ //get TkGeometry record
+ edm::ESHandle geom;
+ es.get().get(geom);
+ geom = geom.product();
+
+ for(uint32_t idigi = 0; idigi < nDigis; idigi++) {
+ DetId detId(rawIdVec[idigi]);
+ if(detId.null()) continue;
+ if(detId.det() != DetId::Detector::Tracker) continue;
+ auto adc_idigi = adcVec[idigi];
+ hadc->Fill(adc_idigi);
+ }
+
+}
+
+void SiPixelValidateDigiFromSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
+ edm::ParameterSetDescription desc;
+ desc.add("src", edm::InputTag("siPixelDigisSoA"));
+ descriptions.add("SiPixelValidateDigiFromSoA", desc);
+}
+DEFINE_FWK_MODULE(SiPixelValidateDigiFromSoA);
diff --git a/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateDigiGPU.cc b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateDigiGPU.cc
new file mode 100644
index 0000000000000..4cad2c2c91618
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateDigiGPU.cc
@@ -0,0 +1,96 @@
+#include
+#include "CUDADataFormats/Common/interface/Product.h"
+#include "CUDADataFormats/Common/interface/HostProduct.h"
+#include "CUDADataFormats/SiPixelDigi/interface/SiPixelDigisCUDA.h"
+#include "DataFormats/SiPixelDigi/interface/SiPixelDigisSoA.h"
+#include "DataFormats/Common/interface/DetSetVectorNew.h"
+#include "DataFormats/Common/interface/Handle.h"
+#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
+#include "FWCore/Framework/interface/ESHandle.h"
+#include "FWCore/Framework/interface/Event.h"
+#include "FWCore/Framework/interface/EventSetup.h"
+#include "FWCore/Framework/interface/MakerMacros.h"
+#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
+#include "FWCore/ParameterSet/interface/ParameterSet.h"
+#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
+#include "FWCore/Utilities/interface/InputTag.h"
+#include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
+#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
+#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
+#include "Geometry/CommonTopologies/interface/GeomDetEnumerators.h"
+#include "HeterogeneousCore/CUDACore/interface/ScopedContext.h"
+#include "RecoLocalTracker/SiPixelRecHits/interface/pixelCPEforGPU.h"
+#include "DQMServices/Core/interface/DQMStore.h"
+#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
+#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
+
+class SiPixelValidateDigiGPU : public DQMEDAnalyzer {
+
+public:
+ explicit SiPixelValidateDigiGPU(const edm::ParameterSet& iConfig);
+ ~SiPixelValidateDigiGPU() override = default;
+ static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
+private:
+ void analyze(const edm::Event& iEvent, edm::EventSetup const& iSetup) override;
+ void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
+
+ edm::EDGetTokenT> gpudigiToken_;
+
+ cms::cuda::host::unique_ptr pdigi_;
+ cms::cuda::host::unique_ptr rawIdArr_;
+ cms::cuda::host::unique_ptr adc_;
+ cms::cuda::host::unique_ptr clus_;
+ uint32_t nDigis_;
+
+ std::string topFolderName_;
+ MonitorElement* hnDigis;
+ MonitorElement* hadc;
+};
+
+SiPixelValidateDigiGPU::SiPixelValidateDigiGPU(const edm::ParameterSet& iConfig)
+ : gpudigiToken_(consumes>(iConfig.getParameter("src")))
+{
+ topFolderName_ = "SiPixelHeterogeneousV/PixelDigisGPU";
+}
+
+void SiPixelValidateDigiGPU::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& run , edm::EventSetup const& es) {
+ ibooker.cd();
+ ibooker.setCurrentFolder(topFolderName_);
+ hnDigis = ibooker.book1D("nDigis", ";nDigis;#entries", 1000, 0, 1000000);
+ hadc = ibooker.book1D("adc", "Digi ADC values", 500, 0, 50000);
+}
+
+void SiPixelValidateDigiGPU::analyze(const edm::Event& iEvent, edm::EventSetup const& es) {
+ cms::cuda::Product const& inputDataWrapped = iEvent.get(gpudigiToken_);
+ cms::cuda::ScopedContextAnalyze ctx{inputDataWrapped};
+ auto const& gpuDigis = ctx.get(inputDataWrapped);
+
+ nDigis_ = gpuDigis.nDigis();
+ hnDigis->Fill(nDigis_);
+ pdigi_ = gpuDigis.pdigiToHostAsync(ctx.stream());
+ rawIdArr_ = gpuDigis.rawIdArrToHostAsync(ctx.stream());
+ adc_ = gpuDigis.adcToHostAsync(ctx.stream());
+ clus_ = gpuDigis.clusToHostAsync(ctx.stream());
+
+
+ //get TkGeometry record
+ edm::ESHandle geom;
+ es.get().get(geom);
+ geom = geom.product();
+
+ for(uint32_t idigi = 0; idigi < nDigis_; idigi++) {
+ DetId detId(rawIdArr_[idigi]);
+ if(detId.null()) continue;
+ if(detId.det() != DetId::Detector::Tracker) continue;
+ auto adc_idigi = adc_[idigi];
+ hadc->Fill(adc_idigi);
+ }
+
+}
+
+void SiPixelValidateDigiGPU::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
+ edm::ParameterSetDescription desc;
+ desc.add("src", edm::InputTag("siPixelClustersCUDA"));
+ descriptions.add("SiPixelValidateDigiGPU", desc);
+}
+DEFINE_FWK_MODULE(SiPixelValidateDigiGPU);
diff --git a/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateRecHitGPU.cc b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateRecHitGPU.cc
new file mode 100644
index 0000000000000..49c3430620142
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateRecHitGPU.cc
@@ -0,0 +1,154 @@
+#include
+#include "CUDADataFormats/Common/interface/Product.h"
+#include "CUDADataFormats/Common/interface/HostProduct.h"
+#include "CUDADataFormats/TrackingRecHit/interface/TrackingRecHit2DCUDA.h"
+#include "DataFormats/Common/interface/DetSetVectorNew.h"
+#include "DataFormats/Common/interface/Handle.h"
+#include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h"
+#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
+#include "FWCore/Framework/interface/ESHandle.h"
+#include "FWCore/Framework/interface/Event.h"
+#include "FWCore/Framework/interface/EventSetup.h"
+#include "FWCore/Framework/interface/MakerMacros.h"
+#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
+#include "FWCore/ParameterSet/interface/ParameterSet.h"
+#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
+#include "FWCore/Utilities/interface/InputTag.h"
+#include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
+#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
+#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
+#include "HeterogeneousCore/CUDACore/interface/ScopedContext.h"
+#include "RecoLocalTracker/SiPixelRecHits/interface/pixelCPEforGPU.h"
+#include "DQMServices/Core/interface/DQMStore.h"
+#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
+#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
+
+class SiPixelValidateRecHitGPU : public DQMEDAnalyzer {
+
+public:
+ explicit SiPixelValidateRecHitGPU(const edm::ParameterSet& iConfig);
+ ~SiPixelValidateRecHitGPU() override = default;
+ static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
+private:
+ void analyze(const edm::Event& iEvent, edm::EventSetup const& iSetup) override;
+ void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
+ edm::EDGetTokenT> tokenHit_; // CUDA hits
+ edm::EDGetTokenT clusterToken_;
+
+ uint32_t m_nHits;
+ cms::cuda::host::unique_ptr m_store32;
+ cms::cuda::host::unique_ptr m_hitsModuleStart;
+
+ std::string topFolderName_;
+ MonitorElement* nHits;
+ MonitorElement* hrecHit_Barrel_XY;
+ MonitorElement* hrecHit_Endcap_plus_XY;
+ MonitorElement* hrecHit_Endcap_minus_XY;
+ MonitorElement* hrecHit_Barrel_RZ;
+ MonitorElement* hrecHit_Endcap_plus_RZ;
+ MonitorElement* hrecHit_Endcap_minus_RZ;
+
+};
+
+SiPixelValidateRecHitGPU::SiPixelValidateRecHitGPU(const edm::ParameterSet& iConfig)
+ : tokenHit_(consumes>(iConfig.getParameter("pixelRecHitSrc"))),
+ clusterToken_(consumes(iConfig.getParameter("src")))
+{
+ topFolderName_ = "SiPixelHeterogeneousV/PixelRecHitGPU";
+}
+
+void SiPixelValidateRecHitGPU::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& run , edm::EventSetup const& es) {
+ ibooker.cd();
+ ibooker.setCurrentFolder(topFolderName_);
+ nHits = ibooker.book1D("nrecHitsFromGPU", "Number of rechits from GPU", 100, 0, 10000);
+ hrecHit_Barrel_XY = ibooker.book2D( "RecHit_Barrel_XY", "Barrel y vs. x", 960, -120, 120, 960, -120, 120 );
+ hrecHit_Endcap_plus_XY = ibooker.book2D( "RecHit_Endcap_plus_XY", "RecHit Forward Endcap y vs. x", 960, -120, 120, 960, -120, 120 );
+ hrecHit_Endcap_minus_XY = ibooker.book2D( "RecHit_Endcap_minus_XY", "RecHit Forward Endcap y vs. x", 960, -120, 120, 960, -120, 120 );
+
+ hrecHit_Barrel_RZ = ibooker.book2D( "RecHit_Barrel_RZ", "RecHit #rho vs. z", 900, -300, 300, 480, 0, 120 );
+ hrecHit_Endcap_plus_RZ = ibooker.book2D( "RecHit_Endcap_plus_RZ", "RecHit #rho vs. z", 900, -300, 300, 480, 0, 120 );
+ hrecHit_Endcap_minus_RZ = ibooker.book2D( "RecHit_Endcap_minus_RZ", "RecHit #rho vs. z", 900, -300, 300, 480, 0, 120 );
+
+}
+
+void SiPixelValidateRecHitGPU::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
+ edm::ParameterSetDescription desc;
+ desc.add("pixelRecHitSrc", edm::InputTag("siPixelRecHitsCUDAPreSplitting"));
+ desc.add("src", edm::InputTag("siPixelClustersPreSplitting"));
+ descriptions.add("SiPixelValidateRecHitGPU", desc);
+}
+
+void SiPixelValidateRecHitGPU::analyze(const edm::Event& iEvent, edm::EventSetup const& es) {
+ cms::cuda::Product const& inputDataWrapped = iEvent.get(tokenHit_);
+ cms::cuda::ScopedContextAnalyze ctx{inputDataWrapped};
+ auto const& inputData = ctx.get(inputDataWrapped);
+ m_nHits = inputData.nHits();
+ if (m_nHits == 0)
+ return;
+
+ m_store32 = inputData.localCoordToHostAsync(ctx.stream());
+ m_hitsModuleStart = inputData.hitsModuleStartToHostAsync(ctx.stream());
+ nHits->Fill(m_nHits);
+
+ auto xl = m_store32.get();
+ auto yl = xl + m_nHits;
+ //auto xe = yl + m_nHits;//errors
+ //auto ye = xe + m_nHits;
+
+ //get TkGeometry record
+ edm::ESHandle geom;
+ es.get().get(geom);
+ geom = geom.product();
+
+ edm::Handle hclusters;
+ iEvent.getByToken(clusterToken_, hclusters);
+
+ auto const& input = *hclusters;
+
+ constexpr uint32_t MaxHitsInModule = gpuClustering::MaxHitsInModule;
+
+ for (auto DSViter = input.begin(); DSViter != input.end(); DSViter++) {
+ unsigned int detid = DSViter->detId();
+ DetId detIdObject(detid);
+ const GeomDetUnit* gDetUnit = geom->idToDetUnit(detIdObject);
+ auto gind = gDetUnit->index();
+ const PixelGeomDetUnit* pixDet = dynamic_cast(gDetUnit);
+ assert(pixDet);
+
+ auto fc = m_hitsModuleStart[gind];
+ auto lc = m_hitsModuleStart[gind + 1];
+ auto nhits = lc - fc;
+
+ nhits = std::min(nhits, MaxHitsInModule);
+
+ if (0 == nhits)
+ continue;
+ auto jnd = [&](int k) { return fc + k; };
+ for (auto const& clust : *DSViter) {
+ assert(clust.originalId() >= 0);
+ assert(clust.originalId() < DSViter->size());
+ if (clust.originalId() >= nhits)
+ continue;
+ auto ij = jnd(clust.originalId());
+ if (ij >= TrackingRecHit2DSOAView::maxHits())
+ continue; // overflow...
+ LocalPoint lp(xl[ij], yl[ij]);
+
+ GlobalPoint rechitPos = gDetUnit->surface().toGlobal(lp);
+
+ if (gDetUnit->type().isBarrel()) {
+ hrecHit_Barrel_XY->Fill( rechitPos.x(), rechitPos.y() );
+ hrecHit_Barrel_RZ->Fill( rechitPos.z(), rechitPos.perp());
+ } else if (gDetUnit->type().isEndcap()) {
+ if(rechitPos.z() > 0) {
+ hrecHit_Endcap_plus_XY->Fill( rechitPos.x(), rechitPos.y() );
+ hrecHit_Endcap_plus_RZ->Fill( rechitPos.z(), rechitPos.perp());
+ } else {
+ hrecHit_Endcap_minus_XY->Fill( rechitPos.x(), rechitPos.y() );
+ hrecHit_Endcap_minus_RZ->Fill( rechitPos.z(), rechitPos.perp());
+ }
+ }
+ }
+ }
+}
+DEFINE_FWK_MODULE(SiPixelValidateRecHitGPU);
diff --git a/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateTrackFromSoA.cc b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateTrackFromSoA.cc
new file mode 100644
index 0000000000000..c7ea653a1334d
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateTrackFromSoA.cc
@@ -0,0 +1,81 @@
+#include
+#include "CUDADataFormats/Common/interface/Product.h"
+#include "CUDADataFormats/Common/interface/HostProduct.h"
+#include "CUDADataFormats/Track/interface/PixelTrackHeterogeneous.h"
+#include "DataFormats/Common/interface/DetSetVectorNew.h"
+#include "DataFormats/Common/interface/Handle.h"
+#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
+#include "FWCore/Framework/interface/ESHandle.h"
+#include "FWCore/Framework/interface/Event.h"
+#include "FWCore/Framework/interface/EventSetup.h"
+#include "FWCore/Framework/interface/MakerMacros.h"
+#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
+#include "FWCore/ParameterSet/interface/ParameterSet.h"
+#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
+#include "FWCore/Utilities/interface/InputTag.h"
+#include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
+#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
+#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
+#include "Geometry/CommonTopologies/interface/GeomDetEnumerators.h"
+#include "HeterogeneousCore/CUDACore/interface/ScopedContext.h"
+#include "RecoLocalTracker/SiPixelRecHits/interface/pixelCPEforGPU.h"
+#include "DQMServices/Core/interface/DQMStore.h"
+#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
+#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
+
+class SiPixelValidateTrackFromSoA : public DQMEDAnalyzer {
+
+public:
+ explicit SiPixelValidateTrackFromSoA(const edm::ParameterSet& iConfig);
+ ~SiPixelValidateTrackFromSoA() override = default;
+ static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
+private:
+ void analyze(const edm::Event& iEvent, edm::EventSetup const& iSetup) override;
+ void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
+
+ edm::EDGetTokenT tracksoaToken_;
+
+ std::string topFolderName_;
+ MonitorElement* hnTracks;
+};
+
+SiPixelValidateTrackFromSoA::SiPixelValidateTrackFromSoA(const edm::ParameterSet& iConfig)
+ : tracksoaToken_(consumes(iConfig.getParameter("src")))
+{
+ topFolderName_ = "SiPixelHeterogenousV/PixelTracksSoA";
+}
+
+void SiPixelValidateTrackFromSoA::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& run , edm::EventSetup const& es) {
+ ibooker.cd();
+ ibooker.setCurrentFolder(topFolderName_);
+ hnTracks = ibooker.book1D("nTracksLoose", "#Tracks with quality >= loose;nTracks;#entries", 100, 0, 1000);
+}
+
+void SiPixelValidateTrackFromSoA::analyze(const edm::Event& iEvent, edm::EventSetup const& es) {
+ const auto& soatracks = *(iEvent.get(tracksoaToken_));
+ const auto *quality = soatracks.qualityData();
+ uint32_t nTk = 0;
+ uint32_t nTkLoose = 0;
+ //soatracks.m_nTracks; this is always 0?
+ //std::cout << "Ntracks:" << soatracks.m_nTracks << "\tmax Tracks=" << soatracks.stride() << std::endl;
+
+ //taken from https://github.com/sroychow/cmssw/blob/pixelPhase1gpuvalid/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducerFromSoA.cc
+ for (int32_t it = 0; it < soatracks.stride(); ++it) {
+ auto nHits = soatracks.nHits(it);
+ if (nHits == 0) break;
+ nTk++;
+ auto q = quality[it];
+ if (q != trackQuality::loose) continue;
+ nTkLoose++;
+ }
+ //std::cout << "Ntracks:" << nTk << "\tloose Tracks=" << nTkLoose << std::endl;
+ hnTracks->Fill(nTkLoose);
+
+}
+
+void SiPixelValidateTrackFromSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
+ edm::ParameterSetDescription desc;
+ desc.add("src", edm::InputTag("pixelTrackSoA"));
+ descriptions.add("SiPixelValidateTrackFromSoA", desc);
+}
+DEFINE_FWK_MODULE(SiPixelValidateTrackFromSoA);
diff --git a/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateVerticesFromSoA.cc b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateVerticesFromSoA.cc
new file mode 100644
index 0000000000000..2415da705874d
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateVerticesFromSoA.cc
@@ -0,0 +1,242 @@
+#include
+#include "CUDADataFormats/Common/interface/Product.h"
+#include "CUDADataFormats/Common/interface/HostProduct.h"
+#include "CUDADataFormats/Vertex/interface/ZVertexHeterogeneous.h"
+#include "DataFormats/Common/interface/DetSetVectorNew.h"
+#include "DataFormats/Common/interface/Handle.h"
+#include "DataFormats/BeamSpot/interface/BeamSpot.h"
+#include "DataFormats/TrackReco/interface/Track.h"
+#include "DataFormats/TrackReco/interface/TrackExtra.h"
+#include "DataFormats/TrackReco/interface/TrackFwd.h"
+#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
+#include "FWCore/Framework/interface/ESHandle.h"
+#include "FWCore/Framework/interface/Event.h"
+#include "FWCore/Framework/interface/EventSetup.h"
+#include "FWCore/Framework/interface/MakerMacros.h"
+#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
+#include "FWCore/ParameterSet/interface/ParameterSet.h"
+#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
+#include "FWCore/Utilities/interface/InputTag.h"
+#include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
+#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
+#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
+#include "HeterogeneousCore/CUDACore/interface/ScopedContext.h"
+#include "RecoLocalTracker/SiPixelRecHits/interface/pixelCPEforGPU.h"
+#include "DQMServices/Core/interface/DQMStore.h"
+#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
+#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
+
+class SiPixelValidateVerticesFromSoA : public DQMEDAnalyzer {
+
+public:
+ explicit SiPixelValidateVerticesFromSoA(const edm::ParameterSet& iConfig);
+ ~SiPixelValidateVerticesFromSoA() override = default;
+
+ static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
+
+private:
+ void analyze(const edm::Event& iEvent, edm::EventSetup const& iSetup) override;
+ void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
+
+ edm::EDGetTokenT tokenvertexsoa_;
+ edm::EDGetTokenT tokenbeamSpot_;
+ edm::EDGetTokenT tokenTracks_;
+
+ std::string topFolderName_;
+
+ MonitorElement* hnVertices;
+ MonitorElement* hvx;
+ MonitorElement* hvy;
+ MonitorElement* hvz;
+ MonitorElement* ndof;
+ MonitorElement* chi2;
+ MonitorElement* pt2;
+ MonitorElement* wv;
+ MonitorElement* chi2ndof;
+ MonitorElement* tracksumPt2;
+ MonitorElement* ptvsNtracks;
+
+ MonitorElement* ntracks;
+ MonitorElement* trackQuality;
+ MonitorElement* associatedTrack;
+ MonitorElement* trackQualityPass;
+ MonitorElement* trackPt;
+ MonitorElement* trackEta;
+ MonitorElement* trackPhi;
+ MonitorElement* trackCharge;
+ MonitorElement* trackZip;
+ MonitorElement* trackTip;
+
+};
+
+SiPixelValidateVerticesFromSoA::SiPixelValidateVerticesFromSoA(const edm::ParameterSet& iConfig)
+ : tokenvertexsoa_(consumes(iConfig.getParameter("src"))),
+ tokenbeamSpot_(consumes(iConfig.getParameter("beamSpotsrc"))),
+ //tokenIndToEdm_(consumes(conf.getParameter("TrackCollectionsrc"))),
+ tokenTracks_(consumes(iConfig.getParameter("trackCollectionsrc")))
+{
+ topFolderName_ = "SiPixelHeterogeneousV/PixelVerticesSoA";
+}
+
+void SiPixelValidateVerticesFromSoA::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& run , edm::EventSetup const& es) {
+ ibooker.cd();
+ ibooker.setCurrentFolder(topFolderName_);
+ hnVertices = ibooker.book1D("nVerticesgpu", ";#of vertices;", 150, -0.5, 149.5);
+ hvx = ibooker.book1D("vertex_xpos", ";xPos;", 100, -0.5, 0.5);
+ hvy = ibooker.book1D("vertex_ypos", ";yPos;", 10, -0.5, 0.5);
+ hvz = ibooker.book1D("vertex_zpos", ";zPos;", 10, -20., 20.);
+ ndof = ibooker.book1D("ndof", ";ndof;", 171, -0.5, 170.5);
+ chi2 = ibooker.book1D("chi2", ";chi2;", 100, -0.5, 1.5);
+ pt2 = ibooker.book1D("pt2", ";p_{T}^{2} of tracks forming vertex;", 450, -0.5, 4499.5);
+ wv = ibooker.book1D("wv", ";Output weight (1/error^2 on z position) of vertex;", 100, -0.5, 1.5);
+ ntracks = ibooker.book1D("ntracks", ";#of tracks;", 101, -0.5, 199.5);
+ trackQuality = ibooker.book1D("trackQuality", ";Track quality;", 6, -0.5, 5.5);
+ associatedTrack = ibooker.book1D("associated tracks", ";track associated;", 100, -1.5, 98.5);
+ trackQualityPass = ibooker.book1D("trackQualityPass", ";Quality of tracks passing the threshold;", 6, -0.5, 5.5);
+ trackPt = ibooker.book1D("trackPt", ";p_T of tracks associated with vertices;", 700, -0.5, 700.5);
+ trackCharge = ibooker.book1D("trackCharge", ";Charge of the track;", 5, -2.5, 2.5);
+ trackZip = ibooker.book1D("trackZip", ";ZIP of tracks;", 19, -9.5, 9.5);
+ trackTip = ibooker.book1D("trackTip", ";TIP of tracks;", 21, -10.5, 10.5);
+ trackEta = ibooker.book1D("trackEta", ";#eta of the tracks;", 11, -5.5, 5.5);
+ trackPhi = ibooker.book1D("trackPhi", ";#phi of the tracks;", 7, -3.5, 3.5);
+ chi2ndof = ibooker.book1D("chi2ndof", ";#chi2/ndof per vertex;", 100, -0.5, 99.5);
+ tracksumPt2 = ibooker.book1D("tracksumPt2", ";Sum of p_{T} per vertex;", 450, -0.5, 4499.5);
+ ptvsNtracks = ibooker.book2D("ptvsNtracks", "Pt^2 as function of the number of tracks;# of tracks per vertex;p_{T}^{2}", 101, -0.5, 199.5, 1500, -0.5, 1499.5);
+
+
+}
+
+void SiPixelValidateVerticesFromSoA::analyze(const edm::Event& iEvent, edm::EventSetup const& es) {
+
+ const auto& vertexsoa = *(iEvent.get(tokenvertexsoa_).get());
+
+ assert(&vertexsoa);
+
+ auto nv = vertexsoa.nvFinal;
+ if(nv > vertexsoa.MAXVTX) return;
+ hnVertices->Fill(nv);
+
+ const auto& tracksoa = *(iEvent.get(tokenTracks_));
+ const auto *quality = tracksoa.qualityData();
+
+ assert(&tracksoa);
+
+ uint32_t maxNumTracks = tracksoa.stride(); // This is the dimension of the soas, not the actual number of tracks. We iterate over them and break the loop if nHits is 0 (index no longer used).
+
+
+ //beamSpot
+ edm::Handle beampspotHandle;
+ iEvent.getByToken(tokenbeamSpot_, beampspotHandle);
+ float x0 = 0., y0 = 0., z0 = 0., dxdz = 0., dydz = 0.;
+ if (!beampspotHandle.isValid()) {
+ edm::LogWarning("SiPixelValidateVerticesFromSoA") << "No beamspot found. returning vertexes with (0,0,Z) ";
+ } else {
+ const reco::BeamSpot &bs = *beampspotHandle;
+ x0 = bs.x0();
+ y0 = bs.y0();
+ z0 = bs.z0();
+ dxdz = bs.dxdz();
+ dydz = bs.dydz();
+ }
+
+ for (unsigned int i = 0; i < nv; i++) {
+ auto z = vertexsoa.zv[i];
+ auto x = x0 + dxdz * z;
+ auto y = y0 + dydz * z;
+ z += z0;
+ hvx->Fill(x);
+ hvy->Fill(y);
+ hvz->Fill(z);
+ ndof->Fill(vertexsoa.ndof[i]);
+ chi2->Fill(vertexsoa.chi2[i]);
+ pt2->Fill(vertexsoa.ptv2[i]);
+ wv->Fill(1./static_cast(vertexsoa.wv[i]));
+ if (vertexsoa.ndof[i]>0)
+ {
+ chi2ndof->Fill(static_cast(vertexsoa.chi2[i])/static_cast(vertexsoa.ndof[i]));
+ }
+
+
+ Double_t sumPt2 = 0;
+
+ // Start accesing the tracks
+ uint32_t nTk = 0; // Total number of tracks assiciated with the vertex.
+ uint32_t nTkLoose = 0; // Number of tracks with quality 'loose'.
+ uint32_t nTkGood = 0; // Number of good tracks (with quality higher than qualityThreshold)
+ auto tkQualityThres = trackQuality::loose; // Quality above which (included) the track is considered of good quality.
+
+ for (uint32_t iTk=0; iTkFill(vertexsoa.idv[iTk]);
+ trackQuality->Fill(qual);
+ trackPt->Fill(tracksoa.pt(iTk));
+ trackEta->Fill(tracksoa.eta(iTk));
+ trackPhi->Fill(tracksoa.phi(iTk));
+ trackCharge->Fill(tracksoa.charge(iTk));
+ trackZip->Fill(tracksoa.zip(iTk));
+ trackTip->Fill(tracksoa.tip(iTk));
+
+ // Making stats
+ nTk++;
+
+ sumPt2 += tracksoa.pt(iTk)*tracksoa.pt(iTk);
+
+ if (qual >= tkQualityThres)
+ {
+ nTkGood++;
+ trackQualityPass->Fill(qual);
+ }
+
+ if (qual == trackQuality::loose)
+ {
+ nTkLoose++;
+ }
+
+ std::cout << "Track: " << iTk << " is associated to vetex: " << i << ", out of: " << nv << " matching" << std::endl;
+ }
+ else
+ {
+ //std::cout << "Track: " << iTk << " is not associated to vetex: " << i << ", out of: " << nv << "not matching" << std::endl;
+ }
+
+ }
+
+ std::cout << "Num tracks: " << nTk << ", (out of max number: " << maxNumTracks << "), thereof good tracks: " << nTkGood
+ << ", N loose tracks: " << nTkLoose
+ << std::endl;
+
+ ntracks->Fill(nTk);
+
+ tracksumPt2->Fill(sumPt2);
+
+ ptvsNtracks->Fill(nTk, vertexsoa.ptv2[i]);
+
+
+ }
+
+ //if (maxNumTracks > vertexsoa.MAXTRACKS)
+ //{
+ // std::cerr << "The maximum number of tracks exceeds the maximum number of tracks in the vertex. " << std::endl;
+ // return;
+ //}
+}
+
+
+void SiPixelValidateVerticesFromSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
+ edm::ParameterSetDescription desc;
+ desc.add("trackCollectionsrc", edm::InputTag("pixelTracks"));
+ desc.add("beamSpotsrc", edm::InputTag("offlineBeamSpot"));
+ desc.add("src", edm::InputTag("pixelVertexSoA"));
+ descriptions.add("SiPixelValidateVerticesFromSoA", desc);
+}
+DEFINE_FWK_MODULE(SiPixelValidateVerticesFromSoA);
diff --git a/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateVerticesGPU.cc b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateVerticesGPU.cc
new file mode 100644
index 0000000000000..7569281f62e81
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/plugins/SiPixelValidateVerticesGPU.cc
@@ -0,0 +1,118 @@
+#include
+#include "CUDADataFormats/Common/interface/Product.h"
+#include "CUDADataFormats/Common/interface/HostProduct.h"
+#include "CUDADataFormats/Vertex/interface/ZVertexHeterogeneous.h"
+#include "DataFormats/Common/interface/DetSetVectorNew.h"
+#include "DataFormats/Common/interface/Handle.h"
+#include "DataFormats/BeamSpot/interface/BeamSpot.h"
+#include "DataFormats/TrackReco/interface/Track.h"
+#include "DataFormats/TrackReco/interface/TrackExtra.h"
+#include "DataFormats/TrackReco/interface/TrackFwd.h"
+#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
+#include "FWCore/Framework/interface/ESHandle.h"
+#include "FWCore/Framework/interface/Event.h"
+#include "FWCore/Framework/interface/EventSetup.h"
+#include "FWCore/Framework/interface/MakerMacros.h"
+#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
+#include "FWCore/ParameterSet/interface/ParameterSet.h"
+#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
+#include "FWCore/Utilities/interface/InputTag.h"
+#include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
+#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
+#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
+#include "HeterogeneousCore/CUDACore/interface/ScopedContext.h"
+#include "RecoLocalTracker/SiPixelRecHits/interface/pixelCPEforGPU.h"
+#include "DQMServices/Core/interface/DQMStore.h"
+#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
+#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
+
+class SiPixelValidateVerticesGPU : public DQMEDAnalyzer {
+
+public:
+ explicit SiPixelValidateVerticesGPU(const edm::ParameterSet& iConfig);
+ ~SiPixelValidateVerticesGPU() override = default;
+
+ static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
+
+ using HMSstorage = HostProduct;
+
+private:
+ void analyze(const edm::Event& iEvent, edm::EventSetup const& iSetup) override;
+ void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
+
+ edm::EDGetTokenT> tokenverticesCUDA_;
+ edm::EDGetTokenT tokenbeamSpot_;
+ edm::EDGetTokenT tokenTracks_;
+
+ std::string topFolderName_;
+ MonitorElement* hnVertices;
+ MonitorElement* hvx;
+ MonitorElement* hvy;
+ MonitorElement* hvz;
+};
+
+SiPixelValidateVerticesGPU::SiPixelValidateVerticesGPU(const edm::ParameterSet& iConfig)
+ : tokenverticesCUDA_(consumes>(iConfig.getParameter("src"))),
+ tokenbeamSpot_(consumes(iConfig.getParameter("beamSpotsrc"))),
+ tokenTracks_(consumes(iConfig.getParameter("trackCollectionsrc")))
+{
+ topFolderName_ = "SiPixelHeterogeneousV/PixelVerticesGPU";
+}
+
+void SiPixelValidateVerticesGPU::bookHistograms(DQMStore::IBooker& ibooker, edm::Run const& run , edm::EventSetup const& es) {
+ ibooker.cd();
+ ibooker.setCurrentFolder(topFolderName_);
+ hnVertices = ibooker.book1D("nVerticesgpu", ";#of vertices;", 150, -0.5, 149.5);
+ hvx = ibooker.book1D("vertex_xpos", ";xPos;", 500, -0.5, 0.5);
+ hvy = ibooker.book1D("vertex_ypos", ";yPos;", 500, -0.5, 0.5);
+ hvz = ibooker.book1D("vertex_zpos", ";zPos;", 500, -20., 20.);
+
+}
+
+void SiPixelValidateVerticesGPU::analyze(const edm::Event& iEvent, edm::EventSetup const& es) {
+ //gpu vertices part
+ auto const& inputDataWrapped = iEvent.get(tokenverticesCUDA_);
+ cms::cuda::ScopedContextAnalyze ctx{inputDataWrapped};
+ auto const& inputData = ctx.get(inputDataWrapped);
+ auto& cudaVertices = *inputData.toHostAsync(ctx.stream());
+
+ auto nv = cudaVertices.nvFinal;
+ if(nv > cudaVertices.MAXVTX) return;
+ hnVertices->Fill(nv);
+
+ //beamSpot
+ edm::Handle beampspotHandle;
+ iEvent.getByToken(tokenbeamSpot_, beampspotHandle);
+ float x0 = 0., y0 = 0., z0 = 0., dxdz = 0., dydz = 0.;
+ if (!beampspotHandle.isValid()) {
+ edm::LogWarning("SiPixelValidateVerticesGPU") << "No beamspot found. returning vertexes with (0,0,Z) ";
+ } else {
+ const reco::BeamSpot &bs = *beampspotHandle;
+ x0 = bs.x0();
+ y0 = bs.y0();
+ z0 = bs.z0();
+ dxdz = bs.dxdz();
+ dydz = bs.dydz();
+ }
+
+ for (unsigned int i = 0; i < nv; i++) {
+ //auto i = cudaVertices.sortInd[j]; // on gpu sorted in ascending order....
+ //assert(i < nv);
+ auto z = cudaVertices.zv[i];
+ auto x = x0 + dxdz * z;
+ auto y = y0 + dydz * z;
+ z += z0;
+ hvx->Fill(x);
+ hvy->Fill(y);
+ hvz->Fill(z);
+ }
+}
+
+void SiPixelValidateVerticesGPU::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
+ edm::ParameterSetDescription desc;
+ desc.add("trackCollectionsrc", edm::InputTag("pixelTracks"));
+ desc.add("beamSpotsrc", edm::InputTag("offlineBeamSpot"));
+ desc.add("src", edm::InputTag("pixelVertexCUDA"));
+ descriptions.add("SiPixelValidateVerticesGPU", desc);
+}
+DEFINE_FWK_MODULE(SiPixelValidateVerticesGPU);
diff --git a/Validation/SiPixelHeterogeneousV/python/PixelHeterogeneousMCHarvesting_cff.py b/Validation/SiPixelHeterogeneousV/python/PixelHeterogeneousMCHarvesting_cff.py
new file mode 100644
index 0000000000000..771e1ef12c55a
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/python/PixelHeterogeneousMCHarvesting_cff.py
@@ -0,0 +1,5 @@
+import FWCore.ParameterSet.Config as cms
+
+from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
+
+pixelHeterogeneousValidationHarvesting = cms.Sequence()
diff --git a/Validation/SiPixelHeterogeneousV/python/PixelHeterogeneousValidationFirstStep_cff.py b/Validation/SiPixelHeterogeneousV/python/PixelHeterogeneousValidationFirstStep_cff.py
new file mode 100644
index 0000000000000..685509b6db8d0
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/python/PixelHeterogeneousValidationFirstStep_cff.py
@@ -0,0 +1,22 @@
+import FWCore.ParameterSet.Config as cms
+#import the validation modules
+##modules that import SoA directly from GPU
+from Validation.SiPixelHeterogeneousV.pixelValidateRecHitGPU_cfi import *
+from Validation.SiPixelHeterogeneousV.pixelValidateVerticesGPU_cfi import *
+from Validation.SiPixelHeterogeneousV.pixelValidateDigiGPU_cfi import *
+
+##modules that import intermediate SoA from CPU
+from Validation.SiPixelHeterogeneousV.pixelValidateVerticesFromSoA_cfi import *
+from Validation.SiPixelHeterogeneousV.pixelValidateDigiFromSoA_cfi import *
+from Validation.SiPixelHeterogeneousV.pixelValidateTrackFromSoA_cfi import *
+
+#Add the modules in the Sequence
+#the following sequence needs to be added to the standard validation sequence##TODO
+pixelHeterogeneousValidationSource = cms.Sequence(sipixeldigivalid
+ *sipixelrechitvalid
+ *pixelverticesvalid)
+
+pixelHeterogeneousValidationFromsoaSource = cms.Sequence(sipixeldigifromsoavalid
+ *sipixelrechitvalid
+ *sipixeltrackfromsoavalid
+ *pixelverticesfromsoavalid)
diff --git a/Validation/SiPixelHeterogeneousV/python/pixelValidateDigiFromSoA_cfi.py b/Validation/SiPixelHeterogeneousV/python/pixelValidateDigiFromSoA_cfi.py
new file mode 100644
index 0000000000000..2fcf6f2d8c3c6
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/python/pixelValidateDigiFromSoA_cfi.py
@@ -0,0 +1,8 @@
+import FWCore.ParameterSet.Config as cms
+
+from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
+
+sipixeldigifromsoavalid = DQMEDAnalyzer("SiPixelValidateDigiFromSoA",
+ mightGet = cms.optional.untracked.vstring,
+ src = cms.InputTag("siPixelDigisSoA")
+)
diff --git a/Validation/SiPixelHeterogeneousV/python/pixelValidateDigiGPU_cfi.py b/Validation/SiPixelHeterogeneousV/python/pixelValidateDigiGPU_cfi.py
new file mode 100644
index 0000000000000..8cd75e4c2d2bd
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/python/pixelValidateDigiGPU_cfi.py
@@ -0,0 +1,8 @@
+import FWCore.ParameterSet.Config as cms
+
+from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
+
+sipixeldigivalid = DQMEDAnalyzer("SiPixelValidateDigiGPU",
+ mightGet = cms.optional.untracked.vstring,
+ src = cms.InputTag("siPixelClustersCUDAPreSplitting")
+)
diff --git a/Validation/SiPixelHeterogeneousV/python/pixelValidateRecHitGPU_cfi.py b/Validation/SiPixelHeterogeneousV/python/pixelValidateRecHitGPU_cfi.py
new file mode 100644
index 0000000000000..3db026382375a
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/python/pixelValidateRecHitGPU_cfi.py
@@ -0,0 +1,9 @@
+import FWCore.ParameterSet.Config as cms
+
+from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
+
+sipixelrechitvalid = DQMEDAnalyzer("SiPixelValidateRecHitGPU",
+ mightGet = cms.optional.untracked.vstring,
+ pixelRecHitSrc = cms.InputTag("siPixelRecHitsCUDAPreSplitting"),
+ src = cms.InputTag("siPixelClustersPreSplitting")
+)
diff --git a/Validation/SiPixelHeterogeneousV/python/pixelValidateTrackFromSoA_cfi.py b/Validation/SiPixelHeterogeneousV/python/pixelValidateTrackFromSoA_cfi.py
new file mode 100644
index 0000000000000..32ea4876ddbbd
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/python/pixelValidateTrackFromSoA_cfi.py
@@ -0,0 +1,8 @@
+import FWCore.ParameterSet.Config as cms
+
+from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
+
+sipixeltrackfromsoavalid = DQMEDAnalyzer("SiPixelValidateTrackFromSoA",
+ mightGet = cms.optional.untracked.vstring,
+ src = cms.InputTag("pixelTrackSoA")
+)
diff --git a/Validation/SiPixelHeterogeneousV/python/pixelValidateVerticesFromSoA_cfi.py b/Validation/SiPixelHeterogeneousV/python/pixelValidateVerticesFromSoA_cfi.py
new file mode 100644
index 0000000000000..d781d5b72e7ab
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/python/pixelValidateVerticesFromSoA_cfi.py
@@ -0,0 +1,10 @@
+import FWCore.ParameterSet.Config as cms
+
+from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
+
+pixelverticesfromsoavalid = DQMEDAnalyzer("SiPixelValidateVerticesFromSoA",
+ trackCollectionsrc = cms.InputTag("pixelTrackSoA"),
+ beamSpotsrc = cms.InputTag("offlineBeamSpot"),
+ mightGet = cms.optional.untracked.vstring,
+ src = cms.InputTag("pixelVertexSoA")
+)
diff --git a/Validation/SiPixelHeterogeneousV/python/pixelValidateVerticesGPU_cfi.py b/Validation/SiPixelHeterogeneousV/python/pixelValidateVerticesGPU_cfi.py
new file mode 100644
index 0000000000000..9e23a339c153e
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/python/pixelValidateVerticesGPU_cfi.py
@@ -0,0 +1,10 @@
+import FWCore.ParameterSet.Config as cms
+
+from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
+
+pixelverticesvalid = DQMEDAnalyzer("SiPixelValidateVerticesGPU",
+ trackCollectionsrc = cms.InputTag("pixelTrackSoA"),
+ beamSpotsrc = cms.InputTag("offlineBeamSpot"),
+ mightGet = cms.optional.untracked.vstring,
+ src = cms.InputTag("pixelVertexCUDA")
+)
diff --git a/Validation/SiPixelHeterogeneousV/test/step3_RAW2DIGI_RECO_VALIDATION_DQM.py b/Validation/SiPixelHeterogeneousV/test/step3_RAW2DIGI_RECO_VALIDATION_DQM.py
new file mode 100644
index 0000000000000..c881ab2a6dded
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/test/step3_RAW2DIGI_RECO_VALIDATION_DQM.py
@@ -0,0 +1,155 @@
+# Auto generated configuration file
+# using:
+# Revision: 1.19
+# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
+# with command line options: step3 --conditions auto:phase1_2018_realistic -n 10 --era Run2_2018 --eventcontent RECOSIM,DQM --runUnscheduled --procModifiers gpu -s RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM --datatier GEN-SIM-RECO,DQMIO --geometry DB:Extended --no_exec
+import FWCore.ParameterSet.Config as cms
+
+from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
+from Configuration.ProcessModifiers.gpu_cff import gpu
+
+process = cms.Process('RECO',Run2_2018,gpu)
+
+# import of standard configurations
+process.load('Configuration.StandardSequences.Services_cff')
+process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
+process.load('FWCore.MessageService.MessageLogger_cfi')
+process.load('Configuration.EventContent.EventContent_cff')
+process.load('SimGeneral.MixingModule.mixNoPU_cfi')
+process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
+process.load('Configuration.StandardSequences.MagneticField_cff')
+process.load('Configuration.StandardSequences.RawToDigi_cff')
+process.load('Configuration.StandardSequences.Reconstruction_cff')
+process.load('Configuration.StandardSequences.Validation_cff')
+process.load('DQMServices.Core.DQMStoreNonLegacy_cff')
+process.load('DQMOffline.Configuration.DQMOfflineMC_cff')
+process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
+
+process.maxEvents = cms.untracked.PSet(
+ input = cms.untracked.int32(10),
+ output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
+)
+
+# Input source
+process.source = cms.Source("PoolSource",
+ fileNames = cms.untracked.vstring(
+ 'file:/eos/cms//store/relval/CMSSW_11_1_0_pre5/RelValTTbar_13UP18_RD/GEN-SIM-DIGI-RAW-HLTDEBUG/PUpmx25ns_110X_upgrade2018_realistic_v9_RD_Harvesting_6-v1/10000/00F14E92-1212-E64C-A9C6-3DF89F0F7DB7.root',
+ #'file:/eos/cms//store/relval/CMSSW_11_1_0_pre5/RelValTTbar_13UP18_RD/GEN-SIM-DIGI-RAW-HLTDEBUG/PUpmx25ns_110X_upgrade2018_realistic_v9_RD_Harvesting_6-v1/10000/AE74DF9D-E5DD-7649-BD41-210C0D97F9FB.root'
+ ),
+ secondaryFileNames = cms.untracked.vstring()
+)
+
+process.options = cms.untracked.PSet(
+ FailPath = cms.untracked.vstring(),
+ IgnoreCompletely = cms.untracked.vstring(),
+ Rethrow = cms.untracked.vstring(),
+ SkipEvent = cms.untracked.vstring(),
+ allowUnscheduled = cms.obsolete.untracked.bool,
+ canDeleteEarly = cms.untracked.vstring(),
+ emptyRunLumiMode = cms.obsolete.untracked.string,
+ eventSetup = cms.untracked.PSet(
+ forceNumberOfConcurrentIOVs = cms.untracked.PSet(
+
+ ),
+ numberOfConcurrentIOVs = cms.untracked.uint32(1)
+ ),
+ fileMode = cms.untracked.string('FULLMERGE'),
+ forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
+ makeTriggerResults = cms.obsolete.untracked.bool,
+ numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
+ numberOfConcurrentRuns = cms.untracked.uint32(1),
+ numberOfStreams = cms.untracked.uint32(0),
+ numberOfThreads = cms.untracked.uint32(1),
+ printDependencies = cms.untracked.bool(False),
+ sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
+ throwIfIllegalParameter = cms.untracked.bool(True),
+ wantSummary = cms.untracked.bool(False)
+)
+
+# Production Info
+process.configurationMetadata = cms.untracked.PSet(
+ annotation = cms.untracked.string('step3 nevts:10'),
+ name = cms.untracked.string('Applications'),
+ version = cms.untracked.string('$Revision: 1.19 $')
+)
+
+# Output definition
+
+process.RECOSIMoutput = cms.OutputModule("PoolOutputModule",
+ dataset = cms.untracked.PSet(
+ dataTier = cms.untracked.string('GEN-SIM-RECO'),
+ filterName = cms.untracked.string('')
+ ),
+ fileName = cms.untracked.string('step3_RAW2DIGI_RECO_VALIDATION_DQM.root'),
+ outputCommands = process.RECOSIMEventContent.outputCommands,
+ splitLevel = cms.untracked.int32(0)
+)
+
+process.DQMoutput = cms.OutputModule("DQMRootOutputModule",
+ dataset = cms.untracked.PSet(
+ dataTier = cms.untracked.string('DQMIO'),
+ filterName = cms.untracked.string('')
+ ),
+ fileName = cms.untracked.string('step3_RAW2DIGI_RECO_VALIDATION_DQM_inDQM.root'),
+ outputCommands = process.DQMEventContent.outputCommands,
+ splitLevel = cms.untracked.int32(0)
+)
+
+# Additional output definition
+
+# Other statements
+process.mix.playback = True
+process.mix.digitizers = cms.PSet()
+for a in process.aliases: delattr(process, a)
+process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string("randomEngineStateProducer")
+from Configuration.AlCa.GlobalTag import GlobalTag
+process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2018_realistic', '')
+
+###Load the new validation sequence
+process.load('Validation.SiPixelHeterogeneousV.PixelHeterogeneousValidationFirstStep_cff')
+
+# Path and EndPath definitions
+process.raw2digi_step = cms.Path(process.RawToDigi_pixelOnly)
+process.reconstruction_step = cms.Path(process.reconstruction_pixelTrackingOnly)
+process.prevalidation_step = cms.Path(process.globalPrevalidationPixelTrackingOnly)
+
+#the standard validation path is updated to run the new sequence -
+# It can either be pixelHeterogeneousValidationSource(if you want to run the modules which access products directly from GPU)
+# or be pixelHeterogeneousValidationFromsoaSource(if you want to run the modules which access products directly from GPU)
+
+process.validation_step = cms.EndPath(process.globalValidationPixelTrackingOnly*process.pixelHeterogeneousValidationFromsoaSource)
+
+process.dqmoffline_step = cms.EndPath(process.DQMOfflinePixelTracking)
+process.dqmofflineOnPAT_step = cms.EndPath(process.PostDQMOffline)
+process.RECOSIMoutput_step = cms.EndPath(process.RECOSIMoutput)
+process.DQMoutput_step = cms.EndPath(process.DQMoutput)
+
+# Schedule definition
+process.schedule = cms.Schedule(process.raw2digi_step,process.reconstruction_step,process.prevalidation_step,process.validation_step, process.dqmoffline_step,process.dqmofflineOnPAT_step,process.RECOSIMoutput_step,process.DQMoutput_step)
+from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
+associatePatAlgosToolsTask(process)
+
+# customisation of the process.
+
+# Automatic addition of the customisation function from SimGeneral.MixingModule.fullMixCustomize_cff
+from SimGeneral.MixingModule.fullMixCustomize_cff import setCrossingFrameOn
+
+#call to customisation function setCrossingFrameOn imported from SimGeneral.MixingModule.fullMixCustomize_cff
+process = setCrossingFrameOn(process)
+
+# End of customisation functions
+#do not add changes to your config after this point (unless you know what you are doing)
+from FWCore.ParameterSet.Utilities import convertToUnscheduled
+process=convertToUnscheduled(process)
+
+
+# Customisation from command line
+
+#Have logErrorHarvester wait for the same EDProducers to finish as those providing data for the OutputModule
+from FWCore.Modules.logErrorHarvester_cff import customiseLogErrorHarvesterUsingOutputCommands
+process = customiseLogErrorHarvesterUsingOutputCommands(process)
+
+# Add early deletion of temporary data products to reduce peak memory need
+from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
+process = customiseEarlyDelete(process)
+# End adding early deletion
diff --git a/Validation/SiPixelHeterogeneousV/test/step4_HARVESTING.py b/Validation/SiPixelHeterogeneousV/test/step4_HARVESTING.py
new file mode 100644
index 0000000000000..4776d442efd87
--- /dev/null
+++ b/Validation/SiPixelHeterogeneousV/test/step4_HARVESTING.py
@@ -0,0 +1,106 @@
+# Auto generated configuration file
+# using:
+# Revision: 1.19
+# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
+# with command line options: step4 --conditions auto:phase1_2018_realistic -s HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM --scenario pp --filetype DQM --geometry DB:Extended --era Run2_2018 --mc -n 100 --no_exec
+import FWCore.ParameterSet.Config as cms
+
+from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
+
+process = cms.Process('HARVESTING',Run2_2018)
+
+# import of standard configurations
+process.load('Configuration.StandardSequences.Services_cff')
+process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
+process.load('FWCore.MessageService.MessageLogger_cfi')
+process.load('Configuration.EventContent.EventContent_cff')
+process.load('SimGeneral.MixingModule.mixNoPU_cfi')
+process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
+process.load('Configuration.StandardSequences.MagneticField_cff')
+process.load('Configuration.StandardSequences.DQMSaverAtRunEnd_cff')
+process.load('Configuration.StandardSequences.Harvesting_cff')
+process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
+
+process.maxEvents = cms.untracked.PSet(
+ input = cms.untracked.int32(-1),
+ output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
+)
+
+# Input source
+process.source = cms.Source("DQMRootSource",
+ fileNames = cms.untracked.vstring('file:step3_RAW2DIGI_RECO_VALIDATION_DQM_inDQM.root')
+)
+
+process.options = cms.untracked.PSet(
+ FailPath = cms.untracked.vstring(),
+ IgnoreCompletely = cms.untracked.vstring(),
+ Rethrow = cms.untracked.vstring('ProductNotFound'),
+ SkipEvent = cms.untracked.vstring(),
+ allowUnscheduled = cms.obsolete.untracked.bool,
+ canDeleteEarly = cms.untracked.vstring(),
+ emptyRunLumiMode = cms.obsolete.untracked.string,
+ eventSetup = cms.untracked.PSet(
+ forceNumberOfConcurrentIOVs = cms.untracked.PSet(
+
+ ),
+ numberOfConcurrentIOVs = cms.untracked.uint32(1)
+ ),
+ fileMode = cms.untracked.string('FULLMERGE'),
+ forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
+ makeTriggerResults = cms.obsolete.untracked.bool,
+ numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
+ numberOfConcurrentRuns = cms.untracked.uint32(1),
+ numberOfStreams = cms.untracked.uint32(0),
+ numberOfThreads = cms.untracked.uint32(1),
+ printDependencies = cms.untracked.bool(False),
+ sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
+ throwIfIllegalParameter = cms.untracked.bool(True),
+ wantSummary = cms.untracked.bool(False)
+)
+
+# Production Info
+process.configurationMetadata = cms.untracked.PSet(
+ annotation = cms.untracked.string('step4 nevts:100'),
+ name = cms.untracked.string('Applications'),
+ version = cms.untracked.string('$Revision: 1.19 $')
+)
+
+# Output definition
+
+# Additional output definition
+
+# Other statements
+from Configuration.AlCa.GlobalTag import GlobalTag
+process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2018_realistic', '')
+
+# Path and EndPath definitions
+process.genHarvesting = cms.Path(process.postValidation_gen)
+process.dqmHarvestingFakeHLT = cms.Path(process.DQMOffline_SecondStep_FakeHLT+process.DQMOffline_Certification)
+process.validationHarvestingHI = cms.Path(process.postValidationHI)
+process.dqmHarvestingExtraHLT = cms.Path(process.DQMOffline_SecondStep_ExtraHLT+process.DQMOffline_Certification)
+process.alcaHarvesting = cms.Path()
+process.validationHarvestingNoHLT = cms.Path(process.postValidation+process.postValidation_gen)
+process.validationHarvestingFS = cms.Path(process.recoMuonPostProcessors+process.postValidationTracking+process.MuIsoValPostProcessor+process.calotowersPostProcessor+process.hcalSimHitsPostProcessor+process.hcaldigisPostProcessor+process.hcalrechitsPostProcessor+process.electronPostValidationSequence+process.photonPostProcessor+process.pfJetClient+process.pfMETClient+process.pfJetResClient+process.pfElectronClient+process.rpcRecHitPostValidation_step+process.makeBetterPlots+process.bTagCollectorSequenceMCbcl+process.METPostProcessor+process.L1GenPostProcessor+process.bdHadronTrackPostProcessor+process.siPixelPhase1OfflineDQM_harvestingV+process.MuonGEMHitsPostProcessors+process.MuonGEMDigisPostProcessors+process.MuonGEMRecHitsPostProcessors+process.postValidation_gen)
+process.validationpreprodHarvesting = cms.Path(process.postValidation_preprod+process.hltpostvalidation_preprod+process.postValidation_gen)
+process.validationprodHarvesting = cms.Path(process.hltpostvalidation_prod+process.postValidation_gen)
+process.validationHarvesting = cms.Path(process.postValidation+process.hltpostvalidation+process.postValidation_gen)
+process.validationpreprodHarvestingNoHLT = cms.Path(process.postValidation_preprod+process.postValidation_gen)
+process.dqmHarvestingPOGMC = cms.Path(process.DQMOffline_SecondStep_PrePOGMC)
+process.validationHarvestingMiniAOD = cms.Path(process.JetPostProcessor+process.METPostProcessorHarvesting+process.postValidationMiniAOD)
+process.dqmHarvesting = cms.Path(process.DQMOffline_SecondStep+process.DQMOffline_Certification)
+process.postValidation_trackingOnly_step = cms.Path(process.postValidation_trackingOnly)
+process.DQMHarvestPixelTracking_step = cms.Path(process.DQMHarvestPixelTracking)
+process.dqmsave_step = cms.Path(process.DQMSaver)
+
+# Schedule definition
+process.schedule = cms.Schedule(process.postValidation_trackingOnly_step,process.DQMHarvestPixelTracking_step,process.dqmsave_step)
+from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
+associatePatAlgosToolsTask(process)
+
+
+# Customisation from command line
+
+# Add early deletion of temporary data products to reduce peak memory need
+from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
+process = customiseEarlyDelete(process)
+# End adding early deletion
diff --git a/gpuworkflow/step3_RAW2DIGI_RECO_VALIDATION_DQM.py b/gpuworkflow/step3_RAW2DIGI_RECO_VALIDATION_DQM.py
new file mode 100644
index 0000000000000..2078840d059f9
--- /dev/null
+++ b/gpuworkflow/step3_RAW2DIGI_RECO_VALIDATION_DQM.py
@@ -0,0 +1,158 @@
+# Auto generated configuration file
+# using:
+# Revision: 1.19
+# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
+# with command line options: step3 --conditions auto:phase1_2018_realistic -n 10 --era Run2_2018 --eventcontent RECOSIM,DQM --runUnscheduled --procModifiers gpu -s RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM --datatier GEN-SIM-RECO,DQMIO --geometry DB:Extended --no_exec
+import FWCore.ParameterSet.Config as cms
+
+from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
+from Configuration.ProcessModifiers.gpu_cff import gpu
+
+process = cms.Process('RECO',Run2_2018,gpu)
+
+# import of standard configurations
+process.load('Configuration.StandardSequences.Services_cff')
+process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
+process.load('FWCore.MessageService.MessageLogger_cfi')
+process.load('Configuration.EventContent.EventContent_cff')
+process.load('SimGeneral.MixingModule.mixNoPU_cfi')
+process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
+process.load('Configuration.StandardSequences.MagneticField_cff')
+process.load('Configuration.StandardSequences.RawToDigi_cff')
+process.load('Configuration.StandardSequences.Reconstruction_cff')
+process.load('Configuration.StandardSequences.Validation_cff')
+process.load('DQMServices.Core.DQMStoreNonLegacy_cff')
+process.load('DQMOffline.Configuration.DQMOfflineMC_cff')
+process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
+process.load('Validation.SiPixelHeterogeneousV.pixelValidateVerticesFromSoA_cfi')
+
+
+process.maxEvents = cms.untracked.PSet(
+ input = cms.untracked.int32(100),
+ output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
+)
+
+# Input source
+process.source = cms.Source("PoolSource",
+ fileNames = cms.untracked.vstring(
+ #'file:/eos/cms//store/relval/CMSSW_11_1_0_pre5/RelValTTbar_13UP18_RD/GEN-SIM-DIGI-RAW-HLTDEBUG/PUpmx25ns_110X_upgrade2018_realistic_v9_RD_Harvesting_6-v1/10000/00F14E92-1212-E64C-A9C6-3DF89F0F7DB7.root',
+ #'file:/eos/cms//store/relval/CMSSW_11_1_0_pre5/RelValTTbar_13UP18_RD/GEN-SIM-DIGI-RAW-HLTDEBUG/PUpmx25ns_110X_upgrade2018_realistic_v9_RD_Harvesting_6-v1/10000/AE74DF9D-E5DD-7649-BD41-210C0D97F9FB.root'
+ 'file:/eos/cms//store/relval/CMSSW_11_1_0_pre5/RelValTTbar_13UP18_RD/GEN-SIM-DIGI-RAW-HLTDEBUG/PUpmx25ns_110X_upgrade2018_realistic_v9_RD_Harvesting_6HS-v1/10000/00300AE1-E215-EB45-9A0B-E7642BA4D58B.root'
+ ),
+ secondaryFileNames = cms.untracked.vstring()
+)
+
+process.options = cms.untracked.PSet(
+ FailPath = cms.untracked.vstring(),
+ IgnoreCompletely = cms.untracked.vstring(),
+ Rethrow = cms.untracked.vstring(),
+ SkipEvent = cms.untracked.vstring(),
+ allowUnscheduled = cms.obsolete.untracked.bool,
+ canDeleteEarly = cms.untracked.vstring(),
+ emptyRunLumiMode = cms.obsolete.untracked.string,
+ eventSetup = cms.untracked.PSet(
+ forceNumberOfConcurrentIOVs = cms.untracked.PSet(
+
+ ),
+ numberOfConcurrentIOVs = cms.untracked.uint32(1)
+ ),
+ fileMode = cms.untracked.string('FULLMERGE'),
+ forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
+ makeTriggerResults = cms.obsolete.untracked.bool,
+ numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
+ numberOfConcurrentRuns = cms.untracked.uint32(1),
+ numberOfStreams = cms.untracked.uint32(0),
+ numberOfThreads = cms.untracked.uint32(1),
+ printDependencies = cms.untracked.bool(False),
+ sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
+ throwIfIllegalParameter = cms.untracked.bool(True),
+ wantSummary = cms.untracked.bool(False)
+)
+
+# Production Info
+process.configurationMetadata = cms.untracked.PSet(
+ annotation = cms.untracked.string('step3 nevts:10'),
+ name = cms.untracked.string('Applications'),
+ version = cms.untracked.string('$Revision: 1.19 $')
+)
+
+# Output definition
+
+process.RECOSIMoutput = cms.OutputModule("PoolOutputModule",
+ dataset = cms.untracked.PSet(
+ dataTier = cms.untracked.string('GEN-SIM-RECO'),
+ filterName = cms.untracked.string('')
+ ),
+ fileName = cms.untracked.string('step3_RAW2DIGI_RECO_VALIDATION_DQM.root'),
+ outputCommands = process.RECOSIMEventContent.outputCommands,
+ splitLevel = cms.untracked.int32(0)
+)
+
+process.DQMoutput = cms.OutputModule("DQMRootOutputModule",
+ dataset = cms.untracked.PSet(
+ dataTier = cms.untracked.string('DQMIO'),
+ filterName = cms.untracked.string('')
+ ),
+ fileName = cms.untracked.string('step3_RAW2DIGI_RECO_VALIDATION_DQM_inDQM.root'),
+ outputCommands = process.DQMEventContent.outputCommands,
+ splitLevel = cms.untracked.int32(0)
+)
+
+# Additional output definition
+
+# Other statements
+process.mix.playback = True
+process.mix.digitizers = cms.PSet()
+for a in process.aliases: delattr(process, a)
+process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string("randomEngineStateProducer")
+from Configuration.AlCa.GlobalTag import GlobalTag
+process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2018_realistic', '')
+
+###Load the new validation sequence
+process.load('Validation.SiPixelHeterogeneousV.PixelHeterogeneousValidationFirstStep_cff')
+
+# Path and EndPath definitions
+process.raw2digi_step = cms.Path(process.RawToDigi_pixelOnly)
+process.reconstruction_step = cms.Path(process.reconstruction_pixelTrackingOnly)
+process.prevalidation_step = cms.Path(process.globalPrevalidationPixelTrackingOnly)
+
+#the standard validation path is updated to run the new sequence -
+# It can either be pixelHeterogeneousValidationSource(if you want to run the modules which access products directly from GPU)
+# or be pixelHeterogeneousValidationFromsoaSource(if you want to run the modules which access products directly from GPU)
+
+process.validation_step = cms.EndPath(process.globalValidationPixelTrackingOnly*process.pixelHeterogeneousValidationFromsoaSource*process.pixelverticesfromsoavalid)
+
+process.dqmoffline_step = cms.EndPath(process.DQMOfflinePixelTracking)
+process.dqmofflineOnPAT_step = cms.EndPath(process.PostDQMOffline)
+process.RECOSIMoutput_step = cms.EndPath(process.RECOSIMoutput)
+process.DQMoutput_step = cms.EndPath(process.DQMoutput)
+
+# Schedule definition
+process.schedule = cms.Schedule(process.raw2digi_step,process.reconstruction_step,process.prevalidation_step,process.validation_step, process.dqmoffline_step,process.dqmofflineOnPAT_step,process.RECOSIMoutput_step,process.DQMoutput_step)
+from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
+associatePatAlgosToolsTask(process)
+
+# customisation of the process.
+
+# Automatic addition of the customisation function from SimGeneral.MixingModule.fullMixCustomize_cff
+from SimGeneral.MixingModule.fullMixCustomize_cff import setCrossingFrameOn
+
+#call to customisation function setCrossingFrameOn imported from SimGeneral.MixingModule.fullMixCustomize_cff
+process = setCrossingFrameOn(process)
+
+# End of customisation functions
+#do not add changes to your config after this point (unless you know what you are doing)
+from FWCore.ParameterSet.Utilities import convertToUnscheduled
+process=convertToUnscheduled(process)
+
+
+# Customisation from command line
+
+#Have logErrorHarvester wait for the same EDProducers to finish as those providing data for the OutputModule
+from FWCore.Modules.logErrorHarvester_cff import customiseLogErrorHarvesterUsingOutputCommands
+process = customiseLogErrorHarvesterUsingOutputCommands(process)
+
+# Add early deletion of temporary data products to reduce peak memory need
+from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
+process = customiseEarlyDelete(process)
+# End adding early deletion
diff --git a/gpuworkflow/step3_quickRAW2DIGI_RECO_VALIDATION_DQM.py b/gpuworkflow/step3_quickRAW2DIGI_RECO_VALIDATION_DQM.py
new file mode 100644
index 0000000000000..5be04e13668e4
--- /dev/null
+++ b/gpuworkflow/step3_quickRAW2DIGI_RECO_VALIDATION_DQM.py
@@ -0,0 +1,167 @@
+# Auto generated configuration file
+# using:
+# Revision: 1.19
+# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
+# with command line options: step3 --conditions auto:phase1_2018_realistic -n 10 --era Run2_2018 --eventcontent RECOSIM,DQM --runUnscheduled --procModifiers gpu -s RAW2DIGI:RawToDigi_pixelOnly,RECO:reconstruction_pixelTrackingOnly,VALIDATION:@pixelTrackingOnlyValidation,DQM:@pixelTrackingOnlyDQM --datatier GEN-SIM-RECO,DQMIO --geometry DB:Extended --no_exec
+import FWCore.ParameterSet.Config as cms
+
+from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
+from Configuration.ProcessModifiers.gpu_cff import gpu
+
+process = cms.Process('RECO',Run2_2018,gpu)
+
+# import of standard configurations
+process.load('Configuration.StandardSequences.Services_cff')
+process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
+process.load('FWCore.MessageService.MessageLogger_cfi')
+process.load('Configuration.EventContent.EventContent_cff')
+process.load('SimGeneral.MixingModule.mixNoPU_cfi')
+process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
+process.load('Configuration.StandardSequences.MagneticField_cff')
+process.load('Configuration.StandardSequences.RawToDigi_cff')
+process.load('Configuration.StandardSequences.Reconstruction_cff')
+process.load('Configuration.StandardSequences.Validation_cff')
+process.load('DQMServices.Core.DQMStoreNonLegacy_cff')
+process.load('DQMOffline.Configuration.DQMOfflineMC_cff')
+process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
+process.load('Validation.SiPixelHeterogeneousV.pixelValidateVerticesFromSoA_cfi')
+
+
+process.maxEvents = cms.untracked.PSet(
+ input = cms.untracked.int32(100),
+ output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
+)
+
+# Input source
+process.source = cms.Source("PoolSource",
+ fileNames = cms.untracked.vstring(
+ #'file:/eos/cms//store/relval/CMSSW_11_1_0_pre5/RelValTTbar_13UP18_RD/GEN-SIM-DIGI-RAW-HLTDEBUG/PUpmx25ns_110X_upgrade2018_realistic_v9_RD_Harvesting_6-v1/10000/00F14E92-1212-E64C-A9C6-3DF89F0F7DB7.root',
+ #'file:/eos/cms//store/relval/CMSSW_11_1_0_pre5/RelValTTbar_13UP18_RD/GEN-SIM-DIGI-RAW-HLTDEBUG/PUpmx25ns_110X_upgrade2018_realistic_v9_RD_Harvesting_6-v1/10000/AE74DF9D-E5DD-7649-BD41-210C0D97F9FB.root'
+ #'file:/eos/cms//store/relval/CMSSW_11_1_0_pre5/RelValTTbar_13UP18_RD/GEN-SIM-DIGI-RAW-HLTDEBUG/PUpmx25ns_110X_upgrade2018_realistic_v9_RD_Harvesting_6HS-v1/10000/00300AE1-E215-EB45-9A0B-E7642BA4D58B.root'
+ 'file:/eos/cms//store/relval/CMSSW_11_1_0_pre7/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/111X_mcRun3_2021_realistic_v4-v1/20000/05646F0A-7AE5-7843-9EB0-8AE84B7440F0.root',
+ 'file:/eos/cms//store/relval/CMSSW_11_1_0_pre7/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/111X_mcRun3_2021_realistic_v4-v1/20000/B010C97F-7CBF-6443-BDD4-8545BFF62A2E.root',
+'file:/eos/cms//store/relval/CMSSW_11_1_0_pre7/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/111X_mcRun3_2021_realistic_v4-v1/20000/40729542-22C8-3447-933A-689FB1F094C2.root',
+'file:/eos/cms//store/relval/CMSSW_11_1_0_pre7/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/111X_mcRun3_2021_realistic_v4-v1/20000/D4F5F544-791B-7846-9A69-A10081194594.root',
+'file:/eos/cms//store/relval/CMSSW_11_1_0_pre7/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/111X_mcRun3_2021_realistic_v4-v1/20000/49F14D6F-99F8-C740-9536-54518DAB8999.root',
+'file:/eos/cms//store/relval/CMSSW_11_1_0_pre7/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/111X_mcRun3_2021_realistic_v4-v1/20000/E59A53F4-4DDA-A74C-BBA1-F222B11861FD.root',
+'file:/eos/cms//store/relval/CMSSW_11_1_0_pre7/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/111X_mcRun3_2021_realistic_v4-v1/20000/6F2750AB-C98B-4B47-A837-CEC5399D4E88.root',
+'file:/eos/cms//store/relval/CMSSW_11_1_0_pre7/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/111X_mcRun3_2021_realistic_v4-v1/20000/E85C406D-87DC-BE42-BC05-FE19AB463FD6.root',
+'file:/eos/cms//store/relval/CMSSW_11_1_0_pre7/RelValTTbar_14TeV/GEN-SIM-DIGI-RAW/111X_mcRun3_2021_realistic_v4-v1/20000/9390CAE9-E239-BB42-B7EE-37081CC04D36.root',
+ ),
+ secondaryFileNames = cms.untracked.vstring()
+)
+
+process.options = cms.untracked.PSet(
+ FailPath = cms.untracked.vstring(),
+ IgnoreCompletely = cms.untracked.vstring(),
+ Rethrow = cms.untracked.vstring(),
+ SkipEvent = cms.untracked.vstring(),
+ allowUnscheduled = cms.obsolete.untracked.bool,
+ canDeleteEarly = cms.untracked.vstring(),
+ emptyRunLumiMode = cms.obsolete.untracked.string,
+ eventSetup = cms.untracked.PSet(
+ forceNumberOfConcurrentIOVs = cms.untracked.PSet(
+
+ ),
+ numberOfConcurrentIOVs = cms.untracked.uint32(1)
+ ),
+ fileMode = cms.untracked.string('FULLMERGE'),
+ forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
+ makeTriggerResults = cms.obsolete.untracked.bool,
+ numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
+ numberOfConcurrentRuns = cms.untracked.uint32(1),
+ numberOfStreams = cms.untracked.uint32(0),
+ numberOfThreads = cms.untracked.uint32(1),
+ printDependencies = cms.untracked.bool(False),
+ sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
+ throwIfIllegalParameter = cms.untracked.bool(True),
+ wantSummary = cms.untracked.bool(False)
+)
+
+# Production Info
+process.configurationMetadata = cms.untracked.PSet(
+ annotation = cms.untracked.string('step3 nevts:10'),
+ name = cms.untracked.string('Applications'),
+ version = cms.untracked.string('$Revision: 1.19 $')
+)
+
+# Output definition
+
+process.RECOSIMoutput = cms.OutputModule("PoolOutputModule",
+ dataset = cms.untracked.PSet(
+ dataTier = cms.untracked.string('GEN-SIM-RECO'),
+ filterName = cms.untracked.string('')
+ ),
+ fileName = cms.untracked.string('step3_RAW2DIGI_RECO_VALIDATION_DQM.root'),
+ outputCommands = process.RECOSIMEventContent.outputCommands,
+ splitLevel = cms.untracked.int32(0)
+)
+
+process.DQMoutput = cms.OutputModule("DQMRootOutputModule",
+ dataset = cms.untracked.PSet(
+ dataTier = cms.untracked.string('DQMIO'),
+ filterName = cms.untracked.string('')
+ ),
+ fileName = cms.untracked.string('step3_RAW2DIGI_RECO_VALIDATION_DQM_inDQM.root'),
+ outputCommands = process.DQMEventContent.outputCommands,
+ splitLevel = cms.untracked.int32(0)
+)
+
+# Additional output definition
+
+# Other statements
+process.mix.playback = True
+process.mix.digitizers = cms.PSet()
+for a in process.aliases: delattr(process, a)
+process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string("randomEngineStateProducer")
+from Configuration.AlCa.GlobalTag import GlobalTag
+process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2018_realistic', '')
+
+###Load the new validation sequence
+process.load('Validation.SiPixelHeterogeneousV.PixelHeterogeneousValidationFirstStep_cff')
+
+# Path and EndPath definitions
+process.raw2digi_step = cms.Path(process.RawToDigi_pixelOnly)
+process.reconstruction_step = cms.Path(process.reconstruction_pixelTrackingOnly)
+process.prevalidation_step = cms.Path(process.globalPrevalidationPixelTrackingOnly)
+
+#the standard validation path is updated to run the new sequence -
+# It can either be pixelHeterogeneousValidationSource(if you want to run the modules which access products directly from GPU)
+# or be pixelHeterogeneousValidationFromsoaSource(if you want to run the modules which access products directly from GPU)
+
+process.validation_step = cms.EndPath(process.globalValidationPixelTrackingOnly*process.pixelHeterogeneousValidationFromsoaSource*process.pixelverticesfromsoavalid)
+
+process.dqmoffline_step = cms.EndPath(process.DQMOfflinePixelTracking)
+process.dqmofflineOnPAT_step = cms.EndPath(process.PostDQMOffline)
+process.RECOSIMoutput_step = cms.EndPath(process.RECOSIMoutput)
+process.DQMoutput_step = cms.EndPath(process.DQMoutput)
+
+# Schedule definition
+process.schedule = cms.Schedule(process.raw2digi_step,process.reconstruction_step,process.prevalidation_step,process.validation_step, process.dqmoffline_step,process.dqmofflineOnPAT_step,process.RECOSIMoutput_step,process.DQMoutput_step)
+from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
+associatePatAlgosToolsTask(process)
+
+# customisation of the process.
+
+# Automatic addition of the customisation function from SimGeneral.MixingModule.fullMixCustomize_cff
+from SimGeneral.MixingModule.fullMixCustomize_cff import setCrossingFrameOn
+
+#call to customisation function setCrossingFrameOn imported from SimGeneral.MixingModule.fullMixCustomize_cff
+process = setCrossingFrameOn(process)
+
+# End of customisation functions
+#do not add changes to your config after this point (unless you know what you are doing)
+from FWCore.ParameterSet.Utilities import convertToUnscheduled
+process=convertToUnscheduled(process)
+
+
+# Customisation from command line
+
+#Have logErrorHarvester wait for the same EDProducers to finish as those providing data for the OutputModule
+from FWCore.Modules.logErrorHarvester_cff import customiseLogErrorHarvesterUsingOutputCommands
+process = customiseLogErrorHarvesterUsingOutputCommands(process)
+
+# Add early deletion of temporary data products to reduce peak memory need
+from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
+process = customiseEarlyDelete(process)
+# End adding early deletion
diff --git a/gpuworkflow/step4_HARVESTING.py b/gpuworkflow/step4_HARVESTING.py
new file mode 100644
index 0000000000000..4776d442efd87
--- /dev/null
+++ b/gpuworkflow/step4_HARVESTING.py
@@ -0,0 +1,106 @@
+# Auto generated configuration file
+# using:
+# Revision: 1.19
+# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
+# with command line options: step4 --conditions auto:phase1_2018_realistic -s HARVESTING:@trackingOnlyValidation+@pixelTrackingOnlyDQM --scenario pp --filetype DQM --geometry DB:Extended --era Run2_2018 --mc -n 100 --no_exec
+import FWCore.ParameterSet.Config as cms
+
+from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
+
+process = cms.Process('HARVESTING',Run2_2018)
+
+# import of standard configurations
+process.load('Configuration.StandardSequences.Services_cff')
+process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
+process.load('FWCore.MessageService.MessageLogger_cfi')
+process.load('Configuration.EventContent.EventContent_cff')
+process.load('SimGeneral.MixingModule.mixNoPU_cfi')
+process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
+process.load('Configuration.StandardSequences.MagneticField_cff')
+process.load('Configuration.StandardSequences.DQMSaverAtRunEnd_cff')
+process.load('Configuration.StandardSequences.Harvesting_cff')
+process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
+
+process.maxEvents = cms.untracked.PSet(
+ input = cms.untracked.int32(-1),
+ output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
+)
+
+# Input source
+process.source = cms.Source("DQMRootSource",
+ fileNames = cms.untracked.vstring('file:step3_RAW2DIGI_RECO_VALIDATION_DQM_inDQM.root')
+)
+
+process.options = cms.untracked.PSet(
+ FailPath = cms.untracked.vstring(),
+ IgnoreCompletely = cms.untracked.vstring(),
+ Rethrow = cms.untracked.vstring('ProductNotFound'),
+ SkipEvent = cms.untracked.vstring(),
+ allowUnscheduled = cms.obsolete.untracked.bool,
+ canDeleteEarly = cms.untracked.vstring(),
+ emptyRunLumiMode = cms.obsolete.untracked.string,
+ eventSetup = cms.untracked.PSet(
+ forceNumberOfConcurrentIOVs = cms.untracked.PSet(
+
+ ),
+ numberOfConcurrentIOVs = cms.untracked.uint32(1)
+ ),
+ fileMode = cms.untracked.string('FULLMERGE'),
+ forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
+ makeTriggerResults = cms.obsolete.untracked.bool,
+ numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1),
+ numberOfConcurrentRuns = cms.untracked.uint32(1),
+ numberOfStreams = cms.untracked.uint32(0),
+ numberOfThreads = cms.untracked.uint32(1),
+ printDependencies = cms.untracked.bool(False),
+ sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
+ throwIfIllegalParameter = cms.untracked.bool(True),
+ wantSummary = cms.untracked.bool(False)
+)
+
+# Production Info
+process.configurationMetadata = cms.untracked.PSet(
+ annotation = cms.untracked.string('step4 nevts:100'),
+ name = cms.untracked.string('Applications'),
+ version = cms.untracked.string('$Revision: 1.19 $')
+)
+
+# Output definition
+
+# Additional output definition
+
+# Other statements
+from Configuration.AlCa.GlobalTag import GlobalTag
+process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2018_realistic', '')
+
+# Path and EndPath definitions
+process.genHarvesting = cms.Path(process.postValidation_gen)
+process.dqmHarvestingFakeHLT = cms.Path(process.DQMOffline_SecondStep_FakeHLT+process.DQMOffline_Certification)
+process.validationHarvestingHI = cms.Path(process.postValidationHI)
+process.dqmHarvestingExtraHLT = cms.Path(process.DQMOffline_SecondStep_ExtraHLT+process.DQMOffline_Certification)
+process.alcaHarvesting = cms.Path()
+process.validationHarvestingNoHLT = cms.Path(process.postValidation+process.postValidation_gen)
+process.validationHarvestingFS = cms.Path(process.recoMuonPostProcessors+process.postValidationTracking+process.MuIsoValPostProcessor+process.calotowersPostProcessor+process.hcalSimHitsPostProcessor+process.hcaldigisPostProcessor+process.hcalrechitsPostProcessor+process.electronPostValidationSequence+process.photonPostProcessor+process.pfJetClient+process.pfMETClient+process.pfJetResClient+process.pfElectronClient+process.rpcRecHitPostValidation_step+process.makeBetterPlots+process.bTagCollectorSequenceMCbcl+process.METPostProcessor+process.L1GenPostProcessor+process.bdHadronTrackPostProcessor+process.siPixelPhase1OfflineDQM_harvestingV+process.MuonGEMHitsPostProcessors+process.MuonGEMDigisPostProcessors+process.MuonGEMRecHitsPostProcessors+process.postValidation_gen)
+process.validationpreprodHarvesting = cms.Path(process.postValidation_preprod+process.hltpostvalidation_preprod+process.postValidation_gen)
+process.validationprodHarvesting = cms.Path(process.hltpostvalidation_prod+process.postValidation_gen)
+process.validationHarvesting = cms.Path(process.postValidation+process.hltpostvalidation+process.postValidation_gen)
+process.validationpreprodHarvestingNoHLT = cms.Path(process.postValidation_preprod+process.postValidation_gen)
+process.dqmHarvestingPOGMC = cms.Path(process.DQMOffline_SecondStep_PrePOGMC)
+process.validationHarvestingMiniAOD = cms.Path(process.JetPostProcessor+process.METPostProcessorHarvesting+process.postValidationMiniAOD)
+process.dqmHarvesting = cms.Path(process.DQMOffline_SecondStep+process.DQMOffline_Certification)
+process.postValidation_trackingOnly_step = cms.Path(process.postValidation_trackingOnly)
+process.DQMHarvestPixelTracking_step = cms.Path(process.DQMHarvestPixelTracking)
+process.dqmsave_step = cms.Path(process.DQMSaver)
+
+# Schedule definition
+process.schedule = cms.Schedule(process.postValidation_trackingOnly_step,process.DQMHarvestPixelTracking_step,process.dqmsave_step)
+from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
+associatePatAlgosToolsTask(process)
+
+
+# Customisation from command line
+
+# Add early deletion of temporary data products to reduce peak memory need
+from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
+process = customiseEarlyDelete(process)
+# End adding early deletion