diff --git a/DQM/EcalMonitorClient/src/MLClient.cc b/DQM/EcalMonitorClient/src/MLClient.cc index bc84593b0145f..38bbef854478c 100644 --- a/DQM/EcalMonitorClient/src/MLClient.cc +++ b/DQM/EcalMonitorClient/src/MLClient.cc @@ -59,7 +59,7 @@ namespace ecaldqm { double pu = sPU.getFloatValue(); //Do not compute ML quality if PU is non existent. - if (pu < 0.) { + if (pu <= 0.) { return; } uint32_t mask(1 << EcalDQMStatusHelper::PEDESTAL_ONLINE_HIGH_GAIN_RMS_ERROR | diff --git a/DQM/EcalMonitorTasks/src/EnergyTask.cc b/DQM/EcalMonitorTasks/src/EnergyTask.cc index 7670fce2e20dd..775882335db8a 100644 --- a/DQM/EcalMonitorTasks/src/EnergyTask.cc +++ b/DQM/EcalMonitorTasks/src/EnergyTask.cc @@ -39,13 +39,13 @@ namespace ecaldqm { MESet& meHit(MEs_.at("Hit")); MESet& meHitAll(MEs_.at("HitAll")); - uint32_t neitherGoodNorPoorCalib(~(0x1 << EcalRecHit::kGood | 0x1 << EcalRecHit::kPoorCalib)); - uint32_t neitherGoodNorOOT(~(0x1 << EcalRecHit::kGood | 0x1 << EcalRecHit::kOutOfTime)); + uint32_t goodORPoorCalibBits(0x1 << EcalRecHit::kGood | 0x1 << EcalRecHit::kPoorCalib); + uint32_t goodOROOTBits(0x1 << EcalRecHit::kGood | 0x1 << EcalRecHit::kOutOfTime); for (EcalRecHitCollection::const_iterator hitItr(_hits.begin()); hitItr != _hits.end(); ++hitItr) { - if (isPhysicsRun_ && hitItr->checkFlagMask(neitherGoodNorPoorCalib)) + if (isPhysicsRun_ && !hitItr->checkFlagMask(goodORPoorCalibBits)) continue; - if (!isPhysicsRun_ && hitItr->checkFlagMask(neitherGoodNorOOT)) + if (!isPhysicsRun_ && !hitItr->checkFlagMask(goodOROOTBits)) continue; float energy(hitItr->energy()); diff --git a/DQM/EcalMonitorTasks/src/OccupancyTask.cc b/DQM/EcalMonitorTasks/src/OccupancyTask.cc index 364840cc193a9..205ef11d7d2e1 100644 --- a/DQM/EcalMonitorTasks/src/OccupancyTask.cc +++ b/DQM/EcalMonitorTasks/src/OccupancyTask.cc @@ -198,7 +198,7 @@ namespace ecaldqm { MESet& meRecHitThr1D(MEs_.at("RecHitThr1D")); MESet& meTrendNRecHitThr(MEs_.at("TrendNRecHitThr")); - uint32_t mask(~(0x1 << EcalRecHit::kGood)); + uint32_t goodBits(0x1 << EcalRecHit::kGood); double nFiltered(0.); float nRHThrp(0), nRHThrm(0); @@ -210,7 +210,7 @@ namespace ecaldqm { meRecHitProjEta.fill(getEcalDQMSetupObjects(), id); meRecHitProjPhi.fill(getEcalDQMSetupObjects(), id); - if (!hit.checkFlagMask(mask) && hit.energy() > recHitThreshold_) { + if (hit.checkFlagMask(goodBits) && hit.energy() > recHitThreshold_) { meRecHitThrProjEta.fill(getEcalDQMSetupObjects(), id); meRecHitThrProjPhi.fill(getEcalDQMSetupObjects(), id); meRecHitThrAll.fill(getEcalDQMSetupObjects(), id); diff --git a/DQM/EcalMonitorTasks/src/TimingTask.cc b/DQM/EcalMonitorTasks/src/TimingTask.cc index bb00f7d266dae..5bd6b365ed5aa 100644 --- a/DQM/EcalMonitorTasks/src/TimingTask.cc +++ b/DQM/EcalMonitorTasks/src/TimingTask.cc @@ -69,11 +69,11 @@ namespace ecaldqm { MESet& meTime1D(MEs_.at("Time1D")); MESet& meChi2(MEs_.at("Chi2")); - uint32_t mask(~((0x1 << EcalRecHit::kGood) | (0x1 << EcalRecHit::kOutOfTime))); + uint32_t goodOROOTBits(0x1 << EcalRecHit::kGood | 0x1 << EcalRecHit::kOutOfTime); int signedSubdet; std::for_each(_hits.begin(), _hits.end(), [&](EcalRecHitCollection::value_type const& hit) { - if (hit.checkFlagMask(mask)) + if (!hit.checkFlagMask(goodOROOTBits)) return; DetId id(hit.id());