40 #define LOGVERB(x) edm::LogVerbatim(x) 42 #define LOGVERB(x) LogTrace(x) 69 : pfClusterTok_ref_{consumes<reco::PFClusterCollection>(
72 consumes<reco::PFClusterCollection>(conf.getUntrackedParameter<
edm::InputTag>(
"pfClusterToken_target"))},
73 pfCaloGPUCompDir_{conf.getUntrackedParameter<
std::string>(
"pfCaloGPUCompDir")} {}
82 histo =
"pfCluster_Multiplicity_GPUvsCPU";
85 histo =
"pfCluster_Energy_GPUvsCPU";
88 histo =
"pfCluster_RecHitMultiplicity_GPUvsCPU";
91 histo =
"pfCluster_Layer_GPUvsCPU";
94 histo =
"pfCluster_Depth_GPUvsCPU";
97 histo =
"pfCluster_Eta_GPUvsCPU";
100 histo =
"pfCluster_Phi_GPUvsCPU";
103 histo =
"pfCluster_DuplicateMatches_GPUvsCPU";
116 if (pfClusters_ref->size() != pfClusters_target->size())
117 LOGVERB(
"PFCaloGPUComparisonTask") <<
" PFCluster multiplicity " << pfClusters_ref->size() <<
" " 118 << pfClusters_target->size();
123 std::vector<int> matched_idx;
124 matched_idx.reserve(pfClusters_ref->size());
125 for (
unsigned i = 0;
i < pfClusters_ref->size(); ++
i) {
127 for (
unsigned j = 0;
j < pfClusters_target->size(); ++
j) {
128 if (pfClusters_ref->at(
i).seed() == pfClusters_target->at(
j).seed()) {
131 matched_idx.push_back((
int)
j);
139 matched_idx.push_back(-1);
144 for (
unsigned i = 0;
i < pfClusters_ref->size(); ++
i) {
145 if (matched_idx[
i] >= 0) {
146 unsigned int j = matched_idx[
i];
148 int target_energy_bin =
150 if (ref_energy_bin != target_energy_bin)
152 <<
"Off-diagonal energy bin entries: " << pfClusters_ref->at(
i).energy() <<
" " 153 << pfClusters_ref->at(
i).eta() <<
" " << pfClusters_ref->at(
i).phi() <<
" " 154 << pfClusters_target->at(
j).energy() <<
" " << pfClusters_target->at(
j).eta() <<
" " 155 << pfClusters_target->at(
j).phi() << std::endl;
162 (
float)pfClusters_target->at(
j).recHitFractions().size());
MonitorElement * pfCluster_Phi_GPUvsCPU_
MonitorElement * pfCluster_Multiplicity_GPUvsCPU_
virtual void setCurrentFolder(std::string const &fullpath)
std::string pfCaloGPUCompDir_
MonitorElement * pfCluster_Depth_GPUvsCPU_
T getUntrackedParameter(std::string const &, T const &) const
PFCaloGPUComparisonTask(edm::ParameterSet const &conf)
~PFCaloGPUComparisonTask() override=default
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
Log< level::Warning, true > LogPrint
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterTok_ref_
MonitorElement * pfCluster_RecHitMultiplicity_GPUvsCPU_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * pfCluster_Eta_GPUvsCPU_
MonitorElement * pfCluster_DuplicateMatches_GPUvsCPU_
Log< level::Warning, false > LogWarning
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
void analyze(edm::Event const &e, edm::EventSetup const &c) override
MonitorElement * pfCluster_Layer_GPUvsCPU_
MonitorElement * pfCluster_Energy_GPUvsCPU_
edm::EDGetTokenT< reco::PFClusterCollection > pfClusterTok_target_