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

Timing, Laser and Hot cell quality plots adjustments [12_5_X] #39327

Merged
merged 2 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DQM/EcalMonitorClient/interface/LaserClient.h
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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