CMS 3D CMS Logo

RecHitTask.cc
Go to the documentation of this file.
2 #include <math.h>
3 
4 using namespace hcaldqm;
5 using namespace hcaldqm::constants;
6 using namespace hcaldqm::filter;
7 
9  DQTask(ps)
10 {
12  edm::InputTag("hbhereco"));
14  edm::InputTag("horeco"));
16  edm::InputTag("hfreco"));
18  edm::InputTag(""));
19  _hfPreRecHitsAvailable = ps.getUntrackedParameter<bool>("hfPreRecHitsAvailable", false);
20 
21  _tokHBHE = consumes<HBHERecHitCollection>(_tagHBHE);
22  _tokHO = consumes<HORecHitCollection>(_tagHO);
23  _tokHF = consumes<HFRecHitCollection>(_tagHF);
24  _tokPreHF = consumes<HFPreRecHitCollection>(_tagPreHF);
25 
26  _cutE_HBHE = ps.getUntrackedParameter<double>("cutE_HBHE", 5);
27  _cutE_HO = ps.getUntrackedParameter<double>("cutE_HO", 5);
28  _cutE_HF = ps.getUntrackedParameter<double>("cutE_HF", 5);
29  _thresh_unihf = ps.getUntrackedParameter<double>("thresh_unihf", 0.2);
30 
31  // order must be the same as in RecoFlag enum
32  _vflags.resize(nRecoFlag);
33  _vflags[fUni]=flag::Flag("UniSlotHF");
34  _vflags[fTCDS]=flag::Flag("TCDS");
35  _vflags[fUnknownIds] = flag::Flag("UnknownIds");
36 }
37 
39  edm::Run const& r, edm::EventSetup const& es)
40 {
41  DQTask::bookHistograms(ib,r,es);
42 
43  // GET WHAT YOU NEED
45  es.get<HcalDbRecord>().get(dbs);
46  _emap = dbs->getHcalMapping();
47 
48  std::vector<uint32_t> vVME;
49  std::vector<uint32_t> vuTCA;
53  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
55  vVME);
57  vuTCA);
58  std::vector<uint32_t> vhashHF;
61 
62  // INITIALIZE FIRST
63  // Energy
71 
72  // Timing
77  _cTimingvsEnergy_SubdetPM.initialize(_name, "TimingvsEnergy",
82 
87  _cTimingCut_depth.initialize(_name, "TimingCut",
92  _cTimingCutvsLS_SubdetPM.initialize(_name, "TimingCutvsLS",
96 
97  // Occupancy
98  _cOccupancy_depth.initialize(_name, "Occupancy",
103 
104  _cOccupancyvsLS_Subdet.initialize(_name, "OccupancyvsLS",
108 
109  _cOccupancyCut_depth.initialize(_name, "OccupancyCut",
114 
116  _cDAAsymmetryVsCharge_SubdetPM.initialize(_name, "ChargeVsAsymmetry",
130  }
131 
132  // INITIALIZE HISTOGRAMS to be used only in Online
133  if (_ptype==fOnline)
134  {
135  _cEnergyvsieta_Subdet.initialize(_name, "Energyvsieta",
139  _cEnergyvsiphi_SubdetPM.initialize(_name, "Energyvsiphi",
143  _cEnergyvsLS_SubdetPM.initialize(_name, "EnergyvsLS",
147  _cEnergyvsBX_SubdetPM.initialize(_name, "EnergyvsBX",
151  _cTimingCutvsieta_Subdet.initialize(_name, "TimingCutvsieta",
155  _cTimingCutvsiphi_SubdetPM.initialize(_name, "TimingCutvsiphi",
159  _cTimingCutvsBX_SubdetPM.initialize(_name, "TimingCutvsBX",
163  _cOccupancyvsiphi_SubdetPM.initialize(_name, "Occupancyvsiphi",
167  _cOccupancyvsieta_Subdet.initialize(_name, "Occupancyvsieta",
171  _cOccupancyCutvsiphi_SubdetPM.initialize(_name, "OccupancyCutvsiphi",
175  _cOccupancyCutvsieta_Subdet.initialize(_name, "OccupancyCutvsieta",
179  _cOccupancyCutvsBX_Subdet.initialize(_name, "OccupancyCutvsBX",
184  "OccupancyCutvsiphivsLS", hcaldqm::hashfunctions::fSubdetPM,
188  _cOccupancyCutvsLS_Subdet.initialize(_name, "OccupancyCutvsLS",
192  }
193 
194  // FED-based plots
195  if (_ptype != fOffline) { // hidefed2crate
196  std::vector<int> vFEDs = hcaldqm::utilities::getFEDList(_emap);
197  std::vector<int> vFEDsVME = hcaldqm::utilities::getFEDVMEList(_emap);
198  std::vector<int> vFEDsuTCA = hcaldqm::utilities::getFEDuTCAList(_emap);
199 
200  // push the rawIds of each fed into the vector
201  for (std::vector<int>::const_iterator it=vFEDsVME.begin();
202  it!=vFEDsVME.end(); ++it)
203  _vhashFEDs.push_back(HcalElectronicsId(
204  FIBERCH_MIN, FIBER_VME_MIN, SPIGOT_MIN, (*it)-FED_VME_MIN).rawId());
205  for (std::vector<int>::const_iterator it=vFEDsuTCA.begin();
206  it!=vFEDsuTCA.end(); ++it)
207  {
208  std::pair<uint16_t, uint16_t> cspair = utilities::fed2crate(*it);
209  _vhashFEDs.push_back(HcalElectronicsId(
210  cspair.first, cspair.second, FIBER_uTCA_MIN1,
211  FIBERCH_MIN, false).rawId());
212  }
213 
214  _cTimingCut_FEDVME.initialize(_name, "TimingCut",
219  _cTimingCut_FEDuTCA.initialize(_name, "TimingCut",
224  _cTimingCutvsLS_FED.initialize(_name, "TimingCutvsLS",
230  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
235  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
238 
239  _cOccupancy_FEDVME.initialize(_name, "Occupancy",
244  _cOccupancy_FEDuTCA.initialize(_name, "Occupancy",
251  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
256  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
259 
260  _cOccupancyCut_FEDVME.initialize(_name, "OccupancyCut",
265  _cOccupancyCut_FEDuTCA.initialize(_name, "OccupancyCut",
272  new hcaldqm::quantity::FEDQuantity(vFEDsVME),
277  new hcaldqm::quantity::FEDQuantity(vFEDsuTCA),
280  if (_ptype == fOnline) {
281  _cSummaryvsLS_FED.initialize(_name, "SummaryvsLS",
286  _cSummaryvsLS.initialize(_name, "SummaryvsLS",
290 
293  }
294  }
295 
296  // BOOK HISTOGRAMS
297  char cutstr[200];
298  sprintf(cutstr, "_EHBHE%dHO%dHF%d", int(_cutE_HBHE),
299  int(_cutE_HO), int(_cutE_HF));
300  char cutstr2[200];
301  sprintf(cutstr2, "_EHF%d", int(_cutE_HF));
302 
303  // Energy
306 
307  // Timing
310  if (_ptype != fOffline) { // hidefed2crate
315  }
319  if (_ptype != fOffline) { // hidefed2crate
321  }
322 
323  // Occupancy
325  if (_ptype != fOffline) { // hidefed2crate
330  }
333  if (_ptype != fOffline) { // hidefed2crate
338  }
339 
344  }
345 
346  // BOOK HISTOGRAMS to be used only in Online
347  if (_ptype==fOnline)
348  {
365 
366  std::vector<uint32_t> vhashFEDHF;
367  vhashFEDHF.push_back(HcalElectronicsId(22, SLOT_uTCA_MIN,
368  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
369  vhashFEDHF.push_back(HcalElectronicsId(29, SLOT_uTCA_MIN,
370  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
371  vhashFEDHF.push_back(HcalElectronicsId(32, SLOT_uTCA_MIN,
372  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
373  vhashFEDHF.push_back(HcalElectronicsId(22, SLOT_uTCA_MIN+6,
374  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
375  vhashFEDHF.push_back(HcalElectronicsId(29, SLOT_uTCA_MIN+6,
376  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
377  vhashFEDHF.push_back(HcalElectronicsId(32, SLOT_uTCA_MIN+6,
378  FIBER_uTCA_MIN1, FIBERCH_MIN, false).rawId());
379  HashFilter filter_FEDHF;
381  vhashFEDHF);
382 
384  if (_ptype != fOffline) { // hidefed2crate
385  _xUniHF.book(_emap, filter_FEDHF);
386  _xUni.book(_emap);
387  }
388  }
389 
390  // initialize hash map
392 
393  // book some mes...
395  meUnknownIds1LS = ib.book1D("UnknownIds", "UnknownIds",
396  1, 0, 1);
397  _unknownIdsPresent = false;
399 }
400 
402 {
403  switch(uf)
404  {
405  case hcaldqm::f1LS:
406  _unknownIdsPresent = false;
407  break;
408  default:
409  break;
410  }
411 
412  DQTask::_resetMonitors(uf);
413 }
414 
415 /* virtual */ void RecHitTask::_process(edm::Event const& e,
416  edm::EventSetup const&)
417 {
421 
422  if (!(e.getByToken(_tokHBHE, chbhe)))
423  _logger.dqmthrow("Collection HBHERecHitCollection not available "
424  + _tagHBHE.label() + " " + _tagHBHE.instance());
425  if (!(e.getByToken(_tokHO, cho)))
426  _logger.dqmthrow("Collection HORecHitCollection not available "
427  + _tagHO.label() + " " + _tagHO.instance());
428  if (!(e.getByToken(_tokHF, chf)))
429  _logger.dqmthrow("Collection HFRecHitCollection not available "
430  + _tagHF.label() + " " + _tagHF.instance());
431 
434  if (!(e.getByToken(_tokPreHF, cprehf)))
435  _logger.dqmthrow("Collection HFPreRecHitCollection not available "
436  + _tagPreHF.label() + " " + _tagPreHF.instance());
437  }
438 
439  // extract some info per event
440  int bx = e.bunchCrossing();
441 
442  // To fill histograms outside of the loop, you need to determine if there were
443  // any valid det ids first
444  uint32_t rawidValid = 0;
445  uint32_t rawidHBValid = 0;
446  uint32_t rawidHEValid = 0;
447 
448  double ehbm = 0; double ehbp = 0;
449  double ehem = 0; double ehep = 0;
450  int nChsHB = 0; int nChsHE = 0;
451  int nChsHBCut = 0; int nChsHECut = 0;
453  it!=chbhe->end(); ++it)
454  {
455  double energy = it->energy();
456  double timing = it->time();
457 
458  // Explicit check on the DetIds present in the Collection
459  HcalDetId did = it->id();
460  uint32_t rawid = _ehashmap.lookup(did);
461  /*
462  * Needs to be removed as DetIds that belong to the HEP17 after combination
463  * are not present in the emap
464  * Removed until further notice!
465  *
466  */
467  //if (rawid==0)
468  //{meUnknownIds1LS->Fill(1); _unknownIdsPresent=true;continue;}
469 
470  HcalElectronicsId const& eid(rawid);
471  rawidValid = did.rawId();
472  if (did.subdet()==HcalBarrel)
473  rawidHBValid = did.rawId();
474  else if (did.subdet()==HcalEndcap)
475  rawidHEValid = did.rawId();
476 
477  _cEnergy_Subdet.fill(did, energy);
478  _cTimingvsEnergy_SubdetPM.fill(did, energy, timing);
479  _cOccupancy_depth.fill(did);
480  did.subdet()==HcalBarrel?did.ieta()>0?ehbp+=energy:ehbm+=energy:
481  did.ieta()>0?ehep+=energy:ehem+=energy;
482 
483  // ONLINE ONLY!
484  if (_ptype==fOnline)
485  {
488  }
489  // ^^^ONLINE ONLY!
490  //
491  if (_ptype != fOffline) { // hidefed2crate
492  // Also, for these electronics plots, require that the channel was found in the emap.
493  if (rawid != 0) {
494  if (eid.isVMEid())
495  {
498  } else if (eid.isUTCAid()) {
501  }
502  }
503  }
504 
505  if (energy>_cutE_HBHE)
506  {
507  // ONLINE ONLY!
508  if (_ptype==fOnline)
509  {
510  _cEnergyvsLS_SubdetPM.fill(did, _currentLS, energy);
511  _cEnergyvsBX_SubdetPM.fill(did, bx, energy);
512  _cEnergyvsieta_Subdet.fill(did, energy);
513  _cEnergyvsiphi_SubdetPM.fill(did, energy);
514  _cTimingCutvsieta_Subdet.fill(did, timing);
515  _cTimingCutvsiphi_SubdetPM.fill(did, timing);
516  _cTimingCutvsBX_SubdetPM.fill(did, bx, timing);
520  }
521  // ^^^ONLINE ONLY!
522  _cEnergy_depth.fill(did, energy);
523  _cTimingCut_SubdetPM.fill(did, timing);
524  _cTimingCut_HBHEPartition.fill(did, timing);
526 
527  // ONLINE
528  if (_ptype==fOnline) {
529  if (rawid != 0) {
530  _cTimingCutvsLS_FED.fill(eid, _currentLS, timing);
531  }
532  _cTimingCut_depth.fill(did, timing);
533  // ^^^ONLINE
534  } else {
535  if (_ptype != fOffline) { // hidefed2crate
536  if (rawid != 0) {
537  _cTimingCutvsLS_FED.fill(eid, _currentLS, timing);
538  }
539  }
540  _cTimingCut_depth.fill(did, timing);
541  }
543  if (_ptype != fOffline) { // hidefed2crate
544  if (rawid != 0) {
545  if (eid.isVMEid()){
546  // ONLINE
547  if (_ptype==fOnline)
548  {
549  _cTimingCut_FEDVME.fill(eid, timing);
550  _cTimingCut_ElectronicsVME.fill(eid, timing);
551  } // ^^^ ONLINE
552  else
553  {
554  _cTimingCut_FEDVME.fill(eid, timing);
555  _cTimingCut_ElectronicsVME.fill(eid, timing);
556  }
557  // ^^^ONLINE
558 
561  } else if (eid.isUTCAid()) {
562  if (_ptype==fOnline)
563  {
564  // time constraints are explicit!
565  _cTimingCut_FEDuTCA.fill(eid, timing);
566  _cTimingCut_ElectronicsuTCA.fill(eid, timing);
567  }
568  else
569  {
570  _cTimingCut_FEDuTCA.fill(eid, timing);
571  _cTimingCut_ElectronicsuTCA.fill(eid, timing);
572  }
575  }
576  }
577  }
578  did.subdet()==HcalBarrel?nChsHBCut++:nChsHECut++;
579  }
580  did.subdet()==HcalBarrel?nChsHB++:nChsHE++;
581  }
582 
583  if (rawidHBValid!=0 && rawidHEValid!=0)
584  {
586  nChsHB);
588  nChsHE);
589 
590  // ONLINE ONLY!
591  if (_ptype==fOnline)
592  {
594  bx, nChsHBCut);
596  bx, nChsHECut);
598  _currentLS, nChsHBCut);
600  _currentLS, nChsHECut);
601  }
602  // ^^^ONLINE ONLY!
603  }
604 
605  // reset
606  rawidValid = 0;
607 
608  int nChsHO = 0; int nChsHOCut = 0;
609  double ehop = 0; double ehom = 0;
611  it!=cho->end(); ++it)
612  {
613  double energy = it->energy();
614  double timing = it->time();
615 
616  // Explicit check on the DetIds present in the Collection
617  HcalDetId did = it->id();
618  uint32_t rawid = _ehashmap.lookup(did);
619  if (rawid==0)
620  {meUnknownIds1LS->Fill(1); _unknownIdsPresent=true;continue;}
621  HcalElectronicsId const& eid(rawid);
622  if (did.subdet()==HcalOuter)
623  rawidValid = did.rawId();
624 
625  _cEnergy_Subdet.fill(did, energy);
626  _cTimingvsEnergy_SubdetPM.fill(did, energy, timing);
627  _cOccupancy_depth.fill(did);
628  did.ieta()>0?ehop+=energy:ehom+=energy;
629 
630  // IMPORTANT: ONLINE ONLY!
631  if (_ptype==fOnline)
632  {
635  }
636  // ONLINE ONLY!
637 
638  if (_ptype != fOffline) { // hidefed2crate
639  if (eid.isVMEid())
640  {
643  }
644  else
645  {
648  }
649  }
650 
651  if (energy>_cutE_HO)
652  {
653  // ONLINE ONLY!
654  if (_ptype==fOnline)
655  {
656  _cEnergyvsLS_SubdetPM.fill(did, _currentLS, energy);
657  _cEnergyvsBX_SubdetPM.fill(did, bx, energy);
658  _cEnergyvsieta_Subdet.fill(did, energy);
659  _cEnergyvsiphi_SubdetPM.fill(did, energy);
660  _cTimingCutvsieta_Subdet.fill(did, timing);
661  _cTimingCutvsiphi_SubdetPM.fill(did, timing);
662  _cTimingCutvsBX_SubdetPM.fill(did, bx, timing);
666  }
667  // ^^^ONLINE ONLY!
668 
669  _cEnergy_depth.fill(did, energy);
670  _cTimingCut_SubdetPM.fill(did, timing);
672  if (_ptype != fOffline) { // hidefed2crate
673  _cTimingCutvsLS_FED.fill(eid, _currentLS, timing);
674  }
676  _cTimingCut_depth.fill(did, timing);
677  if (_ptype != fOffline) { // hidefed2crate
678  if (eid.isVMEid())
679  {
680  _cTimingCut_FEDVME.fill(eid, timing);
681  _cTimingCut_ElectronicsVME.fill(eid, timing);
684  }
685  else
686  {
687  _cTimingCut_FEDuTCA.fill(eid, timing);
688  _cTimingCut_ElectronicsuTCA.fill(eid, timing);
691  }
692  }
693  nChsHOCut++;
694  }
695  nChsHO++;
696  }
697 
698  if (rawidValid!=0)
699  {
701  nChsHO);
702  // ONLINE ONLY!
703  if (_ptype==fOnline)
704  {
706  bx, nChsHOCut);
708  _currentLS, nChsHOCut);
709  }
710  // ^^^ONLINE ONLY!
711  }
712 
713  //reset
714  rawidValid = 0;
715 
716  int nChsHF = 0; int nChsHFCut = 0;
717  double ehfp = 0; double ehfm = 0;
719  it!=chf->end(); ++it)
720  {
721  double energy = it->energy();
722  double timing = it->time();
723 
724  // Explicit check on the DetIds present in the Collection
725  HcalDetId did = it->id();
726  uint32_t rawid = _ehashmap.lookup(did);
727  if (rawid==0)
728  {meUnknownIds1LS->Fill(1); _unknownIdsPresent=true;continue;}
729  HcalElectronicsId const& eid(rawid);
730  if (did.subdet()==HcalForward)
731  rawidValid = did.rawId();
732 
733  _cEnergy_Subdet.fill(did, energy);
734  _cTimingvsEnergy_SubdetPM.fill(did, energy, timing);
735  _cOccupancy_depth.fill(did);
736  did.ieta()>0?ehfp+=energy:ehfm+=energy;
737 
738  // IMPORTANT:
739  // only for Online Processing
740  //
741  if (_ptype==fOnline)
742  {
745  }
746  // ONLINE ONLY!
747 
748  if (_ptype != fOffline) { // hidefed2crate
749  if (eid.isVMEid())
750  {
753  }
754  else
755  {
758  }
759  }
760 
761  if (energy>_cutE_HF)
762  {
763  // ONLINE ONLY!
764  if (_ptype==fOnline)
765  {
766  _cEnergyvsLS_SubdetPM.fill(did, _currentLS, energy);
767  _cEnergyvsBX_SubdetPM.fill(did, bx, energy);
768  _cEnergyvsieta_Subdet.fill(did, energy);
769  _cEnergyvsiphi_SubdetPM.fill(did, energy);
770  _cTimingCutvsieta_Subdet.fill(did, timing);
771  _cTimingCutvsiphi_SubdetPM.fill(did, timing);
772  _cTimingCutvsBX_SubdetPM.fill(did, bx, timing);
776  if (_ptype != fOffline) { // hidefed2crate
777  _xUniHF.get(eid)++;
778  }
779  }
780  // ^^^ONLINE ONLY!
781  _cEnergy_depth.fill(did, energy);
782  _cTimingCut_SubdetPM.fill(did, timing);
784  if (_ptype != fOffline) { // hidefed2crate
785  _cTimingCutvsLS_FED.fill(eid, _currentLS, timing);
786  }
788  _cTimingCut_depth.fill(did, timing);
789  if (_ptype != fOffline) { // hidefed2crate
790  if (eid.isVMEid())
791  {
792  _cTimingCut_FEDVME.fill(eid, timing);
793  _cTimingCut_ElectronicsVME.fill(eid, timing);
796  }
797  else
798  {
799  _cTimingCut_FEDuTCA.fill(eid, timing);
800  _cTimingCut_ElectronicsuTCA.fill(eid, timing);
803  }
804  }
805  nChsHFCut++;
806  }
807  nChsHF++;
808  }
809 
810  if (rawidValid!=0)
811  {
813  nChsHF);
814  // ONLINE ONLY!
815  if (_ptype==fOnline)
816  {
818  bx, nChsHFCut);
820  _currentLS, nChsHFCut);
821  }
822  // ^^^ONLINE ONLY!
823  }
824 
825  // Loop over HFPreRecHits to get charge and charge asymmetry
828  it!=cprehf->end(); ++it)
829  {
830  HcalDetId did = it->id();
831  if (_filter_HF.filter(did)) {
832  continue;
833  }
834  std::pair<float, bool> chargeAsymmetry = it->chargeAsymmetry(0.);
835  std::pair<float, bool> chargeAsymmetryCut = it->chargeAsymmetry(20.);
836 
837  if (chargeAsymmetry.second) {
838  _cDAAsymmetryVsCharge_SubdetPM.fill(did, chargeAsymmetry.first, it->charge());
839  }
840  if (chargeAsymmetryCut.second) {
841  _cDAAsymmetryMean_cut_depth.fill(did, chargeAsymmetryCut.first);
842  _cDAAsymmetry_cut_SubdetPM.fill(did, chargeAsymmetryCut.first);
843  }
844  }
845  }
846 }
847 
849  lb, edm::EventSetup const& es)
850 {
851  DQTask::beginLuminosityBlock(lb, es);
852 }
853 
855  lb, edm::EventSetup const& es)
856 {
857  if (_ptype!=fOnline)
858  return;
859 
860  //
861  // GENERATE STATUS ONLY FOR ONLINE
862  //
863 // for (std::vector<HcalGenericDetId>::const_iterator it=gids.begin();
864 // it!=gids.end(); ++it)
865 // {}
866 
867  for (uintCompactMap::const_iterator it=_xUniHF.begin();
868  it!=_xUniHF.end(); ++it)
869  {
870  uint32_t hash1 = it->first;
871  HcalElectronicsId eid1(hash1);
872  double x1 = it->second;
873 
874  for (uintCompactMap::const_iterator jt=_xUniHF.begin();
875  jt!=_xUniHF.end(); ++jt)
876  {
877  if (jt==it)
878  continue;
879  double x2 = jt->second;
880  if (x2==0)
881  continue;
882  if (x1/x2<_thresh_unihf)
883  _xUni.get(eid1)++;
884  }
885  }
886 
887  if (_ptype != fOffline) { // hidefed2crate
888  for (std::vector<uint32_t>::const_iterator it=_vhashFEDs.begin();
889  it!=_vhashFEDs.end(); ++it)
890  {
891  flag::Flag fSum("RECO");
893 
894  std::vector<uint32_t>::const_iterator cit=std::find(
895  _vcdaqEids.begin(), _vcdaqEids.end(), *it);
896  if (cit==_vcdaqEids.end())
897  {
898  // not @cDAQ
899  for (uint32_t iflag=0; iflag<_vflags.size(); iflag++)
900  _cSummaryvsLS_FED.setBinContent(eid, _currentLS, int(iflag),
901  int(flag::fNCDAQ));
903  continue;
904  }
905 
906  // FED is @cDAQ
907  if (hcaldqm::utilities::isFEDHF(eid) && (_runkeyVal==0 || _runkeyVal==4))
908  {
909  if (_xUni.get(eid)>0)
910  _vflags[fUni]._state = flag::fPROBLEMATIC;
911  else
912  _vflags[fUni]._state = flag::fGOOD;
913  }
914 
915  if (_unknownIdsPresent)
916  _vflags[fUnknownIds]._state = flag::fBAD;
917  else
918  _vflags[fUnknownIds]._state = flag::fGOOD;
919 
920  int iflag=0;
921  for (std::vector<flag::Flag>::iterator ft=_vflags.begin();
922  ft!=_vflags.end(); ++ft)
923  {
924  _cSummaryvsLS_FED.setBinContent(eid, _currentLS, int(iflag),
925  int(ft->_state));
926  fSum+=(*ft);
927  iflag++;
928 
929  // reset after using
930  ft->reset();
931  }
933  }
934  _xUniHF.reset(); _xUni.reset();
935  }
936 
937  // in the end always do the DQTask::endLumi
938  DQTask::endLuminosityBlock(lb, es);
939 }
940 
942 
hcaldqm::ContainerXXX< uint32_t > _xUniHF
Definition: RecHitTask.h:125
T getUntrackedParameter(std::string const &, T const &) const
hcaldqm::Container2D _cOccupancyCut_depth
Definition: RecHitTask.h:120
hcaldqm::Container2D _cSummaryvsLS_FED
Definition: RecHitTask.h:137
std::vector< uint32_t > _vhashFEDs
Definition: RecHitTask.h:57
hcaldqm::ContainerProf1D _cOccupancyvsLS_Subdet
Definition: RecHitTask.h:110
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *qy=new ValueQuantity(quantity::fN), int debug=0)
Definition: Container1D.cc:40
edm::EDGetTokenT< HBHERecHitCollection > _tokHBHE
Definition: RecHitTask.h:48
hcaldqm::ContainerProf2D _cEnergy_depth
Definition: RecHitTask.h:83
hcaldqm::Container2D _cTimingvsEnergy_SubdetPM
Definition: RecHitTask.h:88
int const CRATE_VME_MIN
Definition: Constants.h:111
hcaldqm::Container2D _cOccupancyCut_FEDVME
Definition: RecHitTask.h:115
hcaldqm::Container2D _cOccupancy_FEDVME
Definition: RecHitTask.h:106
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:49
double _cutE_HO
Definition: RecHitTask.h:53
std::pair< uint16_t, uint16_t > fed2crate(int fed)
Definition: Utilities.cc:12
uint32_t rawId() const
edm::EDGetTokenT< HFRecHitCollection > _tokHF
Definition: RecHitTask.h:50
hcaldqm::ContainerXXX< uint32_t > _xUni
Definition: RecHitTask.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:460
void initialize(HcalElectronicsMap const *, ElectronicsMapType etype=fHcalElectronicsMap)
hcaldqm::Container1D _cOccupancyCutvsiphi_SubdetPM
Definition: RecHitTask.h:121
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
hcaldqm::ContainerProf1D _cEnergyvsieta_Subdet
Definition: RecHitTask.h:81
hcaldqm::ContainerProf1D _cEnergyvsiphi_SubdetPM
Definition: RecHitTask.h:82
hcaldqm::Container2D _cOccupancyCutvsiphivsLS_SubdetPM
Definition: RecHitTask.h:124
std::vector< HcalGenericDetId > _gids
Definition: RecHitTask.h:136
virtual CompactMap::const_iterator begin()
Definition: ContainerXXX.h:75
UpdateFreq
Definition: DQTask.h:17
State _state
Definition: Flag.h:79
std::vector< HBHERecHit >::const_iterator const_iterator
hcaldqm::Container1D _cTimingCut_SubdetPM
Definition: RecHitTask.h:91
int bunchCrossing() const
Definition: EventBase.h:66
RecHitTask(edm::ParameterSet const &)
Definition: RecHitTask.cc:8
int const SPIGOT_MIN
Definition: Constants.h:136
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: RecHitTask.cc:854
virtual void reset()
Definition: ContainerXXX.h:366
hcaldqm::ContainerProf1D _cTimingCutvsieta_Subdet
Definition: RecHitTask.h:100
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
int const FIBER_VME_MIN
Definition: Constants.h:141
hcaldqm::ContainerProf1D _cEnergyvsBX_SubdetPM
Definition: RecHitTask.h:85
void bookHistograms(fwlite::EventContainer &eventCont)
hcaldqm::Container2D _cOccupancyCut_ElectronicsVME
Definition: RecHitTask.h:117
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
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
hcaldqm::ContainerProf2D _cTimingCut_ElectronicsuTCA
Definition: RecHitTask.h:96
virtual CompactMap::const_iterator end()
Definition: ContainerXXX.h:77
std::vector< hcaldqm::flag::Flag > _vflags
Definition: RecHitTask.h:60
double _cutE_HBHE
Definition: RecHitTask.h:53
ProcessingType _ptype
Definition: DQModule.h:59
virtual void fill(uint32_t)
Definition: Container1D.cc:82
hcaldqm::Container1D _cEnergy_Subdet
Definition: RecHitTask.h:80
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, int debug=0)
hcaldqm::ContainerProf1D _cTimingCutvsLS_FED
Definition: RecHitTask.h:98
hcaldqm::ContainerProf2D _cTimingCut_FEDVME
Definition: RecHitTask.h:93
hcaldqm::ContainerProf1D _cTimingCutvsLS_SubdetPM
Definition: RecHitTask.h:99
void reset()
Definition: Flag.h:76
hcaldqm::Container2D _cOccupancyCut_ElectronicsuTCA
Definition: RecHitTask.h:118
virtual void setBinContent(int, int, int)
hcaldqm::ContainerProf1D _cOccupancyCutvsBX_Subdet
Definition: RecHitTask.h:123
void dqmthrow(std::string const &msg) const
Definition: Logger.h:15
int const FED_VME_MIN
Definition: Constants.h:98
virtual void initialize(std::string const &folder, hashfunctions::HashType, Quantity *, Quantity *, Quantity *qz=new ValueQuantity(quantity::fEnergy), int debug=0)
edm::InputTag _tagPreHF
Definition: RecHitTask.h:46
int ieta() const
get the cell ieta
Definition: HcalDetId.h:56
hcaldqm::Container2D _cOccupancy_ElectronicsVME
Definition: RecHitTask.h:108
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
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:144
double _cutE_HF
Definition: RecHitTask.h:53
hash_function_did const hash_did[nHashType_did]
std::vector< HcalGenericDetId > allPrecisionId() const
Logger _logger
Definition: DQModule.h:70
hcaldqm::Container2D _cOccupancyCut_FEDuTCA
Definition: RecHitTask.h:116
hcaldqm::electronicsmap::ElectronicsMap _ehashmap
Definition: RecHitTask.h:70
MonitorElement * meUnknownIds1LS
Definition: RecHitTask.h:133
edm::EDGetTokenT< HFPreRecHitCollection > _tokPreHF
Definition: RecHitTask.h:51
std::string _name
Definition: DQModule.h:57
HcalElectronicsMap const * _emap
Definition: DQTask.h:73
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
hcaldqm::ContainerSingle2D _cSummaryvsLS
Definition: RecHitTask.h:138
double _thresh_unihf
Definition: RecHitTask.h:54
int const CRATE_uTCA_MIN
Definition: Constants.h:116
const_iterator end() const
bool isVMEid() const
hcaldqm::Container2D _cOccupancy_ElectronicsuTCA
Definition: RecHitTask.h:109
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
virtual void book(HcalElectronicsMap const *)
Definition: ContainerXXX.h:99
edm::InputTag _tagHO
Definition: RecHitTask.h:44
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::filter::HashFilter _filter_HF
Definition: RecHitTask.h:77
const T & get() const
Definition: EventSetup.h:55
hcaldqm::Container2D _cOccupancy_FEDuTCA
Definition: RecHitTask.h:107
edm::InputTag _tagHF
Definition: RecHitTask.h:45
virtual void _process(edm::Event const &, edm::EventSetup const &)
Definition: RecHitTask.cc:415
hcaldqm::Container2D _cDAAsymmetryVsCharge_SubdetPM
Definition: RecHitTask.h:128
virtual void setBinContent(HcalDetId const &, int) override
Definition: Container2D.cc:235
std::string const & label() const
Definition: InputTag.h:36
hcaldqm::Container1D _cTimingCut_HBHEPartition
Definition: RecHitTask.h:92
hcaldqm::filter::HashFilter _filter_uTCA
Definition: RecHitTask.h:74
hcaldqm::ContainerProf1D _cOccupancyCutvsLS_Subdet
Definition: RecHitTask.h:119
virtual STDTYPE & get(HcalDetId const &)
Definition: ContainerXXX.h:249
hcaldqm::Container1D _cOccupancyvsieta_Subdet
Definition: RecHitTask.h:112
std::vector< int > getFEDList(HcalElectronicsMap const *)
Definition: Utilities.cc:95
std::vector< int > getFEDuTCAList(HcalElectronicsMap const *)
Definition: Utilities.cc:145
virtual void fill(HcalDetId const &) override
Definition: Container2D.cc:59
const HcalElectronicsMap * getHcalMapping() const
virtual bool filter(HcalDetId const &) const
Definition: HashFilter.cc:36
bool _hfPreRecHitsAvailable
Definition: RecHitTask.h:47
std::string _subsystem
Definition: DQModule.h:64
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
Definition: RecHitTask.cc:38
hcaldqm::ContainerProf1D _cTimingCutvsBX_SubdetPM
Definition: RecHitTask.h:102
edm::EDGetTokenT< HORecHitCollection > _tokHO
Definition: RecHitTask.h:49
std::vector< uint32_t > _vcdaqEids
Definition: DQTask.h:65
edm::InputTag _tagHBHE
Definition: RecHitTask.h:43
hcaldqm::ContainerProf2D _cTimingCut_FEDuTCA
Definition: RecHitTask.h:94
virtual void initialize(hashfunctions::HashType, int debug=0)
Definition: ContainerXXX.h:91
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
Definition: RecHitTask.cc:848
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
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="") override
Definition: Container2D.cc:895
virtual void _resetMonitors(hcaldqm::UpdateFreq)
Definition: RecHitTask.cc:401
virtual void book(DQMStore::IBooker &, HcalElectronicsMap const *, std::string subsystem="Hcal", std::string aux="")
hcaldqm::Container2D _cOccupancy_depth
Definition: RecHitTask.h:105
hcaldqm::ContainerProf2D _cDAAsymmetryMean_cut_depth
Definition: RecHitTask.h:129
hcaldqm::ContainerProf1D _cTimingCutvsiphi_SubdetPM
Definition: RecHitTask.h:101
hcaldqm::ContainerProf2D _cTimingCut_depth
Definition: RecHitTask.h:97
Readout chain identification for Hcal.
std::string const & instance() const
Definition: InputTag.h:37
hcaldqm::ContainerProf2D _cTimingCut_ElectronicsVME
Definition: RecHitTask.h:95
hcaldqm::filter::HashFilter _filter_VME
Definition: RecHitTask.h:73
hcaldqm::Container1D _cOccupancyCutvsieta_Subdet
Definition: RecHitTask.h:122
bool isFEDHF(HcalElectronicsId const &)
Definition: Utilities.cc:187
hcaldqm::Container1D _cOccupancyvsiphi_SubdetPM
Definition: RecHitTask.h:111
int const SLOT_uTCA_MIN
Definition: Constants.h:123
bool isUTCAid() const
const_iterator begin() const
Definition: Run.h:42
bool _unknownIdsPresent
Definition: RecHitTask.h:134
ib
Definition: cuy.py:660
hcaldqm::Container1D _cDAAsymmetry_cut_SubdetPM
Definition: RecHitTask.h:130
hcaldqm::ContainerProf1D _cEnergyvsLS_SubdetPM
Definition: RecHitTask.h:84