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

Duplicate key MEs for by lumi reset. #16113

Merged
merged 2 commits into from Oct 11, 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
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
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
7 changes: 7 additions & 0 deletions DQM/EcalMonitorTasks/python/RawDataTask_cfi.py
Expand Up @@ -278,6 +278,13 @@
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'),
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
13 changes: 13 additions & 0 deletions DQM/EcalMonitorTasks/python/TrigPrimTask_cfi.py
Expand Up @@ -191,6 +191,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
16 changes: 15 additions & 1 deletion DQM/EcalMonitorTasks/src/IntegrityTask.cc
Expand Up @@ -13,13 +13,16 @@ namespace ecaldqm
void
IntegrityTask::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
{
// Reset by LS plots at beginning of every LS
MEs_.at("MapByLumi").reset();
MEs_.at("ByLumi").reset();
}

template<typename IDCollection>
void
IntegrityTask::runOnDetIdCollection(IDCollection const& _ids, Collections _collection)
{
// Collection is empty if there are no errors
if(_ids.size() == 0) return;

MESet* set(0);
Expand All @@ -40,6 +43,7 @@ namespace ecaldqm
return;
}

MESet& meMapByLumi(MEs_.at("MapByLumi"));
MESet& meByLumi(MEs_.at("ByLumi"));
MESet& meTotal(MEs_.at("Total"));
MESet& meTrendNErrors(MEs_.at("TrendNErrors"));
Expand All @@ -50,6 +54,8 @@ namespace ecaldqm
int dccid(dccId(id));
meByLumi.fill(dccid);
meTotal.fill(dccid);
// Fill Integrity Errors Map with channel errors for this lumi
meMapByLumi.fill(id);

meTrendNErrors.fill(double(timestamp_.iLumi), 1.);
});
Expand All @@ -58,6 +64,7 @@ namespace ecaldqm
void
IntegrityTask::runOnElectronicsIdCollection(EcalElectronicsIdCollection const& _ids, Collections _collection)
{
// Collection is empty if there are no errors
if(_ids.size() == 0) return;

MESet* set(0);
Expand All @@ -72,6 +79,7 @@ namespace ecaldqm
return;
}

MESet& meMapByLumi(MEs_.at("MapByLumi"));
MESet& meByLumi(MEs_.at("ByLumi"));
MESet& meTotal(MEs_.at("Total"));
MESet& meTrendNErrors(MEs_.at("TrendNErrors"));
Expand All @@ -81,12 +89,18 @@ namespace ecaldqm
set->fill(id);
int dccid(id.dccId());
double nCrystals(0.);
std::vector<DetId> chIds( getElectronicsMap()->dccTowerConstituents(dccid, id.towerId()) );
if(dccid <= kEEmHigh + 1 || dccid >= kEEpLow + 1)
nCrystals = getElectronicsMap()->dccTowerConstituents(dccid, id.towerId()).size();
nCrystals = chIds.size();
else
nCrystals = 25.;
meByLumi.fill(dccid, nCrystals);
meTotal.fill(dccid, nCrystals);
// Fill Integrity Errors Map with tower errors for this lumi
// Since binned by crystal for compatibility with channel errors,
// fill with constituent channels of tower
for(std::vector<DetId>::iterator chItr(chIds.begin()); chItr != chIds.end(); ++chItr)
meMapByLumi.fill(*chItr);

meTrendNErrors.fill(double(timestamp_.iLumi), nCrystals);
});
Expand Down
15 changes: 15 additions & 0 deletions DQM/EcalMonitorTasks/src/OccupancyTask.cc
Expand Up @@ -36,6 +36,15 @@ namespace ecaldqm
return false;
}

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

void
OccupancyTask::runOnRawData(EcalRawDataCollection const& _dcchs)
{
Expand All @@ -53,6 +62,7 @@ namespace ecaldqm
MESet& meDigiProjEta(MEs_.at("DigiProjEta"));
MESet& meDigiProjPhi(MEs_.at("DigiProjPhi"));
MESet& meDigiAll(MEs_.at("DigiAll"));
MESet& meDigiAllByLumi(MEs_.at("DigiAllByLumi"));
MESet& meDigiDCC(MEs_.at("DigiDCC"));
MESet& meDigi1D(MEs_.at("Digi1D"));
MESet& meTrendNDigi(MEs_.at("TrendNDigi"));
Expand All @@ -63,6 +73,7 @@ namespace ecaldqm
meDigiProjEta.fill(id);
meDigiProjPhi.fill(id);
meDigiAll.fill(id);
meDigiAllByLumi.fill(id);
meDigiDCC.fill(id);
});

Expand All @@ -79,6 +90,7 @@ namespace ecaldqm
// MESet& meTPDigiProjPhi(MEs_.at("TPDigiProjPhi"));
MESet& meTPDigiRCT(MEs_.at("TPDigiRCT"));
MESet& meTPDigiThrAll(MEs_.at("TPDigiThrAll"));
MESet& meTPDigiThrAllByLumi(MEs_.at("TPDigiThrAllByLumi"));
MESet& meTPDigiThrProjEta(MEs_.at("TPDigiThrProjEta"));
MESet& meTPDigiThrProjPhi(MEs_.at("TPDigiThrProjPhi"));
MESet& meTrendNTPDigi(MEs_.at("TrendNTPDigi"));
Expand All @@ -95,6 +107,7 @@ namespace ecaldqm
meTPDigiThrProjEta.fill(id);
meTPDigiThrProjPhi.fill(id);
meTPDigiThrAll.fill(id);
meTPDigiThrAllByLumi.fill(id);
meTPDigiRCT.fill(id);
if(id.subDet() == EcalBarrel) nFilteredEB += 1.;
else nFilteredEE += 1.;
Expand All @@ -112,6 +125,7 @@ namespace ecaldqm
MESet& meRecHitProjEta(MEs_.at("RecHitProjEta"));
MESet& meRecHitProjPhi(MEs_.at("RecHitProjPhi"));
MESet& meRecHitThrAll(MEs_.at("RecHitThrAll"));
MESet& meRecHitThrAllByLumi(MEs_.at("RecHitThrAllByLumi"));
MESet& meRecHitThrmvp(MEs_.at("RecHitThrmvp"));
MESet& meRecHitThrpm(MEs_.at("RecHitThrpm"));
MESet& meRecHitThrProjEta(MEs_.at("RecHitThrProjEta"));
Expand All @@ -135,6 +149,7 @@ namespace ecaldqm
meRecHitThrProjEta.fill(id);
meRecHitThrProjPhi.fill(id);
meRecHitThrAll.fill(id);
meRecHitThrAllByLumi.fill(id);
nFiltered += 1.;
bool isPlusFar ( iSubdet == EcalBarrel ? (EBDetId(id).iphi() > 100 && EBDetId(id).iphi() < 280) : zside(id) > 0 );
if ( isPlusFar )
Expand Down