17 enableUncalib_(
false),
27 EBCpuUncalibRecHits_(nullptr),
28 EECpuUncalibRecHits_(nullptr),
29 EBCpuRecHits_(nullptr),
30 EECpuRecHits_(nullptr) {}
168 template <
typename DigiCollection>
171 MESet& meDigiCpuAmplitude(
MEs_.
at(
"DigiCpuAmplitude"));
177 if constexpr (std::is_same_v<DigiCollection, EBDigiCollection>) {
185 unsigned nCpuDigis(cpuDigis.size());
188 for (
auto const& cpuDigi : cpuDigis) {
193 static_cast<MESetMulti&
>(meDigiCpuAmplitude).use(iSample);
195 int cpuAmp(cpuDataFrame.
sample(iSample).
adc());
201 template <
typename DigiCollection>
204 MESet& meDigiGpuCpuAmplitude(
MEs_.
at(
"DigiGpuCpuAmplitude"));
212 if constexpr (std::is_same_v<DigiCollection, EBDigiCollection>) {
222 <<
"CpuDigis Collection. Aborting runOnGpuDigis\n";
226 unsigned nGpuDigis(gpuDigis.size());
227 unsigned nCpuDigis(cpuDigis->size());
241 for (
auto const& gpuDigi : gpuDigis) {
243 DetId gpuId(gpuDigi.id());
244 typename DigiCollection::const_iterator cpuItr(cpuDigis->find(gpuId));
245 if (cpuItr == cpuDigis->end()) {
246 edm::LogWarning(
"EcalDQM") <<
"GpuTask: Did not find CpuDigi DetId " << gpuId.rawId() <<
" in CPU collection\n";
255 static_cast<MESetMulti&
>(meDigiGpuCpuAmplitude).use(iSample);
257 int gpuAmp(gpuDataFrame.
sample(iSample).
adc());
258 int cpuAmp(cpuDataFrame.
sample(iSample).
adc());
263 MESet& meDigiGpuAmplitude(
MEs_.
at(
"DigiGpuAmplitude"));
264 static_cast<MESetMulti&
>(meDigiGpuAmplitude).use(iSample);
269 MESet& meDigi2DAmplitude(
MEs_.
at(
"Digi2DAmplitude"));
270 static_cast<MESetMulti&
>(meDigi2DAmplitude).use(iSample);
280 MESet& meUncalibCpuAmpError(
MEs_.
at(
"UncalibCpuAmpError"));
281 MESet& meUncalibCpuPedestal(
MEs_.
at(
"UncalibCpuPedestal"));
282 MESet& meUncalibCpuJitter(
MEs_.
at(
"UncalibCpuJitter"));
283 MESet& meUncalibCpuJitterError(
MEs_.
at(
"UncalibCpuJitterError"));
284 MESet& meUncalibCpuChi2(
MEs_.
at(
"UncalibCpuChi2"));
285 MESet& meUncalibCpuOOTAmp(
MEs_.
at(
"UncalibCpuOOTAmp"));
286 MESet& meUncalibCpuFlags(
MEs_.
at(
"UncalibCpuFlags"));
296 unsigned nCpuHits(cpuHits.
size());
299 for (
auto const& cpuHit : cpuHits) {
300 float cpuAmp(cpuHit.amplitude());
301 float cpuAmpError(cpuHit.amplitudeError());
302 float cpuPedestal(cpuHit.pedestal());
303 float cpuJitter(cpuHit.jitter());
304 float cpuJitterError(cpuHit.jitterError());
305 float cpuChi2(cpuHit.chi2());
306 uint32_t cpuFlags(cpuHit.flags());
308 if (cpuJitterError == 10000)
309 cpuJitterError = 0.249999;
320 static_cast<MESetMulti&
>(meUncalibCpuOOTAmp).use(iAmp);
331 MESet& meUncalibGpuCpuAmp(
MEs_.
at(
"UncalibGpuCpuAmp"));
332 MESet& meUncalibGpuCpuAmpError(
MEs_.
at(
"UncalibGpuCpuAmpError"));
333 MESet& meUncalibGpuCpuPedestal(
MEs_.
at(
"UncalibGpuCpuPedestal"));
334 MESet& meUncalibGpuCpuJitter(
MEs_.
at(
"UncalibGpuCpuJitter"));
335 MESet& meUncalibGpuCpuJitterError(
MEs_.
at(
"UncalibGpuCpuJitterError"));
336 MESet& meUncalibGpuCpuChi2(
MEs_.
at(
"UncalibGpuCpuChi2"));
337 MESet& meUncalibGpuCpuOOTAmp(
MEs_.
at(
"UncalibGpuCpuOOTAmp"));
338 MESet& meUncalibGpuCpuFlags(
MEs_.
at(
"UncalibGpuCpuFlags"));
348 <<
"CpuUncalibRecHits Collection. Aborting runOnGpuUncalibRecHits\n";
352 unsigned nGpuHits(gpuHits.
size());
353 unsigned nCpuHits(cpuHits->
size());
367 for (
auto const& gpuHit : gpuHits) {
369 DetId gpuId(gpuHit.id());
371 if (cpuItr == cpuHits->
end()) {
372 edm::LogWarning(
"EcalDQM") <<
"GpuTask: Did not find GpuUncalibRecHit DetId " << gpuId.rawId()
373 <<
" in CPU collection\n";
377 float gpuAmp(gpuHit.amplitude());
378 float gpuAmpError(gpuHit.amplitudeError());
379 float gpuPedestal(gpuHit.pedestal());
380 float gpuJitter(gpuHit.jitter());
381 float gpuJitterError(gpuHit.jitterError());
382 float gpuChi2(gpuHit.chi2());
383 uint32_t gpuFlags(gpuHit.flags());
385 if (gpuJitterError == 10000)
386 gpuJitterError = 0.249999;
388 float cpuAmp(cpuItr->amplitude());
389 float cpuAmpError(cpuItr->amplitudeError());
390 float cpuPedestal(cpuItr->pedestal());
391 float cpuJitter(cpuItr->jitter());
392 float cpuJitterError(cpuItr->jitterError());
393 float cpuChi2(cpuItr->chi2());
394 uint32_t cpuFlags(cpuItr->flags());
396 if (cpuJitterError == 10000)
397 cpuJitterError = 0.249999;
409 MESet& meUncalibGpuAmpError(
MEs_.
at(
"UncalibGpuAmpError"));
410 MESet& meUncalibGpuPedestal(
MEs_.
at(
"UncalibGpuPedestal"));
411 MESet& meUncalibGpuJitter(
MEs_.
at(
"UncalibGpuJitter"));
412 MESet& meUncalibGpuJitterError(
MEs_.
at(
"UncalibGpuJitterError"));
413 MESet& meUncalibGpuChi2(
MEs_.
at(
"UncalibGpuChi2"));
414 MESet& meUncalibGpuFlags(
MEs_.
at(
"UncalibGpuFlags"));
427 MESet& meUncalib2DAmpError(
MEs_.
at(
"Uncalib2DAmpError"));
428 MESet& meUncalib2DPedestal(
MEs_.
at(
"Uncalib2DPedestal"));
429 MESet& meUncalib2DJitter(
MEs_.
at(
"Uncalib2DJitter"));
430 MESet& meUncalib2DJitterError(
MEs_.
at(
"Uncalib2DJitterError"));
432 MESet& meUncalib2DFlags(
MEs_.
at(
"Uncalib2DFlags"));
444 static_cast<MESetMulti&
>(meUncalibGpuCpuOOTAmp).use(iAmp);
453 MESet& meUncalibGpuOOTAmp(
MEs_.
at(
"UncalibGpuOOTAmp"));
454 static_cast<MESetMulti&
>(meUncalibGpuOOTAmp).use(iAmp);
459 MESet& meUncalib2DOOTAmp(
MEs_.
at(
"Uncalib2DOOTAmp"));
460 static_cast<MESetMulti&
>(meUncalib2DOOTAmp).use(iAmp);
469 MESet& meRecHitCpuEnergy(
MEs_.
at(
"RecHitCpuEnergy"));
471 MESet& meRecHitCpuFlags(
MEs_.
at(
"RecHitCpuFlags"));
481 unsigned nCpuHits(cpuHits.
size());
484 for (
auto const& cpuHit : cpuHits) {
485 float cpuEnergy(cpuHit.energy());
486 float cpuTime(cpuHit.time());
487 uint32_t cpuFlags(cpuHit.flagsBits());
497 MESet& meRecHitGpuCpuEnergy(
MEs_.
at(
"RecHitGpuCpuEnergy"));
498 MESet& meRecHitGpuCpuTime(
MEs_.
at(
"RecHitGpuCpuTime"));
499 MESet& meRecHitGpuCpuFlags(
MEs_.
at(
"RecHitGpuCpuFlags"));
508 <<
"CpuRecHits Collection. Aborting runOnGpuRecHits\n";
512 unsigned nGpuHits(gpuHits.
size());
513 unsigned nCpuHits(cpuHits->
size());
526 for (
auto const& gpuHit : gpuHits) {
528 DetId gpuId(gpuHit.detid());
530 if (cpuItr == cpuHits->
end()) {
531 edm::LogWarning(
"EcalDQM") <<
"GpuTask: Did not find GpuRecHit DetId " << gpuId.rawId()
532 <<
" in CPU collection\n";
536 float gpuEnergy(gpuHit.energy());
537 float gpuTime(gpuHit.time());
538 uint32_t gpuFlags(gpuHit.flagsBits());
540 float cpuEnergy(cpuItr->energy());
541 float cpuTime(cpuItr->time());
542 uint32_t cpuFlags(cpuItr->flagsBits());
549 MESet& meRecHitGpuEnergy(
MEs_.
at(
"RecHitGpuEnergy"));
551 MESet& meRecHitGpuFlags(
MEs_.
at(
"RecHitGpuFlags"));
559 MESet& meRecHit2DEnergy(
MEs_.
at(
"RecHit2DEnergy"));
void addDependencies(DependencySet &) override
#define DEFINE_ECALDQM_WORKER(TYPE)
EBDigiCollection const * EBCpuDigis_
void runOnGpuRecHits(EcalRecHitCollection const &, Collections)
bool filterRunType(short const *) override
MESet & at(const std::string &key)
void runOnCpuUncalibRecHits(EcalUncalibratedRecHitCollection const &, Collections)
std::vector< T >::const_iterator const_iterator
EEDigiCollection const * EECpuDigis_
EcalRecHitCollection const * EECpuRecHits_
void fill(EcalDQMSetupObjects const edso, DetId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
void setParams(edm::ParameterSet const &) override
void runOnGpuUncalibRecHits(EcalUncalibratedRecHitCollection const &, Collections)
EcalMGPASample sample(int i) const
virtual void fill(EcalDQMSetupObjects const, DetId const &, double=1., double=1., double=1.)
void beginEvent(edm::Event const &, edm::EventSetup const &, bool const &, bool &) override
EcalRecHitCollection const * EBCpuRecHits_
const_iterator end() const
EcalDQMSetupObjects const getEcalDQMSetupObjects()
std::vector< int > uncalibOOTAmps_
void runOnGpuDigis(DigiCollection const &, Collections)
static constexpr unsigned int sampleSize
iterator find(key_type k)
EcalUncalibratedRecHitCollection const * EECpuUncalibRecHits_
int adc() const
get the ADC sample (12 bits)
EcalUncalibratedRecHitCollection const * EBCpuUncalibRecHits_
Log< level::Warning, false > LogWarning
void erase(const std::string &key)
void runOnCpuRecHits(EcalRecHitCollection const &, Collections)
void runOnCpuDigis(DigiCollection const &, Collections)