Skip to content

Commit

Permalink
Add TTID error plots
Browse files Browse the repository at this point in the history
  • Loading branch information
abhih1 committed Nov 15, 2022
1 parent e58106d commit aa8675e
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 4 deletions.
1 change: 1 addition & 0 deletions DQM/EcalMonitorClient/interface/IntegrityClient.h
Expand Up @@ -23,6 +23,7 @@ namespace ecaldqm {
void setTokens(edm::ConsumesCollector&) override;

float errFractionThreshold_;
int processedEvents;
};
} // namespace ecaldqm

Expand Down
12 changes: 10 additions & 2 deletions DQM/EcalMonitorClient/python/IntegrityClient_cfi.py
Expand Up @@ -18,7 +18,8 @@
ChId = ecalIntegrityTask.MEs.ChId,
TowerId = ecalIntegrityTask.MEs.TowerId,
BXSRP = ecalRawDataTask.MEs.BXSRP,
BXTCC = ecalRawDataTask.MEs.BXTCC
BXTCC = ecalRawDataTask.MEs.BXTCC,
NumEvents = ecalOccupancyTask.MEs.NEvents
),
MEs = cms.untracked.PSet(
QualitySummary = cms.untracked.PSet(
Expand All @@ -41,6 +42,13 @@
otype = cms.untracked.string('Ecal3P'),
btype = cms.untracked.string('Crystal'),
description = cms.untracked.string('Map of channel status as given by the Ecal Channel Status Record. LEGEND:<br/>0: Channel ok,<br/>1: DAC settings problem, pedestal not in the design range,<br/>2: Channel with no laser, ok elsewhere,<br/>3: Noisy,<br/>4: Very noisy,<br/>5-7: Reserved for more categories of noisy channels,<br/>8: Channel at fixed gain 6 (or 6 and 1),<br/>9: Channel at fixed gain 1,<br/>10: Channel at fixed gain 0 (dead of type this),<br/>11: Non-responding isolated channel (dead of type other),<br/>12: Channel and one or more neigbors not responding (e.g.: in a dead VFE 5x1 channel),<br/>13: Channel in TT with no data link, TP data ok,<br/>14: Channel in TT with no data link and no TP data.')
)
),
TowerIdNormalized = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sIntegrityTask/TTId/%(prefix)sIT TTId Normalized %(sm)s'),
kind = cms.untracked.string('TH2F'),
otype = cms.untracked.string('SM'),
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('TTID errors normalized by total no.of processed events per run.')
)
)
)
19 changes: 17 additions & 2 deletions DQM/EcalMonitorClient/src/IntegrityClient.cc
Expand Up @@ -8,9 +8,10 @@
#include "DataFormats/EcalDetId/interface/EEDetId.h"

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

namespace ecaldqm {
IntegrityClient::IntegrityClient() : DQWorkerClient(), errFractionThreshold_(0.) {
IntegrityClient::IntegrityClient() : DQWorkerClient(), errFractionThreshold_(0.), processedEvents(0) {
qualitySummaries_.insert("Quality");
qualitySummaries_.insert("QualitySummary");
}
Expand Down Expand Up @@ -44,7 +45,21 @@ namespace ecaldqm {
MESet const& sGainSwitch(sources_.at("GainSwitch"));
MESet const& sTowerId(sources_.at("TowerId"));
MESet const& sBlockSize(sources_.at("BlockSize"));

MESetNonObject const& sNumEvents(static_cast<MESetNonObject&>(sources_.at("NumEvents")));

//Get the no.of events per LS calculated in OccupancyTask
int nEv = sNumEvents.getFloatValue();
processedEvents += nEv; //Sum it up to get the total processed events for the whole run.

//TTID errors nomalized by total no.of events in a run.
MESet& meTTIDNorm(MEs_.at("TowerIdNormalized"));
MESet::iterator tEnd(meTTIDNorm.end(GetElectronicsMap()));
for (MESet::iterator tItr(meTTIDNorm.beginChannel(GetElectronicsMap())); tItr != tEnd;
tItr.toNextChannel(GetElectronicsMap())) {
DetId id(tItr->getId());
float towerid(sTowerId.getBinContent(getEcalDQMSetupObjects(), id));
tItr->setBinContent(towerid / processedEvents);
}
// Fill Channel Status Map MEs
// Record is checked for updates at every endLumi and filled here
MESet::iterator chSEnd(meChStatus.end(GetElectronicsMap()));
Expand Down
15 changes: 15 additions & 0 deletions DQM/EcalMonitorTasks/python/IntegrityTask_cfi.py
Expand Up @@ -70,6 +70,21 @@
otype = cms.untracked.string('SM'),
btype = cms.untracked.string('SuperCrystal'),
description = cms.untracked.string('')
),
TTIDTotal = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sIntegrityTask/%(prefix)sIT weighted TTID errors'),
kind = cms.untracked.string('TH1F'),
otype = cms.untracked.string('Ecal2P'),
btype = cms.untracked.string('DCC'),
description = cms.untracked.string('Total number of TTID errors for each FED. Histogram filled weighted by no.of crystals per tower to be compatible with the other integrity errors which are binned by crystals.')
),
TTIDByLumi = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sIntegrityTask/%(prefix)sIT weighted TTID errors by lumi'),
kind = cms.untracked.string('TH1F'),
otype = cms.untracked.string('Ecal2P'),
btype = cms.untracked.string('DCC'),
perLumi = cms.untracked.bool(True),
description = cms.untracked.string('Total number of TTID errors for each FED in this lumi section. Histogram filled weighted by no.of crystals per tower to be compatible with the other integrity errors which are binned by crystals.')
)
)
)
Expand Down
8 changes: 8 additions & 0 deletions DQM/EcalMonitorTasks/src/IntegrityTask.cc
Expand Up @@ -13,6 +13,7 @@ namespace ecaldqm {
if (ByLumiResetSwitch) {
MEs_.at("MapByLumi").reset(GetElectronicsMap());
MEs_.at("ByLumi").reset(GetElectronicsMap());
MEs_.at("TTIDByLumi").reset(GetElectronicsMap());
}
}

Expand Down Expand Up @@ -78,6 +79,8 @@ namespace ecaldqm {
MESet& meByLumi(MEs_.at("ByLumi"));
MESet& meTotal(MEs_.at("Total"));
MESet& meTrendNErrors(MEs_.at("TrendNErrors"));
MESet& meTTIDTotal(MEs_.at("TTIDTotal"));
MESet& meTTIDByLumi(MEs_.at("TTIDByLumi"));

std::for_each(_ids.begin(), _ids.end(), [&](EcalElectronicsIdCollection::value_type const& id) {
set->fill(getEcalDQMSetupObjects(), id);
Expand All @@ -90,6 +93,11 @@ namespace ecaldqm {
nCrystals = 25.;
meByLumi.fill(getEcalDQMSetupObjects(), dccid, nCrystals);
meTotal.fill(getEcalDQMSetupObjects(), dccid, nCrystals);

if (_collection == kTowerIdErrors) {
meTTIDByLumi.fill(getEcalDQMSetupObjects(), dccid, nCrystals);
meTTIDTotal.fill(getEcalDQMSetupObjects(), 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
Expand Down

0 comments on commit aa8675e

Please sign in to comment.