diff --git a/DQM/EcalMonitorClient/interface/IntegrityClient.h b/DQM/EcalMonitorClient/interface/IntegrityClient.h
index 1a49d53629002..d3c47007ffd18 100644
--- a/DQM/EcalMonitorClient/interface/IntegrityClient.h
+++ b/DQM/EcalMonitorClient/interface/IntegrityClient.h
@@ -23,6 +23,7 @@ namespace ecaldqm {
void setTokens(edm::ConsumesCollector&) override;
float errFractionThreshold_;
+ int processedEvents;
};
} // namespace ecaldqm
diff --git a/DQM/EcalMonitorClient/python/IntegrityClient_cfi.py b/DQM/EcalMonitorClient/python/IntegrityClient_cfi.py
index d91cfb18521c9..7f631d75a86da 100644
--- a/DQM/EcalMonitorClient/python/IntegrityClient_cfi.py
+++ b/DQM/EcalMonitorClient/python/IntegrityClient_cfi.py
@@ -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(
@@ -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:
0: Channel ok,
1: DAC settings problem, pedestal not in the design range,
2: Channel with no laser, ok elsewhere,
3: Noisy,
4: Very noisy,
5-7: Reserved for more categories of noisy channels,
8: Channel at fixed gain 6 (or 6 and 1),
9: Channel at fixed gain 1,
10: Channel at fixed gain 0 (dead of type this),
11: Non-responding isolated channel (dead of type other),
12: Channel and one or more neigbors not responding (e.g.: in a dead VFE 5x1 channel),
13: Channel in TT with no data link, TP data ok,
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.')
+ )
)
)
diff --git a/DQM/EcalMonitorClient/src/IntegrityClient.cc b/DQM/EcalMonitorClient/src/IntegrityClient.cc
index ff90ebdc3dad2..159904346cce8 100644
--- a/DQM/EcalMonitorClient/src/IntegrityClient.cc
+++ b/DQM/EcalMonitorClient/src/IntegrityClient.cc
@@ -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");
}
@@ -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(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()));
diff --git a/DQM/EcalMonitorTasks/python/IntegrityTask_cfi.py b/DQM/EcalMonitorTasks/python/IntegrityTask_cfi.py
index 42387f2bd0323..e3613293938d1 100644
--- a/DQM/EcalMonitorTasks/python/IntegrityTask_cfi.py
+++ b/DQM/EcalMonitorTasks/python/IntegrityTask_cfi.py
@@ -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.')
)
)
)
diff --git a/DQM/EcalMonitorTasks/src/IntegrityTask.cc b/DQM/EcalMonitorTasks/src/IntegrityTask.cc
index c4228f45890e6..032cd64872c93 100644
--- a/DQM/EcalMonitorTasks/src/IntegrityTask.cc
+++ b/DQM/EcalMonitorTasks/src/IntegrityTask.cc
@@ -13,6 +13,7 @@ namespace ecaldqm {
if (ByLumiResetSwitch) {
MEs_.at("MapByLumi").reset(GetElectronicsMap());
MEs_.at("ByLumi").reset(GetElectronicsMap());
+ MEs_.at("TTIDByLumi").reset(GetElectronicsMap());
}
}
@@ -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);
@@ -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