47 #define LOGVERB(x) edm::LogVerbatim(x) 49 #define LOGVERB(x) LogTrace(x) 91 consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<
edm::InputTag>(
"pfClusterToken_target"))},
92 pfCaloGPUCompDir_{conf.getUntrackedParameter<
std::string>(
"name")} {}
101 histo =
"pfCluster_Multiplicity_HostvsDevice";
102 const char* histoAxis =
"pfCluster_Multiplicity_HostvsDevice;Multiplicity Device;Multiplicity Device";
105 histo =
"pfCluster_Energy_HostvsDevice";
106 histoAxis =
"pfCluster_Energy_HostvsDevice;Energy Host [GeV];Energy Device [GeV]";
109 histo =
"pfCluster_RecHitMultiplicity_HostvsDevice";
110 histoAxis =
"pfCluster_RecHitMultiplicity_HostvsDevice;RecHit Multiplicity Host;RecHit Multiplicity Device";
113 histo =
"pfCluster_Layer_HostvsDevice";
114 histoAxis =
"pfCluster_Layer_HostvsDevice;Cluster Layer Host;Cluster Layer Device";
117 histo =
"pfCluster_Depth_HostvsDevice";
118 histoAxis =
"pfCluster_Depth_HostvsDevice;Cluster Depth Host;Cluster Depth Device";
121 histo =
"pfCluster_Eta_HostvsDevice";
122 histoAxis =
"pfCluster_Eta_HostvsDevice;Cluster #eta Host;Cluster #eta Device";
125 histo =
"pfCluster_Phi_HostvsDevice";
126 histoAxis =
"pfCluster_Phi_HostvsDevice;Cluster #phi Host;Cluster #phi Device";
129 histo =
"pfCluster_DuplicateMatches_HostvsDevice";
130 histoAxis =
"pfCluster_Duplicates_HostvsDevice;Cluster Duplicates Host;Cluster Duplicates Device";
143 auto lumiCache = luminosityBlockCache(
event.getLuminosityBlock().index());
147 if (pfClusters_ref->size() != pfClusters_target->size())
148 LOGVERB(
"PFCaloGPUComparisonTask") <<
" PFCluster multiplicity " << pfClusters_ref->size() <<
" " 149 << pfClusters_target->size();
154 std::vector<int> matched_idx;
155 matched_idx.reserve(pfClusters_ref->size());
156 for (
unsigned i = 0;
i < pfClusters_ref->size(); ++
i) {
158 for (
unsigned j = 0;
j < pfClusters_target->size(); ++
j) {
159 if (pfClusters_ref->at(
i).seed() == pfClusters_target->at(
j).seed()) {
162 matched_idx.push_back((
int)
j);
170 matched_idx.push_back(-1);
175 for (
unsigned i = 0;
i < pfClusters_ref->size(); ++
i) {
176 if (matched_idx[
i] >= 0) {
177 unsigned int j = matched_idx[
i];
180 int target_energy_bin =
182 if (ref_energy_bin != target_energy_bin)
184 <<
"Off-diagonal energy bin entries: " << pfClusters_ref->at(
i).energy() <<
" " 185 << pfClusters_ref->at(
i).eta() <<
" " << pfClusters_ref->at(
i).phi() <<
" " 186 << pfClusters_target->at(
j).energy() <<
" " << pfClusters_target->at(
j).eta() <<
" " 187 << pfClusters_target->at(
j).phi() << std::endl;
194 (
float)pfClusters_target->at(
j).recHitFractions().size());
201 return DQTask::globalBeginLuminosityBlock(lb, es);
208 auto lumiCache = luminosityBlockCache(lb.
index());
212 DQTask::globalEndLuminosityBlock(lb, es);
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
void _process(edm::Event const &, edm::EventSetup const &) override
PFHcalGPUComparisonTask(edm::ParameterSet const &)
MonitorElement * book1I(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * pfCluster_Multiplicity_HostvsDevice_
virtual void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterTok_ref_
MonitorElement * pfCluster_Layer_HostvsDevice_
MonitorElement * pfCluster_RecHitMultiplicity_HostvsDevice_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::string pfCaloGPUCompDir_
MonitorElement * pfCluster_Phi_HostvsDevice_
example_stream void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_FWK_MODULE(type)
Log< level::Warning, true > LogPrint
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterTok_target_
std::shared_ptr< hcaldqm::Cache > globalBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const override
void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
MonitorElement * pfCluster_Depth_HostvsDevice_
MonitorElement * pfCluster_Energy_HostvsDevice_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
LuminosityBlockIndex index() const
MonitorElement * pfCluster_Eta_HostvsDevice_
MonitorElement * pfCluster_DuplicateMatches_HostvsDevice_
Log< level::Warning, false > LogWarning
MonitorElement * book2I(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void _resetMonitors(hcaldqm::UpdateFreq) override
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override