Skip to content

Commit

Permalink
Adjusting thresholds for timing, laser and hot cell quality plots
Browse files Browse the repository at this point in the history
  • Loading branch information
abhih1 committed Aug 23, 2022
1 parent ff37043 commit 64f83fa
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 13 deletions.
1 change: 1 addition & 0 deletions DQM/EcalMonitorClient/interface/LaserClient.h
Expand Up @@ -19,6 +19,7 @@ namespace ecaldqm {
int minChannelEntries_;
std::vector<float> expectedAmplitude_;
float toleranceAmplitudeLo_;
float toleranceAmplitudeFwdLo_;
float toleranceAmplitudeHi_;
float toleranceAmpRMSRatio_;
std::vector<float> expectedTiming_;
Expand Down
3 changes: 2 additions & 1 deletion DQM/EcalMonitorClient/interface/TimingClient.h
Expand Up @@ -15,7 +15,8 @@ namespace ecaldqm {
private:
void setParams(edm::ParameterSet const&) override;

float toleranceMean_;
float EBtoleranceMean_;
float EEtoleranceMean_;
float toleranceMeanFwd_;
float toleranceRMS_;
float toleranceRMSFwd_;
Expand Down
2 changes: 2 additions & 0 deletions DQM/EcalMonitorClient/python/LaserClient_cfi.py
Expand Up @@ -8,6 +8,7 @@
minChannelEntries = 3
expectedAmplitude = [1700.0, 1300.0, 1700.0, 1700.0]
toleranceAmplitudeLo = 0.1
toleranceAmplitudeFwdLo = 0.01
toleranceAmplitudeHi = 2.06
toleranceAmpRMSRatio = 0.3
expectedPNAmplitude = [800.0, 800.0, 800.0, 800.0]
Expand All @@ -23,6 +24,7 @@
minChannelEntries = cms.untracked.int32(minChannelEntries),
expectedAmplitude = cms.untracked.vdouble(expectedAmplitude),
toleranceAmplitudeLo = cms.untracked.double(toleranceAmplitudeLo),
toleranceAmplitudeFwdLo = cms.untracked.double(toleranceAmplitudeFwdLo),
toleranceAmplitudeHi = cms.untracked.double(toleranceAmplitudeHi),
toleranceAmpRMSRatio = cms.untracked.double(toleranceAmpRMSRatio),
expectedPNAmplitude = cms.untracked.vdouble(expectedPNAmplitude),
Expand Down
10 changes: 6 additions & 4 deletions DQM/EcalMonitorClient/python/TimingClient_cfi.py
Expand Up @@ -5,7 +5,8 @@

minChannelEntries = 1
minTowerEntries = 3
toleranceMean = 2.
EBtoleranceMean = 2.
EEtoleranceMean = 3.
toleranceRMS = 6.
minChannelEntriesFwd = 8
minTowerEntriesFwd = 24
Expand All @@ -18,7 +19,8 @@
params = cms.untracked.PSet(
minChannelEntries = cms.untracked.int32(minChannelEntries),
minTowerEntries = cms.untracked.int32(minTowerEntries),
toleranceMean = cms.untracked.double(toleranceMean),
EBtoleranceMean = cms.untracked.double(EBtoleranceMean),
EEtoleranceMean = cms.untracked.double(EEtoleranceMean),
toleranceRMS = cms.untracked.double(toleranceRMS),
minChannelEntriesFwd = cms.untracked.int32(minChannelEntriesFwd),
minTowerEntriesFwd = cms.untracked.int32(minTowerEntriesFwd),
Expand Down Expand Up @@ -127,14 +129,14 @@
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('Summary of the timing data quality. A 5x5 tower is red if the mean timing of the tower is off by more than ' + str(toleranceMean) + ' or RMS is greater than ' + str(toleranceRMS) + ' (' + str(toleranceMeanFwd) + ' and ' + str(toleranceRMSFwd) + ' in forward region). Towers with total entries less than ' + str(minTowerEntries) + ' are not subject to this evaluation. Since 5x5 tower timings are calculated with a tighter time-window than per-channel timings, a tower can additionally become red if its the sum of per-channel timing histogram entries is greater than per-tower histogram entries by factor ' + str(1. / (1. - tailPopulThreshold)) + ' (significant fraction of events fall outside the tight time-window).')
description = cms.untracked.string('Summary of the timing data quality. A 5x5 tower is red if the mean timing of the tower is off by more than ' + str(EBtoleranceMean) + 'for EB and ' + str(EEtoleranceMean) + 'for EE, or RMS is greater than ' + str(toleranceRMS) + ' (' + str(toleranceMeanFwd) + ' and ' + str(toleranceRMSFwd) + ' in forward region). Towers with total entries less than ' + str(minTowerEntries) + ' are not subject to this evaluation. Since 5x5 tower timings are calculated with a tighter time-window than per-channel timings, a tower can additionally become red if its the sum of per-channel timing histogram entries is greater than per-tower histogram entries by factor ' + str(1. / (1. - tailPopulThreshold)) + ' (significant fraction of events fall outside the tight time-window).')
),
Quality = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sTimingClient/%(prefix)sTMT timing quality %(sm)s'),
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('SM'),
btype = cms.untracked.string('Crystal'),
description = cms.untracked.string('Summary of the timing data quality. A channel is red if its mean timing is off by more than ' + str(toleranceMean) + ' or RMS is greater than ' + str(toleranceRMS) + '. Channels with entries less than ' + str(minChannelEntries) + ' are not considered.')
description = cms.untracked.string('Summary of the timing data quality. A channel is red if its mean timing is off by more than ' + str(EBtoleranceMean) + 'for EB and' + str(EEtoleranceMean) + 'for EE, or RMS is greater than ' + str(toleranceRMS) + '. Channels with entries less than ' + str(minChannelEntries) + ' are not considered.')
),
MeanAll = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sSummaryClient/%(prefix)sTMT%(suffix)s timing mean 1D summary'),
Expand Down
10 changes: 8 additions & 2 deletions DQM/EcalMonitorClient/src/LaserClient.cc
Expand Up @@ -18,6 +18,7 @@ namespace ecaldqm {
minChannelEntries_(0),
expectedAmplitude_(0),
toleranceAmplitudeLo_(0.),
toleranceAmplitudeFwdLo_(0.),
toleranceAmplitudeHi_(0.),
toleranceAmpRMSRatio_(0.),
expectedTiming_(0),
Expand All @@ -31,6 +32,7 @@ namespace ecaldqm {
void LaserClient::setParams(edm::ParameterSet const& _params) {
minChannelEntries_ = _params.getUntrackedParameter<int>("minChannelEntries");
toleranceAmplitudeLo_ = _params.getUntrackedParameter<double>("toleranceAmplitudeLo");
toleranceAmplitudeFwdLo_ = _params.getUntrackedParameter<double>("toleranceAmplitudeFwdLo");
toleranceAmplitudeHi_ = _params.getUntrackedParameter<double>("toleranceAmplitudeHi");
toleranceAmpRMSRatio_ = _params.getUntrackedParameter<double>("toleranceAmpRMSRatio");
toleranceTiming_ = _params.getUntrackedParameter<double>("toleranceTiming");
Expand Down Expand Up @@ -148,16 +150,20 @@ namespace ecaldqm {

float tMean(tItr->getBinContent());
float tRms(tItr->getBinError() * sqrt(tEntries));
float threshAmplitudeLo_;

meTimingMean.fill(getEcalDQMSetupObjects(), id, tMean);
meTimingRMS.fill(getEcalDQMSetupObjects(), id, tRms);
meTimingRMSMap.setBinContent(getEcalDQMSetupObjects(), id, tRms);

float intensity(aMean / expectedAmplitude_[wlItr->second]);
if (isForward(id))
if (isForward(id)) {
intensity /= forwardFactor_;
threshAmplitudeLo_ = toleranceAmplitudeFwdLo_;
} else
threshAmplitudeLo_ = toleranceAmplitudeLo_;

if (intensity < toleranceAmplitudeLo_ || intensity > toleranceAmplitudeHi_ ||
if (intensity < threshAmplitudeLo_ || intensity > toleranceAmplitudeHi_ ||
aRms > aMean * toleranceAmpRMSRatio_ ||
std::abs(tMean - expectedTiming_[wlItr->second]) > toleranceTiming_ /*|| tRms > toleranceTimRMS_*/)
qItr->setBinContent(doMask ? kMBad : kBad);
Expand Down
4 changes: 2 additions & 2 deletions DQM/EcalMonitorClient/src/OccupancyClient.cc
Expand Up @@ -180,7 +180,7 @@ namespace ecaldqm {
meQualitySummary.maskMatches(id, mask, statusManager_, GetTrigTowerMap()) ? kMBad : kBad);
}
}

/* Disabling as it's creating false alarms with whole FEDs RED when few hot towers show up. To be tuned.
// Quality check: set entire FED to BAD if its occupancy begins to vanish
// Fill FED statistics from (filtered) RecHit Occupancy
float meanFEDEB(0), meanFEDEE(0), rmsFEDEB(0), rmsFEDEE(0);
Expand Down Expand Up @@ -223,7 +223,7 @@ namespace ecaldqm {
id,
meQualitySummary.maskMatches(id, mask, statusManager_, GetTrigTowerMap()) ? kMBad : kBad);
}

*/
} // producePlots()

DEFINE_ECALDQM_WORKER(OccupancyClient);
Expand Down
20 changes: 16 additions & 4 deletions DQM/EcalMonitorClient/src/TimingClient.cc
Expand Up @@ -12,7 +12,8 @@
namespace ecaldqm {
TimingClient::TimingClient()
: DQWorkerClient(),
toleranceMean_(0.),
EBtoleranceMean_(0.),
EEtoleranceMean_(0.),
toleranceMeanFwd_(0.),
toleranceRMS_(0.),
toleranceRMSFwd_(0.),
Expand All @@ -26,7 +27,8 @@ namespace ecaldqm {
}

void TimingClient::setParams(edm::ParameterSet const& _params) {
toleranceMean_ = _params.getUntrackedParameter<double>("toleranceMean");
EBtoleranceMean_ = _params.getUntrackedParameter<double>("EBtoleranceMean");
EEtoleranceMean_ = _params.getUntrackedParameter<double>("EEtoleranceMean");
toleranceMeanFwd_ = _params.getUntrackedParameter<double>("toleranceMeanFwd");
toleranceRMS_ = _params.getUntrackedParameter<double>("toleranceRMS");
toleranceRMSFwd_ = _params.getUntrackedParameter<double>("toleranceRMSFwd");
Expand Down Expand Up @@ -73,9 +75,14 @@ namespace ecaldqm {
DetId id(qItr->getId());

int minChannelEntries(minChannelEntries_);
float meanThresh(toleranceMean_);
float meanThresh;
float rmsThresh(toleranceRMS_);

if (id.subdetId() == EcalBarrel)
meanThresh = EBtoleranceMean_;
else
meanThresh = EEtoleranceMean_;

if (isForward(id)) {
minChannelEntries = minChannelEntriesFwd_;
meanThresh = toleranceMeanFwd_;
Expand Down Expand Up @@ -185,9 +192,14 @@ namespace ecaldqm {
ids = scConstituents(EcalScDetId(tId));

int minTowerEntries(minTowerEntries_);
float meanThresh(toleranceMean_);
float meanThresh;
float rmsThresh(toleranceRMS_);

if (tId.subdetId() == EcalBarrel)
meanThresh = EBtoleranceMean_;
else
meanThresh = EEtoleranceMean_;

if (isForward(tId)) {
minTowerEntries = minTowerEntriesFwd_;
meanThresh = toleranceMeanFwd_;
Expand Down

0 comments on commit 64f83fa

Please sign in to comment.