Skip to content

Commit

Permalink
rename SiPixelPhase1Heterogeneous -> SiPixelHeterogeneous
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed Dec 8, 2022
1 parent 425b3de commit 64ac830
Show file tree
Hide file tree
Showing 13 changed files with 148 additions and 142 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -28,13 +28,13 @@
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"

template<typename T>
class SiPixelPhase1CompareRecHitsSoA : public DQMEDAnalyzer {
class SiPixelCompareRecHitsSoA : public DQMEDAnalyzer {
public:
using HitSoA = TrackingRecHit2DSOAViewT<T>;
using HitsOnCPU = TrackingRecHit2DCPUT<T>;

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;
Expand Down Expand Up @@ -79,7 +79,7 @@ class SiPixelPhase1CompareRecHitsSoA : public DQMEDAnalyzer {
//

template<typename T>
SiPixelPhase1CompareRecHitsSoA<T>::SiPixelPhase1CompareRecHitsSoA(const edm::ParameterSet& iConfig)
SiPixelCompareRecHitsSoA<T>::SiPixelCompareRecHitsSoA(const edm::ParameterSet& iConfig)
: geomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord, edm::Transition::BeginRun>()),
topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()),
tokenSoAHitsCPU_(consumes(iConfig.getParameter<edm::InputTag>("pixelHitsSrcCPU"))),
Expand All @@ -90,7 +90,7 @@ SiPixelPhase1CompareRecHitsSoA<T>::SiPixelPhase1CompareRecHitsSoA(const edm::Par
// Begin Run
//
template<typename T>
void SiPixelPhase1CompareRecHitsSoA<T>::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
void SiPixelCompareRecHitsSoA<T>::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
tkGeom_ = &iSetup.getData(geomToken_);
tTopo_ = &iSetup.getData(topoToken_);
}
Expand All @@ -99,11 +99,11 @@ void SiPixelPhase1CompareRecHitsSoA<T>::dqmBeginRun(const edm::Run& iRun, const
// -- Analyze
//
template<typename T>
void SiPixelPhase1CompareRecHitsSoA<T>::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
void SiPixelCompareRecHitsSoA<T>::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; ";
}
Expand Down Expand Up @@ -189,7 +189,7 @@ void SiPixelPhase1CompareRecHitsSoA<T>::analyze(const edm::Event& iEvent, const
// -- Book Histograms
//
template<typename T>
void SiPixelPhase1CompareRecHitsSoA<T>::bookHistograms(DQMStore::IBooker& iBook,
void SiPixelCompareRecHitsSoA<T>::bookHistograms(DQMStore::IBooker& iBook,
edm::Run const& iRun,
edm::EventSetup const& iSetup) {
iBook.cd();
Expand Down Expand Up @@ -232,7 +232,7 @@ void SiPixelPhase1CompareRecHitsSoA<T>::bookHistograms(DQMStore::IBooker& iBook,
}

template<typename T>
void SiPixelPhase1CompareRecHitsSoA<T>::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
void SiPixelCompareRecHitsSoA<T>::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
// monitorpixelRecHitsSoA
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("pixelHitsSrcCPU", edm::InputTag("siPixelRecHitsPreSplittingSoA@cpu"));
Expand All @@ -242,8 +242,8 @@ void SiPixelPhase1CompareRecHitsSoA<T>::fillDescriptions(edm::ConfigurationDescr
descriptions.addWithDefaultLabel(desc);
}

using SiPixelPhase1CompareRecHitsSoAPhase1 = SiPixelPhase1CompareRecHitsSoA<pixelTopology::Phase1>;
using SiPixelPhase1CompareRecHitsSoAPhase2 = SiPixelPhase1CompareRecHitsSoA<pixelTopology::Phase2>;
using SiPixelPhase1CompareRecHitsSoA = SiPixelCompareRecHitsSoA<pixelTopology::Phase1>;
using SiPixelPhase2CompareRecHitsSoA = SiPixelCompareRecHitsSoA<pixelTopology::Phase2>;

DEFINE_FWK_MODULE(SiPixelPhase1CompareRecHitsSoAPhase1);
DEFINE_FWK_MODULE(SiPixelPhase1CompareRecHitsSoAPhase2);
DEFINE_FWK_MODULE(SiPixelPhase1CompareRecHitsSoA);
DEFINE_FWK_MODULE(SiPixelPhase2CompareRecHitsSoA);
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -63,12 +63,12 @@ namespace {
} // namespace

template<typename T>
class SiPixelPhase1CompareTrackSoA : public DQMEDAnalyzer {
class SiPixelCompareTrackSoA : public DQMEDAnalyzer {
public:
using PixelTrackSoA = PixelTrackHeterogeneousT<T>;

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);
Expand Down Expand Up @@ -116,7 +116,7 @@ class SiPixelPhase1CompareTrackSoA : public DQMEDAnalyzer {
//

template<typename T>
SiPixelPhase1CompareTrackSoA<T>::SiPixelPhase1CompareTrackSoA(const edm::ParameterSet& iConfig)
SiPixelCompareTrackSoA<T>::SiPixelCompareTrackSoA(const edm::ParameterSet& iConfig)
: tokenSoATrackCPU_(consumes<PixelTrackSoA>(iConfig.getParameter<edm::InputTag>("pixelTrackSrcCPU"))),
tokenSoATrackGPU_(consumes<PixelTrackSoA>(iConfig.getParameter<edm::InputTag>("pixelTrackSrcGPU"))),
topFolderName_(iConfig.getParameter<std::string>("topFolderName")),
Expand All @@ -128,11 +128,11 @@ SiPixelPhase1CompareTrackSoA<T>::SiPixelPhase1CompareTrackSoA(const edm::Paramet
// -- Analyze
//
template<typename T>
void SiPixelPhase1CompareTrackSoA<T>::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
void SiPixelCompareTrackSoA<T>::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; ";
}
Expand Down Expand Up @@ -228,7 +228,7 @@ void SiPixelPhase1CompareTrackSoA<T>::analyze(const edm::Event& iEvent, const ed
// -- Book Histograms
//
template<typename T>
void SiPixelPhase1CompareTrackSoA<T>::bookHistograms(DQMStore::IBooker& iBook,
void SiPixelCompareTrackSoA<T>::bookHistograms(DQMStore::IBooker& iBook,
edm::Run const& iRun,
edm::EventSetup const& iSetup) {
iBook.cd();
Expand Down Expand Up @@ -272,7 +272,7 @@ void SiPixelPhase1CompareTrackSoA<T>::bookHistograms(DQMStore::IBooker& iBook,
}

template<typename T>
void SiPixelPhase1CompareTrackSoA<T>::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
void SiPixelCompareTrackSoA<T>::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
// monitorpixelTrackSoA
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("pixelTrackSrcCPU", edm::InputTag("pixelTracksSoA@cpu"));
Expand All @@ -284,8 +284,8 @@ void SiPixelPhase1CompareTrackSoA<T>::fillDescriptions(edm::ConfigurationDescrip
descriptions.addWithDefaultLabel(desc);
}

using SiPixelPhase1CompareTrackSoAPhase1 = SiPixelPhase1CompareTrackSoA<pixelTopology::Phase1>;
using SiPixelPhase1CompareTrackSoAPhase2 = SiPixelPhase1CompareTrackSoA<pixelTopology::Phase2>;
using SiPixelPhase1CompareTrackSoA = SiPixelCompareTrackSoA<pixelTopology::Phase1>;
using SiPixelPhase2CompareTrackSoA = SiPixelCompareTrackSoA<pixelTopology::Phase2>;

DEFINE_FWK_MODULE(SiPixelPhase1CompareTrackSoAPhase1);
DEFINE_FWK_MODULE(SiPixelPhase1CompareTrackSoAPhase2);
DEFINE_FWK_MODULE(SiPixelPhase1CompareTrackSoA);
DEFINE_FWK_MODULE(SiPixelPhase2CompareTrackSoA);
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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<uint16_t>;
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);
Expand Down Expand Up @@ -53,7 +53,7 @@ class SiPixelPhase1CompareVertexSoA : public DQMEDAnalyzer {
// constructors
//

SiPixelPhase1CompareVertexSoA::SiPixelPhase1CompareVertexSoA(const edm::ParameterSet& iConfig)
SiPixelCompareVertexSoA::SiPixelCompareVertexSoA(const edm::ParameterSet& iConfig)
: tokenSoAVertexCPU_(consumes<ZVertexHeterogeneous>(iConfig.getParameter<edm::InputTag>("pixelVertexSrcCPU"))),
tokenSoAVertexGPU_(consumes<ZVertexHeterogeneous>(iConfig.getParameter<edm::InputTag>("pixelVertexSrcGPU"))),
tokenBeamSpot_(consumes<reco::BeamSpot>(iConfig.getParameter<edm::InputTag>("beamSpotSrc"))),
Expand All @@ -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; ";
}
Expand All @@ -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();
Expand Down Expand Up @@ -149,7 +149,7 @@ void SiPixelPhase1CompareVertexSoA::analyze(const edm::Event& iEvent, const edm:
//
// -- Book Histograms
//
void SiPixelPhase1CompareVertexSoA::bookHistograms(DQMStore::IBooker& ibooker,
void SiPixelCompareVertexSoA::bookHistograms(DQMStore::IBooker& ibooker,
edm::Run const& iRun,
edm::EventSetup const& iSetup) {
ibooker.cd();
Expand All @@ -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<edm::InputTag>("pixelVertexSrcCPU", edm::InputTag("pixelVerticesSoA@cpu"));
Expand All @@ -181,4 +181,4 @@ void SiPixelPhase1CompareVertexSoA::fillDescriptions(edm::ConfigurationDescripti
desc.add<double>("dzCut", 1.);
descriptions.addWithDefaultLabel(desc);
}
DEFINE_FWK_MODULE(SiPixelPhase1CompareVertexSoA);
DEFINE_FWK_MODULE(SiPixelCompareVertexSoA);
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -29,13 +29,13 @@
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"

template<typename T>
class SiPixelPhase1MonitorRecHitsSoA : public DQMEDAnalyzer {
class SiPixelMonitorRecHitsSoA : public DQMEDAnalyzer {
public:
using HitSoA = TrackingRecHit2DSOAViewT<T>;
using HitsOnCPU = TrackingRecHit2DCPUT<T>;

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;
Expand Down Expand Up @@ -76,7 +76,7 @@ class SiPixelPhase1MonitorRecHitsSoA : public DQMEDAnalyzer {
//

template<typename T>
SiPixelPhase1MonitorRecHitsSoA<T>::SiPixelPhase1MonitorRecHitsSoA(const edm::ParameterSet& iConfig)
SiPixelMonitorRecHitsSoA<T>::SiPixelMonitorRecHitsSoA(const edm::ParameterSet& iConfig)
: geomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord, edm::Transition::BeginRun>()),
topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd, edm::Transition::BeginRun>()),
tokenSoAHitsCPU_(consumes(iConfig.getParameter<edm::InputTag>("pixelHitsSrc"))),
Expand All @@ -85,7 +85,7 @@ SiPixelPhase1MonitorRecHitsSoA<T>::SiPixelPhase1MonitorRecHitsSoA(const edm::Par
// Begin Run
//
template<typename T>
void SiPixelPhase1MonitorRecHitsSoA<T>::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
void SiPixelMonitorRecHitsSoA<T>::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup& iSetup) {
tkGeom_ = &iSetup.getData(geomToken_);
tTopo_ = &iSetup.getData(topoToken_);
}
Expand All @@ -94,10 +94,10 @@ void SiPixelPhase1MonitorRecHitsSoA<T>::dqmBeginRun(const edm::Run& iRun, const
// -- Analyze
//
template<typename T>
void SiPixelPhase1MonitorRecHitsSoA<T>::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
void SiPixelMonitorRecHitsSoA<T>::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;
Expand Down Expand Up @@ -150,7 +150,7 @@ void SiPixelPhase1MonitorRecHitsSoA<T>::analyze(const edm::Event& iEvent, const
// -- Book Histograms
//
template<typename T>
void SiPixelPhase1MonitorRecHitsSoA<T>::bookHistograms(DQMStore::IBooker& iBook,
void SiPixelMonitorRecHitsSoA<T>::bookHistograms(DQMStore::IBooker& iBook,
edm::Run const& iRun,
edm::EventSetup const& iSetup) {
iBook.cd();
Expand Down Expand Up @@ -193,16 +193,16 @@ void SiPixelPhase1MonitorRecHitsSoA<T>::bookHistograms(DQMStore::IBooker& iBook,
}

template<typename T>
void SiPixelPhase1MonitorRecHitsSoA<T>::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
void SiPixelMonitorRecHitsSoA<T>::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
// monitorpixelRecHitsSoA
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("pixelHitsSrc", edm::InputTag("siPixelRecHitsPreSplittingSoA"));
desc.add<std::string>("TopFolderName", "SiPixelHeterogeneous/PixelRecHitsSoA");
descriptions.addWithDefaultLabel(desc);
}

using SiPixelPhase1MonitorRecHitsSoAPhase1 = SiPixelPhase1MonitorRecHitsSoA<pixelTopology::Phase1>;
using SiPixelPhase1MonitorRecHitsSoAPhase2 = SiPixelPhase1MonitorRecHitsSoA<pixelTopology::Phase2>;
using SiPixelPhase1MonitorRecHitsSoA = SiPixelMonitorRecHitsSoA<pixelTopology::Phase1>;
using SiPixelPhase2MonitorRecHitsSoA = SiPixelMonitorRecHitsSoA<pixelTopology::Phase2>;

DEFINE_FWK_MODULE(SiPixelPhase1MonitorRecHitsSoAPhase1);
DEFINE_FWK_MODULE(SiPixelPhase1MonitorRecHitsSoAPhase2);
DEFINE_FWK_MODULE(SiPixelPhase1MonitorRecHitsSoA);
DEFINE_FWK_MODULE(SiPixelPhase2MonitorRecHitsSoA);
Loading

0 comments on commit 64ac830

Please sign in to comment.