Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HCALDQM: Move channel quality lookup to dqmBeginLuminosityBlock (+increase pedestal RMS axis) #25360

Merged
merged 3 commits into from Dec 6, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions DQM/HcalCommon/interface/DQClient.h
Expand Up @@ -30,6 +30,9 @@ namespace hcaldqm
~DQClient() override {}

virtual void beginRun(edm::Run const&, edm::EventSetup const&);
virtual void beginLuminosityBlock(DQMStore::IBooker&,
DQMStore::IGetter&, edm::LuminosityBlock const& lb,
edm::EventSetup const&);
virtual void endLuminosityBlock(DQMStore::IBooker&,
DQMStore::IGetter&,
edm::LuminosityBlock const&, edm::EventSetup const&);
Expand Down
3 changes: 3 additions & 0 deletions DQM/HcalCommon/interface/DQHarvester.h
Expand Up @@ -22,6 +22,9 @@ namespace hcaldqm
~DQHarvester() override {}

void beginRun(edm::Run const&, edm::EventSetup const&) override;
void dqmBeginLuminosityBlock(
DQMStore::IBooker& ib, DQMStore::IGetter& ig,
edm::LuminosityBlock const& lb, edm::EventSetup const& es);
void dqmEndLuminosityBlock(
DQMStore::IBooker&, DQMStore::IGetter&,
edm::LuminosityBlock const&, edm::EventSetup const&) override;
Expand Down
10 changes: 9 additions & 1 deletion DQM/HcalCommon/src/DQClient.cc
Expand Up @@ -87,8 +87,16 @@ namespace hcaldqm
}
}

// get the Channel Quality masks
// Initialize channel quality masks, but do not load (changed for 10_4_X, moving to LS granularity)
_xQuality.initialize(hashfunctions::fDChannel);
}

/* virtual */ void DQClient::beginLuminosityBlock(DQMStore::IBooker&,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DryRun sorry why /* virtual */ ? If this is not needed please just remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @fabiocos - I have no idea, actually... this is from before my time. I'll remove it.

DQMStore::IGetter&, edm::LuminosityBlock const& lb,
edm::EventSetup const& es)
{
// get the Channel Quality masks
_xQuality.reset();
edm::ESHandle<HcalChannelQuality> hcq;
es.get<HcalChannelQualityRcd>().get("withTopo", hcq);
const HcalChannelQuality *cq = hcq.product();
Expand Down
9 changes: 8 additions & 1 deletion DQM/HcalCommon/src/DQHarvester.cc
Expand Up @@ -90,8 +90,15 @@ namespace hcaldqm
}
}

// get the Hcal Channels Quality for channels that are not 0
// Initialize channel quality masks, but do not load (changed for 10_4_X, moving to LS granularity)
_xQuality.initialize(hashfunctions::fDChannel);
}

/* virtual */ void DQHarvester::dqmBeginLuminosityBlock(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DryRun same here

DQMStore::IBooker& ib, DQMStore::IGetter& ig,
edm::LuminosityBlock const& lb, edm::EventSetup const& es)
{
// get the Hcal Channels Quality for channels that are not 0
edm::ESHandle<HcalChannelQuality> hcq;
es.get<HcalChannelQualityRcd>().get("withTopo", hcq);
const HcalChannelQuality *cq = hcq.product();
Expand Down
50 changes: 25 additions & 25 deletions DQM/HcalCommon/src/DQTask.cc
Expand Up @@ -69,30 +69,6 @@ namespace hcaldqm
}
}

// get the Channel Quality Status for all the channels
edm::ESHandle<HcalChannelQuality> hcq;
es.get<HcalChannelQualityRcd>().get("withTopo", hcq);
const HcalChannelQuality *cq = hcq.product();
std::vector<DetId> detids = cq->getAllChannels();
for (std::vector<DetId>::const_iterator it=detids.begin();
it!=detids.end(); ++it)
{
// if unknown skip
if (HcalGenericDetId(*it).genericSubdet()==
HcalGenericDetId::HcalGenUnknown)
continue;

if (HcalGenericDetId(*it).isHcalDetId())
{
HcalDetId did(*it);
uint32_t mask = (cq->getValues(did))->getValue();
if (mask!=0)
{
_xQuality.push(did, mask);
}
}
}

// book some base guys
_cEvsTotal.book(ib, _subsystem);
_cEvsPerLS.book(ib, _subsystem);
Expand Down Expand Up @@ -133,7 +109,31 @@ namespace hcaldqm
this->_resetMonitors(f50LS);
if (_procLSs%100==0)
this->_resetMonitors(f100LS);


// get the Channel Quality Status for all the channels
_xQuality.reset();
edm::ESHandle<HcalChannelQuality> hcq;
es.get<HcalChannelQualityRcd>().get("withTopo", hcq);
const HcalChannelQuality *cq = hcq.product();
std::vector<DetId> detids = cq->getAllChannels();
for (std::vector<DetId>::const_iterator it=detids.begin();
it!=detids.end(); ++it)
{
// if unknown skip
if (HcalGenericDetId(*it).genericSubdet()==
HcalGenericDetId::HcalGenUnknown)
continue;

if (HcalGenericDetId(*it).isHcalDetId())
{
HcalDetId did(*it);
uint32_t mask = (cq->getValues(did))->getValue();
if (mask!=0)
{
_xQuality.push(did, mask);
}
}
}
}

/* virtual */ void DQTask::endLuminosityBlock(
Expand Down
4 changes: 2 additions & 2 deletions DQM/HcalTasks/plugins/PedestalTask.cc
Expand Up @@ -122,7 +122,7 @@ PedestalTask::PedestalTask(edm::ParameterSet const& ps):
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fADC_15),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN, true),0);
_cRMSTotal_Subdet.initialize(_name, "RMS", hcaldqm::hashfunctions::fSubdet,
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fADC_5),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fADC_15),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN, true),0);
_cMeanTotal_depth.initialize(_name, "Mean", hcaldqm::hashfunctions::fdepth,
new hcaldqm::quantity::DetectorQuantity(hcaldqm::quantity::fieta),
Expand All @@ -131,7 +131,7 @@ PedestalTask::PedestalTask(edm::ParameterSet const& ps):
_cRMSTotal_depth.initialize(_name, "RMS", hcaldqm::hashfunctions::fdepth,
new hcaldqm::quantity::DetectorQuantity(hcaldqm::quantity::fieta),
new hcaldqm::quantity::DetectorQuantity(hcaldqm::quantity::fiphi),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fADC_5),0);
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fADC_15),0);

_cMeanDBRef1LS_Subdet.initialize(_name, "MeanDBRef1LS", hcaldqm::hashfunctions::fSubdet,
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fAroundZero),
Expand Down