Skip to content

Commit 5ad997d

Browse files
authored
Merge pull request #48971 from waredjeb/pfDQM_diff_plots_16_1_X
Add PF GPU-CPU difference plots in DQM
2 parents 5aca130 + d3c7c48 commit 5ad997d

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

DQM/PFTasks/plugins/PFHcalGPUComparisonTask.cc

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
2626
#include "DataFormats/Math/interface/Vector3D.h"
2727
#include "DataFormats/Math/interface/deltaR.h"
28+
#include "DataFormats/Math/interface/deltaPhi.h"
2829
#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
2930
#include "DataFormats/ParticleFlowReco/interface/PFBlock.h"
3031
#include "DataFormats/ParticleFlowReco/interface/PFBlockElementCluster.h"
@@ -80,6 +81,14 @@ class PFHcalGPUComparisonTask : public hcaldqm::DQTask {
8081
MonitorElement* pfCluster_Phi_HostvsDevice_;
8182
MonitorElement* pfCluster_DuplicateMatches_HostvsDevice_;
8283

84+
MonitorElement* pfCluster_Multiplicity_Diff_HostvsDevice_;
85+
MonitorElement* pfCluster_Energy_Diff_HostvsDevice_;
86+
MonitorElement* pfCluster_RecHitMultiplicity_Diff_HostvsDevice_;
87+
MonitorElement* pfCluster_Layer_Diff_HostvsDevice_;
88+
MonitorElement* pfCluster_Depth_Diff_HostvsDevice_;
89+
MonitorElement* pfCluster_Eta_Diff_HostvsDevice_;
90+
MonitorElement* pfCluster_Phi_Diff_HostvsDevice_;
91+
8392
std::string pfCaloGPUCompDir_;
8493
};
8594

@@ -129,6 +138,21 @@ void PFHcalGPUComparisonTask::bookHistograms(DQMStore::IBooker& ibooker, edm::Ru
129138
histo = "pfCluster_DuplicateMatches_HostvsDevice";
130139
histoAxis = "pfCluster_Duplicates_HostvsDevice;Cluster Duplicates Host;Cluster Duplicates Device";
131140
pfCluster_DuplicateMatches_HostvsDevice_ = ibooker.book1I(histo, histoAxis, 100, 0., 1000);
141+
142+
pfCluster_Multiplicity_Diff_HostvsDevice_ = ibooker.book1D(
143+
"MultiplicityDiff", "PFCluster Multiplicity Difference; (Reference - Target);#entries", 100, -2, 2);
144+
pfCluster_Energy_Diff_HostvsDevice_ =
145+
ibooker.book1D("EnergyDiff", "PFCluster Energy Difference; (Reference - Target);#entries", 100, -2, 2);
146+
pfCluster_RecHitMultiplicity_Diff_HostvsDevice_ = ibooker.book1D(
147+
"RHMultiplicityDiff", "PFCluster RecHit Multiplicity Difference; (Reference - Target);#entries", 100, -2, 2);
148+
pfCluster_Layer_Diff_HostvsDevice_ =
149+
ibooker.book1D("LayerDiff", "PFCluster Layer Difference; (Reference - Target);#entries", 100, -2, 2);
150+
pfCluster_Depth_Diff_HostvsDevice_ =
151+
ibooker.book1D("DepthDiff", "PFCluster Depth Difference; (Reference - Target);#entries", 100, -2, 2);
152+
pfCluster_Eta_Diff_HostvsDevice_ =
153+
ibooker.book1D("EtaDiff", "PFCluster #eta Difference; (Reference - Target);#entries", 100, -0.5, 0.5);
154+
pfCluster_Phi_Diff_HostvsDevice_ =
155+
ibooker.book1D("PhiDiff", "PFCluster #phi Difference; (Reference - Target);#entries", 100, -0.5, 0.5);
132156
}
133157

134158
void PFHcalGPUComparisonTask::_resetMonitors(hcaldqm::UpdateFreq uf) { DQTask::_resetMonitors(uf); }
@@ -148,7 +172,7 @@ void PFHcalGPUComparisonTask::_process(edm::Event const& event, edm::EventSetup
148172
LOGVERB("PFCaloGPUComparisonTask") << " PFCluster multiplicity " << pfClusters_ref->size() << " "
149173
<< pfClusters_target->size();
150174
pfCluster_Multiplicity_HostvsDevice_->Fill((float)pfClusters_ref->size(), (float)pfClusters_target->size());
151-
175+
pfCluster_Multiplicity_Diff_HostvsDevice_->Fill((float)pfClusters_ref->size() - (float)pfClusters_target->size());
152176
//
153177
// Find matching PF cluster pairs
154178
std::vector<int> matched_idx;
@@ -192,6 +216,15 @@ void PFHcalGPUComparisonTask::_process(edm::Event const& event, edm::EventSetup
192216
pfCluster_Depth_HostvsDevice_->Fill(pfClusters_ref->at(i).depth(), pfClusters_target->at(j).depth());
193217
pfCluster_RecHitMultiplicity_HostvsDevice_->Fill((float)pfClusters_ref->at(i).recHitFractions().size(),
194218
(float)pfClusters_target->at(j).recHitFractions().size());
219+
pfCluster_Energy_Diff_HostvsDevice_->Fill(pfClusters_ref->at(i).energy() - pfClusters_target->at(j).energy());
220+
pfCluster_RecHitMultiplicity_Diff_HostvsDevice_->Fill((float)pfClusters_ref->at(i).recHitFractions().size() -
221+
(float)pfClusters_target->at(j).recHitFractions().size());
222+
pfCluster_Layer_Diff_HostvsDevice_->Fill(pfClusters_ref->at(i).layer() - pfClusters_target->at(j).layer());
223+
pfCluster_Depth_Diff_HostvsDevice_->Fill(pfClusters_ref->at(i).depth() - pfClusters_target->at(j).depth());
224+
;
225+
pfCluster_Eta_Diff_HostvsDevice_->Fill(pfClusters_ref->at(i).eta() - pfClusters_target->at(j).eta());
226+
pfCluster_Phi_Diff_HostvsDevice_->Fill(
227+
reco::deltaPhi(pfClusters_ref->at(i).phi(), pfClusters_target->at(j).phi()));
195228
}
196229
}
197230
}

0 commit comments

Comments
 (0)