Skip to content

Commit

Permalink
Add condition for runs without luminosity and fix unittest fail
Browse files Browse the repository at this point in the history
  • Loading branch information
abhih1 committed Nov 7, 2021
1 parent b6d7108 commit ab48878
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion DQM/EcalMonitorClient/src/MLClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ namespace ecaldqm {
//Get the no.of events and the PU per LS calculated in OccupancyTask
int nEv = sNumEvents.getFloatValue();
double pu = sPU.getFloatValue();

//Do not compute ML quality if PU is non existent.
if (pu < 0.) {
return;
}
uint32_t mask(1 << EcalDQMStatusHelper::PEDESTAL_ONLINE_HIGH_GAIN_RMS_ERROR |
1 << EcalDQMStatusHelper::PHYSICS_BAD_CHANNEL_WARNING |
1 << EcalDQMStatusHelper::PHYSICS_BAD_CHANNEL_ERROR);
Expand Down
8 changes: 5 additions & 3 deletions DQM/EcalMonitorTasks/src/OccupancyTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace ecaldqm {
recHitThreshold_ = _params.getUntrackedParameter<double>("recHitThreshold");
tpThreshold_ = _params.getUntrackedParameter<double>("tpThreshold");
lumiTag = _params.getParameter<edm::InputTag>("scalers");
lumiCheck_ = _params.getUntrackedParameter<bool>("lumiCheck");
lumiCheck_ = _params.getUntrackedParameter<bool>("lumiCheck", false);
}

void OccupancyTask::setTokens(edm::ConsumesCollector& _collector) {
Expand Down Expand Up @@ -78,8 +78,10 @@ namespace ecaldqm {
MESet& mePU(static_cast<MESet&>(MEs_.at("PU")));
edm::Handle<LumiScalersCollection> lumiScalers;
_evt.getByToken(lumiScalersToken_, lumiScalers);
auto scalit = lumiScalers->begin();
scal_pu = scalit->pileup();
if (lumiScalers.isValid() and not lumiScalers->empty()) {
auto scalit = lumiScalers->begin();
scal_pu = scalit->pileup();
}
mePU.fill(getEcalDQMSetupObjects(), double(scal_pu));
FindPUinLS = false;
}
Expand Down

0 comments on commit ab48878

Please sign in to comment.