19 EBCpuUncalibRecHits_(nullptr),
20 EECpuUncalibRecHits_(nullptr),
21 EBCpuRecHits_(nullptr),
22 EECpuRecHits_(nullptr) {}
112 template <
typename DigiCollection>
115 MESet& meDigiCpuAmplitude(
MEs_.
at(
"DigiCpuAmplitude"));
121 if constexpr (std::is_same_v<DigiCollection, EBDigiCollection>) {
125 assert(iSubdet == EcalEndcap);
129 unsigned nCpuDigis(cpuDigis.size());
132 for (
auto const& cpuDigi : cpuDigis) {
137 static_cast<MESetMulti&
>(meDigiCpuAmplitude).use(iSample);
139 int cpuAmp(cpuDataFrame.
sample(iSample).
adc());
145 template <
typename DigiCollection>
148 MESet& meDigiGpuCpuAmplitude(
MEs_.
at(
"DigiGpuCpuAmplitude"));
155 DigiCollection
const* cpuDigis;
156 if constexpr (std::is_same_v<DigiCollection, EBDigiCollection>) {
160 assert(iSubdet == EcalEndcap);
166 <<
"CpuDigis Collection. Aborting runOnGpuDigis\n";
170 unsigned nGpuDigis(gpuDigis.size());
171 unsigned nCpuDigis(cpuDigis->size());
180 for (
auto const& gpuDigi : gpuDigis) {
182 DetId gpuId(gpuDigi.id());
183 typename DigiCollection::const_iterator cpuItr(cpuDigis->find(gpuId));
184 if (cpuItr == cpuDigis->end()) {
185 edm::LogWarning(
"EcalDQM") <<
"GpuTask: Did not find CpuDigi DetId " << gpuId.rawId() <<
" in CPU collection\n";
194 static_cast<MESetMulti&
>(meDigiGpuCpuAmplitude).use(iSample);
196 int gpuAmp(gpuDataFrame.
sample(iSample).
adc());
197 int cpuAmp(cpuDataFrame.
sample(iSample).
adc());
202 MESet& meDigiGpuAmplitude(
MEs_.
at(
"DigiGpuAmplitude"));
203 static_cast<MESetMulti&
>(meDigiGpuAmplitude).use(iSample);
213 MESet& meUncalibCpuAmpError(
MEs_.
at(
"UncalibCpuAmpError"));
214 MESet& meUncalibCpuPedestal(
MEs_.
at(
"UncalibCpuPedestal"));
215 MESet& meUncalibCpuJitter(
MEs_.
at(
"UncalibCpuJitter"));
216 MESet& meUncalibCpuJitterError(
MEs_.
at(
"UncalibCpuJitterError"));
217 MESet& meUncalibCpuChi2(
MEs_.
at(
"UncalibCpuChi2"));
218 MESet& meUncalibCpuOOTAmp(
MEs_.
at(
"UncalibCpuOOTAmp"));
219 MESet& meUncalibCpuFlags(
MEs_.
at(
"UncalibCpuFlags"));
229 unsigned nCpuHits(cpuHits.
size());
232 for (
auto const& cpuHit : cpuHits) {
233 float cpuAmp(cpuHit.amplitude());
234 float cpuAmpError(cpuHit.amplitudeError());
235 float cpuPedestal(cpuHit.pedestal());
236 float cpuJitter(cpuHit.jitter());
237 float cpuJitterError(cpuHit.jitterError());
238 float cpuChi2(cpuHit.chi2());
239 uint32_t cpuFlags(cpuHit.flags());
241 if (cpuJitterError == 10000)
242 cpuJitterError = 0.249999;
253 static_cast<MESetMulti&
>(meUncalibCpuOOTAmp).use(iAmp);
264 MESet& meUncalibGpuCpuAmp(
MEs_.
at(
"UncalibGpuCpuAmp"));
265 MESet& meUncalibGpuCpuAmpError(
MEs_.
at(
"UncalibGpuCpuAmpError"));
266 MESet& meUncalibGpuCpuPedestal(
MEs_.
at(
"UncalibGpuCpuPedestal"));
267 MESet& meUncalibGpuCpuJitter(
MEs_.
at(
"UncalibGpuCpuJitter"));
268 MESet& meUncalibGpuCpuJitterError(
MEs_.
at(
"UncalibGpuCpuJitterError"));
269 MESet& meUncalibGpuCpuChi2(
MEs_.
at(
"UncalibGpuCpuChi2"));
270 MESet& meUncalibGpuCpuOOTAmp(
MEs_.
at(
"UncalibGpuCpuOOTAmp"));
271 MESet& meUncalibGpuCpuFlags(
MEs_.
at(
"UncalibGpuCpuFlags"));
281 <<
"CpuUncalibRecHits Collection. Aborting runOnGpuUncalibRecHits\n";
285 unsigned nGpuHits(gpuHits.
size());
286 unsigned nCpuHits(cpuHits->
size());
295 for (
auto const& gpuHit : gpuHits) {
297 DetId gpuId(gpuHit.id());
299 if (cpuItr == cpuHits->
end()) {
300 edm::LogWarning(
"EcalDQM") <<
"GpuTask: Did not find GpuUncalibRecHit DetId " << gpuId.rawId()
301 <<
" in CPU collection\n";
305 float gpuAmp(gpuHit.amplitude());
306 float gpuAmpError(gpuHit.amplitudeError());
307 float gpuPedestal(gpuHit.pedestal());
308 float gpuJitter(gpuHit.jitter());
309 float gpuJitterError(gpuHit.jitterError());
310 float gpuChi2(gpuHit.chi2());
311 uint32_t gpuFlags(gpuHit.flags());
313 if (gpuJitterError == 10000)
314 gpuJitterError = 0.249999;
316 float cpuAmp(cpuItr->amplitude());
317 float cpuAmpError(cpuItr->amplitudeError());
318 float cpuPedestal(cpuItr->pedestal());
319 float cpuJitter(cpuItr->jitter());
320 float cpuJitterError(cpuItr->jitterError());
321 float cpuChi2(cpuItr->chi2());
322 uint32_t cpuFlags(cpuItr->flags());
324 if (cpuJitterError == 10000)
325 cpuJitterError = 0.249999;
337 MESet& meUncalibGpuAmpError(
MEs_.
at(
"UncalibGpuAmpError"));
338 MESet& meUncalibGpuPedestal(
MEs_.
at(
"UncalibGpuPedestal"));
339 MESet& meUncalibGpuJitter(
MEs_.
at(
"UncalibGpuJitter"));
340 MESet& meUncalibGpuJitterError(
MEs_.
at(
"UncalibGpuJitterError"));
341 MESet& meUncalibGpuChi2(
MEs_.
at(
"UncalibGpuChi2"));
342 MESet& meUncalibGpuFlags(
MEs_.
at(
"UncalibGpuFlags"));
354 static_cast<MESetMulti&
>(meUncalibGpuCpuOOTAmp).use(iAmp);
363 MESet& meUncalibGpuOOTAmp(
MEs_.
at(
"UncalibGpuOOTAmp"));
364 static_cast<MESetMulti&
>(meUncalibGpuOOTAmp).use(iAmp);
373 MESet& meRecHitCpuEnergy(
MEs_.
at(
"RecHitCpuEnergy"));
375 MESet& meRecHitCpuFlags(
MEs_.
at(
"RecHitCpuFlags"));
385 unsigned nCpuHits(cpuHits.
size());
388 for (
auto const& cpuHit : cpuHits) {
389 float cpuEnergy(cpuHit.energy());
390 float cpuTime(cpuHit.time());
391 uint32_t cpuFlags(cpuHit.flagsBits());
401 MESet& meRecHitGpuCpuEnergy(
MEs_.
at(
"RecHitGpuCpuEnergy"));
402 MESet& meRecHitGpuCpuTime(
MEs_.
at(
"RecHitGpuCpuTime"));
403 MESet& meRecHitGpuCpuFlags(
MEs_.
at(
"RecHitGpuCpuFlags"));
412 <<
"CpuRecHits Collection. Aborting runOnGpuRecHits\n";
416 unsigned nGpuHits(gpuHits.
size());
417 unsigned nCpuHits(cpuHits->
size());
426 for (
auto const& gpuHit : gpuHits) {
428 DetId gpuId(gpuHit.detid());
430 if (cpuItr == cpuHits->
end()) {
431 edm::LogWarning(
"EcalDQM") <<
"GpuTask: Did not find GpuRecHit DetId " << gpuId.rawId()
432 <<
" in CPU collection\n";
436 float gpuEnergy(gpuHit.energy());
437 float gpuTime(gpuHit.time());
438 uint32_t gpuFlags(gpuHit.flagsBits());
440 float cpuEnergy(cpuItr->energy());
441 float cpuTime(cpuItr->time());
442 uint32_t cpuFlags(cpuItr->flagsBits());
449 MESet& meRecHitGpuEnergy(
MEs_.
at(
"RecHitGpuEnergy"));
451 MESet& meRecHitGpuFlags(
MEs_.
at(
"RecHitGpuFlags"));
T getUntrackedParameter(std::string const &, T const &) const
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
EcalMGPASample sample(int i) const
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)
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_
EcalUncalibratedRecHitCollection const * EBCpuUncalibRecHits_
Log< level::Warning, false > LogWarning
void push_back(Dependency const &_d)
void erase(const std::string &key)
void runOnCpuRecHits(EcalRecHitCollection const &, Collections)
void runOnCpuDigis(DigiCollection const &, Collections)
int adc() const
get the ADC sample (12 bits)