1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
|
#include "DQM/HcalTasks/interface/RawTask.h"
using namespace hcaldqm;
using namespace hcaldqm::constants;
RawTask::RawTask(edm::ParameterSet const& ps)
: DQTask(ps), hcalDbServiceToken_(esConsumes<HcalDbService, HcalDbRecord, edm::Transition::BeginRun>()) {
_tagFEDs = ps.getUntrackedParameter<edm::InputTag>("tagFEDs", edm::InputTag("rawDataCollector"));
_tagReport = ps.getUntrackedParameter<edm::InputTag>("tagReport", edm::InputTag("hcalDigis"));
_calibProcessing = ps.getUntrackedParameter<bool>("calibProcessing", false);
_thresh_calib_nbadq = ps.getUntrackedParameter<int>("thresh_calib_nbadq", 5000);
_tokFEDs = consumes<FEDRawDataCollection>(_tagFEDs);
_tokReport = consumes<HcalUnpackerReport>(_tagReport);
_vflags.resize(nRawFlag);
_vflags[fEvnMsm] = flag::Flag("EvnMsm");
_vflags[fBcnMsm] = flag::Flag("BcnMsm");
_vflags[fBadQ] = flag::Flag("BadQ");
_vflags[fOrnMsm] = flag::Flag("OrnMsm");
_NBadQEvent = 0;
}
/* virtual */ void RawTask::bookHistograms(DQMStore::IBooker& ib, edm::Run const& r, edm::EventSetup const& es) {
DQTask::bookHistograms(ib, r, es);
// GET WHAT YOU NEED
edm::ESHandle<HcalDbService> dbs = es.getHandle(hcalDbServiceToken_);
_emap = dbs->getHcalMapping();
std::vector<uint32_t> vVME;
std::vector<uint32_t> vuTCA;
vVME.push_back(
HcalElectronicsId(constants::FIBERCH_MIN, constants::FIBER_VME_MIN, SPIGOT_MIN, CRATE_VME_MIN).rawId());
vuTCA.push_back(HcalElectronicsId(CRATE_uTCA_MIN, SLOT_uTCA_MIN, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
_filter_VME.initialize(filter::fFilter, hcaldqm::hashfunctions::fElectronics, vVME);
_filter_uTCA.initialize(filter::fFilter, hcaldqm::hashfunctions::fElectronics, vuTCA);
_cBadQualityvsLS.initialize(_name,
"BadQualityvsLS",
new hcaldqm::quantity::LumiSection(_maxLS),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN_m0to10000),
0);
_cBadQualityvsBX.initialize(_name,
"BadQualityvsBX",
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fBX),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN_m0to10000),
0);
_cBadQuality_depth.initialize(_name,
"BadQuality",
hcaldqm::hashfunctions::fdepth,
new hcaldqm::quantity::DetectorQuantity(hcaldqm::quantity::fieta),
new hcaldqm::quantity::DetectorQuantity(hcaldqm::quantity::fiphi),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN),
0);
// FED-based plots
if (_ptype != fOffline) { // hidefed2crate
std::vector<int> vFEDs = hcaldqm::utilities::getFEDList(_emap);
std::vector<int> vFEDsVME = hcaldqm::utilities::getFEDVMEList(_emap);
std::vector<int> vFEDsuTCA = hcaldqm::utilities::getFEDuTCAList(_emap);
std::vector<uint32_t> vhashFEDsVME;
std::vector<uint32_t> vhashFEDsuTCA;
for (std::vector<int>::const_iterator it = vFEDsVME.begin(); it != vFEDsVME.end(); ++it) {
vhashFEDsVME.push_back(
HcalElectronicsId(
constants::FIBERCH_MIN, constants::FIBER_VME_MIN, SPIGOT_MIN, (*it) - constants::FED_VME_MIN)
.rawId());
_vhashFEDs.push_back(
HcalElectronicsId(
constants::FIBERCH_MIN, constants::FIBER_VME_MIN, SPIGOT_MIN, (*it) - constants::FED_VME_MIN)
.rawId());
}
for (std::vector<int>::const_iterator it = vFEDsuTCA.begin(); it != vFEDsuTCA.end(); ++it) {
std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
vhashFEDsuTCA.push_back(
HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
_vhashFEDs.push_back(HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
}
_filter_FEDsVME.initialize(filter::fPreserver, hcaldqm::hashfunctions::fFED, vhashFEDsVME);
_filter_FEDsuTCA.initialize(filter::fPreserver, hcaldqm::hashfunctions::fFED, vhashFEDsuTCA);
// INITIALIZE FIRST
_cEvnMsm_ElectronicsuTCA.initialize(_name,
"EvnMsm",
hcaldqm::hashfunctions::fElectronics,
new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
new hcaldqm::quantity::ElectronicsQuantity(hcaldqm::quantity::fSlotuTCA),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN),
0);
_cBcnMsm_ElectronicsuTCA.initialize(_name,
"BcnMsm",
hcaldqm::hashfunctions::fElectronics,
new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
new hcaldqm::quantity::ElectronicsQuantity(hcaldqm::quantity::fSlotuTCA),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN),
0);
_cOrnMsm_ElectronicsuTCA.initialize(_name,
"OrnMsm",
hcaldqm::hashfunctions::fElectronics,
new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
new hcaldqm::quantity::ElectronicsQuantity(hcaldqm::quantity::fSlotuTCA),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN),
0);
// Bad Quality
_cBadQuality_FEDuTCA.initialize(_name,
"BadQuality",
hcaldqm::hashfunctions::fCrate,
new hcaldqm::quantity::ElectronicsQuantity(hcaldqm::quantity::fSlotuTCA),
new hcaldqm::quantity::ElectronicsQuantity(hcaldqm::quantity::fFiberuTCA),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN),
0);
// Online only
if (_ptype == fOnline) {
_xEvnMsmLS.initialize(hcaldqm::hashfunctions::fFED);
_xBcnMsmLS.initialize(hcaldqm::hashfunctions::fFED);
_xOrnMsmLS.initialize(hcaldqm::hashfunctions::fFED);
_xBadQLS.initialize(hcaldqm::hashfunctions::fFED);
_cSummaryvsLS_FED.initialize(_name,
"SummaryvsLS",
hcaldqm::hashfunctions::fFED,
new hcaldqm::quantity::LumiSection(_maxLS),
new hcaldqm::quantity::FlagQuantity(_vflags),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fState),
0);
_cSummaryvsLS.initialize(_name,
"SummaryvsLS",
new hcaldqm::quantity::LumiSection(_maxLS),
new hcaldqm::quantity::FEDQuantity(vFEDs),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fState),
0);
_cBadQ_FEDvsLS.initialize(_name,
"BadQ_FEDvsLS",
new hcaldqm::quantity::LumiSectionCoarse(_maxLS, 10),
new hcaldqm::quantity::FEDQuantity(vFEDs),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN),
0);
_cBadQ_FEDvsLSmod10.initialize(_name,
"BadQ_FEDvsLSmod10",
new hcaldqm::quantity::LumiSection(10),
new hcaldqm::quantity::FEDQuantity(vFEDs),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN),
0);
// FED Size vs LS
_cDataSizevsLS_FED.initialize(_name,
"DataSizevsLS",
hcaldqm::hashfunctions::fFED,
new hcaldqm::quantity::LumiSection(_maxLS),
new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fDataSize),
0);
}
}
// BOOK HISTOGRAMS
if (_ptype != fOffline) {
_cEvnMsm_ElectronicsuTCA.book(ib, _emap, _filter_VME, _subsystem);
_cBcnMsm_ElectronicsuTCA.book(ib, _emap, _filter_VME, _subsystem);
_cOrnMsm_ElectronicsuTCA.book(ib, _emap, _filter_VME, _subsystem);
_cBadQuality_FEDuTCA.book(ib, _emap, _filter_VME, _subsystem);
}
if (_ptype == fOffline) {
auto scope = DQMStore::IBooker::UseLumiScope(ib);
_cBadQuality_depth.book(ib, _emap, _subsystem);
} else {
_cBadQuality_depth.book(ib, _emap, _subsystem);
}
_cBadQualityvsLS.book(ib, _subsystem);
_cBadQualityvsBX.book(ib, _subsystem);
// BOOK HISTOGRAMS to be used in ONLINE ONLY!
if (_ptype == fOnline) {
_xEvnMsmLS.book(_emap);
_xBcnMsmLS.book(_emap);
_xOrnMsmLS.book(_emap);
_xBadQLS.book(_emap);
_cSummaryvsLS_FED.book(ib, _emap, _subsystem);
_cSummaryvsLS.book(ib, _subsystem);
_cBadQ_FEDvsLSmod10.book(ib, _subsystem);
_cBadQ_FEDvsLS.book(ib, _subsystem);
_cDataSizevsLS_FED.book(ib, _emap, _subsystem);
}
// FOR OFFLINE PROCESSING MARK THESE HISTOGRAMS AS LUMI BASED
//if (_ptype == fOffline) {
//if (_ptype != fOffline) { // hidefed2crate
// Note that this is deliberately contradictory for the fed2crate fix, so it can be reversed if fed2crate is ever fixed properly,
// TODO: set LUMI scope while booking.
// _cEvnMsm_ElectronicsVME.setLumiFlag();
// _cBcnMsm_ElectronicsVME.setLumiFlag();
// _cEvnMsm_ElectronicsuTCA.setLumiFlag();
// _cBcnMsm_ElectronicsuTCA.setLumiFlag();
//}
//}
// initialize hash map
_ehashmap.initialize(_emap, hcaldqm::electronicsmap::fD2EHashMap);
}
/* virtual */ void RawTask::_resetMonitors(hcaldqm::UpdateFreq uf) {
// base reset
DQTask::_resetMonitors(uf);
}
/* virtual */ void RawTask::_process(edm::Event const& e, edm::EventSetup const&) {
edm::Handle<FEDRawDataCollection> craw;
edm::Handle<HcalUnpackerReport> creport;
if (!e.getByToken(_tokFEDs, craw))
_logger.dqmthrow("Collection FEDRawDataCollection isn't available" + _tagFEDs.label() + " " + _tagFEDs.instance());
if (!e.getByToken(_tokReport, creport))
_logger.dqmthrow("Collection HcalUnpackerReport isn't available" + _tagReport.label() + " " +
_tagReport.instance());
// extract some info
int bx = e.bunchCrossing();
auto lumiCache = luminosityBlockCache(e.getLuminosityBlock().index());
_currentLS = lumiCache->currentLS;
_xQuality.reset();
_xQuality = lumiCache->xQuality;
/*
* For Calibration/Abort Gap Processing
* check if the #channels taht are bad from the unpacker
* is > 5000. If it is skip...
*/
if (_calibProcessing) {
int nbadq = creport->badQualityDigis();
if (nbadq >= _thresh_calib_nbadq)
return;
}
if (_ptype == fOnline &&
lumiCache->EvtCntLS == 1) { // Reset the bin for _cBadQ_FEDvsLSmod10 at the beginning of each new LS
for (std::vector<uint32_t>::const_iterator it = _vhashFEDs.begin(); it != _vhashFEDs.end(); ++it) {
HcalElectronicsId eid = HcalElectronicsId(*it);
_cBadQ_FEDvsLSmod10.setBinContent(eid, _currentLS % 10, 0);
}
}
int nn = 0;
// loop thru and fill the detIds with bad quality
// NOTE: Calibration Channels are skipped!
// TODO: Include for Online Calibration Channels marked as bad
// a comment below is left on purpose!
//_cBadQualityvsBX.fill(bx, creport->badQualityDigis());
int Nbadq = creport->badQualityDigis();
if (lumiCache->EvtCntLS == 1)
_NBadQEvent = 0; // Reset at the beginning of each new LS
if (Nbadq > 0)
_NBadQEvent++;
//std::cout << " Nbadq "<< Nbadq << " NBadQEvent " <<_NBadQEvent<< std::endl;
for (std::vector<DetId>::const_iterator it = creport->bad_quality_begin(); it != creport->bad_quality_end(); ++it) {
// skip non HCAL det ids
if (!HcalGenericDetId(*it).isHcalDetId())
continue;
// skip those that are of bad quality from conditions
// Masked or Dead
if (_xQuality.exists(HcalDetId(*it))) {
HcalChannelStatus cs(it->rawId(), _xQuality.get(HcalDetId(*it)));
if (cs.isBitSet(HcalChannelStatus::HcalCellMask) || cs.isBitSet(HcalChannelStatus::HcalCellDead))
continue;
}
nn++;
HcalElectronicsId eid = HcalElectronicsId(_ehashmap.lookup(*it));
_cBadQuality_depth.fill(HcalDetId(*it));
// ONLINE ONLY!
if (_ptype == fOnline)
//Number of BadQualityDigis
_xBadQLS.get(eid)++;
//std::cout << " event _xBadQLS "<< double(_xBadQLS.get(eid)) << std::endl;
if (_ptype != fOffline) { // hidefed2crate
if (!eid.isVMEid()) {
if (_filter_FEDsuTCA.filter(eid))
continue;
_cBadQuality_FEDuTCA.fill(eid);
}
}
}
_cBadQualityvsLS.fill(_currentLS, nn);
_cBadQualityvsBX.fill(bx, nn);
if (_ptype != fOffline) { // hidefed2crate
for (int fed = FEDNumbering::MINHCALFEDID; fed <= FEDNumbering::MAXHCALuTCAFEDID; fed++) {
// skip nonHCAL FEDs
if ((fed > FEDNumbering::MAXHCALFEDID && fed < FEDNumbering::MINHCALuTCAFEDID) ||
fed > FEDNumbering::MAXHCALuTCAFEDID)
continue;
FEDRawData const& raw = craw->FEDData(fed);
if (raw.size() < constants::RAW_EMPTY)
continue;
if (fed <= FEDNumbering::MAXHCALFEDID) // VME
{
HcalDCCHeader const* hdcc = (HcalDCCHeader const*)(raw.data());
if (!hdcc)
continue;
uint32_t bcn = hdcc->getBunchId();
uint32_t orn = hdcc->getOrbitNumber() & 0x1F; // LS 5 bits only
uint32_t evn = hdcc->getDCCEventNumber();
int dccId = hdcc->getSourceId() - constants::FED_VME_MIN;
/* online only */
if (_ptype == fOnline) {
HcalElectronicsId eid =
HcalElectronicsId(constants::FIBERCH_MIN, constants::FIBER_VME_MIN, constants::SPIGOT_MIN, dccId);
if (_filter_FEDsVME.filter(eid))
continue;
_cDataSizevsLS_FED.fill(eid, _currentLS, double(raw.size()) / 1024.);
}
// iterate over spigots
HcalHTRData htr;
for (int is = 0; is < HcalDCCHeader::SPIGOT_COUNT; is++) {
int r = hdcc->getSpigotData(is, htr, raw.size());
if (r != 0 || !htr.check())
continue;
HcalElectronicsId eid = HcalElectronicsId(constants::FIBERCH_MIN, constants::FIBER_VME_MIN, is, dccId);
if (_filter_FEDsVME.filter(eid))
continue;
uint32_t htr_evn = htr.getL1ANumber();
uint32_t htr_orn = htr.getOrbitNumber();
uint32_t htr_bcn = htr.getBunchNumber();
bool qevn = (htr_evn != evn);
bool qbcn = (htr_bcn != bcn);
bool qorn = (htr_orn != orn);
if (qevn) {
if (_ptype == fOnline && is <= constants::SPIGOT_MAX)
_xEvnMsmLS.get(eid)++;
}
if (qorn) {
if (_ptype == fOnline && is <= constants::SPIGOT_MAX)
_xOrnMsmLS.get(eid)++;
}
if (qbcn) {
if (_ptype == fOnline && is <= constants::SPIGOT_MAX)
_xBcnMsmLS.get(eid)++;
}
}
} else // uTCA
{
hcal::AMC13Header const* hamc13 = (hcal::AMC13Header const*)raw.data();
if (!hamc13)
continue;
/* online only */
if (_ptype == fOnline) {
std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(fed);
HcalElectronicsId eid = HcalElectronicsId(cspair.first, cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false);
if (_filter_FEDsuTCA.filter(eid))
continue;
_cDataSizevsLS_FED.fill(eid, _currentLS, double(raw.size()) / 1024.);
}
uint32_t bcn = hamc13->bunchId();
uint32_t orn = hamc13->orbitNumber() & 0xFFFF; // LS 16bits only
uint32_t evn = hamc13->l1aNumber();
int namc = hamc13->NAMC();
for (int iamc = 0; iamc < namc; iamc++) {
int slot = hamc13->AMCSlot(iamc);
int crate = hamc13->AMCId(iamc) & 0xFF;
HcalElectronicsId eid(crate, slot, FIBER_uTCA_MIN1, FIBERCH_MIN, false);
if (_filter_FEDsuTCA.filter(eid))
continue;
HcalUHTRData uhtr(hamc13->AMCPayload(iamc), hamc13->AMCSize(iamc));
uint32_t uhtr_evn = uhtr.l1ANumber();
uint32_t uhtr_bcn = uhtr.bunchNumber();
uint32_t uhtr_orn = uhtr.orbitNumber();
bool qevn = (uhtr_evn != evn);
bool qbcn = (uhtr_bcn != bcn);
bool qorn = (uhtr_orn != orn);
if (qevn) {
_cEvnMsm_ElectronicsuTCA.fill(eid);
if (_ptype == fOnline)
_xEvnMsmLS.get(eid)++;
}
if (qorn) {
_cOrnMsm_ElectronicsuTCA.fill(eid);
if (_ptype == fOnline)
_xOrnMsmLS.get(eid)++;
}
if (qbcn) {
_cBcnMsm_ElectronicsuTCA.fill(eid);
if (_ptype == fOnline)
_xBcnMsmLS.get(eid)++;
}
}
}
}
}
}
std::shared_ptr<hcaldqm::Cache> RawTask::globalBeginLuminosityBlock(edm::LuminosityBlock const& lb,
edm::EventSetup const& es) const {
return DQTask::globalBeginLuminosityBlock(lb, es);
// _cBadQualityvsLS.extendAxisRange(_currentLS);
// _cSummaryvsLS_FED.extendAxisRange(_currentLS);
// _cSummaryvsLS.extendAxisRange(_currentLS);
}
/* virtual */ void RawTask::globalEndLuminosityBlock(edm::LuminosityBlock const& lb, edm::EventSetup const& es) {
auto lumiCache = luminosityBlockCache(lb.index());
_currentLS = lumiCache->currentLS;
_evsPerLS = lumiCache->EvtCntLS;
if (_ptype != fOnline)
return;
//
// GENERATE STATUS ONLY FOR ONLINE!
//
for (std::vector<uint32_t>::const_iterator it = _vhashFEDs.begin(); it != _vhashFEDs.end(); ++it) {
flag::Flag fSum("RAW");
HcalElectronicsId eid = HcalElectronicsId(*it);
int fed = hcaldqm::utilities::crate2fed(eid.crateId(), eid.slot());
std::vector<uint32_t>::const_iterator cit = std::find(_vcdaqEids.begin(), _vcdaqEids.end(), *it);
if (cit == _vcdaqEids.end()) {
// not @cDAQ
for (uint32_t iflag = 0; iflag < _vflags.size(); iflag++)
_cSummaryvsLS_FED.setBinContent(eid, _currentLS, int(iflag), int(flag::fNCDAQ));
_cSummaryvsLS.setBinContent(eid, _currentLS, int(flag::fNCDAQ));
continue;
}
// FED is @cDAQ
if (hcaldqm::utilities::isFEDHBHE(eid) || hcaldqm::utilities::isFEDHF(eid) || hcaldqm::utilities::isFEDHO(eid)) {
if (_xEvnMsmLS.get(eid) > 0)
_vflags[fEvnMsm]._state = flag::fBAD;
else
_vflags[fEvnMsm]._state = flag::fGOOD;
if (_xBcnMsmLS.get(eid) > 0)
_vflags[fBcnMsm]._state = flag::fBAD;
else
_vflags[fBcnMsm]._state = flag::fGOOD;
if (_xOrnMsmLS.get(eid) > 0)
_vflags[fOrnMsm]._state = flag::fBAD;
else
_vflags[fOrnMsm]._state = flag::fGOOD;
if (double(_xBadQLS.get(eid)) > double(12 * _evsPerLS))
_vflags[fBadQ]._state = flag::fBAD;
else if (_xBadQLS.get(eid) > 0) {
_vflags[fBadQ]._state = flag::fPROBLEMATIC;
} else
_vflags[fBadQ]._state = flag::fGOOD;
}
int iflag = 0;
// iterate over all flags:
// - sum them all up in summary flag for this FED
// - reset each flag right after using it
for (std::vector<flag::Flag>::iterator ft = _vflags.begin(); ft != _vflags.end(); ++ft) {
_cSummaryvsLS_FED.setBinContent(eid, _currentLS, int(iflag), ft->_state);
// Following line added due to https://gitlab.cern.ch/cmshcal/docs/-/issues/233 // BadQ > (5%) of number of events in this LS.
if (ft->_name == "BadQ" && (double(_xBadQLS.get(eid)) > 0 && double(_NBadQEvent) > double(0.05 * _evsPerLS))) {
if (!hcaldqm::utilities::isFEDHO(eid) && fed != 1136 && ft->_state != 3) {
_cBadQ_FEDvsLSmod10.setBinContent(eid, _currentLS % 10, (double(_NBadQEvent) / double(_evsPerLS)) * 100);
_cBadQ_FEDvsLS.setBinContent(eid, _currentLS, (double(_NBadQEvent) / double(_evsPerLS)) * 100);
}
}
fSum += (*ft);
iflag++;
// this is the MUST! We don't keep flags per FED, reset
// each one of them after using
ft->reset();
}
_cSummaryvsLS.setBinContent(eid, _currentLS, fSum._state);
}
// reset...
_xOrnMsmLS.reset();
_xEvnMsmLS.reset();
_xBcnMsmLS.reset();
_xBadQLS.reset();
// in the end always do the DQTask::endLumi
DQTask::globalEndLuminosityBlock(lb, es);
}
DEFINE_FWK_MODULE(RawTask);
|