Skip to content

Commit

Permalink
Fix Pedestal EB RMS threshold. Add chi2 cut on DQM timing.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbandrews committed Nov 10, 2015
1 parent 912bdd0 commit 63179d0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
3 changes: 2 additions & 1 deletion DQM/EcalMonitorClient/interface/PedestalClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ namespace ecaldqm
int minChannelEntries_;
float expectedMean_;
float toleranceMean_;
std::vector<float> toleranceRMS_;
std::vector<float> toleranceRMSEB_;
std::vector<float> toleranceRMSEE_;
float expectedPNMean_;
float tolerancePNMean_;
std::vector<float> tolerancePNRMS_;
Expand Down
10 changes: 6 additions & 4 deletions DQM/EcalMonitorClient/python/PedestalClient_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
minChannelEntries = 3
expectedMean = 200.
toleranceMean = 25.
toleranceRMS = [1., 1.5, 3.] # [G1, G6, G12]
toleranceRMSEB = [1., 1.2, 2.] # [G1, G6, G12]
toleranceRMSEE = [1., 1.5, 3.] # [G1, G6, G12]
expectedPNMean = 750.
tolerancePNMean = 100.
tolerancePNRMS = [20., 20.] # [G1, G16]
Expand All @@ -17,7 +18,8 @@
minChannelEntries = cms.untracked.int32(minChannelEntries),
expectedMean = cms.untracked.double(expectedMean),
toleranceMean = cms.untracked.double(toleranceMean),
toleranceRMS = cms.untracked.vdouble(toleranceRMS),
toleranceRMSEB = cms.untracked.vdouble(toleranceRMSEB),
toleranceRMSEE = cms.untracked.vdouble(toleranceRMSEE),
expectedPNMean = cms.untracked.double(expectedPNMean),
tolerancePNMean = cms.untracked.double(tolerancePNMean),
tolerancePNRMS = cms.untracked.vdouble(tolerancePNRMS),
Expand Down Expand Up @@ -77,7 +79,7 @@
),
kind = cms.untracked.string('TH2F'),
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('Summary of the pedestal quality for crystals. A channel is red if the pedestal mean is off from ' + str(expectedMean) + ' by ' + str(toleranceMean) + ' or if the pedestal RMS is greater than threshold. RMS thresholds are ' + ('%.1f, %.1f, %.1f' % tuple(toleranceRMS)) + ' for gains 1, 6, and 12 respectively. Channels with entries less than ' + str(minChannelEntries) + ' are not considered.')
description = cms.untracked.string('Summary of the pedestal quality for crystals. A channel is red if the pedestal mean is off from ' + str(expectedMean) + ' by ' + str(toleranceMean) + ' or if the pedestal RMS is greater than threshold. RMS thresholds for EB are ' + ('Gain1:%.1f, Gain6:%.1f, Gain12:%.1f' % tuple(toleranceRMSEB)) + ' ADC, and for EE, ' + ('Gain1:%.1f, Gain6:%.1f, Gain12:%.1f' % tuple(toleranceRMSEE)) + ' ADC. Channels with entries less than ' + str(minChannelEntries) + ' are not considered.')
),
Quality = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sPedestalClient/%(prefix)sPT pedestal quality G%(gain)s %(sm)s'),
Expand All @@ -87,7 +89,7 @@
),
kind = cms.untracked.string('TH2F'),
btype = cms.untracked.string('Crystal'),
description = cms.untracked.string('Summary of the pedestal quality for crystals. A channel is red if the pedestal mean is off from ' + str(expectedMean) + ' by ' + str(toleranceMean) + ' or if the pedestal RMS is greater than threshold. RMS thresholds are ' + ('%.1f, %.1f, %.1f' % tuple(toleranceRMS)) + ' for gains 1, 6, and 12 respectively. Channels with entries less than ' + str(minChannelEntries) + ' are not considered.')
description = cms.untracked.string('Summary of the pedestal quality for crystals. A channel is red if the pedestal mean is off from ' + str(expectedMean) + ' by ' + str(toleranceMean) + ' or if the pedestal RMS is greater than threshold. RMS thresholds for EB are ' + ('Gain1:%.1f, Gain6:%.1f, Gain12:%.1f' % tuple(toleranceRMSEB)) + ' ADC, and for EE, ' + ('Gain1:%.1f, Gain6:%.1f, Gain12:%.1f' % tuple(toleranceRMSEE)) + ' ADC. Channels with entries less than ' + str(minChannelEntries) + ' are not considered.')
),
Mean = cms.untracked.PSet(
kind = cms.untracked.string('TH1F'),
Expand Down
16 changes: 11 additions & 5 deletions DQM/EcalMonitorClient/src/PedestalClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ namespace ecaldqm
minChannelEntries_(0),
expectedMean_(0.),
toleranceMean_(0.),
toleranceRMS_(0),
toleranceRMSEB_(0),
toleranceRMSEE_(0),
expectedPNMean_(0.),
tolerancePNMean_(0.),
tolerancePNRMS_(0)
Expand Down Expand Up @@ -61,9 +62,11 @@ namespace ecaldqm
pnGainToME_[gain] = pnPedestal.getIndex(repl);
}

toleranceRMS_.resize(nG);
toleranceRMSEB_.resize(nG);
toleranceRMSEE_.resize(nG);

std::vector<double> inToleranceRMS(_params.getUntrackedParameter<std::vector<double> >("toleranceRMS"));
std::vector<double> inToleranceRMSEB(_params.getUntrackedParameter<std::vector<double> >("toleranceRMSEB"));
std::vector<double> inToleranceRMSEE(_params.getUntrackedParameter<std::vector<double> >("toleranceRMSEE"));

for(std::map<int, unsigned>::iterator gainItr(gainToME_.begin()); gainItr != gainToME_.end(); ++gainItr){
unsigned iME(gainItr->second);
Expand All @@ -77,7 +80,8 @@ namespace ecaldqm
iGain = 2; break;
}

toleranceRMS_[iME] = inToleranceRMS[iGain];
toleranceRMSEB_[iME] = inToleranceRMSEB[iGain];
toleranceRMSEE_[iME] = inToleranceRMSEE[iGain];
}

tolerancePNRMS_.resize(nGPN);
Expand Down Expand Up @@ -166,7 +170,9 @@ namespace ecaldqm
meMean.fill(id, mean);
meRMS.fill(id, rms);

if(abs(mean - expectedMean_) > toleranceMean_ || rms > toleranceRMS_[gainItr->second])
float toleranceRMS_ = ( id.subdetId() == EcalBarrel ) ? toleranceRMSEB_[gainItr->second] : toleranceRMSEE_[gainItr->second];

if(abs(mean - expectedMean_) > toleranceMean_ || rms > toleranceRMS_)
qItr->setBinContent(doMask ? kMBad : kBad);
else
qItr->setBinContent(doMask ? kMGood : kGood);
Expand Down
3 changes: 3 additions & 0 deletions DQM/EcalMonitorTasks/src/TimingTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ namespace ecaldqm
float time(hit.time());
float energy(hit.energy());

float chi2Threshold = ( id.subdetId() == EcalBarrel ) ? 16. : 50.;
if ( hit.chi2() > chi2Threshold ) return;

meTimeAmp.fill(id, energy, time);
meTimeAmpAll.fill(id, energy, time);

Expand Down

0 comments on commit 63179d0

Please sign in to comment.