Skip to content

Commit

Permalink
Merge pull request #11804 from mbandrews/TestPulseRMS76x
Browse files Browse the repository at this point in the history
Fix TestPulse RMS binning and output
  • Loading branch information
davidlange6 committed Oct 16, 2015
2 parents 3f74840 + 92a0969 commit 34cdb49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DQM/EcalMonitorClient/python/TestPulseClient_cfi.py
Expand Up @@ -60,12 +60,12 @@
gain = ecaldqmMGPAGains
),
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('Ecal2P'),
otype = cms.untracked.string('SM'),
zaxis = cms.untracked.PSet(
title = cms.untracked.string('rms (ADC counts)')
),
btype = cms.untracked.string('Crystal'),
path = cms.untracked.string('%(subdet)s/%(prefix)sTestPulseClient/%(prefix)sTPT test pulse rms G%(gain)s'),
path = cms.untracked.string('%(subdet)s/%(prefix)sTestPulseClient/%(prefix)sTPT test pulse rms G%(gain)s %(sm)s'),
description = cms.untracked.string('2D distribution of the amplitude RMS. Channels with entries less than ' + str(minChannelEntries) + ' are not considered.')
)
)
Expand Down
4 changes: 3 additions & 1 deletion DQM/EcalMonitorClient/src/TestPulseClient.cc
Expand Up @@ -141,6 +141,7 @@ namespace ecaldqm
}

MESet::iterator qEnd(meQuality.end());
MESet::iterator rItr(meAmplitudeRMS);
MESet::const_iterator aItr(sAmplitude);
for(MESet::iterator qItr(meQuality.beginChannel()); qItr != qEnd; qItr.toNextChannel()){

Expand All @@ -149,6 +150,7 @@ namespace ecaldqm
bool doMask(meQuality.maskMatches(id, mask, statusManager_));

aItr = qItr;
rItr = qItr;

float entries(aItr->getBinEntries());

Expand All @@ -160,7 +162,7 @@ namespace ecaldqm
float amp(aItr->getBinContent());
float rms(aItr->getBinError() * sqrt(entries));

meAmplitudeRMS.setBinContent(id, rms);
rItr->setBinContent(rms);

if(amp < amplitudeThreshold_[gainItr->second] || rms > toleranceRMS_[gainItr->second])
qItr->setBinContent(doMask ? kMBad : kBad);
Expand Down

0 comments on commit 34cdb49

Please sign in to comment.