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

Added 2-D histogram of trigger tower flags vs Et; Revert FEStatus to run based: getting LS reports from FEMap instead. #16205

Merged
merged 4 commits into from Nov 1, 2016
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions DQM/EcalMonitorClient/python/PresampleClient_cfi.py
Expand Up @@ -62,6 +62,16 @@
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('2D distribution of the presample RMS. Channels with entries less than ' + str(minChannelEntries) + ' are not considered.')
),
RMSMapAllByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sSummaryClient/%(prefix)sPOT%(suffix)s pedestal G12 RMS map by lumi'),
kind = cms.untracked.string('TH2F'),
zaxis = cms.untracked.PSet(
title = cms.untracked.string('RMS')
),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('Crystal'),
description = cms.untracked.string('2D distribution of the presample RMS in this lumisection. Channels with entries less than ' + str(minChannelEntries) + ' are not considered.')
),
TrendMean = cms.untracked.PSet(
path = cms.untracked.string('Ecal/Trends/PresampleClient %(prefix)s pedestal mean max - min'),
kind = cms.untracked.string('TProfile'),
Expand Down
1 change: 0 additions & 1 deletion DQM/EcalMonitorClient/python/RawDataClient_cfi.py
Expand Up @@ -20,7 +20,6 @@
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('SuperCrystal'),
perLumi = cms.untracked.bool(True),
description = cms.untracked.string('Summary of the raw data (DCC and front-end) quality. A channel is red if it has nonzero events with FE status that is different from any of ENABLED, DISABLED, SUPPRESSED, FIFOFULL, FIFOFULL_L1ADESYNC, and FORCEDZS. A FED can also go red if its number of L1A desynchronization errors is greater than ' + str(synchErrThresholdFactor) + ' * log10(total entries).')
),
ErrorsSummary = cms.untracked.PSet(
Expand Down
1 change: 1 addition & 0 deletions DQM/EcalMonitorClient/python/SummaryClient_cfi.py
Expand Up @@ -27,6 +27,7 @@
RawData = ecalRawDataClient.MEs.QualitySummary,
DesyncByLumi = ecalRawDataTask.MEs.DesyncByLumi,
FEByLumi = ecalRawDataTask.MEs.FEByLumi,
FEStatusErrMapByLumi = ecalRawDataTask.MEs.FEStatusErrMapByLumi,
TriggerPrimitives = ecalTrigPrimClient.MEs.EmulQualitySummary,
HotCell = ecalOccupancyClient.MEs.QualitySummary,
BXSRP = ecalRawDataTask.MEs.BXSRP,
Expand Down
11 changes: 6 additions & 5 deletions DQM/EcalMonitorClient/src/PresampleClient.cc
Expand Up @@ -43,6 +43,7 @@ namespace ecaldqm
MESet& meRMS(MEs_.at("RMS"));
MESet& meRMSMap(MEs_.at("RMSMap"));
MESet& meRMSMapAll(MEs_.at("RMSMapAll"));
MESet& meRMSMapAllByLumi(MEs_.at("RMSMapAllByLumi"));

MESet const& sPedestal(sources_.at("Pedestal"));
MESet const& sPedestalByLS(sources_.at("PedestalByLS"));
Expand All @@ -60,6 +61,7 @@ namespace ecaldqm
for(MESet::iterator qItr(meQuality.beginChannel()); qItr != qEnd; qItr.toNextChannel()){

pItr = qItr;
pLSItr = qItr;

DetId id(qItr->getId());

Expand All @@ -70,6 +72,7 @@ namespace ecaldqm
if(isForward(id)) rmsThresh = toleranceRMSFwd_;

double entries(pItr->getBinEntries());
double entriesLS(pLSItr->getBinEntries());

if(entries < minChannelEntries_){
qItr->setBinContent(doMask ? kMUnknown : kUnknown);
Expand All @@ -79,13 +82,16 @@ namespace ecaldqm
}

double mean(pItr->getBinContent());
double meanLS(pLSItr->getBinContent());
double rms(pItr->getBinError() * std::sqrt(entries));
double rmsLS(pLSItr->getBinError() * std::sqrt(entriesLS));

int dccid(dccId(id));

meMean.fill(dccid, mean);
meRMS.fill(dccid, rms);
meRMSMap.setBinContent(id, rms);
meRMSMapAllByLumi.setBinContent(id, rmsLS);

if(std::abs(mean - expectedMean_) > toleranceMean_ || rms > rmsThresh){
qItr->setBinContent(doMask ? kMBad : kBad);
Expand All @@ -99,12 +105,7 @@ namespace ecaldqm

// Fill Presample Trend plots:
// Use PedestalByLS which only contains digis from "current" LS
pLSItr = qItr;
double entriesLS( pLSItr->getBinEntries() );
double meanLS( pLSItr->getBinContent() );
double rmsLS( pLSItr->getBinError() * std::sqrt(entries) );
float chStatus( sChStatus.getBinContent(id) );

if ( entriesLS < minChannelEntries_ ) continue;
if ( chStatus != EcalChannelStatusCode::kOk ) continue; // exclude problematic channels

Expand Down
26 changes: 18 additions & 8 deletions DQM/EcalMonitorClient/src/SummaryClient.cc
Expand Up @@ -2,6 +2,8 @@

#include "DQM/EcalCommon/interface/EcalDQMCommonUtils.h"

#include "CondFormats/EcalObjects/interface/EcalDQMStatusHelper.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"

#include <algorithm>
Expand Down Expand Up @@ -66,7 +68,8 @@ namespace ecaldqm

MESet const& sIntegrityByLumi(sources_.at("IntegrityByLumi"));
MESet const& sDesyncByLumi(sources_.at("DesyncByLumi"));
MESet const& sFEByLumi(sources_.at("FEByLumi"));
MESet const& sFEByLumi(sources_.at("FEByLumi")); // Does NOT include FE=Disabled
MESet const& sFEStatusErrMapByLumi(sources_.at("FEStatusErrMapByLumi")); // Includes FE=Disabled

double integrityByLumi[nDCC];
double rawDataByLumi[nDCC];
Expand Down Expand Up @@ -96,16 +99,19 @@ namespace ecaldqm

std::map<uint32_t, int> badChannelsCount;

// Override IntegrityByLumi check if Desync errors present
// Override IntegrityByLumi check if any Desync errors present
// Used to set an entire FED to BAD
MESet const& sBXSRP(sources_.at("BXSRP"));
MESet const& sBXTCC(sources_.at("BXTCC"));
std::vector<bool> hasMismatchDCC(nDCC,false);
for ( unsigned iDCC(0); iDCC < nDCC; ++iDCC ) {
if ( sBXSRP.getBinContent(iDCC + 1) > 50. || sBXTCC.getBinContent(iDCC + 1) > 50. ) // "any" => 50
if ( sBXSRP.getBinContent(iDCC + 1) > 50. || sBXTCC.getBinContent(iDCC + 1) > 50. ) // "any" = 50
hasMismatchDCC[iDCC] = true;
}

// Get RawData mask
uint32_t mask(1 << EcalDQMStatusHelper::STATUS_FLAG_ERROR);

MESet::iterator qEnd(meQualitySummary.end());
for(MESet::iterator qItr(meQualitySummary.beginChannel()); qItr != qEnd; qItr.toNextChannel()){

Expand All @@ -124,11 +130,14 @@ namespace ecaldqm
int timing(sTiming ? sTiming->getBinContent(id) : kUnknown);
int trigprim(sTriggerPrimitives ? sTriggerPrimitives->getBinContent(id) : kUnknown);
int rawdata(sRawData.getBinContent(id));

double rawdataLS(sFEStatusErrMapByLumi.getBinContent(id)); // Includes FE=Disabled

// If there are no RawData or Integrity errors in this LS, set them back to GOOD
//if(integrity == kBad && integrityByLumi[iDCC] == 0.) integrity = kGood;
if(integrity == kBad && integrityByLumi[iDCC] == 0. && !hasMismatchDCC[iDCC]) integrity = kGood;
if(rawdata == kBad && rawDataByLumi[iDCC] == 0.) rawdata = kGood;
//if(rawdata == kBad && rawDataByLumi[iDCC] == 0.) rawdata = kGood;
if(rawdata == kBad && rawDataByLumi[iDCC] == 0. && rawdataLS == 0.) rawdata = kGood;

// Fill Global Quality Summary
int status(kGood);
Expand All @@ -138,7 +147,7 @@ namespace ecaldqm
status = kUnknown;
qItr->setBinContent(status);

// Keep running count of good/bad channels/towers
// Keep running count of good/bad channels/towers: Uses cumulative stats.
if(status == kBad){
if(id.subdetId() == EcalBarrel) badChannelsCount[EBDetId(id).tower().rawId()] += 1;
if(id.subdetId() == EcalEndcap) badChannelsCount[EEDetId(id).sc().rawId()] += 1;
Expand All @@ -150,9 +159,10 @@ namespace ecaldqm
dccChannels[iDCC] += 1.;
totalChannels += 1.;

// Keep running count of good channels in RawData only:
// Only RawData used in by LS reporting to save memory
if(rawdata != kBad){
// Keep running count of good channels in RawData only: Uses LS stats only.
// LS-based reports only use RawData as input to save on having to run other workers
bool isMasked(meQualitySummary.maskMatches(id, mask, statusManager_));
if( rawdataLS == 0. || isMasked ){ // channel != kBad in rawdata
dccGoodRaw[iDCC] += 1.;
totalGoodRaw += 1.;
}
Expand Down
2 changes: 2 additions & 0 deletions DQM/EcalMonitorTasks/interface/EnergyTask.h
Expand Up @@ -14,6 +14,8 @@ namespace ecaldqm {

bool filterRunType(short const*) override;

void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;

bool analyze(void const*, Collections) override;

void runOnRecHits(EcalRecHitCollection const&);
Expand Down
2 changes: 2 additions & 0 deletions DQM/EcalMonitorTasks/interface/OccupancyTask.h
Expand Up @@ -16,6 +16,8 @@ namespace ecaldqm

bool filterRunType(short const*) override;

void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;

bool analyze(void const*, Collections) override;

void runOnRawData(EcalRawDataCollection const&);
Expand Down
5 changes: 3 additions & 2 deletions DQM/EcalMonitorTasks/interface/TrigPrimTask.h
Expand Up @@ -19,11 +19,12 @@ namespace ecaldqm {

void addDependencies(DependencySet&) override;

bool analyze(void const*, Collections) override;

void beginRun(edm::Run const&, edm::EventSetup const&) override;
void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
void beginEvent(edm::Event const&, edm::EventSetup const&) override;

bool analyze(void const*, Collections) override;

void runOnRealTPs(EcalTrigPrimDigiCollection const&);
void runOnEmulTPs(EcalTrigPrimDigiCollection const&);
template<typename DigiCollection> void runOnDigis(DigiCollection const&);
Expand Down
10 changes: 10 additions & 0 deletions DQM/EcalMonitorTasks/python/EnergyTask_cfi.py
Expand Up @@ -18,6 +18,16 @@
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('2D distribution of the mean rec hit energy.')
),
HitMapAllByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sSummaryClient/%(prefix)sOT%(suffix)s energy summary by lumi'), # In SummaryClient for historical reasons
kind = cms.untracked.string('TProfile2D'),
zaxis = cms.untracked.PSet(
title = cms.untracked.string('energy (GeV)')
),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('2D distribution of the mean tower rec hit energy for this lumisection. The mean is the total tower rechit energy over the number of rechits in the tower.')
),
HitAll = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sOccupancyTask/%(prefix)sOT rec hit spectrum%(suffix)s'),
kind = cms.untracked.string('TH1F'),
Expand Down
7 changes: 7 additions & 0 deletions DQM/EcalMonitorTasks/python/IntegrityTask_cfi.py
Expand Up @@ -18,6 +18,13 @@
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('')
),
MapByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sIntegrityTask/%(prefix)sIT%(suffix)s integrity errors map by lumi'),
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('Crystal'),
description = cms.untracked.string('Integrity error occupancy map for this lumisection. Includes Gain, ChId, GainSwitch, TowerId, and BlockSize errors.')
),
ByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sIntegrityTask/%(prefix)sIT weighted integrity errors by lumi'),
kind = cms.untracked.string('TH1F'),
Expand Down
21 changes: 21 additions & 0 deletions DQM/EcalMonitorTasks/python/OccupancyTask_cfi.py
Expand Up @@ -124,6 +124,13 @@
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('Digi occupancy.')
),
DigiAllByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sOccupancyTask/%(prefix)sOT digi occupancy%(suffix)s by lumi'),
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('Digi occupancy for this lumisection.')
),
RecHitThrProjEta = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sOccupancyTask/%(prefix)sOT rec hit thr occupancy%(suffix)s projection eta'),
kind = cms.untracked.string('TH1F'),
Expand All @@ -145,6 +152,13 @@
btype = cms.untracked.string('TriggerTower'),
description = cms.untracked.string('Occupancy for TP digis with Et > ' + str(tpThreshold) + ' GeV.')
),
TPDigiThrAllByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sOccupancyTask/%(prefix)sOT TP digi thr occupancy%(suffix)s by lumi'),
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('TriggerTower'),
description = cms.untracked.string('TP digi occupancy for this lumisection. Only includes TP digis with Et > ' + str(tpThreshold) + ' GeV.')
),
TPDigiRCT = cms.untracked.PSet(
path = cms.untracked.string('EcalBarrel/EBOccupancyTask/TP digi thr occupancy in RCT coordinates'),
kind = cms.untracked.string('TH2F'),
Expand All @@ -159,6 +173,13 @@
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('Occupancy for rec hits with GOOD reconstruction flag and E > ' + str(recHitThreshold) + ' GeV.')
),
RecHitThrAllByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sOccupancyTask/%(prefix)sOT rec hit thr occupancy%(suffix)s by lumi'),
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('Filtered rechit cccupancy for this lumisection. Only includes rechits with GOOD reconstruction flag and E > ' + str(recHitThreshold) + ' GeV.')
),
RecHitAll = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sOccupancyTask/%(prefix)sOT rec hit occupancy%(suffix)s'),
kind = cms.untracked.string('TH2F'),
Expand Down
9 changes: 8 additions & 1 deletion DQM/EcalMonitorTasks/python/RawDataTask_cfi.py
Expand Up @@ -276,8 +276,15 @@
),
otype = cms.untracked.string('SM'),
btype = cms.untracked.string('SuperCrystal'),
perLumi = cms.untracked.bool(True),
description = cms.untracked.string('FE status counter.')
),
FEStatusErrMapByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sStatusFlagsTask/FEStatus/%(prefix)sSFT%(suffix)s front-end status error map by lumi'),
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('SuperCrystal'),
perLumi = cms.untracked.bool(True),
description = cms.untracked.string('FE status error occupancy map for this lumisection. Nominal FE status flags such as ENABLED, SUPPRESSED, FIFOFILL, FIFOFULLL1ADESYNC, and FORCEDZS are NOT included.')
)
)
)
Expand Down
2 changes: 1 addition & 1 deletion DQM/EcalMonitorTasks/python/SelectiveReadoutTask_cfi.py
Expand Up @@ -166,7 +166,7 @@
kind = cms.untracked.string('TH1F'),
otype = cms.untracked.string('Ecal3P'),
xaxis = cms.untracked.PSet(
high = cms.untracked.double(3.0),
high = cms.untracked.double(5.0),
nbins = cms.untracked.int32(100),
low = cms.untracked.double(0.0),
title = cms.untracked.string('event size (kB)')
Expand Down
33 changes: 33 additions & 0 deletions DQM/EcalMonitorTasks/python/TrigPrimTask_cfi.py
Expand Up @@ -149,6 +149,26 @@
btype = cms.untracked.string('DCC'),
description = cms.untracked.string('Distribution of the trigger tower flags.')
),
TTFlagsVsEt = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sSelectiveReadoutTask/%(prefix)sSRT TT Flags vs Et%(suffix)s'),
kind = cms.untracked.string('TH2F'),
yaxis = cms.untracked.PSet(
high = cms.untracked.double(7.5),
nbins = cms.untracked.int32(8),
low = cms.untracked.double(-0.5),
title = cms.untracked.string('TT flag'),
labels = cms.untracked.vstring(map(str, range(0, 8)))
),
otype = cms.untracked.string('Ecal3P'),
xaxis = cms.untracked.PSet(
high = cms.untracked.double(50.0),
nbins = cms.untracked.int32(100),
low = cms.untracked.double(0.0),
title = cms.untracked.string('TP Et')
),
btype = cms.untracked.string('User'),
description = cms.untracked.string('2D histograms of of TT flags of a corresponding to a given TT vs Et measured by that tower.')
),
TTFlags4 = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sTriggerTowerTask/%(prefix)sTTT TTF4 Occupancy%(suffix)s'),
kind = cms.untracked.string('TH2F'),
Expand Down Expand Up @@ -191,6 +211,19 @@
btype = cms.untracked.string('TriggerTower'),
description = cms.untracked.string('2D distribution of the trigger primitive Et.')
),
EtSummaryByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sSummaryClient/%(prefix)sTTT%(suffix)s Et trigger tower summary by lumi'),
kind = cms.untracked.string('TProfile2D'),
zaxis = cms.untracked.PSet(
high = cms.untracked.double(256.0),
nbins = cms.untracked.int32(128),
low = cms.untracked.double(0.0),
title = cms.untracked.string('TP Et')
),
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('TriggerTower'),
description = cms.untracked.string('2D distribution of the Trigger Primitives Et for this lumisection.')
),
EtRealMap = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sTriggerTowerTask/%(prefix)sTTT Et map Real Digis %(sm)s'),
kind = cms.untracked.string('TProfile2D'),
Expand Down
9 changes: 9 additions & 0 deletions DQM/EcalMonitorTasks/src/EnergyTask.cc
Expand Up @@ -36,11 +36,19 @@ namespace ecaldqm
return false;
}

void
EnergyTask::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
{
// Reset by LS plots at beginning of every LS
MEs_.at("HitMapAllByLumi").reset();
}

void
EnergyTask::runOnRecHits(EcalRecHitCollection const& _hits)
{
MESet& meHitMap(MEs_.at("HitMap"));
MESet& meHitMapAll(MEs_.at("HitMapAll"));
MESet& meHitMapAllByLumi(MEs_.at("HitMapAllByLumi"));
MESet& meHit(MEs_.at("Hit"));
MESet& meHitAll(MEs_.at("HitAll"));

Expand All @@ -61,6 +69,7 @@ namespace ecaldqm

meHitMap.fill(id, energy);
meHitMapAll.fill(id, energy);
meHitMapAllByLumi.fill(id, energy);
meHit.fill(id, energy);
meHitAll.fill(id, energy);

Expand Down