Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixel Heterogeneous DQM: add 1D differnce plots in vertex comparison module. #38245

Merged
merged 1 commit into from Jun 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -44,6 +44,9 @@ class SiPixelPhase1CompareVertexSoA : public DQMEDAnalyzer {
MonitorElement* hchi2oNdof_;
MonitorElement* hptv2_;
MonitorElement* hntrks_;
MonitorElement* hxdiff_;
MonitorElement* hydiff_;
MonitorElement* hzdiff_;
};

//
Expand Down Expand Up @@ -129,9 +132,12 @@ void SiPixelPhase1CompareVertexSoA::analyze(const edm::Event& iEvent, const edm:
auto ndofGPU = vsoaGPU.ndof[closestVtxidx];
auto chi2GPU = vsoaGPU.chi2[closestVtxidx];

hx_->Fill(xc, xg);
hy_->Fill(yc, yg);
hx_->Fill(xc - x0, xg - x0);
hy_->Fill(yc - y0, yg - y0);
hz_->Fill(zc, zg);
hxdiff_->Fill(xc - xg);
hydiff_->Fill(yc - yg);
hzdiff_->Fill(zc - zg);
hchi2_->Fill(chi2CPU, chi2GPU);
hchi2oNdof_->Fill(chi2CPU / ndofCPU, chi2GPU / ndofGPU);
hptv2_->Fill(vsoaCPU.ptv2[sic], vsoaGPU.ptv2[closestVtxidx]);
Expand All @@ -146,21 +152,23 @@ void SiPixelPhase1CompareVertexSoA::analyze(const edm::Event& iEvent, const edm:
void SiPixelPhase1CompareVertexSoA::bookHistograms(DQMStore::IBooker& ibooker,
edm::Run const& iRun,
edm::EventSetup const& iSetup) {
//std::string top_folder = ""//
ibooker.cd();
ibooker.setCurrentFolder(topFolderName_);

// FIXME: all the 2D correlation plots are quite heavy in terms of memory consumption, so a as soon as DQM supports either TH2I or THnSparse
// these should be moved to a less resource consuming format
hnVertex_ = ibooker.book2I("nVertex", "# of Vertex;CPU;GPU", 101, -0.5, 100.5, 101, -0.5, 100.5);
hx_ = ibooker.book2I("vx", "Vertez x;CPU;GPU", 20, -0.1, 0.1, 20, -0.1, 0.1);
hy_ = ibooker.book2I("vy", "Vertez y;CPU;GPU", 20, -0.1, 0.1, 20, -0.1, 0.1);
hx_ = ibooker.book2I("vx", "Vertez x - Beamspot x;CPU;GPU", 50, -0.1, 0.1, 50, -0.1, 0.1);
hy_ = ibooker.book2I("vy", "Vertez y - Beamspot y;CPU;GPU", 50, -0.1, 0.1, 50, -0.1, 0.1);
hz_ = ibooker.book2I("vz", "Vertez z;CPU;GPU", 30, -30., 30., 30, -30., 30.);
hchi2_ = ibooker.book2I("chi2", "Vertex chi-squared;CPU;GPU", 40, 0., 20., 40, 0., 20.);
hchi2oNdof_ = ibooker.book2I("chi2oNdof", "Vertex chi-squared/Ndof;CPU;GPU", 40, 0., 20., 40, 0., 20.);
hptv2_ = ibooker.book2I("ptsq", "Vertex p_T squared;CPU;GPU", 200, 0., 200., 200, 0., 200.);
hntrks_ = ibooker.book2I("ntrk", "#tracks associated;CPU;GPU", 100, -0.5, 99.5, 100, -0.5, 99.5);
hntrks_ = ibooker.book2I("ntrk", "#tracks associated;CPU;GPU", 100, -0.5, 99.5, 100, -0.5, 99.5);
hxdiff_ = ibooker.book1D("vxdiff", ";Vertex x difference (CPU - GPU);#entries", 100, -0.001, 0.001);
hydiff_ = ibooker.book1D("vydiff", ";Vertex y difference (CPU - GPU);#entries", 100, -0.001, 0.001);
hzdiff_ = ibooker.book1D("vzdiff", ";Vertex z difference (CPU - GPU);#entries", 100, -2.5, 2.5);
}

void SiPixelPhase1CompareVertexSoA::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
Expand Down