test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TPTask.cc
Go to the documentation of this file.
2 
3 
4 using namespace hcaldqm;
5 using namespace hcaldqm::constants;
7  DQTask(ps)
8 {
10  edm::InputTag("hcalDigis"));
12  edm::InputTag("emulDigis"));
13 
14  _tokData = consumes<HcalTrigPrimDigiCollection>(_tagData);
15  _tokEmul = consumes<HcalTrigPrimDigiCollection>(_tagEmul);
16 
17  _skip1x1 = ps.getUntrackedParameter<bool>("skip1x1", true);
18  _cutEt = ps.getUntrackedParameter<int>("cutEt", 3);
20  "thresh_EtMsmRate_high", 0.2);
22  "thresh_EtMsmRate_low", 0.05);
24  "thresh_FGMsmRate", 0.2);
26  "thresh_FGMsmRate_low", 0.05);
27  _thresh_DataMsn = ps.getUntrackedParameter<double>("thresh_DataMsn",
28  0.1);
29  _thresh_EmulMsn = ps.getUntrackedParameter<double>("thresh_EmulMsn");
30  std::vector<int> tmp = ps.getUntrackedParameter<std::vector<int> >("vFGBitsReady");
31  for (uint32_t iii=0; iii<constants::NUM_FGBITS; iii++)
32  _vFGBitsReady.push_back(tmp[iii]);
33 
34  _vflags.resize(nTPFlag);
35  _vflags[fEtMsm]=flag::Flag("EtMsm");
36  _vflags[fFGMsm]=flag::Flag("FGMsm");
37  _vflags[fDataMsn]=flag::Flag("DataMsn");
38  _vflags[fEmulMsn]=flag::Flag("EmulMsn");
39  _vflags[fUnknownIds]=flag::Flag("UnknownIds");
40 }
41 
43  edm::Run const& r, edm::EventSetup const& es)
44 {
45  DQTask::bookHistograms(ib,r,es);
46 
47  // GET WHAT YOU NEED
49  es.get<HcalDbRecord>().get(dbs);
50  _emap = dbs->getHcalMapping();
51  std::vector<int> vFEDs = hcaldqm::utilities::getFEDList(_emap);
52  std::vector<int> vFEDsVME = hcaldqm::utilities::getFEDVMEList(_emap);
53  std::vector<int> vFEDsuTCA = hcaldqm::utilities::getFEDuTCAList(_emap);
54  std::vector<uint32_t> vVME;
55  std::vector<uint32_t> vuTCA;
56  std::vector<uint32_t> depth0;
57  vVME.push_back(HcalElectronicsId(FIBERCH_MIN,
60  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
62  vVME);
64  vuTCA);
65  depth0.push_back(HcalTrigTowerDetId(1, 1, 0).rawId());
67  depth0);
68 
69  // push the rawIds of each fed into the vector
70  // this vector is used at endlumi for online state generation
71  for (std::vector<int>::const_iterator it=vFEDsVME.begin();
72  it!=vFEDsVME.end(); ++it)
73  {
75  SPIGOT_MIN, (*it)-FED_VME_MIN).rawId());
76  }
77  for (std::vector<int>::const_iterator it=vFEDsuTCA.begin();
78  it!=vFEDsuTCA.end(); ++it)
79  {
80  std::pair<uint16_t, uint16_t> cspair = hcaldqm::utilities::fed2crate(*it);
81  _vhashFEDs.push_back(HcalElectronicsId(cspair.first,
82  cspair.second, FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
83  }
84 
85  // INITIALIZE FIRST
86  // Et/FG
97  for (uint8_t iii=0; iii<constants::NUM_FGBITS; iii++)
98  {
103  }
104 
107  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
112  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
117  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
122  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
141 
142  // Occupancies
145  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
150  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
155  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
160  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
163 
166  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
171  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
176  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
181  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
184 
185  _cOccupancyData_depthlike.initialize(_name, "OccupancyData",
189  _cOccupancyEmul_depthlike.initialize(_name, "OccupancyEmul",
193  _cOccupancyCutData_depthlike.initialize(_name, "OccupancyCutData",
197  _cOccupancyCutEmul_depthlike.initialize(_name, "OccupancyCutEmul",
201 
202  // Mismatches
205  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
210  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
215  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
220  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
231 
232  // Missing Data w.r.t. Emulator
235  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
240  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
245  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
250  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
263  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
268  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
275 
276  _cOccupancyDatavsBX_TTSubdet.initialize(_name, "OccupancyDatavsBX",
280  _cOccupancyEmulvsBX_TTSubdet.initialize(_name, "OccupancyEmulvsBX",
284  _cOccupancyCutDatavsBX_TTSubdet.initialize(_name, "OccupancyCutDatavsBX",
288  _cOccupancyCutEmulvsBX_TTSubdet.initialize(_name, "OccupancyCutEmulvsBX",
292 
293  // INITIALIZE HISTOGRAMS to be used in Online only!
294  if (_ptype==fOnline)
295  {
296  _cEtCorr2x3_TTSubdet.initialize(_name, "EtCorr2x3",
301  _cOccupancyData2x3_depthlike.initialize(_name, "OccupancyData2x3",
305  _cOccupancyEmul2x3_depthlike.initialize(_name, "OccupancyEmul2x3",
309  _cEtCutDatavsLS_TTSubdet.initialize(_name, "EtCutDatavsLS",
313  _cEtCutEmulvsLS_TTSubdet.initialize(_name, "EtCutEmulvsLS",
317  _cEtCutDatavsBX_TTSubdet.initialize(_name, "EtCutDatavsBX",
321  _cEtCutEmulvsBX_TTSubdet.initialize(_name, "EtCutEmulvsBX",
325  _cEtCorrRatiovsLS_TTSubdet.initialize(_name, "EtCorrRatiovsLS",
329  _cEtCorrRatiovsBX_TTSubdet.initialize(_name, "EtCorrRatiovsBX",
333  _cEtMsmRatiovsLS_TTSubdet.initialize(_name, "EtMsmRatiovsLS",
337  _cEtMsmRatiovsBX_TTSubdet.initialize(_name, "EtMsmRatiovsBX",
349  _cMsnDatavsLS_TTSubdet.initialize(_name, "MsnDatavsLS",
353  _cMsnCutDatavsLS_TTSubdet.initialize(_name, "MsnCutDatavsLS",
357  _cMsnDatavsBX_TTSubdet.initialize(_name, "MsnDatavsBX",
361  _cMsnCutDatavsBX_TTSubdet.initialize(_name, "MsnCutDatavsBX",
365  _cMsnEmulvsLS_TTSubdet.initialize(_name, "MsnEmulvsLS",
369  _cMsnCutEmulvsLS_TTSubdet.initialize(_name, "MsnCutEmulvsLS",
373  _cMsnEmulvsBX_TTSubdet.initialize(_name, "MsnEmulvsBX",
377  _cMsnCutEmulvsBX_TTSubdet.initialize(_name, "MsnCutEmulvsBX",
381  _cOccupancyDatavsLS_TTSubdet.initialize(_name, "OccupancyDatavsLS",
386  "OccupancyCutDatavsLS",
390  _cOccupancyDatavsBX_TTSubdet.initialize(_name, "OccupancyDatavsBX",
395  "OccupancyCutDatavsBX",
399  _cOccupancyEmulvsLS_TTSubdet.initialize(_name, "OccupancyEmulvsLS",
404  "OccupancyCutEmulvsLS",
408  _cOccupancyEmulvsBX_TTSubdet.initialize(_name, "OccupancyEmulvsBX",
413  "OccupancyCutEmulvsBX",
417  _cSummaryvsLS_FED.initialize(_name, "SummaryvsLS",
422  _cSummaryvsLS.initialize(_name, "SummaryvsLS",
426 
434  }
435 
436  // BOOK HISTOGRAMS
437  char aux[20];
438  for (unsigned int iii=0; iii<constants::NUM_FGBITS; iii++)
439  {
440  sprintf(aux, "BIT%d", iii);
441  _cFGCorr_TTSubdet[iii].book(ib, _emap, _subsystem, aux);
442  }
481 
482  // whatever has to go online only goes here
483  if (_ptype==fOnline)
484  {
516 
517  _xEtMsm.book(_emap);
518  _xFGMsm.book(_emap);
524  }
525 
526  // initialize the hash map
528 
529  // book the flag for unknown ids and the online guy as well
531  meUnknownIds1LS = ib.book1D("UnknownIds", "UnknownIds",
532  1, 0, 1);
533  _unknownIdsPresent = false;
535 }
536 
538 {
539  DQTask::_resetMonitors(uf);
540  switch (uf)
541  {
542  case hcaldqm::f1LS:
543  _unknownIdsPresent = false;
544  break;
545  default :
546  break;
547  }
548 }
549 
550 /* virtual */ void TPTask::_process(edm::Event const& e,
551  edm::EventSetup const&)
552 {
555  if (!e.getByToken(_tokData, cdata))
556  _logger.dqmthrow("Collection HcalTrigPrimDigiCollection isn't available"
557  + _tagData.label() + " " + _tagData.instance());
558  if (!e.getByToken(_tokEmul, cemul))
559  _logger.dqmthrow("Collection HcalTrigPrimDigiCollection isn't available"
560  + _tagEmul.label() + " " + _tagEmul.instance());
561 
562  // extract some info per event
563  int bx = e.bunchCrossing();
564 
565  // some summaries... per event
566  int numHBHE(0), numHF(0), numCutHBHE(0), numCutHF(0);
567  int numCorrHBHE(0), numCorrHF(0);
568  int numMsmHBHE(0), numMsmHF(0);
569  int numMsnHBHE(0), numMsnHF(0), numMsnCutHBHE(0), numMsnCutHF(0);
570 
571  // for explanation see RecHit or Digi Tasks
572  uint32_t rawidHBHEValid = 0;
573  uint32_t rawidHFValid = 0;
574 
575  /*
576  * STEP1:
577  * Loop over the data digis and
578  * - do ... for all the data digis
579  * - find the emulator digi
580  * --- compare soi Et
581  * --- compare soi FG
582  * --- Do not fill anything for emulator Et!!!
583  */
584  for (HcalTrigPrimDigiCollection::const_iterator it=cdata->begin();
585  it!=cdata->end(); ++it)
586  {
587  // Explicit check on the DetIds present in the Collection
588  HcalTrigTowerDetId tid = it->id();
589  uint32_t rawid = _ehashmap.lookup(tid);
590  if (rawid==0)
591  {meUnknownIds1LS->Fill(1); _unknownIdsPresent = true; continue;}
592  HcalElectronicsId const& eid(rawid);
593  if (tid.ietaAbs()>=29)
594  rawidHFValid = tid.rawId();
595  else
596  rawidHBHEValid = tid.rawId();
597 
598  //
599  // HF 2x3 TPs Treat theam separately and only for ONLINE!
600  //
601  if (tid.version()==0 && tid.ietaAbs()>=29)
602  {
603  // do this only for online processing
604  if (_ptype==fOnline)
605  {
607  HcalTrigPrimDigiCollection::const_iterator jt=cemul->find(tid);
608  if (jt!=cemul->end())
609  _cEtCorr2x3_TTSubdet.fill(tid, it->SOI_compressedEt(),
610  jt->SOI_compressedEt());
611  }
612 
613  // skip to the next tp digi
614  continue;
615  }
616 
617  // FROM THIS POINT, HBHE + 1x1 HF TPs
618  int soiEt_d = it->t0().compressedEt();
619  int soiFG_d[constants::NUM_FGBITS];
620  for (uint32_t ibit=0; ibit<constants::NUM_FGBITS; ibit++)
621  soiFG_d[ibit] = it->t0().fineGrain(ibit)?1:0;
622  tid.ietaAbs()>=29?numHF++:numHBHE++;
623 
624  // fill w/o a cut
625  _cEtData_TTSubdet.fill(tid, soiEt_d);
626  _cEtData_depthlike.fill(tid, soiEt_d);
628  if (eid.isVMEid())
629  {
631  _cEtData_ElectronicsVME.fill(eid, soiEt_d);
632  }
633  else
634  {
636  _cEtData_ElectronicsuTCA.fill(eid, soiEt_d);
637  }
638 
639  // FILL w/a CUT
640  if (soiEt_d>_cutEt)
641  {
642  tid.ietaAbs()>=29?numCutHF++:numCutHBHE++;
644  _cEtCutData_depthlike.fill(tid, soiEt_d);
645 
646  // ONLINE ONLY!
647  if (_ptype==fOnline)
648  {
650  _cEtCutDatavsBX_TTSubdet.fill(tid, bx, soiEt_d);
651  _xDataTotal.get(eid)++;
652  }
653  // ^^^ONLINE ONLY!
654 
655  if (eid.isVMEid())
657  else
659  }
660 
661  // FIND the EMULATOR DIGI
662  HcalTrigPrimDigiCollection::const_iterator jt=cemul->find(tid);
663  if (jt!=cemul->end())
664  {
665  // if PRESENT!
666  int soiEt_e = jt->SOI_compressedEt();
667  int soiFG_e[constants::NUM_FGBITS];
668  for (uint32_t ibit=0; ibit<constants::NUM_FGBITS; ibit++)
669  soiFG_e[ibit] = jt->t0().fineGrain(ibit)?1:0;
670  // if both are zeroes => set 1
671  double rEt = soiEt_d==0 && soiEt_e==0?1:
672  double(std::min(soiEt_d, soiEt_e))/
673  double(std::max(soiEt_e, soiEt_d));
674 
675  // ONLINE ONLY!
676  if (_ptype==fOnline)
677  {
678  _xNumCorr.get(eid)++;
679  tid.ietaAbs()>=29?numCorrHF++:numCorrHBHE++;
681  _cEtCorrRatiovsBX_TTSubdet.fill(tid, bx, rEt);
682  }
683  // ^^^ONLINE ONLY!
684 
685  _cEtCorrRatio_depthlike.fill(tid, rEt);
686  _cEtCorr_TTSubdet.fill(tid, soiEt_d, soiEt_e);
687  for (uint32_t ibit=0; ibit<constants::NUM_FGBITS; ibit++)
688  _cFGCorr_TTSubdet[ibit].fill(tid, soiFG_d[ibit], soiFG_e[ibit]);
689  // FILL w/o a CUT
690  if (eid.isVMEid())
691  {
693  }
694  else
695  {
697  }
698 
699  // if SOI Et are not equal
700  // fill mismatched
701  if (soiEt_d!=soiEt_e)
702  {
703  tid.ietaAbs()>=29?numMsmHF++:numMsmHBHE++;
704  _cEtMsm_depthlike.fill(tid);
705  if (eid.isVMEid())
707  else
709  if (_ptype==fOnline)
710  _xEtMsm.get(eid)++;
711  }
712  // if SOI FG are not equal
713  // fill mismatched.
714  // Do this comparison only for FG Bits that are commissioned
715  for (uint32_t ibit=0; ibit<constants::NUM_FGBITS; ibit++)
716  if (soiFG_d[ibit]!=soiFG_e[ibit] && _vFGBitsReady[ibit])
717  {
718  _cFGMsm_depthlike.fill(tid);
719  if (eid.isVMEid())
721  else
723  if (_ptype==fOnline)
724  _xFGMsm.get(eid)++;
725  }
726  }
727  else
728  {
729  // IF MISSING
730  _cEtCorr_TTSubdet.fill(tid, soiEt_d, -2);
732  tid.ietaAbs()>=29?numMsnHF++:numMsnHBHE++;
733  if (eid.isVMEid())
735  else
737 
738  if (soiEt_d>_cutEt)
739  {
740  tid.ietaAbs()>=29?numMsnCutHF++:numMsnCutHBHE++;
741  if (_ptype==fOnline)
742  _xEmulMsn.get(eid)++;
743  }
744  }
745  }
746 
747  if (rawidHFValid!=0 && rawidHBHEValid!=0)
748  {
749  // ONLINE ONLY!
750  if (_ptype==fOnline)
751  {
753  numHBHE);
755  numHF);
757  bx, numCutHBHE);
759  numCutHF);
761  _currentLS, numHBHE);
763  _currentLS,numHF);
765  _currentLS, numCutHBHE);
767  _currentLS, numCutHF);
768 
770  numMsmHBHE);
772  numMsmHF);
773  _cEtMsmvsBX_TTSubdet.fill(HcalTrigTowerDetId(rawidHBHEValid), bx,
774  numMsmHBHE);
775  _cEtMsmvsBX_TTSubdet.fill(HcalTrigTowerDetId(rawidHFValid), bx,
776  numMsmHF);
777 
779  _currentLS,
780  double(numMsmHBHE)/double(numCorrHBHE));
782  _currentLS,
783  double(numMsmHF)/double(numCorrHF));
785  double(numMsmHBHE)/double(numCorrHBHE));
787  double(numMsmHF)/double(numCorrHF));
788 
790  _currentLS, numMsnHBHE);
792  _currentLS, numMsnHF);
794  _currentLS, numMsnCutHBHE);
796  _currentLS, numMsnCutHF);
797 
799  bx, numMsnHBHE);
801  bx, numMsnHF);
803  bx, numMsnCutHBHE);
805  bx, numMsnCutHF);
806  }
807  }
808 
809  numHBHE=0; numHF=0; numCutHBHE=0; numCutHF=0;
810  numMsnHBHE=0; numMsnHF=0; numCutHBHE=0; numCutHF=0;
811 
812  // reset
813  rawidHBHEValid = 0;
814  rawidHFValid = 0;
815 
816  /*
817  * STEP2:
818  * Loop over the emulator digis and
819  * - do ... for all the emulator digis
820  * - find data digi and
821  * --- if found skip
822  * --- if not found - fill the missing Data plot
823  */
824  for (HcalTrigPrimDigiCollection::const_iterator it=cemul->begin();
825  it!=cemul->end(); ++it)
826  {
827  // Explicit check on the DetIds present in the Collection
828  HcalTrigTowerDetId tid = it->id();
829  uint32_t rawid = _ehashmap.lookup(tid);
830  if (rawid==0)
831  {meUnknownIds1LS->Fill(1); _unknownIdsPresent = true; continue;}
832  HcalElectronicsId const& eid(rawid);
833  if (tid.ietaAbs()>=29)
834  rawidHFValid = tid.rawId();
835  else
836  rawidHBHEValid = tid.rawId();
837 
838  // HF 2x3 TPs. Only do it for Online!!!
839  if (tid.version()==0 && tid.ietaAbs()>=29)
840  {
841  // only do this for online processing
842  if (_ptype==fOnline)
844  continue;
845  }
846  int soiEt = it->SOI_compressedEt();
847 
848  // FILL/INCREMENT w/o a CUT
849  tid.ietaAbs()>=29?numHF++:numHBHE++;
850  _cEtEmul_TTSubdet.fill(tid, soiEt);
851  _cEtEmul_depthlike.fill(tid, soiEt);
853  if (eid.isVMEid())
854  {
856  _cEtEmul_ElectronicsVME.fill(eid, soiEt);
857  }
858  else
859  {
861  _cEtEmul_ElectronicsuTCA.fill(eid, soiEt);
862  }
863 
864  // FILL w/ a CUT
865  if (soiEt>_cutEt)
866  {
867  tid.ietaAbs()>=29?numCutHF++:numCutHBHE++;
869  _cEtCutEmul_depthlike.fill(tid, soiEt);
870  if (eid.isVMEid())
872  else
874 
875  // ONLINE ONLY!
876  if (_ptype==fOnline)
877  {
879  _cEtCutEmulvsBX_TTSubdet.fill(tid, bx, soiEt);
880  _xEmulTotal.get(eid)++;
881  }
882  // ^^^ONLINE ONLY!
883  }
884 
885  // FIND a data digi
886  HcalTrigPrimDigiCollection::const_iterator jt=cdata->find(tid);
887  if (jt==cdata->end())
888  {
889  tid.ietaAbs()>=29?numMsnHF++:numMsnHBHE++;
890  _cEtCorr_TTSubdet.fill(tid, -2, soiEt);
891  if (eid.isVMEid())
893  else
895  if (soiEt>_cutEt)
896  {
897  tid.ietaAbs()>=29?numMsnCutHF++:numMsnCutHBHE++;
898  if (_ptype==fOnline)
899  _xDataMsn.get(eid)++;
900  }
901  }
902  }
903 
904  if (rawidHBHEValid!=0 && rawidHFValid!=0)
905  {
906  // ONLINE ONLY!
907  if (_ptype==fOnline)
908  {
910  numHBHE);
912  numHF);
914  bx,
915  numCutHBHE);
917  numCutHF);
918 
920  _currentLS, numHBHE);
922  _currentLS,numHF);
924  _currentLS, numCutHBHE);
926  _currentLS, numCutHF);
927 
929  _currentLS, numMsnHBHE);
931  _currentLS, numMsnHF);
933  _currentLS, numMsnCutHBHE);
935  _currentLS, numMsnCutHF);
936 
938  bx, numMsnHBHE);
940  bx, numMsnHF);
942  bx, numMsnCutHBHE);
944  bx, numMsnCutHF);
945  }
946  // ^^^ONLINE ONLY!
947  }
948 }
949 
951  edm::EventSetup const& es)
952 {
953  DQTask::beginLuminosityBlock(lb, es);
954 }
955 
957  edm::EventSetup const& es)
958 {
959  if (_ptype!=fOnline)
960  return;
961 
962  //
963  // GENERATE STATUS ONLY FOR ONLINE!
964  //
965  for (std::vector<uint32_t>::const_iterator it=_vhashFEDs.begin();
966  it!=_vhashFEDs.end(); ++it)
967  {
968  flag::Flag fSum("TP");
970 
971  std::vector<uint32_t>::const_iterator cit=std::find(
972  _vcdaqEids.begin(), _vcdaqEids.end(), *it);
973  if (cit==_vcdaqEids.end())
974  {
975  // not @cDAQ
976  for (uint32_t iflag=0; iflag<_vflags.size(); iflag++)
977  _cSummaryvsLS_FED.setBinContent(eid, _currentLS, int(iflag),
978  int(flag::fNCDAQ));
980  continue;
981  }
982 
984  {
985  // FED is @cDAQ
986  double etmsm = _xNumCorr.get(eid)>0?
987  double(_xEtMsm.get(eid))/double(_xNumCorr.get(eid)):0;
988  double fgmsm = _xNumCorr.get(eid)>0?
989  double(_xFGMsm.get(eid))/double(_xNumCorr.get(eid)):0;
990  /*
991  * UNUSED VARS
992  * double dmsm = _xDataTotal.get(eid)>0?
993  double(_xDataMsn.get(eid))/double(_xDataTotal.get(eid)):0;
994  double emsm = _xEmulTotal.get(eid)>0?
995  double(_xEmulMsn.get(eid))/double(_xEmulTotal.get(eid)):0;
996  */
997  if (etmsm>=_thresh_EtMsmRate_high)
998  _vflags[fEtMsm]._state = flag::fBAD;
999  else if (etmsm>=_thresh_EtMsmRate_low)
1000  _vflags[fEtMsm]._state = flag::fPROBLEMATIC;
1001  else
1002  _vflags[fEtMsm]._state = flag::fGOOD;
1003  if (fgmsm>=_thresh_FGMsmRate_high)
1004  _vflags[fFGMsm]._state = flag::fBAD;
1005  else if (fgmsm>=_thresh_FGMsmRate_low)
1006  _vflags[fFGMsm]._state = flag::fPROBLEMATIC;
1007  else
1008  _vflags[fFGMsm]._state = flag::fGOOD;
1009  /*
1010  * DISABLE THESE FLAGS FOR ONLINE FOR NOW!
1011  if (dmsm>=_thresh_DataMsn)
1012  _vflags[fDataMsn]._state = flag::fBAD;
1013  else
1014  _vflags[fDataMsn]._state = flag::fGOOD;
1015  if (emsm>=_thresh_EmulMsn)
1016  _vflags[fEmulMsn]._state = flag::fBAD;
1017  else
1018  _vflags[fEmulMsn]._state = flag::fGOOD;
1019  */
1020  }
1021 
1022  if (_unknownIdsPresent)
1023  _vflags[fUnknownIds]._state = flag::fBAD;
1024  else
1025  _vflags[fUnknownIds]._state = flag::fGOOD;
1026 
1027  int iflag=0;
1028  for (std::vector<flag::Flag>::iterator ft=_vflags.begin();
1029  ft!=_vflags.end(); ++ft)
1030  {
1031  _cSummaryvsLS_FED.setBinContent(eid, _currentLS, int(iflag),
1032  ft->_state);
1033  fSum+=(*ft);
1034  iflag++;
1035 
1036  // this is the MUST!
1037  // reset after using this flag
1038  ft->reset();
1039  }
1040  _cSummaryvsLS.setBinContent(eid, _currentLS, int(fSum._state));
1041  }
1042 
1043  // reset...
1046  _xEmulTotal.reset();
1047 
1048  // in the end always do the DQTask::endLumi
1049  DQTask::endLuminosityBlock(lb, es);
1050 }
1051 
1053 
hcaldqm::ContainerProf1D _cEtCorrRatiovsBX_TTSubdet
Definition: TPTask.h:103
hcaldqm::ContainerXXX< uint32_t > _xDataTotal
Definition: TPTask.h:172
T getUntrackedParameter(std::string const &, T const &) const
bool _skip1x1
Definition: TPTask.h:57
hcaldqm::ContainerProf1D _cMsnCutEmulvsBX_TTSubdet
Definition: TPTask.h:154
hcaldqm::Container2D _cMsnData_ElectronicsVME
Definition: TPTask.h:139
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *qy=new ValueQuantity(quantity::fN), int debug=0)
Definition: Container1D.cc:40
hcaldqm::Container1D _cEtEmul_TTSubdet
Definition: TPTask.h:78
hcaldqm::ContainerSingleProf2D _cEtData_depthlike
Definition: TPTask.h:93
edm::InputTag _tagData
Definition: TPTask.h:39
virtual void setBinContent(HcalDetId const &, int)
Definition: Container2D.cc:235
string fill
Definition: lumiContext.py:319
int const CRATE_VME_MIN
Definition: Constants.h:60
hcaldqm::ContainerProf1D _cMsnDatavsBX_TTSubdet
Definition: TPTask.h:144
double _thresh_FGMsmRate_high
Definition: TPTask.h:59
int ib
Definition: cuy.py:660
hcaldqm::ContainerSingle2D _cOccupancyCutEmul_depthlike
Definition: TPTask.h:120
hcaldqm::ContainerProf1D _cMsnDatavsLS_TTSubdet
Definition: TPTask.h:142
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:13
std::vector< uint32_t > _vhashFEDs
Definition: TPTask.h:65
uint32_t rawId() const
hcaldqm::ContainerProf1D _cEtMsmvsLS_TTSubdet
Definition: TPTask.h:133
hcaldqm::Container2D _cOccupancyData_ElectronicsVME
Definition: TPTask.h:106
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
hcaldqm::ContainerProf1D _cEtCutEmulvsLS_TTSubdet
Definition: TPTask.h:83
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
Definition: TPTask.h:69
edm::EDGetTokenT< HcalTrigPrimDigiCollection > _tokData
Definition: TPTask.h:41
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
UpdateFreq
Definition: DQTask.h:17
MonitorElement * meUnknownIds1LS
Definition: TPTask.h:167
State _state
Definition: Flag.h:79
std::vector< HcalTriggerPrimitiveDigi >::const_iterator const_iterator
hcaldqm::ContainerSingleProf2D _cEtCorrRatio_depthlike
Definition: TPTask.h:101
hcaldqm::ContainerProf1D _cMsnCutDatavsBX_TTSubdet
Definition: TPTask.h:145
int bunchCrossing() const
Definition: EventBase.h:65
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
int _cutEt
Definition: TPTask.h:58
int const SPIGOT_MIN
Definition: Constants.h:85
hcaldqm::ContainerProf1D _cMsnCutDatavsLS_TTSubdet
Definition: TPTask.h:143
virtual void reset()
Definition: ContainerXXX.h:366
hcaldqm::ContainerSingle2D _cOccupancyCutData_depthlike
Definition: TPTask.h:119
double _thresh_FGMsmRate_low
Definition: TPTask.h:59
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
int const FIBER_VME_MIN
Definition: Constants.h:90
hcaldqm::ContainerProf1D _cOccupancyDatavsLS_TTSubdet
Definition: TPTask.h:161
hcaldqm::Container2D _cOccupancyEmul_ElectronicsVME
Definition: TPTask.h:108
hcaldqm::ContainerProf1D _cEtMsmRatiovsLS_TTSubdet
Definition: TPTask.h:134
void bookHistograms(fwlite::EventContainer &eventCont)
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: TPTask.cc:956
hcaldqm::ContainerSingle2D _cOccupancyEmul2x3_depthlike
Definition: TPTask.h:124
hcaldqm::ContainerProf1D _cMsnEmulvsBX_TTSubdet
Definition: TPTask.h:153
int const FIBERCH_MIN
Definition: Constants.h:100
virtual void initialize(std::string const &folder, Quantity *, Quantity *, Quantity *qz=new ValueQuantity(quantity::fN), int debug=0)
void Fill(long long x)
double _thresh_EtMsmRate_low
Definition: TPTask.h:59
virtual void book(DQMStore::IBooker &, std::string subsystem="Hcal", std::string aux="")
hcaldqm::ContainerProf2D _cEtCorrRatio_ElectronicsuTCA
Definition: TPTask.h:100
std::vector< int > getFEDVMEList(HcalElectronicsMap const *)
Definition: Utilities.cc:78
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: TPTask.cc:950
hcaldqm::Container2D _cFGCorr_TTSubdet[hcaldqm::constants::NUM_FGBITS]
Definition: TPTask.h:81
hcaldqm::ContainerXXX< uint32_t > _xDataMsn
Definition: TPTask.h:172
virtual void fill(HcalDetId const &)
Definition: Container2D.cc:59
hcaldqm::filter::HashFilter _filter_uTCA
Definition: TPTask.h:73
double _thresh_EmulMsn
Definition: TPTask.h:59
hcaldqm::Container2D _cSummaryvsLS_FED
Definition: TPTask.h:170
ProcessingType _ptype
Definition: DQModule.h:59
virtual void fill(uint32_t)
Definition: Container1D.cc:82
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, int debug=0)
hcaldqm::Container2D _cOccupancyCutData_ElectronicsVME
Definition: TPTask.h:111
std::vector< hcaldqm::flag::Flag > _vflags
Definition: TPTask.h:45
void reset()
Definition: Flag.h:76
virtual void setBinContent(int, int, int)
hcaldqm::ContainerXXX< uint32_t > _xEmulMsn
Definition: TPTask.h:172
void dqmthrow(std::string const &msg) const
Definition: Logger.h:15
hcaldqm::ContainerProf2D _cEtData_ElectronicsVME
Definition: TPTask.h:87
hcaldqm::ContainerProf1D _cEtMsmvsBX_TTSubdet
Definition: TPTask.h:135
HcalElectronicsMap const * _emap
Definition: TPTask.h:68
int const FED_VME_MIN
Definition: Constants.h:47
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, Quantity *qz=new ValueQuantity(quantity::fEnergy), int debug=0)
TPTask(edm::ParameterSet const &)
Definition: TPTask.cc:6
hcaldqm::ContainerProf1D _cOccupancyDatavsBX_TTSubdet
Definition: TPTask.h:157
hcaldqm::ContainerProf2D _cEtEmul_ElectronicsuTCA
Definition: TPTask.h:90
hcaldqm::ContainerProf1D _cEtCorrRatiovsLS_TTSubdet
Definition: TPTask.h:102
hcaldqm::ContainerSingle2D _cOccupancyData2x3_depthlike
Definition: TPTask.h:123
hcaldqm::ContainerSingle2D _cFGMsm_depthlike
Definition: TPTask.h:132
hcaldqm::ContainerProf2D _cEtEmul_ElectronicsVME
Definition: TPTask.h:89
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
hcaldqm::filter::HashFilter _filter_depth0
Definition: TPTask.h:74
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, Quantity *qz=new ValueQuantity(quantity::fN), int debug=0)
Definition: Container2D.cc:32
int const FIBER_uTCA_MIN1
Definition: Constants.h:93
hcaldqm::ContainerProf2D _cEtCorrRatio_ElectronicsVME
Definition: TPTask.h:99
hcaldqm::ContainerXXX< uint32_t > _xEtMsm
Definition: TPTask.h:172
hcaldqm::Container2D _cEtMsm_ElectronicsuTCA
Definition: TPTask.h:128
hcaldqm::Container2D _cOccupancyCutEmul_ElectronicsuTCA
Definition: TPTask.h:114
Logger _logger
Definition: DQModule.h:70
T min(T a, T b)
Definition: MathUtil.h:58
double _thresh_EtMsmRate_high
Definition: TPTask.h:59
std::string _name
Definition: DQModule.h:57
hcaldqm::ContainerProf1D _cOccupancyCutDatavsLS_TTSubdet
Definition: TPTask.h:163
hcaldqm::Container2D _cOccupancyCutData_ElectronicsuTCA
Definition: TPTask.h:112
hcaldqm::ContainerSingle2D _cSummaryvsLS
Definition: TPTask.h:171
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
int const CRATE_uTCA_MIN
Definition: Constants.h:65
hcaldqm::ContainerSingle2D _cOccupancyData_depthlike
Definition: TPTask.h:117
hcaldqm::Container2D _cOccupancyCutEmul_ElectronicsVME
Definition: TPTask.h:113
hcaldqm::ContainerSingle2D _cEtMsm_depthlike
Definition: TPTask.h:131
hcaldqm::ContainerProf1D _cEtCutDatavsLS_TTSubdet
Definition: TPTask.h:82
hcaldqm::Container2D _cMsnData_ElectronicsuTCA
Definition: TPTask.h:140
hcaldqm::Container2D _cFGMsm_ElectronicsVME
Definition: TPTask.h:129
hcaldqm::Container2D _cMsnEmul_ElectronicsuTCA
Definition: TPTask.h:149
hcaldqm::ContainerProf1D _cOccupancyEmulvsBX_TTSubdet
Definition: TPTask.h:158
bool isVMEid() const
hcaldqm::ContainerXXX< uint32_t > _xEmulTotal
Definition: TPTask.h:172
double _thresh_DataMsn
Definition: TPTask.h:59
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
bool isFEDHBHE(HcalElectronicsId const &)
Definition: Utilities.cc:131
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
Definition: Container2D.cc:895
virtual void book(HcalElectronicsMap const *)
Definition: ContainerXXX.h:99
hcaldqm::Container2D _cFGMsm_ElectronicsuTCA
Definition: TPTask.h:130
virtual void initialize(std::string const &folder, Quantity *, Quantity *, Quantity *qz=new ValueQuantity(quantity::fN), int debug=0)
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
Definition: Container1D.cc:957
hcaldqm::ContainerProf1D _cEtCutDatavsBX_TTSubdet
Definition: TPTask.h:84
int version() const
get the version code for the trigger tower
const T & get() const
Definition: EventSetup.h:56
std::vector< bool > _vFGBitsReady
Definition: TPTask.h:62
hcaldqm::ContainerProf1D _cOccupancyCutEmulvsBX_TTSubdet
Definition: TPTask.h:160
hcaldqm::ContainerXXX< uint32_t > _xFGMsm
Definition: TPTask.h:172
hcaldqm::Container2D _cOccupancyEmul_ElectronicsuTCA
Definition: TPTask.h:109
std::string const & label() const
Definition: InputTag.h:36
hcaldqm::ContainerProf1D _cOccupancyCutDatavsBX_TTSubdet
Definition: TPTask.h:159
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
hcaldqm::ContainerSingle2D _cOccupancyEmul_depthlike
Definition: TPTask.h:118
hcaldqm::Container2D _cOccupancyData_ElectronicsuTCA
Definition: TPTask.h:107
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:249
int const NUM_FGBITS
Definition: Constants.h:178
edm::EDGetTokenT< HcalTrigPrimDigiCollection > _tokEmul
Definition: TPTask.h:42
hcaldqm::ContainerProf1D _cEtCutEmulvsBX_TTSubdet
Definition: TPTask.h:85
std::vector< int > getFEDList(HcalElectronicsMap const *)
Definition: Utilities.cc:54
hcaldqm::Container2D _cEtMsm_ElectronicsVME
Definition: TPTask.h:127
hcaldqm::Container2D _cEtCorr2x3_TTSubdet
Definition: TPTask.h:80
std::vector< int > getFEDuTCAList(HcalElectronicsMap const *)
Definition: Utilities.cc:104
Definition: TPTask.h:22
hcaldqm::Container2D _cEtCorr_TTSubdet
Definition: TPTask.h:79
std::string _subsystem
Definition: DQModule.h:64
hcaldqm::ContainerSingleProf2D _cEtEmul_depthlike
Definition: TPTask.h:94
hcaldqm::ContainerXXX< uint32_t > _xNumCorr
Definition: TPTask.h:172
bool _unknownIdsPresent
Definition: TPTask.h:168
hcaldqm::filter::HashFilter _filter_VME
Definition: TPTask.h:72
std::vector< uint32_t > _vcdaqEids
Definition: DQTask.h:65
hcaldqm::ContainerProf1D _cOccupancyEmulvsLS_TTSubdet
Definition: TPTask.h:162
hcaldqm::ContainerProf1D _cOccupancyCutEmulvsLS_TTSubdet
Definition: TPTask.h:164
virtual void fill(int, int)
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:91
virtual void initialize(FilterType ftype, HashType htype, std::vector< uint32_t > const &)
Definition: HashFilter.cc:26
void setLumiFlag(void)
this ME is meant to be stored for each luminosity section
hcaldqm::ContainerProf1D _cEtMsmRatiovsBX_TTSubdet
Definition: TPTask.h:136
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
edm::InputTag _tagEmul
Definition: TPTask.h:40
hcaldqm::ContainerSingleProf2D _cEtCutEmul_depthlike
Definition: TPTask.h:96
hcaldqm::ContainerProf2D _cEtData_ElectronicsuTCA
Definition: TPTask.h:88
hcaldqm::ContainerProf1D _cMsnEmulvsLS_TTSubdet
Definition: TPTask.h:151
Readout chain identification for Hcal.
std::string const & instance() const
Definition: InputTag.h:37
hcaldqm::ContainerSingle2D _cMsnData_depthlike
Definition: TPTask.h:141
bool isFEDHF(HcalElectronicsId const &)
Definition: Utilities.cc:153
int ietaAbs() const
get the absolute value of the tower ieta
virtual void _process(edm::Event const &, edm::EventSetup const &)
Definition: TPTask.cc:550
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
Definition: TPTask.cc:42
int const SLOT_uTCA_MIN
Definition: Constants.h:72
hcaldqm::ContainerSingleProf2D _cEtCutData_depthlike
Definition: TPTask.h:95
Definition: Run.h:43
virtual void _resetMonitors(hcaldqm::UpdateFreq)
Definition: TPTask.cc:537
hcaldqm::Container1D _cEtData_TTSubdet
Definition: TPTask.h:77
hcaldqm::ContainerSingle2D _cMsnEmul_depthlike
Definition: TPTask.h:150
hcaldqm::ContainerProf1D _cMsnCutEmulvsLS_TTSubdet
Definition: TPTask.h:152
hcaldqm::Container2D _cMsnEmul_ElectronicsVME
Definition: TPTask.h:148