CMS 3D CMS Logo

DigiTask.cc
Go to the documentation of this file.
2 
3 using namespace hcaldqm;
4 using namespace hcaldqm::constants;
5 using namespace hcaldqm::filter;
6 
8  DQTask(ps)
9 {
11  edm::InputTag("hcalDigis"));
13  edm::InputTag("hcalDigis"));
15  edm::InputTag("hcalDigis"));
17  edm::InputTag("hcalDigis"));
18 
19  _tokHBHE = consumes<HBHEDigiCollection>(_tagHBHE);
20  _tokHE = consumes<QIE11DigiCollection>(_tagHE);
21  _tokHO = consumes<HODigiCollection>(_tagHO);
22  _tokHF = consumes<QIE10DigiCollection>(_tagHF);
23 
24  _cutSumQ_HBHE = ps.getUntrackedParameter<double>("cutSumQ_HBHE", 20);
25  _cutSumQ_HE = ps.getUntrackedParameter<double>("cutSumQ_HE", 20);
26  _cutSumQ_HO = ps.getUntrackedParameter<double>("cutSumQ_HO", 20);
27  _cutSumQ_HF = ps.getUntrackedParameter<double>("cutSumQ_HF", 20);
28  _thresh_unihf = ps.getUntrackedParameter<double>("thresh_unihf", 0.2);
29  _thresh_led = ps.getUntrackedParameter<double>("thresh_led", 20);
30 
31  _vflags.resize(nDigiFlag);
32  _vflags[fUni]=hcaldqm::flag::Flag("UniSlotHF");
36  _vflags[fLED]=hcaldqm::flag::Flag("LEDMisfire");
37  _vflags[fCapId]=hcaldqm::flag::Flag("BadCapId");
38 
39  _qie10InConditions = ps.getUntrackedParameter<bool>("qie10InConditions", true);
40 
41  // Get reference digi sizes. Convert from unsigned to signed int, because <digi>::size()/samples() return ints for some reason.
42  std::vector<uint32_t> vrefDigiSize = ps.getUntrackedParameter<std::vector<uint32_t>>("refDigiSize");
43  _refDigiSize[HcalBarrel] = (int)vrefDigiSize[0];
44  _refDigiSize[HcalEndcap] = (int)vrefDigiSize[1];
45  _refDigiSize[HcalOuter] = (int)vrefDigiSize[2];
46  _refDigiSize[HcalForward] = (int)vrefDigiSize[3];
47 
48  // (capid - BX) % 4 to 1
49  _capidmbx[HcalBarrel] = 1;
50  _capidmbx[HcalEndcap] = 1;
51  _capidmbx[HcalOuter] = 1;
53 }
54 
56  edm::Run const& r, edm::EventSetup const& es)
57 {
58  DQTask::bookHistograms(ib,r,es);
59 
60  // GET WHAT YOU NEED
62  es.get<HcalDbRecord>().get(dbs);
63  _emap = dbs->getHcalMapping();
64  std::vector<uint32_t> vVME;
65  std::vector<uint32_t> vuTCA;
69  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
71  vVME);
73  vuTCA);
74 
75  // Filters for QIE8 vs QIE10/11
76  std::vector<uint32_t> vhashQIE1011;
80  vhashQIE1011);
82  vhashQIE1011);
83 
84  // INITIALIZE FIRST
102 
116 
121  _cTimingCut_depth.initialize(_name, "TimingCut",
130 
131  // Occupancy w/o a cut
132  _cOccupancyvsLS_Subdet.initialize(_name, "OccupancyvsLS",
136  _cOccupancy_depth.initialize(_name, "Occupancy",
141 
142  // Occupancy w/ a cut
143  _cOccupancyCutvsLS_Subdet.initialize(_name, "OccupancyCutvsLS",
147  _cOccupancyCut_depth.initialize(_name, "OccupancyCut",
152 
153  // Digi size
154  _cDigiSize_Crate.initialize(_name, "DigiSize",
168 
169  _cLETDCTimevsADC_SubdetPM.initialize(_name, "LETDCTimevsADC",
174  _cLETDCvsADC_SubdetPM.initialize(_name, "LETDCvsADC",
179  _cLETDCvsTS_SubdetPM.initialize(_name, "LETDCvsTS",
188  _cLETDCTime_depth.initialize(_name, "LETDCTime",
193 
194  _cBadTDCValues_SubdetPM.initialize(_name, "BadTDCValues",
198  _cBadTDCvsBX_SubdetPM.initialize(_name, "BadTDCvsBX",
202  _cBadTDCvsLS_SubdetPM.initialize(_name, "BadTDCvsLS",
206  _cBadTDCCount_depth.initialize(_name, "BadTDCCount",
211 
212  if (_ptype == fOnline || _ptype == fLocal) {
214  "Occupancy", hashfunctions::fCrate,
219  "Occupancy", hashfunctions::fCrateSlot,
223  }
224 
225  // INITIALIZE HISTOGRAMS that are only for Online
226  if (_ptype==fOnline)
227  {
228  // Charge sharing
241  _cDigiSizevsLS_FED.initialize(_name, "DigiSizevsLS",
245  _cTimingCutvsiphi_SubdetPM.initialize(_name, "TimingCutvsiphi",
249  _cTimingCutvsieta_Subdet.initialize(_name, "TimingCutvsieta",
253  _cOccupancyvsiphi_SubdetPM.initialize(_name, "Occupancyvsiphi",
257  _cOccupancyvsieta_Subdet.initialize(_name, "Occupancyvsieta",
261  _cOccupancyCutvsiphi_SubdetPM.initialize(_name, "OccupancyCutvsiphi",
265  _cOccupancyCutvsieta_Subdet.initialize(_name, "OccupancyCutvsieta",
269  _cOccupancyCutvsLS_Subdet.initialize(_name, "OccupancyCutvsLS",
273  _cOccupancyCutvsBX_Subdet.initialize(_name, "OccupancyCutvsBX",
277 // _cOccupancyCutvsSlotvsLS_HFPM.initialize(_name,
278 // "OccupancyCutvsSlotvsLS", hcaldqm::hashfunctions::fSubdetPM,
279 // new hcaldqm::quantity::LumiSection(_maxLS),
280 // new hcaldqm::quantity::ElectronicsQuantity(hcaldqm::quantity::fSlotuTCA),
281 // new hcaldqm::quantity::ValueQuantity(hcaldqm::quantity::fN),0);
283  "OccupancyCutvsiphivsLS", hcaldqm::hashfunctions::fSubdetPM,
287  }
292 
293  for (int i = 0; i < 4; ++i) {
302  }
303 
304  if (_ptype != fOffline) { // hidefed2crate
305  std::vector<int> vFEDs = hcaldqm::utilities::getFEDList(_emap);
306  std::vector<int> vFEDsVME = hcaldqm::utilities::getFEDVMEList(_emap);
307  std::vector<int> vFEDsuTCA = hcaldqm::utilities::getFEDuTCAList(_emap);
308 
309  std::vector<uint32_t> vFEDHF;
310  vFEDHF.push_back(HcalElectronicsId(22, SLOT_uTCA_MIN,
311  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
312  vFEDHF.push_back(HcalElectronicsId(22, SLOT_uTCA_MIN+6,
313  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
314  vFEDHF.push_back(HcalElectronicsId(29, SLOT_uTCA_MIN,
315  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
316  vFEDHF.push_back(HcalElectronicsId(29, SLOT_uTCA_MIN+6,
317  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
318  vFEDHF.push_back(HcalElectronicsId(32, SLOT_uTCA_MIN,
319  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
320  vFEDHF.push_back(HcalElectronicsId(32, SLOT_uTCA_MIN+6,
321  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
322 
323  // initialize filters
325  vFEDHF);
326 
327  // push the rawIds of each fed into the vector...
328  for (std::vector<int>::const_iterator it=vFEDsVME.begin();
329  it!=vFEDsVME.end(); ++it)
330  _vhashFEDs.push_back(HcalElectronicsId(
332  (*it)-FED_VME_MIN).rawId());
333  for (std::vector<int>::const_iterator it=vFEDsuTCA.begin();
334  it!=vFEDsuTCA.end(); ++it)
335  {
336  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
337  _vhashFEDs.push_back(HcalElectronicsId(
338  cspair.first, cspair.second, FIBER_uTCA_MIN1,
339  FIBERCH_MIN, false).rawId());
340  }
341 
342  _cShapeCut_FED.initialize(_name, "ShapeCut",
346 
347  _cTimingCut_FEDVME.initialize(_name, "TimingCut",
352  _cTimingCut_FEDuTCA.initialize(_name, "TimingCut",
359  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
364  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
367  _cTimingCutvsLS_FED.initialize(_name, "TimingvsLS",
371 
372  _cOccupancy_FEDVME.initialize(_name, "Occupancy",
377  _cOccupancy_FEDuTCA.initialize(_name, "Occupancy",
384  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
389  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
392 
393  _cOccupancyCut_FEDVME.initialize(_name, "OccupancyCut",
398  _cOccupancyCut_FEDuTCA.initialize(_name, "OccupancyCut",
405  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
410  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
413 
414  _cDigiSize_FED.initialize(_name, "DigiSize",
418 
419  if (_ptype == fOnline) {
420  _cSummaryvsLS_FED.initialize(_name, "SummaryvsLS",
425  _cSummaryvsLS.initialize(_name, "SummaryvsLS",
429 
436  }
437  }
438 
439  // BOOK HISTOGRAMS
440  char cutstr[200];
441  sprintf(cutstr, "_SumQHBHE%dHO%dHF%d", int(_cutSumQ_HBHE),
442  int(_cutSumQ_HO), int(_cutSumQ_HF));
443  char cutstr2[200];
444  sprintf(cutstr2, "_SumQHF%d", int(_cutSumQ_HF));
445 
458 
459  if (_ptype != fOffline) { // hidefed2crate
475  }
476 
480 
484 
490 
495 
497  for (int i = 0; i < 4; ++i) {
498  char aux[10];
499  sprintf(aux, "%d_uTCA", i);
501 
502  sprintf(aux, "%d_VME", i);
504  }
505 
506  // BOOK HISTOGRAMS that are only for Online
509 
510  if (_ptype == fOnline || _ptype == fLocal) {
513  }
514 
515  if (_ptype==fOnline)
516  {
529 // _cOccupancyCutvsSlotvsLS_HFPM.book(ib, _emap, _filter_QIE1011, _subsystem);
533 
535  _xNChs.book(_emap);
537  _xUni.book(_emap);
540 
541  // Manually book LED monitoring histogram, to get custom axis
542  ib.setCurrentFolder(_subsystem+"/"+_name+"/LED");
543  _meLEDMon = ib.book2D("LED_ADCvsBX", "Pin diode ADC vs BX", 99, -0.5, 3564-0.5, 64, -0.5, 255.5);
544  _meLEDMon->setAxisTitle("BX", 1);
545  _meLEDMon->setAxisTitle("ADC", 2);
546 
547  // just PER HF FED RECORD THE #CHANNELS
548  // ONLY WAY TO DO THAT AUTOMATICALLY AND W/O HARDCODING 1728
549  // or ANY OTHER VALUES LIKE 2592, 2192
550  std::vector<HcalGenericDetId> gids = _emap->allPrecisionId();
551  for (std::vector<HcalGenericDetId>::const_iterator it=gids.begin();
552  it!=gids.end(); ++it)
553  {
554  if (!it->isHcalDetId())
555  continue;
556  HcalDetId did(it->rawId());
557  if (_xQuality.exists(did))
558  {
559  HcalChannelStatus cs(it->rawId(), _xQuality.get(
560  HcalDetId(*it)));
561  if (
564  continue;
565  }
567  _xNChsNominal.get(eid)++; // he will know the nominal #channels per FED
568  }
569  }
570 
571  // MARK THESE HISTOGRAMS AS LUMI BASED FOR OFFLINE PROCESSING
572  if (_ptype==fOffline)
573  {
575  //_cDigiSize_FED.setLumiFlag();
577  }
578 
579  // book Number of Events vs LS histogram
580  ib.setCurrentFolder(_subsystem+"/RunInfo");
581  meNumEvents1LS = ib.book1D("NumberOfEvents", "NumberOfEvents",
582  1, 0, 1);
584 
585  // book the flag for unknown ids and the online guy as well
587  meUnknownIds1LS = ib.book1D("UnknownIds", "UnknownIds",
588  1, 0, 1);
589  _unknownIdsPresent = false;
591 
592  _ledSignalPresent = false;
593  ib.setCurrentFolder(_subsystem+"/"+_name+"/LED");
594  _meLEDEventCount = ib.book1D("LEDEventCount", "LEDEventCount", 1, 0, 2);
596 }
597 
599 {
600  DQTask::_resetMonitors(uf);
601 
602  switch(uf)
603  {
604  case hcaldqm::f1LS:
605  _unknownIdsPresent = false;
606  break;
607  case hcaldqm::f50LS:
608  // ^^^ONLINE ONLY!
609  if (_ptype==fOnline)
611  // ^^^
612  break;
613  default:
614  break;
615  }
616 }
617 
618 /* virtual */ void DigiTask::_process(edm::Event const& e,
619  edm::EventSetup const&)
620 {
625 
626  if (!e.getByToken(_tokHBHE, chbhe))
627  _logger.dqmthrow("Collection HBHEDigiCollection isn't available"
628  + _tagHBHE.label() + " " + _tagHBHE.instance());
629  if (!e.getByToken(_tokHE, che_qie11))
630  _logger.dqmthrow("Collection QIE11DigiCollection isn't available"
631  + _tagHE.label() + " " + _tagHE.instance());
632  if (!e.getByToken(_tokHO, cho))
633  _logger.dqmthrow("Collection HODigiCollection isn't available"
634  + _tagHO.label() + " " + _tagHO.instance());
635  if (!e.getByToken(_tokHF, chf))
636  _logger.dqmthrow("Collection QIE10DigiCollection isn't available"
637  + _tagHF.label() + " " + _tagHF.instance());
638 
639  // extract some info per event
640  int bx = e.bunchCrossing();
641  meNumEvents1LS->Fill(0.5); // just increment
642 
643  // To fill histograms outside of the loop, you need to determine if there were
644  // any valid det ids first
645  uint32_t rawidValid = 0;
646  uint32_t rawidHBValid = 0;
647  uint32_t rawidHEValid = 0;
648 
649  // HB collection
650  int numChs = 0;
651  int numChsCut = 0;
652  int numChsHE = 0;
653  int numChsCutHE = 0;
654  for (HBHEDigiCollection::const_iterator it=chbhe->begin(); it!=chbhe->end();
655  ++it)
656  {
657  // Explicit check on the DetIds present in the Collection
658  HcalDetId const& did = it->id();
659  if (did.subdet() != HcalBarrel) {
660  continue;
661  }
662  uint32_t rawid = _ehashmap.lookup(did);
663  if (rawid == 0) {
664  meUnknownIds1LS->Fill(1);
665  _unknownIdsPresent=true;
666  continue;
667  } else {
668  if (did.subdet()==HcalBarrel) {
669  rawidHBValid = did.rawId();
670  } else if (did.subdet()==HcalEndcap) {
671  rawidHEValid = did.rawId();
672  }
673  }
674  HcalElectronicsId const& eid(rawid);
675 
676  // filter out channels that are masked out
677  if (_xQuality.exists(did))
678  {
679  HcalChannelStatus cs(did.rawId(), _xQuality.get(did));
680  if (
683  continue;
684  }
685 
686  if (_ptype == fOnline) {
687  short this_capidmbx = (it->sample(it->presamples()).capid() - bx) % 4;
688  if (this_capidmbx < 0) {
689  this_capidmbx += 4;
690  }
691  _cCapidMinusBXmod4_SubdetPM.fill(did, this_capidmbx);
692  bool good_capidmbx = (_capidmbx[did.subdet()] == this_capidmbx);
693  if (!good_capidmbx) {
694  _xBadCapid.get(eid)++;
695  }
696  if (eid.isVMEid()) {
697  _cCapidMinusBXmod4_CrateSlotVME[this_capidmbx].fill(eid);
698 
699  } else {
700  _cCapidMinusBXmod4_CrateSlotuTCA[this_capidmbx].fill(eid);
701  }
702  }
703 
704  //double sumQ = hcaldqm::utilities::sumQ<HBHEDataFrame>(*it, 2.5, 0, it->size()-1);
705  CaloSamples digi_fC = hcaldqm::utilities::loadADC2fCDB<HBHEDataFrame>(_dbService, did, *it);
706  double sumQ = hcaldqm::utilities::sumQDB<HBHEDataFrame>(_dbService, digi_fC, did, *it, 0, it->size()-1);
707 
708  _cSumQ_SubdetPM.fill(did, sumQ);
709  _cOccupancy_depth.fill(did);
710  if (_ptype == fOnline || _ptype == fLocal) {
711  _cOccupancy_Crate.fill(eid);
713  }
714  if (_ptype==fOnline)
715  {
716  _cDigiSizevsLS_FED.fill(eid, _currentLS, it->size());
717  it->size()!=_refDigiSize[did.subdet()]?
718  _xDigiSize.get(eid)++:_xDigiSize.get(eid)+=0;
721  }
722  _cDigiSize_Crate.fill(eid, it->size());
723  if (_ptype != fOffline) { // hidefed2crate
724  _cDigiSize_FED.fill(eid, it->size());
725  if (eid.isVMEid())
726  {
729  }
730  else
731  {
734  /*
735  if (!it->validate(0, it->size()))
736  {
737  _cCapIdRots_depth.fill(did);
738  _cCapIdRots_FEDuTCA.fill(eid, 1);
739  }*/
740  }
741  }
742 
743  for (int i=0; i<it->size(); i++)
744  {
745  _cADC_SubdetPM.fill(did, it->sample(i).adc());
746  _cfC_SubdetPM.fill(did, it->sample(i).nominal_fC());
747  if (_ptype != fOffline) { // hidefed2crate
748  _cADCvsTS_SubdetPM.fill(did, i, it->sample(i).adc());
749  if (sumQ>_cutSumQ_HBHE) {
750  _cShapeCut_FED.fill(eid, i, it->sample(i).nominal_fC());
751  }
752  }
753  }
754 
755  if (sumQ>_cutSumQ_HBHE)
756  {
757  //double timing = hcaldqm::utilities::aveTS<HBHEDataFrame>(*it, 2.5, 0, it->size()-1);
758  double timing = hcaldqm::utilities::aveTSDB<HBHEDataFrame>(_dbService, digi_fC, did, *it, 0, it->size()-1);
759  _cTimingCut_SubdetPM.fill(did, timing);
760  _cTimingCut_depth.fill(did, timing);
763  if (_ptype != fOffline) { // hidefed2crate
764  _cTimingCutvsLS_FED.fill(eid, _currentLS, timing);
765  }
766  _cSumQ_depth.fill(did, sumQ);
767  _cSumQvsLS_SubdetPM.fill(did, _currentLS, sumQ);
768  if (_ptype==fOnline)
769  {
770  _cSumQvsBX_SubdetPM.fill(did, bx, sumQ);
771  _cTimingCutvsiphi_SubdetPM.fill(did, timing);
772  _cTimingCutvsieta_Subdet.fill(did, timing);
776  }
777  if (_ptype != fOffline) { // hidefed2crate
778  if (eid.isVMEid())
779  {
780  _cTimingCut_FEDVME.fill(eid, timing);
781  _cTimingCut_ElectronicsVME.fill(eid, timing);
784  }
785  else
786  {
787  _cTimingCut_FEDuTCA.fill(eid, timing);
788  _cTimingCut_ElectronicsuTCA.fill(eid, timing);
791  }
792  }
793  did.subdet()==HcalBarrel?numChsCut++:numChsCutHE++;
794  }
795  did.subdet()==HcalBarrel?numChs++:numChsHE++;
796  }
797 
798  // HE QIE11 collection
799  for (QIE11DigiCollection::const_iterator it=che_qie11->begin(); it!=che_qie11->end();
800  ++it)
801  {
802  const QIE11DataFrame digi = static_cast<const QIE11DataFrame>(*it);
803 
804  // Explicit check on the DetIds present in the Collection
805  HcalDetId const& did = digi.detid();
806  if (did.subdet() != HcalEndcap) {
807  // LED monitoring from calibration channels
808  if (did.subdet() == HcalOther) {
809  HcalOtherDetId hodid(digi.detid());
810  if (hodid.subdet() == HcalCalibration) {
811  if (did.depth() == 10) {
812  _ledSignalPresent = false;
813  for (int i=0; i<digi.samples(); i++) {
814  if (_ptype == fOnline) {
815  _meLEDMon->Fill(bx, digi[i].adc());
816  }
817  if (digi[i].adc() > _thresh_led) {
818  _ledSignalPresent = true;
819  }
820  }
821  if (_ledSignalPresent) {
823  }
824  }
825  }
826  }
827 
828  continue;
829  }
830  uint32_t rawid = _ehashmap.lookup(did);
831  if (rawid == 0) {
832  meUnknownIds1LS->Fill(1);
833  _unknownIdsPresent=true;
834  continue;
835  } else {
836  if (did.subdet()==HcalBarrel) { // Note: since this is HE, we obviously expect did.subdet() always to be HcalEndcap, but QIE11DigiCollection will have HB for Run 3.
837  rawidHBValid = did.rawId();
838  } else if (did.subdet()==HcalEndcap) {
839  rawidHEValid = did.rawId();
840  }
841  }
842  HcalElectronicsId const& eid(rawid);
843 
844  // filter out channels that are masked out
845  if (_xQuality.exists(did))
846  {
847  HcalChannelStatus cs(did.rawId(), _xQuality.get(did));
848  if (
851  continue;
852  }
853 
854  // (capid - BX) % 4
855  if (_ptype == fOnline) {
856  short soi = -1;
857  for (int i=0; i<digi.samples(); i++) {
858  if (digi[i].soi()) {
859  soi = i;
860  break;
861  }
862  }
863  short this_capidmbx = (digi[soi].capid() - bx) % 4;
864  if (this_capidmbx < 0) {
865  this_capidmbx += 4;
866  }
867  _cCapidMinusBXmod4_SubdetPM.fill(did, this_capidmbx);
868  bool good_capidmbx = (_capidmbx[did.subdet()] == this_capidmbx);
869  if (!good_capidmbx) {
870  _xBadCapid.get(eid)++;
871  }
872  if (eid.isVMEid()) {
873  _cCapidMinusBXmod4_CrateSlotVME[this_capidmbx].fill(eid);
874 
875  } else {
876  _cCapidMinusBXmod4_CrateSlotuTCA[this_capidmbx].fill(eid);
877  }
878  }
879 
880  CaloSamples digi_fC = hcaldqm::utilities::loadADC2fCDB<QIE11DataFrame>(_dbService, did, digi);
881  double sumQ = hcaldqm::utilities::sumQDB<QIE11DataFrame>(_dbService, digi_fC, did, digi, 0, digi.samples()-1);
882 
883  _cSumQ_SubdetPM_QIE1011.fill(did, sumQ);
884  _cOccupancy_depth.fill(did);
885  if (_ptype == fOnline || _ptype == fLocal) {
886  _cOccupancy_Crate.fill(eid);
888  }
889  if (_ptype==fOnline)
890  {
891  _cDigiSizevsLS_FED.fill(eid, _currentLS, digi.samples());
892  digi.samples()!=_refDigiSize[did.subdet()]?
893  _xDigiSize.get(eid)++:_xDigiSize.get(eid)+=0;
896  }
897  _cDigiSize_Crate.fill(eid, digi.samples());
898  if (_ptype != fOffline) { // hidefed2crate
899  _cDigiSize_FED.fill(eid, digi.samples());
900  if (eid.isVMEid())
901  {
904  }
905  else
906  {
909  /*
910  if (!digi.validate(0, digi.size()))
911  {
912  _cCapIdRots_depth.fill(did);
913  _cCapIdRots_FEDuTCA.fill(eid, 1);
914  }*/
915  }
916  }
917  for (int i=0; i<digi.samples(); i++) {
918  double q = hcaldqm::utilities::adc2fCDBMinusPedestal<QIE11DataFrame>(_dbService, digi_fC, did, digi, i);
919  _cADC_SubdetPM_QIE1011.fill(did, digi[i].adc());
920  _cfC_SubdetPM_QIE1011.fill(did, q);
921  _cLETDCvsADC_SubdetPM.fill(did, digi[i].adc(), digi[i].tdc());
922  _cLETDCvsTS_SubdetPM.fill(did, (int)i, digi[i].tdc());
923  if (digi[i].tdc() <50) {
924  double time = i*25. + (digi[i].tdc() / 2.);
925  _cLETDCTime_SubdetPM.fill(did, time);
926  _cLETDCTime_depth.fill(did, time);
927  _cLETDCTimevsADC_SubdetPM.fill(did, digi[i].adc(), time);
928  }
929  // Bad TDC values: 50-61 should never happen in QIE10 or QIE11, but we saw some in 2017 data.
930  if ((50 <= digi[i].tdc()) && (digi[i].tdc() <= 61)) {
931  _cBadTDCValues_SubdetPM.fill(did, digi[i].tdc());
932  _cBadTDCvsBX_SubdetPM.fill(did, bx);
935  }
936  if (_ptype != fOffline) { // hidefed2crate
937  _cADCvsTS_SubdetPM_QIE1011.fill(did, i, digi[i].adc());
938  if (sumQ>_cutSumQ_HE) {
939  _cShapeCut_FED.fill(eid, i, q);
940  }
941  }
942  }
943 
944  if (sumQ>_cutSumQ_HE)
945  {
946  //double timing = hcaldqm::utilities::aveTS_v10<QIE11DataFrame>(digi, 2.5, 0,digi.samples()-1);
947  double timing = hcaldqm::utilities::aveTSDB<QIE11DataFrame>(_dbService, digi_fC, did, digi, 0, digi.samples()-1);
948  _cTimingCut_SubdetPM.fill(did, timing);
949  _cTimingCut_depth.fill(did, timing);
952  if (_ptype != fOffline) { // hidefed2crate
953  _cTimingCutvsLS_FED.fill(eid, _currentLS, timing);
954  }
955  _cSumQ_depth.fill(did, sumQ);
957  if (_ptype==fOnline)
958  {
959  _cSumQvsBX_SubdetPM_QIE1011.fill(did, bx, sumQ);
960  _cTimingCutvsiphi_SubdetPM.fill(did, timing);
961  _cTimingCutvsieta_Subdet.fill(did, timing);
965  }
966  if (_ptype != fOffline) { // hidefed2crate
967  if (eid.isVMEid())
968  {
969  _cTimingCut_FEDVME.fill(eid, timing);
970  _cTimingCut_ElectronicsVME.fill(eid, timing);
973  }
974  else
975  {
976  _cTimingCut_FEDuTCA.fill(eid, timing);
977  _cTimingCut_ElectronicsuTCA.fill(eid, timing);
980  }
981  }
982  did.subdet()==HcalBarrel?numChsCut++:numChsCutHE++;
983  }
984  did.subdet()==HcalBarrel?numChs++:numChsHE++;
985  }
986 
987  if (rawidHBValid!=0 && rawidHEValid!=0)
988  {
990  numChs);
992  numChsHE);
993  // ONLINE ONLY!
994  if (_ptype==fOnline)
995  {
997  _currentLS, numChsCut);
998  _cOccupancyCutvsBX_Subdet.fill(HcalDetId(rawidHBValid), bx,
999  numChsCut);
1000  _cOccupancyCutvsLS_Subdet.fill(HcalDetId(rawidHEValid),
1001  _currentLS, numChsCutHE);
1002  _cOccupancyCutvsBX_Subdet.fill(HcalDetId(rawidHEValid), bx,
1003  numChsCutHE);
1004  }
1005  // ^^^ONLINE ONLY!
1006  }
1007  numChs=0;
1008  numChsCut = 0;
1009 
1010  // reset
1011  rawidValid = 0;
1012 
1013 
1014  // HO collection
1015  for (HODigiCollection::const_iterator it=cho->begin(); it!=cho->end();
1016  ++it)
1017  {
1018  // Explicit check on the DetIds present in the Collection
1019  HcalDetId const& did = it->id();
1020  if (did.subdet() != HcalOuter) {
1021  continue;
1022  }
1023  uint32_t rawid = _ehashmap.lookup(did);
1024  if (rawid == 0) {
1025  meUnknownIds1LS->Fill(1);
1026  _unknownIdsPresent = true;
1027  continue;
1028  } else {
1029  rawidValid = did.rawId();
1030  }
1031  HcalElectronicsId const& eid(rawid);
1032 
1033  // filter out channels that are masked out
1034  if (_xQuality.exists(did))
1035  {
1036  HcalChannelStatus cs(did.rawId(), _xQuality.get(did));
1037  if (
1038  cs.isBitSet(HcalChannelStatus::HcalCellMask) ||
1040  continue;
1041  }
1042 
1043  if (_ptype == fOnline) {
1044  short this_capidmbx = (it->sample(it->presamples()).capid() - bx) % 4;
1045  if (this_capidmbx < 0) {
1046  this_capidmbx += 4;
1047  }
1048  _cCapidMinusBXmod4_SubdetPM.fill(did, this_capidmbx);
1049  bool good_capidmbx = (_capidmbx[did.subdet()] == this_capidmbx);
1050  if (!good_capidmbx) {
1051  _xBadCapid.get(eid)++;
1052  }
1053  if (eid.isVMEid()) {
1054  _cCapidMinusBXmod4_CrateSlotVME[this_capidmbx].fill(eid);
1055 
1056  } else {
1057  _cCapidMinusBXmod4_CrateSlotuTCA[this_capidmbx].fill(eid);
1058  }
1059  }
1060 
1061  //double sumQ = hcaldqm::utilities::sumQ<HODataFrame>(*it, 8.5, 0, it->size()-1);
1062  CaloSamples digi_fC = hcaldqm::utilities::loadADC2fCDB<HODataFrame>(_dbService, did, *it);
1063  double sumQ = hcaldqm::utilities::sumQDB<HODataFrame>(_dbService, digi_fC, did, *it, 0, it->size()-1);
1064 
1065  _cSumQ_SubdetPM.fill(did, sumQ);
1066  _cOccupancy_depth.fill(did);
1067  if (_ptype==fOnline)
1068  {
1069  _cDigiSizevsLS_FED.fill(eid, _currentLS, it->size());
1070  it->size()!=_refDigiSize[did.subdet()]?
1071  _xDigiSize.get(eid)++:_xDigiSize.get(eid)+=0;
1074  }
1075  _cDigiSize_Crate.fill(eid, it->size());
1076  if (_ptype != fOffline) { // hidefed2crate
1077  _cDigiSize_FED.fill(eid, it->size());
1078  if (eid.isVMEid())
1079  {
1080  _cOccupancy_FEDVME.fill(eid);
1082  /*
1083  if (!it->validate(0, it->size()))
1084  _cCapIdRots_FEDVME.fill(eid, 1);
1085  */
1086  }
1087  else
1088  {
1091  /*
1092  if (!it->validate(0, it->size()))
1093  _cCapIdRots_FEDuTCA.fill(eid, 1);*/
1094  }
1095  }
1096 
1097  for (int i=0; i<it->size(); i++)
1098  {
1099  _cADC_SubdetPM.fill(did, it->sample(i).adc());
1100  _cfC_SubdetPM.fill(did, it->sample(i).nominal_fC());
1101  if (_ptype != fOffline) { // hidefed2crate
1102  _cADCvsTS_SubdetPM.fill(did, i, it->sample(i).adc());
1103  if (sumQ>_cutSumQ_HO)
1104  _cShapeCut_FED.fill(eid, i, it->sample(i).nominal_fC());
1105  }
1106  }
1107 
1108  if (sumQ>_cutSumQ_HO)
1109  {
1110  //double timing = hcaldqm::utilities::aveTS<HODataFrame>(*it, 8.5, 0,it->size()-1);
1111  double timing = hcaldqm::utilities::aveTSDB<HODataFrame>(_dbService, digi_fC, did, *it, 0, it->size()-1);
1112  _cSumQ_depth.fill(did, sumQ);
1113  _cSumQvsLS_SubdetPM.fill(did, _currentLS, sumQ);
1115  _cTimingCut_SubdetPM.fill(did, timing);
1116  _cTimingCut_depth.fill(did, timing);
1118  if (_ptype != fOffline) { // hidefed2crate
1119  _cTimingCutvsLS_FED.fill(eid, _currentLS, timing);
1120  }
1121  if (_ptype==fOnline)
1122  {
1123  _cSumQvsBX_SubdetPM.fill(did, bx, sumQ);
1124  _cTimingCutvsiphi_SubdetPM.fill(did, timing);
1125  _cTimingCutvsieta_Subdet.fill(did, timing);
1129  }
1130  if (_ptype != fOffline) { // hidefed2crate
1131  if (eid.isVMEid())
1132  {
1133  _cTimingCut_FEDVME.fill(eid, timing);
1134  _cTimingCut_ElectronicsVME.fill(eid, timing);
1137  }
1138  else
1139  {
1140  _cTimingCut_FEDuTCA.fill(eid, timing);
1141  _cTimingCut_ElectronicsuTCA.fill(eid, timing);
1144  }
1145  }
1146  numChsCut++;
1147  }
1148  numChs++;
1149  }
1150 
1151  if (rawidValid!=0)
1152  {
1154  numChs);
1155 
1156  if (_ptype==fOnline)
1157  {
1159  _currentLS, numChsCut);
1160  _cOccupancyCutvsBX_Subdet.fill(HcalDetId(rawidValid), bx,
1161  numChsCut);
1162  }
1163  }
1164  numChs=0; numChsCut=0;
1165 
1166  // reset
1167  rawidValid = 0;
1168 
1169  // HF collection
1170  if (_qie10InConditions) {
1171  for (QIE10DigiCollection::const_iterator it=chf->begin(); it!=chf->end(); ++it) {
1172  const QIE10DataFrame digi = static_cast<const QIE10DataFrame>(*it);
1173 
1174  // Explicit check on the DetIds present in the Collection
1175  HcalDetId const& did = digi.detid();
1176  if (did.subdet() != HcalForward) {
1177  continue;
1178  }
1179 
1180  uint32_t rawid = _ehashmap.lookup(did);
1181  if (rawid == 0) {
1182  meUnknownIds1LS->Fill(1);
1183  _unknownIdsPresent=true;
1184  continue;
1185  } else {
1186  rawidValid = did.rawId();
1187  }
1188  HcalElectronicsId const& eid(rawid);
1189 
1190  // filter out channels that are masked out
1191  if (_xQuality.exists(did))
1192  {
1193  HcalChannelStatus cs(did.rawId(), _xQuality.get(did));
1194  if (
1195  cs.isBitSet(HcalChannelStatus::HcalCellMask) ||
1197  continue;
1198  }
1199 
1200  // (capid - BX) % 4
1201  if (_ptype == fOnline) {
1202  short soi = -1;
1203  for (int i=0; i<digi.samples(); i++) {
1204  if (digi[i].soi()) {
1205  soi = i;
1206  break;
1207  }
1208  }
1209  short this_capidmbx = (digi[soi].capid() - bx) % 4;
1210  if (this_capidmbx < 0) {
1211  this_capidmbx += 4;
1212  }
1213  _cCapidMinusBXmod4_SubdetPM.fill(did, this_capidmbx);
1214  bool good_capidmbx = (_capidmbx[did.subdet()] == this_capidmbx);
1215  if (!good_capidmbx) {
1216  _xBadCapid.get(eid)++;
1217  }
1218  if (eid.isVMEid()) {
1219  _cCapidMinusBXmod4_CrateSlotVME[this_capidmbx].fill(eid);
1220 
1221  } else {
1222  _cCapidMinusBXmod4_CrateSlotuTCA[this_capidmbx].fill(eid);
1223  }
1224  }
1225 
1226  CaloSamples digi_fC = hcaldqm::utilities::loadADC2fCDB<QIE10DataFrame>(_dbService, did, digi);
1227  double sumQ = hcaldqm::utilities::sumQDB<QIE10DataFrame>(_dbService, digi_fC, did, digi, 0, digi.samples()-1);
1228  //double sumQ = hcaldqm::utilities::sumQ_v10<QIE10DataFrame>(digi, 2.5, 0, digi.samples()-1);
1229 
1230  //if (!_filter_QIE1011.filter(did)) {
1231  _cSumQ_SubdetPM_QIE1011.fill(did, sumQ);
1232  //}
1233  _cOccupancy_depth.fill(did);
1234  if (_ptype==fOnline)
1235  {
1236  _xNChs.get(eid)++;
1237  _cDigiSizevsLS_FED.fill(eid, _currentLS, digi.samples());
1238  digi.samples()!=_refDigiSize[did.subdet()]?
1239  _xDigiSize.get(eid)++:_xDigiSize.get(eid)+=0;
1242  }
1243  _cDigiSize_Crate.fill(eid, digi.samples());
1244  if (_ptype != fOffline) { // hidefed2crate
1245  _cDigiSize_FED.fill(eid, digi.samples());
1246  if (eid.isVMEid())
1247  {
1248  _cOccupancy_FEDVME.fill(eid);
1250  /*
1251  if (!it->validate(0, it->size()))
1252  _cCapIdRots_FEDVME.fill(eid, 1);*/
1253  }
1254  else
1255  {
1258  /*
1259  if (!it->validate(0, it->size()))
1260  _cCapIdRots_FEDuTCA.fill(eid, 1);*/
1261  }
1262  }
1263 
1264  for (int i=0; i<digi.samples(); i++)
1265  {
1266  double q = hcaldqm::utilities::adc2fCDBMinusPedestal<QIE10DataFrame>(_dbService, digi_fC, did, digi, i);
1267  //if (!_filter_QIE1011.filter(did)) {
1268  _cADC_SubdetPM_QIE1011.fill(did, digi[i].adc());
1269  _cfC_SubdetPM_QIE1011.fill(did, q);
1270  _cLETDCvsADC_SubdetPM.fill(did, digi[i].adc(), digi[i].le_tdc());
1271  _cLETDCvsTS_SubdetPM.fill(did, (int)i, digi[i].le_tdc());
1272  if (digi[i].le_tdc() <50) {
1273  double time = i*25. + (digi[i].le_tdc() / 2.);
1274  _cLETDCTime_SubdetPM.fill(did, time);
1275  _cLETDCTime_depth.fill(did, time);
1276  _cLETDCTimevsADC_SubdetPM.fill(did, digi[i].adc(), time);
1277  }
1278 
1279  // Bad TDC values: 50-61 should never happen in QIE10 or QIE11, but we are seeing some in 2017 data.
1280  if ((50 <= digi[i].le_tdc()) && (digi[i].le_tdc() <= 61)) {
1281  _cBadTDCValues_SubdetPM.fill(did, digi[i].le_tdc());
1282  _cBadTDCvsBX_SubdetPM.fill(did, bx);
1285  }
1286  if (_ptype != fOffline) { // hidefed2crate
1287  _cADCvsTS_SubdetPM_QIE1011.fill(did, (int)i, digi[i].adc());
1288  if (sumQ>_cutSumQ_HF)
1289  _cShapeCut_FED.fill(eid, (int)i, q);
1290  }
1291  //}
1292  }
1293 
1294  if (sumQ>_cutSumQ_HF)
1295  {
1296  double timing = hcaldqm::utilities::aveTS_v10<QIE10DataFrame>(digi, 2.5, 0,
1297  digi.samples()-1);
1298  double q1 = hcaldqm::utilities::adc2fCDBMinusPedestal<QIE10DataFrame>(_dbService, digi_fC, did, digi, 1);
1299  double q2 = hcaldqm::utilities::adc2fCDBMinusPedestal<QIE10DataFrame>(_dbService, digi_fC, did, digi, 2);
1300  double q2q12 = q2/(q1+q2);
1301  _cSumQ_depth.fill(did, sumQ);
1302  //if (!_filter_QIE1011.filter(did)) {
1304  //}
1305  _cTimingCut_SubdetPM.fill(did, timing);
1306  _cTimingCut_depth.fill(did, timing);
1308  if (_ptype==fOnline)
1309  {
1310  //if (!_filter_QIE1011.filter(did)) {
1311  _cSumQvsBX_SubdetPM_QIE1011.fill(did, bx, sumQ);
1312  //}
1313  _cTimingCutvsiphi_SubdetPM.fill(did, timing);
1314  _cTimingCutvsieta_Subdet.fill(did, timing);
1318  // _cOccupancyCutvsSlotvsLS_HFPM.fill(did, _currentLS);
1319  _xUniHF.get(eid)++;
1320  }
1321  if (_ptype != fOffline) { // hidefed2crate
1322  _cTimingCutvsLS_FED.fill(eid, _currentLS, timing);
1323  }
1325  if (!eid.isVMEid())
1326  if (_ptype==fOnline)
1327  _cQ2Q12CutvsLS_FEDHF.fill(eid, _currentLS, q2q12);
1328  if (_ptype != fOffline) { // hidefed2crate
1329  if (eid.isVMEid())
1330  {
1331  _cTimingCut_FEDVME.fill(eid, timing);
1332  _cTimingCut_ElectronicsVME.fill(eid, timing);
1335  }
1336  else
1337  {
1338  _cTimingCut_FEDuTCA.fill(eid, timing);
1339  _cTimingCut_ElectronicsuTCA.fill(eid, timing);
1342  }
1343  }
1344  numChsCut++;
1345  }
1346  numChs++;
1347  }
1348  }
1349 
1350  if (rawidValid!=0)
1351  {
1353  numChs);
1354 
1355  if (_ptype==fOnline)
1356  {
1358  _currentLS, numChsCut);
1359  _cOccupancyCutvsBX_Subdet.fill(HcalDetId(rawidValid), bx,
1360  numChsCut);
1361  }
1362  }
1363 }
1364 
1366  edm::LuminosityBlock const& lb, edm::EventSetup const& es)
1367 {
1368  DQTask::beginLuminosityBlock(lb, es);
1369 }
1370 
1372  edm::EventSetup const& es)
1373 {
1374  if (_ptype!=fOnline)
1375  return;
1376 
1377  for (uintCompactMap::const_iterator it=_xUniHF.begin();
1378  it!=_xUniHF.end(); ++it)
1379  {
1380  uint32_t hash1 = it->first;
1381  HcalElectronicsId eid1(hash1);
1382  double x1 = it->second;
1383 
1384  for (uintCompactMap::const_iterator jt=_xUniHF.begin();
1385  jt!=_xUniHF.end(); ++jt)
1386  {
1387  if (jt==it)
1388  continue;
1389  double x2 = jt->second;
1390  if (x2==0)
1391  continue;
1392  if (x1/x2<_thresh_unihf)
1393  _xUni.get(eid1)++;
1394  }
1395  }
1396 
1397  if (_ptype != fOffline) { // hidefed2crate
1398  for (std::vector<uint32_t>::const_iterator it=_vhashFEDs.begin();
1399  it!=_vhashFEDs.end(); ++it)
1400  {
1401  hcaldqm::flag::Flag fSum("DIGI");
1403 
1404  std::vector<uint32_t>::const_iterator cit=std::find(
1405  _vcdaqEids.begin(), _vcdaqEids.end(), *it);
1406  if (cit==_vcdaqEids.end())
1407  {
1408  // not @cDAQ
1409  for (uint32_t iflag=0; iflag<_vflags.size(); iflag++)
1410  _cSummaryvsLS_FED.setBinContent(eid, _currentLS, int(iflag),
1411  int(hcaldqm::flag::fNCDAQ));
1413  continue;
1414  }
1415 
1416  // FED is @cDAQ
1419  {
1420  if (_xDigiSize.get(eid)>0)
1422  else
1424 
1425  if (_xBadCapid.get(eid) > 0) {
1427  } else {
1429  }
1430 
1431  if (hcaldqm::utilities::isFEDHF(eid))
1432  {
1433  double fr = double(_xNChs.get(eid))/double(
1434  _xNChsNominal.get(eid)*_evsPerLS);
1435  if (_runkeyVal==0 || _runkeyVal==4)
1436  {
1437  // only for pp or hi
1438  if (_xUni.get(eid)>0)
1440  else
1441  _vflags[fUni]._state = hcaldqm::flag::fGOOD;
1442  }
1443  if (fr<0.95)
1445  else if (fr<1.0)
1447  else
1449  }
1450  }
1451  if (_unknownIdsPresent)
1453  else
1455 
1456  if (_ledSignalPresent)
1457  _vflags[fLED]._state = hcaldqm::flag::fBAD;
1458  else
1459  _vflags[fLED]._state = hcaldqm::flag::fGOOD;
1460 
1461  int iflag=0;
1462  for (std::vector<hcaldqm::flag::Flag>::iterator ft=_vflags.begin();
1463  ft!=_vflags.end(); ++ft)
1464  {
1466  int(ft->_state));
1467  fSum+=(*ft);
1468  iflag++;
1469 
1470  // reset!
1471  ft->reset();
1472  }
1474  }
1475  }
1476 
1478  _xNChs.reset();
1479  _xBadCapid.reset();
1480 
1481  // in the end always do the DQTask::endLumi
1482  DQTask::endLuminosityBlock(lb, es);
1483 }
1484 
1486 
int adc(sample_type sample)
get the ADC sample (12 bits)
int samples() const
total number of samples in the digi
void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, int debug=0) override
DetId detid() const
Get the detector id.
hcaldqm::ContainerProf1D _cTimingCutvsiphi_SubdetPM
Definition: DigiTask.h:120
constexpr uint32_t rawId() const
void _process(edm::Event const &, edm::EventSetup const &) override
Definition: DigiTask.cc:618
hcaldqm::ContainerXXX< uint32_t > _xBadCapid
Definition: DigiTask.h:164
bool _qie10InConditions
Definition: DigiTask.h:202
T getUntrackedParameter(std::string const &, T const &) const
double _thresh_led
Definition: DigiTask.h:196
MonitorElement * meNumEvents1LS
Definition: DigiTask.h:192
hcaldqm::Container1D _cADC_SubdetPM
Definition: DigiTask.h:90
hcaldqm::Container1D _cADC_SubdetPM_QIE1011
Definition: DigiTask.h:98
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: DigiTask.cc:1371
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *qy=new quantity::ValueQuantity(quantity::fN), int debug=0)
Definition: Container1D.cc:41
hcaldqm::Container1D _cOccupancyCutvsieta_Subdet
Definition: DigiTask.h:147
auto_ptr< ClusterSequence > cs
hcaldqm::ContainerProf1D _cSumQvsBX_SubdetPM
Definition: DigiTask.h:95
virtual bool exists(HcalDetId const &)
Definition: ContainerXXX.h:265
int const CRATE_VME_MIN
Definition: Constants.h:111
MonitorElement * _meLEDMon
Definition: DigiTask.h:189
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:142
void fill(HcalDetId const &) override
edm::InputTag _tagHO
Definition: DigiTask.h:48
std::map< HcalSubdetector, int > _refDigiSize
Definition: DigiTask.h:74
hcaldqm::Container2D _cADCvsTS_SubdetPM
Definition: DigiTask.h:107
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:12
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: DigiTask.cc:1365
edm::EDGetTokenT< QIE11DigiCollection > _tokHE
Definition: DigiTask.h:51
double _cutSumQ_HE
Definition: DigiTask.h:55
hcaldqm::ContainerProf1D _cQ2Q12CutvsLS_FEDHF
Definition: DigiTask.h:124
MonitorElement * meUnknownIds1LS
Definition: DigiTask.h:193
edm::EDGetTokenT< HBHEDigiCollection > _tokHBHE
Definition: DigiTask.h:50
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:579
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
MonitorElement * _meLEDEventCount
Definition: DigiTask.h:195
hcaldqm::Container2D _cLETDCTimevsADC_SubdetPM
Definition: DigiTask.h:167
double _cutSumQ_HO
Definition: DigiTask.h:55
virtual CompactMap::const_iterator begin()
Definition: ContainerXXX.h:73
double _thresh_unihf
Definition: DigiTask.h:56
UpdateFreq
Definition: DQTask.h:17
State _state
Definition: Flag.h:79
std::map< HcalSubdetector, short > _capidmbx
Definition: DigiTask.h:204
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
std::vector< HBHEDataFrame >::const_iterator const_iterator
int bunchCrossing() const
Definition: EventBase.h:66
hcaldqm::ContainerSingle2D _cCapidMinusBXmod4_CrateSlotuTCA[4]
Definition: DigiTask.h:185
virtual void initialize(std::string const &folder, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
int const SPIGOT_MIN
Definition: Constants.h:136
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
hcaldqm::ContainerProf2D _cSumQ_depth
Definition: DigiTask.h:93
edm::EDGetTokenT< HODigiCollection > _tokHO
Definition: DigiTask.h:52
hcaldqm::Container1D _cOccupancyCutvsiphi_SubdetPM
Definition: DigiTask.h:146
const_iterator begin() const
virtual void reset()
Definition: ContainerXXX.h:364
hcaldqm::ContainerProf1D _cSumQvsLS_SubdetPM_QIE1011
Definition: DigiTask.h:101
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
hcaldqm::ContainerSingle2D _cSummaryvsLS
Definition: DigiTask.h:200
hcaldqm::ContainerProf2D _cTimingCut_FEDVME
Definition: DigiTask.h:113
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: DigiTask.cc:55
int const FIBER_VME_MIN
Definition: Constants.h:141
hcaldqm::Container2D _cOccupancyCutvsiphivsLS_SubdetPM
Definition: DigiTask.h:149
hcaldqm::ContainerXXX< uint32_t > _xDigiSize
Definition: DigiTask.h:160
hcaldqm::ContainerProf2D _cTimingCut_FEDuTCA
Definition: DigiTask.h:114
double q2[4]
Definition: TauolaWrapper.h:88
hcaldqm::Container1D _cBadTDCvsLS_SubdetPM
Definition: DigiTask.h:176
int const FIBERCH_MIN
Definition: Constants.h:151
void Fill(long long x)
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
std::vector< int > getFEDVMEList(HcalElectronicsMap const *)
Definition: Utilities.cc:119
hcaldqm::filter::HashFilter _filter_VME
Definition: DigiTask.h:81
virtual CompactMap::const_iterator end()
Definition: ContainerXXX.h:75
hcaldqm::Container2D _cLETDCvsTS_SubdetPM
Definition: DigiTask.h:169
int depth() const
get the tower depth
Definition: HcalDetId.h:162
ProcessingType _ptype
Definition: DQModule.h:59
virtual void fill(uint32_t)
Definition: Container1D.cc:83
virtual void reset()
Definition: Container1D.cc:66
bool _ledSignalPresent
Definition: DigiTask.h:197
edm::InputTag _tagHBHE
Definition: DigiTask.h:46
void reset()
Definition: Flag.h:76
void setLumiFlag()
this ME is meant to be stored for each luminosity section
hcaldqm::Container2D _cOccupancy_CrateSlot
Definition: DigiTask.h:133
virtual void setBinContent(int, int, int)
constexpr bool isVMEid() const
void dqmthrow(std::string const &msg) const
Definition: Logger.h:15
ContainerXXX< uint32_t > _xQuality
Definition: DQTask.h:62
int const FED_VME_MIN
Definition: Constants.h:98
hcaldqm::Container2D _cADCvsTS_SubdetPM_QIE1011
Definition: DigiTask.h:108
hcaldqm::Container2D _cOccupancyCut_ElectronicsVME
Definition: DigiTask.h:143
hcaldqm::Container1D _cDigiSize_Crate
Definition: DigiTask.h:157
hcaldqm::Container1D _cShapeCut_FED
Definition: DigiTask.h:106
hcaldqm::Container2D _cOccupancyCut_depth
Definition: DigiTask.h:145
hcaldqm::ContainerProf1D _cOccupancyCutvsBX_Subdet
Definition: DigiTask.h:154
double _cutSumQ_HF
Definition: DigiTask.h:55
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:118
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
int const FIBER_uTCA_MIN1
Definition: Constants.h:144
hcaldqm::Container1D _cfC_SubdetPM_QIE1011
Definition: DigiTask.h:99
double _cutSumQ_HBHE
Definition: DigiTask.h:55
hash_function_did const hash_did[nHashType_did]
hcaldqm::ContainerProf2D _cTimingCut_depth
Definition: DigiTask.h:119
DetId detid() const
Get the detector id.
std::vector< HcalGenericDetId > allPrecisionId() const
Logger _logger
Definition: DQModule.h:70
hcaldqm::Container1D _cBadTDCValues_SubdetPM
Definition: DigiTask.h:174
hcaldqm::Container2D _cOccupancy_FEDVME
Definition: DigiTask.h:128
hcaldqm::ContainerProf1D _cTimingCutvsLS_SubdetPM
Definition: DigiTask.h:118
hcaldqm::Container2D _cOccupancyCut_FEDVME
Definition: DigiTask.h:141
hcaldqm::ContainerProf1D _cSumQvsBX_SubdetPM_QIE1011
Definition: DigiTask.h:102
hcaldqm::ContainerSingle2D _cCapidMinusBXmod4_CrateSlotVME[4]
Definition: DigiTask.h:186
hcaldqm::Container2D _cOccupancy_depth
Definition: DigiTask.h:134
std::string _name
Definition: DQModule.h:57
HcalElectronicsMap const * _emap
Definition: DQTask.h:73
hcaldqm::Container2D _cSummaryvsLS_FED
Definition: DigiTask.h:199
hcaldqm::filter::HashFilter _filter_FEDHF
Definition: DigiTask.h:83
int const CRATE_uTCA_MIN
Definition: Constants.h:116
edm::InputTag _tagHE
Definition: DigiTask.h:47
const_iterator end() const
edm::EDGetTokenT< QIE10DigiCollection > _tokHF
Definition: DigiTask.h:53
DigiTask(edm::ParameterSet const &)
Definition: DigiTask.cc:7
hcaldqm::ContainerProf1D _cOccupancyvsLS_Subdet
Definition: DigiTask.h:152
void _resetMonitors(hcaldqm::UpdateFreq) override
Definition: DigiTask.cc:598
hcaldqm::ContainerProf1D _cSumQvsLS_SubdetPM
Definition: DigiTask.h:94
hcaldqm::ContainerXXX< uint32_t > _xUni
Definition: DigiTask.h:161
hcaldqm::ContainerProf1D _cTimingCutvsLS_FED
Definition: DigiTask.h:117
hcaldqm::Container2D _cOccupancyCut_FEDuTCA
Definition: DigiTask.h:142
hcaldqm::Container2D _cOccupancy_ElectronicsVME
Definition: DigiTask.h:130
edm::InputTag _tagHF
Definition: DigiTask.h:49
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
bool isFEDHBHE(HcalElectronicsId const &)
Definition: Utilities.cc:172
virtual void book(HcalElectronicsMap const *)
Definition: ContainerXXX.h:97
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:136
int size() const
get the size
Definition: CaloSamples.h:24
hcaldqm::Container1D _cDigiSize_FED
Definition: DigiTask.h:158
hcaldqm::filter::HashFilter _filter_QIE8
Definition: DigiTask.h:85
double q1[4]
Definition: TauolaWrapper.h:87
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
Definition: Container1D.cc:958
virtual void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fN), int debug=0)
Definition: Container2D.cc:32
hcaldqm::ContainerXXX< uint32_t > _xNChsNominal
Definition: DigiTask.h:163
hcaldqm::Container1D _cSumQ_SubdetPM
Definition: DigiTask.h:92
hcaldqm::Container1D _cOccupancyvsiphi_SubdetPM
Definition: DigiTask.h:135
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
hcaldqm::ContainerProf1D _cTimingCutvsieta_Subdet
Definition: DigiTask.h:121
hcaldqm::Container1D _cLETDCTime_SubdetPM
Definition: DigiTask.h:170
hcaldqm::electronicsmap::ElectronicsMap _dhashmap
Definition: DigiTask.h:78
void initialize(std::string const &folder, hashfunctions::HashType, quantity::Quantity *, quantity::Quantity *, quantity::Quantity *qz=new quantity::ValueQuantity(quantity::fEnergy), int debug=0) override
std::vector< hcaldqm::flag::Flag > _vflags
Definition: DigiTask.h:59
void setBinContent(HcalDetId const &, int) override
Definition: Container2D.cc:235
std::string const & label() const
Definition: InputTag.h:36
const_iterator end() const
hcaldqm::Container2D _cOccupancyCut_ElectronicsuTCA
Definition: DigiTask.h:144
hcaldqm::ContainerProf2D _cTimingCut_ElectronicsVME
Definition: DigiTask.h:115
hcaldqm::Container2D _cLETDCvsADC_SubdetPM
Definition: DigiTask.h:168
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:247
edm::ESHandle< HcalDbService > _dbService
Definition: DQTask.h:72
hcaldqm::Container1D _cBadTDCvsBX_SubdetPM
Definition: DigiTask.h:175
virtual void setLumiFlag()
std::vector< int > getFEDList(HcalElectronicsMap const *)
Definition: Utilities.cc:95
hcaldqm::Container2D _cOccupancy_Crate
Definition: DigiTask.h:132
T get() const
Definition: EventSetup.h:63
std::vector< int > getFEDuTCAList(HcalElectronicsMap const *)
Definition: Utilities.cc:145
void fill(HcalDetId const &) override
Definition: Container2D.cc:59
const HcalElectronicsMap * getHcalMapping() const
virtual void initialize(FilterType ftype, hashfunctions::HashType htype, std::vector< uint32_t > const &)
Definition: HashFilter.cc:28
std::string _subsystem
Definition: DQModule.h:64
hcaldqm::filter::HashFilter _filter_uTCA
Definition: DigiTask.h:82
bool isFEDHO(HcalElectronicsId const &)
Definition: Utilities.cc:212
std::vector< uint32_t > _vcdaqEids
Definition: DQTask.h:65
hcaldqm::ContainerProf1D _cDigiSizevsLS_FED
Definition: DigiTask.h:159
hcaldqm::ContainerXXX< uint32_t > _xNChs
Definition: DigiTask.h:162
virtual void fill(int, int)
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
Definition: DigiTask.h:77
hcaldqm::ContainerProf1D _cOccupancyCutvsLS_Subdet
Definition: DigiTask.h:153
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:89
hcaldqm::filter::HashFilter _filter_QIE1011
Definition: DigiTask.h:84
void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
Definition: Container2D.cc:895
hcaldqm::Container2D _cBadTDCCount_depth
Definition: DigiTask.h:177
hcaldqm::ContainerProf2D _cLETDCTime_depth
Definition: DigiTask.h:171
std::vector< uint32_t > _vhashFEDs
Definition: DigiTask.h:72
int samples() const
total number of samples in the digi
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
hcaldqm::Container1D _cOccupancyvsieta_Subdet
Definition: DigiTask.h:136
Readout chain identification for Hcal.
std::string const & instance() const
Definition: InputTag.h:37
bool isFEDHF(HcalElectronicsId const &)
Definition: Utilities.cc:187
hcaldqm::ContainerProf2D _cTimingCut_ElectronicsuTCA
Definition: DigiTask.h:116
int const SLOT_uTCA_MIN
Definition: Constants.h:123
const_iterator begin() const
hcaldqm::Container1D _cSumQ_SubdetPM_QIE1011
Definition: DigiTask.h:100
hcaldqm::Container1D _cTimingCut_SubdetPM
Definition: DigiTask.h:112
Definition: Run.h:44
bool _unknownIdsPresent
Definition: DigiTask.h:194
hcaldqm::Container2D _cOccupancy_FEDuTCA
Definition: DigiTask.h:129
hcaldqm::Container1D _cCapidMinusBXmod4_SubdetPM
Definition: DigiTask.h:184
ib
Definition: cuy.py:661
hcaldqm::ContainerXXX< uint32_t > _xUniHF
Definition: DigiTask.h:161
double sumQ(DIGI const &digi, double ped, int i=0, int j=3)
Definition: Utilities.h:121
hcaldqm::Container1D _cfC_SubdetPM
Definition: DigiTask.h:91
hcaldqm::Container2D _cOccupancy_ElectronicsuTCA
Definition: DigiTask.h:131