Skip to content

Commit e004f66

Browse files
committed
add GPU-CPU difference plots
1 parent 51437cd commit e004f66

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

DQM/PFTasks/plugins/PFHcalGPUComparisonTask.cc

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ class PFHcalGPUComparisonTask : public hcaldqm::DQTask {
8080
MonitorElement* pfCluster_Phi_HostvsDevice_;
8181
MonitorElement* pfCluster_DuplicateMatches_HostvsDevice_;
8282

83+
MonitorElement* pfCluster_Multiplicity_Diff_HostvsDevice_;
84+
MonitorElement* pfCluster_Energy_Diff_HostvsDevice_;
85+
MonitorElement* pfCluster_RecHitMultiplicity_Diff_HostvsDevice_;
86+
MonitorElement* pfCluster_Layer_Diff_HostvsDevice_;
87+
MonitorElement* pfCluster_Depth_Diff_HostvsDevice_;
88+
MonitorElement* pfCluster_Eta_Diff_HostvsDevice_;
89+
MonitorElement* pfCluster_Phi_Diff_HostvsDevice_;
90+
8391
std::string pfCaloGPUCompDir_;
8492
};
8593

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

134157
void PFHcalGPUComparisonTask::_resetMonitors(hcaldqm::UpdateFreq uf) { DQTask::_resetMonitors(uf); }
@@ -148,7 +171,7 @@ void PFHcalGPUComparisonTask::_process(edm::Event const& event, edm::EventSetup
148171
LOGVERB("PFCaloGPUComparisonTask") << " PFCluster multiplicity " << pfClusters_ref->size() << " "
149172
<< pfClusters_target->size();
150173
pfCluster_Multiplicity_HostvsDevice_->Fill((float)pfClusters_ref->size(), (float)pfClusters_target->size());
151-
174+
pfCluster_Multiplicity_Diff_HostvsDevice_->Fill((float)pfClusters_ref->size() - (float)pfClusters_target->size());
152175
//
153176
// Find matching PF cluster pairs
154177
std::vector<int> matched_idx;
@@ -192,6 +215,14 @@ void PFHcalGPUComparisonTask::_process(edm::Event const& event, edm::EventSetup
192215
pfCluster_Depth_HostvsDevice_->Fill(pfClusters_ref->at(i).depth(), pfClusters_target->at(j).depth());
193216
pfCluster_RecHitMultiplicity_HostvsDevice_->Fill((float)pfClusters_ref->at(i).recHitFractions().size(),
194217
(float)pfClusters_target->at(j).recHitFractions().size());
218+
pfCluster_Energy_Diff_HostvsDevice_->Fill(pfClusters_ref->at(i).energy() - pfClusters_target->at(j).energy());
219+
pfCluster_RecHitMultiplicity_Diff_HostvsDevice_->Fill((float)pfClusters_ref->at(i).recHitFractions().size() -
220+
(float)pfClusters_target->at(j).recHitFractions().size());
221+
pfCluster_Layer_Diff_HostvsDevice_->Fill(pfClusters_ref->at(i).layer() - pfClusters_target->at(j).layer());
222+
pfCluster_Depth_Diff_HostvsDevice_->Fill(pfClusters_ref->at(i).depth() - pfClusters_target->at(j).depth());
223+
;
224+
pfCluster_Eta_Diff_HostvsDevice_->Fill(pfClusters_ref->at(i).eta() - pfClusters_target->at(j).eta());
225+
pfCluster_Phi_Diff_HostvsDevice_->Fill(pfClusters_ref->at(i).phi() - pfClusters_target->at(j).phi());
195226
}
196227
}
197228
}

0 commit comments

Comments
 (0)