CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
HcalDeadCellMonitor Class Reference

#include <HcalDeadCellMonitor.h>

Inheritance diagram for HcalDeadCellMonitor:
HcalBaseDQMonitor edm::EDAnalyzer

Public Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &s)
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
void cleanup ()
 
void endJob ()
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 
 HcalDeadCellMonitor (const edm::ParameterSet &ps)
 
template<class DIGI >
void process_Digi (DIGI &digi)
 
template<class RECHIT >
void process_RecHit (RECHIT &rechit)
 
void processEvent (const HBHERecHitCollection &hbHits, const HORecHitCollection &hoHits, const HFRecHitCollection &hfHits, const HBHEDigiCollection &hbhedigi, const HODigiCollection &hodigi, const HFDigiCollection &hfdigi)
 
void reset ()
 
void setup ()
 
 ~HcalDeadCellMonitor ()
 
- Public Member Functions inherited from HcalBaseDQMonitor
 HcalBaseDQMonitor (const edm::ParameterSet &ps)
 
 HcalBaseDQMonitor ()
 
 ~HcalBaseDQMonitor ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

void fillNevents_problemCells ()
 
void fillNevents_recentdigis ()
 
void fillNevents_recentrechits ()
 
template<class T >
void process_Digi (T &digi)
 
template<class T >
void process_RecHit (T &rechit)
 
void processEvent_HBHEdigi (const HBHEDataFrame digi)
 
void zeroCounters (bool resetpresent=false)
 

Private Attributes

int alarmer_counter_
 
int deadevt_
 
bool deadmon_makeDiagnostics_
 
bool deadmon_test_digis_
 
bool deadmon_test_rechits_
 
edm::InputTag digiLabel_
 
EtaPhiHists DigiPresentByDepth
 
bool endLumiProcessed_
 
double energyThreshold_
 
bool excludeHO1P02_
 
bool excludeHORing2_
 
MonitorElementHBDeadVsEvent
 
double HBenergyThreshold_
 
bool hbhedcsON
 
edm::InputTag hbheRechitLabel_
 
MonitorElementHEDeadVsEvent
 
double HEenergyThreshold_
 
bool hfdcsON
 
MonitorElementHFDeadVsEvent
 
double HFenergyThreshold_
 
edm::InputTag hfRechitLabel_
 
MonitorElementHODeadVsEvent
 
double HOenergyThreshold_
 
edm::InputTag hoRechitLabel_
 
int is_RBX_loss_
 
HcalLogicalMaplogicalMap_
 
int minDeadEventCount_
 
MonitorElementNevents
 
unsigned int NumBadHB
 
unsigned int NumBadHE
 
unsigned int NumBadHF
 
unsigned int NumBadHFLUMI
 
unsigned int NumBadHO
 
unsigned int NumBadHO0
 
unsigned int NumBadHO12
 
int NumBadHO1P02
 
MonitorElementNumberOfNeverPresentDigis
 
MonitorElementNumberOfNeverPresentDigisHB
 
MonitorElementNumberOfNeverPresentDigisHE
 
MonitorElementNumberOfNeverPresentDigisHF
 
MonitorElementNumberOfNeverPresentDigisHO
 
MonitorElementNumberOfNeverPresentRecHits
 
MonitorElementNumberOfNeverPresentRecHitsHB
 
MonitorElementNumberOfNeverPresentRecHitsHE
 
MonitorElementNumberOfNeverPresentRecHitsHF
 
MonitorElementNumberOfNeverPresentRecHitsHO
 
MonitorElementNumberOfRecentMissingDigis
 
MonitorElementNumberOfRecentMissingDigisHB
 
MonitorElementNumberOfRecentMissingDigisHE
 
MonitorElementNumberOfRecentMissingDigisHF
 
MonitorElementNumberOfRecentMissingDigisHO
 
MonitorElementNumberOfRecentMissingRecHits
 
MonitorElementNumberOfRecentMissingRecHitsHB
 
MonitorElementNumberOfRecentMissingRecHitsHE
 
MonitorElementNumberOfRecentMissingRecHitsHF
 
MonitorElementNumberOfRecentMissingRecHitsHO
 
unsigned int occupancy_RBX [132]
 
bool present_digi [85][72][4]
 
bool present_rechit [85][72][4]
 
MonitorElementProblemsInLastNLB_HBHEHF_alarm
 
MonitorElementProblemsVsLB
 
MonitorElementProblemsVsLB_HB
 
MonitorElementProblemsVsLB_HE
 
MonitorElementProblemsVsLB_HF
 
MonitorElementProblemsVsLB_HO
 
MonitorElementRBX_loss_VS_LB
 
int rbxlost [132]
 
EtaPhiHists RecentMissingDigisByDepth
 
EtaPhiHists RecentMissingRecHitsByDepth
 
unsigned int recentoccupancy_digi [85][72][4]
 
unsigned int recentoccupancy_rechit [85][72][4]
 
EtaPhiHists RecHitPresentByDepth
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from HcalBaseDQMonitor
virtual void beginJob ()
 
virtual void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
bool IsAllowedCalibType ()
 
bool LumiInOrder (int lumisec)
 
void SetupEtaPhiHists (EtaPhiHists &hh, std::string Name, std::string Units)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 
- Protected Attributes inherited from HcalBaseDQMonitor
std::vector< int > AllowedCalibTypes_
 
int badChannelStatusMask_
 
int currentLS
 
int currenttype_
 
DQMStoredbe_
 
int debug_
 
bool enableCleanup_
 
bool eventAllowed_
 
bool HBpresent_
 
bool HEpresent_
 
bool HFpresent_
 
bool HOpresent_
 
int ievt_
 
std::map< unsigned int, int > KnownBadCells_
 
int levt_
 
bool makeDiagnostics_
 
MonitorElementmeIevt_
 
MonitorElementmeLevt_
 
bool mergeRuns_
 
MonitorElementmeTevt_
 
MonitorElementmeTevtHist_
 
int NLumiBlocks_
 
bool Online_
 
std::string prefixME_
 
MonitorElementProblemsCurrentLB
 
MonitorElementProblemsVsLB
 
MonitorElementProblemsVsLB_HB
 
MonitorElementProblemsVsLB_HBHEHF
 
MonitorElementProblemsVsLB_HE
 
MonitorElementProblemsVsLB_HF
 
MonitorElementProblemsVsLB_HO
 
bool skipOutOfOrderLS_
 
std::string subdir_
 
int tevt_
 

Detailed Description

Date:
2011/05/23 14:54:10
Revision:
1.51
Author
J. Temple - Univ. of Maryland

Definition at line 32 of file HcalDeadCellMonitor.h.

Constructor & Destructor Documentation

HcalDeadCellMonitor::HcalDeadCellMonitor ( const edm::ParameterSet ps)

Definition at line 4 of file HcalDeadCellMonitor.cc.

References HcalBaseDQMonitor::AllowedCalibTypes_, HcalBaseDQMonitor::badChannelStatusMask_, deadmon_test_digis_, deadmon_test_rechits_, HcalBaseDQMonitor::debug_, digiLabel_, HcalBaseDQMonitor::enableCleanup_, energyThreshold_, excludeHO1P02_, excludeHORing2_, edm::ParameterSet::getUntrackedParameter(), HBenergyThreshold_, hbheRechitLabel_, HcalChannelStatus::HcalCellDead, HEenergyThreshold_, HFenergyThreshold_, hfRechitLabel_, HOenergyThreshold_, hoRechitLabel_, logicalMap_, HcalBaseDQMonitor::makeDiagnostics_, HcalBaseDQMonitor::mergeRuns_, minDeadEventCount_, HcalBaseDQMonitor::NLumiBlocks_, HcalBaseDQMonitor::Online_, HcalBaseDQMonitor::prefixME_, HcalBaseDQMonitor::skipOutOfOrderLS_, and HcalBaseDQMonitor::subdir_.

5 {
6  Online_ = ps.getUntrackedParameter<bool>("online",false);
7  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns",false);
8  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup",false);
9  debug_ = ps.getUntrackedParameter<int>("debug",0);
10  makeDiagnostics_ = ps.getUntrackedParameter<bool>("makeDiagnostics",false);
11  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
12  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
13  prefixME_.append("/");
14  subdir_ = ps.getUntrackedParameter<std::string>("TaskFolder","DeadCellMonitor_Hcal"); // DeadCellMonitor_Hcal
15  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
16  subdir_.append("/");
17  subdir_=prefixME_+subdir_;
18  AllowedCalibTypes_ = ps.getUntrackedParameter<std::vector<int> > ("AllowedCalibTypes");
19  skipOutOfOrderLS_ = ps.getUntrackedParameter<bool>("skipOutOfOrderLS",true);
20  NLumiBlocks_ = ps.getUntrackedParameter<int>("NLumiBlocks",4000);
21 
22  badChannelStatusMask_ = ps.getUntrackedParameter<int>("BadChannelStatusMask",
23  ps.getUntrackedParameter<int>("BadChannelStatusMask",
24  (1<<HcalChannelStatus::HcalCellDead))); // identify channel status values to mask
25  // DeadCell-specific parameters
26 
27  // Collection type info
29  hbheRechitLabel_ = ps.getUntrackedParameter<edm::InputTag>("hbheRechitLabel");
30  hoRechitLabel_ = ps.getUntrackedParameter<edm::InputTag>("hoRechitLabel");
31  hfRechitLabel_ = ps.getUntrackedParameter<edm::InputTag>("hfRechitLabel");
32 
33  // minimum number of events required for lumi section-based dead cell checks
34  minDeadEventCount_ = ps.getUntrackedParameter<int>("minDeadEventCount",1000);
35  excludeHORing2_ = ps.getUntrackedParameter<bool>("excludeHORing2",false);
36  excludeHO1P02_ = ps.getUntrackedParameter<bool>("excludeHO1P02",false);
37 
38  // Set which dead cell checks will be performed
39  /* Dead cells can be defined in the following ways:
40  1) never present digi -- digi is never present in run
41  2) digis -- digi is absent for one or more lumi section
42  3) never present rechit -- rechit > threshold energy never present (NOT redundant, since it requires not just that a rechit be present, but that it be above threshold as well. )
43  4) rechits -- rechit is present, but rechit energy below threshold for one or more lumi sections
44 
45  Of these tests, never-present digis are always checked.
46  Occasional digis are checked only if deadmon_test_digis_ is true,
47  and both rechit tests are made only if deadmon_test_rechits_ is true
48  */
49 
50  deadmon_test_digis_ = ps.getUntrackedParameter<bool>("test_digis",true);
51  deadmon_test_rechits_ = ps.getUntrackedParameter<bool>("test_rechits",false);
52 
53  // rechit energy test -- cell must be below threshold value for a number of consecutive events to be considered dead
54  energyThreshold_ = ps.getUntrackedParameter<double>("MissingRechitEnergyThreshold",0);
55  HBenergyThreshold_ = ps.getUntrackedParameter<double>("HB_energyThreshold",energyThreshold_);
56  HEenergyThreshold_ = ps.getUntrackedParameter<double>("HE_energyThreshold",energyThreshold_);
57  HOenergyThreshold_ = ps.getUntrackedParameter<double>("HO_energyThreshold",energyThreshold_);
58  HFenergyThreshold_ = ps.getUntrackedParameter<double>("HF_energyThreshold",energyThreshold_);
59 
61  logicalMap_=new HcalLogicalMap(gen.createMap());
62 } //constructor
edm::InputTag hfRechitLabel_
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag hbheRechitLabel_
std::vector< int > AllowedCalibTypes_
edm::InputTag hoRechitLabel_
HcalLogicalMap * logicalMap_
HcalDeadCellMonitor::~HcalDeadCellMonitor ( )

Definition at line 64 of file HcalDeadCellMonitor.cc.

References logicalMap_.

65 {
66  if (logicalMap_ == 0) delete logicalMap_;
67 } //destructor
HcalLogicalMap * logicalMap_

Member Function Documentation

void HcalDeadCellMonitor::analyze ( edm::Event const &  e,
edm::EventSetup const &  s 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 583 of file HcalDeadCellMonitor.cc.

References HcalBaseDQMonitor::analyze(), gather_cfg::cout, deadevt_, HcalBaseDQMonitor::debug_, digiLabel_, endLumiProcessed_, MonitorElement::Fill(), edm::Event::getByLabel(), DcsStatus::HBHEa, DcsStatus::HBHEb, DcsStatus::HBHEc, hbhedcsON, hbheRechitLabel_, DcsStatus::HF, hfdcsON, hfRechitLabel_, hoRechitLabel_, i, HcalBaseDQMonitor::ievt_, is_RBX_loss_, HcalBaseDQMonitor::IsAllowedCalibType(), edm::HandleBase::isValid(), HcalBaseDQMonitor::levt_, HcalBaseDQMonitor::LumiInOrder(), edm::EventBase::luminosityBlock(), Nevents, occupancy_RBX, processEvent(), rbxlost, and HcalBaseDQMonitor::tevt_.

584 {
585  if (!IsAllowedCalibType()) return;
586  endLumiProcessed_=false;
587  Nevents->Fill(0,1); // count all events of allowed calibration type, even if their lumi block is not in the right order
588  if (LumiInOrder(e.luminosityBlock())==false) return;
589  // try to get rechits and digis
593 
597 
599  // check if detectors whether they were ON
601  e.getByLabel("scalersRawToDigi", dcsStatus);
602 
603  if (dcsStatus.isValid() && dcsStatus->size() != 0)
604  {
605  if ((*dcsStatus)[0].ready(DcsStatus::HBHEa) &&
606  (*dcsStatus)[0].ready(DcsStatus::HBHEb) &&
607  (*dcsStatus)[0].ready(DcsStatus::HBHEc))
608  {
609  hbhedcsON = true;
610  if (debug_) std::cout << "hbhe on" << std::endl;
611  }
612  else hbhedcsON = false;
613 
614  if ((*dcsStatus)[0].ready(DcsStatus::HF))
615  {
616  hfdcsON = true;
617  if (debug_) std::cout << "hf on" << std::endl;
618  }
619  else hfdcsON = false;
620  }
622 
623  if (!(e.getByLabel(digiLabel_,hbhe_digi)))
624  {
625  edm::LogWarning("HcalDeadCellMonitor")<< digiLabel_<<" hbhe_digi not available";
626  return;
627  }
628  if (!(e.getByLabel(digiLabel_,ho_digi)))
629  {
630  edm::LogWarning("HcalDeadCellMonitor")<< digiLabel_<<" ho_digi not available";
631  return;
632  }
633  if (!(e.getByLabel(digiLabel_,hf_digi)))
634  {
635  edm::LogWarning("HcalDeadCellMonitor")<< digiLabel_<<" hf_digi not available";
636  return;
637  }
638 
639  if (!(e.getByLabel(hbheRechitLabel_,hbhe_rechit)))
640  {
641  edm::LogWarning("HcalDeadCellMonitor")<< hbheRechitLabel_<<" hbhe_rechit not available";
642  return;
643  }
644 
645  if (!(e.getByLabel(hfRechitLabel_,hf_rechit)))
646  {
647  edm::LogWarning("HcalDeadCellMonitor")<< hfRechitLabel_<<" hf_rechit not available";
648  return;
649  }
650  if (!(e.getByLabel(hoRechitLabel_,ho_rechit)))
651  {
652  edm::LogWarning("HcalDeadCellMonitor")<< hoRechitLabel_<<" ho_rechit not available";
653  return;
654  }
655  if (debug_>1) std::cout <<"\t<HcalDeadCellMonitor::analyze> Processing good event! event # = "<<ievt_<<std::endl;
656  // Good event found; increment counter (via base class analyze method)
657  // This also runs the allowed calibration /lumi in order tests again; remove?
659 
660  ++deadevt_; //increment local counter
661 
662  processEvent(*hbhe_rechit, *ho_rechit, *hf_rechit, *hbhe_digi, *ho_digi, *hf_digi);
663 
664  // check for presence of an RBX data loss
665  if(levt_>10 && tevt_ % 10 == 0 ) //levt_ counts events perLS, but excludes
666  { //"wrong", calibration-type events. Compare with tevt_ instead...
667  for(int i=71; i<132; i++)
668  {
669  //These RBXs in HO are excluded, set to 1 to ignore
670  if(i >= 72 && i < 85)
671  occupancy_RBX[i] = 1;
672  if(i >=85 && i <= 95 && i%2==0)
673  occupancy_RBX[i] = 1;
674  if(i >=108 && i <= 119 && i%2==0)
675  occupancy_RBX[i] = 1;
676  if(i >=120 && i <= 131)
677  occupancy_RBX[i] = 1;
678 
679  if(i==117 || i==131) // HO SiPMs have much less hits, 10 events not enough.
680  occupancy_RBX[i] = 1; // Also no RBX loss for SiPMs, so ignore for now.
681  }
682 
683  // RBX loss detected
684  for (unsigned int i=0;i<132;++i)
685  if(occupancy_RBX[i] == 0)
686  {
687  is_RBX_loss_ = 1;
688  rbxlost[i] = 1;
689  }
690 
691  // no RBX loss, reset the counters
692  if (is_RBX_loss_ == 0)
693  for (unsigned int i=0;i<132;++i)
694  occupancy_RBX[i] = 0;
695  }
696 
697  // if RBX is lost any time during the LS, don't allow the counters to increment
698  if(is_RBX_loss_ == 1)
699  for (unsigned int i=0;i<132;++i)
700  if(rbxlost[i]==1) occupancy_RBX[i] = 0;
701 
702 } // void HcalDeadCellMonitor::analyze(...)
edm::InputTag hfRechitLabel_
int i
Definition: DBlmapReader.cc:9
bool LumiInOrder(int lumisec)
unsigned int occupancy_RBX[132]
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
edm::InputTag hbheRechitLabel_
void Fill(long long x)
edm::InputTag hoRechitLabel_
MonitorElement * Nevents
bool isValid() const
Definition: HandleBase.h:76
void processEvent(const HBHERecHitCollection &hbHits, const HORecHitCollection &hoHits, const HFRecHitCollection &hfHits, const HBHEDigiCollection &hbhedigi, const HODigiCollection &hodigi, const HFDigiCollection &hfdigi)
tuple cout
Definition: gather_cfg.py:41
string s
Definition: asciidump.py:422
void HcalDeadCellMonitor::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 364 of file HcalDeadCellMonitor.cc.

References HcalBaseDQMonitor::badChannelStatusMask_, HcalBaseDQMonitor::beginRun(), gather_cfg::cout, HcalBaseDQMonitor::debug_, edm::EventSetup::get(), HcalCondObjectContainer< Item >::getAllChannels(), reco::JetExtendedAssociation::getValue(), HcalCondObjectContainer< Item >::getValues(), DetId::Hcal, i, HcalBaseDQMonitor::KnownBadCells_, HcalBaseDQMonitor::mergeRuns_, L1TEmulatorMonitor_cff::p, edm::ESHandle< class >::product(), reset(), setup(), ntuplemaker::status, and HcalBaseDQMonitor::tevt_.

365 {
366  if (debug_>1) std::cout <<"HcalDeadCellMonitor::beginRun"<<std::endl;
368 
369  if (tevt_==0) this->setup(); // set up histograms if they have not been created before
370  if (mergeRuns_==false)
371  this->reset();
372 
373  // Get known dead cells for this run
374  KnownBadCells_.clear();
375  if (badChannelStatusMask_>0)
376  {
378  c.get<HcalChannelQualityRcd>().get(p);
379  HcalChannelQuality* chanquality= new HcalChannelQuality(*p.product());
380  std::vector<DetId> mydetids = chanquality->getAllChannels();
381  for (std::vector<DetId>::const_iterator i = mydetids.begin();
382  i!=mydetids.end();
383  ++i)
384  {
385  if (i->det()!=DetId::Hcal) continue; // not an hcal cell
386  HcalDetId id=HcalDetId(*i);
387  int status=(chanquality->getValues(id))->getValue();
388  if ((status & badChannelStatusMask_))
389  {
390  KnownBadCells_[id.rawId()]=status;
391  }
392  }
393  delete chanquality;
394  } // if (badChannelStatusMask_>0)
395  return;
396 } //void HcalDeadCellMonitor::beginRun(...)
int i
Definition: DBlmapReader.cc:9
std::map< unsigned int, int > KnownBadCells_
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
std::vector< DetId > getAllChannels() const
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
const JetExtendedData & getValue(const Container &, const reco::JetBaseRef &)
get value for the association. Throw exception if no association found
tuple cout
Definition: gather_cfg.py:41
tuple status
Definition: ntuplemaker.py:245
const Item * getValues(DetId fId) const
void HcalDeadCellMonitor::cleanup ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 470 of file HcalDeadCellMonitor.cc.

References HcalBaseDQMonitor::dbe_, HcalBaseDQMonitor::enableCleanup_, DQMStore::removeContents(), DQMStore::setCurrentFolder(), and HcalBaseDQMonitor::subdir_.

Referenced by endJob().

471 {
472  if (!enableCleanup_) return;
473  if (dbe_)
474  {
476  dbe_->removeContents();
477  dbe_->setCurrentFolder(subdir_+"dead_digi_never_present");
478  dbe_->removeContents();
479  dbe_->setCurrentFolder(subdir_+"dead_digi_often_missing");
480  dbe_->removeContents();
481  dbe_->setCurrentFolder(subdir_+"dead_rechit_neverpresent");
482  dbe_->removeContents();
483  dbe_->setCurrentFolder(subdir_+"dead_rechit_often_missing");
484  dbe_->removeContents();
485  dbe_->setCurrentFolder(subdir_+"dead_cell_parameters");
486  dbe_->removeContents();
487  dbe_->setCurrentFolder(subdir_+"LSvalues");
488  dbe_->removeContents();
489  }
490  return;
491 } // void HcalDeadCellMonitor::cleanup()
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:2345
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
void HcalDeadCellMonitor::endJob ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 577 of file HcalDeadCellMonitor.cc.

References cleanup(), gather_cfg::cout, HcalBaseDQMonitor::debug_, and HcalBaseDQMonitor::enableCleanup_.

578 {
579  if (debug_>0) std::cout <<"HcalDeadCellMonitor::endJob()"<<std::endl;
580  if (enableCleanup_) cleanup(); // when do we force cleanup?
581 }
tuple cout
Definition: gather_cfg.py:41
void HcalDeadCellMonitor::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 495 of file HcalDeadCellMonitor.cc.

References alarmer_counter_, deadevt_, endLumiProcessed_, fillNevents_problemCells(), fillNevents_recentdigis(), fillNevents_recentrechits(), hbhedcsON, HcalBaseDQMonitor::HBpresent_, HcalBaseDQMonitor::HEpresent_, hfdcsON, HcalBaseDQMonitor::HFpresent_, i, is_RBX_loss_, HcalBaseDQMonitor::levt_, HcalBaseDQMonitor::LumiInOrder(), edm::LuminosityBlockBase::luminosityBlock(), minDeadEventCount_, NumBadHB, NumBadHE, NumBadHF, NumBadHFLUMI, NumBadHO, NumBadHO0, NumBadHO12, HcalBaseDQMonitor::ProblemsCurrentLB, ProblemsInLastNLB_HBHEHF_alarm, rbxlost, MonitorElement::Reset(), MonitorElement::setBinContent(), and zeroCounters().

497 {
498  // skip old lumi sections
499  if (this->LumiInOrder(lumiSeg.luminosityBlock())==false) return;
500 
501  // Reset current LS histogram
502  if (ProblemsCurrentLB)
504 
506 
507  //increase the number of LS counting, for alarmer. Only make alarms for HBHE
508  if(hbhedcsON == true && hfdcsON == true && HBpresent_ == 1 && HEpresent_ == 1 && HFpresent_ == 1)
510  else
511  alarmer_counter_ = 0;
512 
513  // Here is where we determine whether or not to process an event
514  // Not enough events
515  // there are less than minDeadEventCount_ in this LS, but RBXloss is found
516 
518  {
521 
522  endLumiProcessed_=true;
523  is_RBX_loss_=0;
524 
525  for (unsigned int i=0;i<132;++i)
526  rbxlost[i] = 0;
527 
528  if (ProblemsCurrentLB)
529  {
530  ProblemsCurrentLB->setBinContent(0,0, levt_); // underflow bin contains number of events
538  }
539  }
540 
541  if (deadevt_<minDeadEventCount_) // perform normal tasks, since no RBX loss is detected in this lumisections
542  return;
543 
544  endLumiProcessed_=true;
545  // fillNevents_problemCells checks for never-present cells
549 
550  if (ProblemsCurrentLB)
551  {
552  ProblemsCurrentLB->setBinContent(0,0, levt_); // underflow bin contains number of events
560  }
561  zeroCounters();
562  deadevt_=0;
563  is_RBX_loss_=0;
564 
565  return;
566 } //endLuminosityBlock()
int i
Definition: DBlmapReader.cc:9
bool LumiInOrder(int lumisec)
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * ProblemsCurrentLB
void zeroCounters(bool resetpresent=false)
LuminosityBlockNumber_t luminosityBlock() const
MonitorElement * ProblemsInLastNLB_HBHEHF_alarm
void Reset(void)
reset ME (ie. contents, errors, etc)
void HcalDeadCellMonitor::endRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 568 of file HcalDeadCellMonitor.cc.

References endLumiProcessed_, and fillNevents_problemCells().

569 {
570  // Always carry out overall occupancy test at endRun, regardless minimum number of events?
571  // Or should we require an absolute lower bound?
572  // We can always run this test; we'll use the summary client to implement a lower bound before calculating reportSummary values
573  if (endLumiProcessed_==false) fillNevents_problemCells(); // always check for never-present cells
574  return;
575 }
void HcalDeadCellMonitor::fillNevents_problemCells ( )
private

Definition at line 1157 of file HcalDeadCellMonitor.cc.

References abs, alarmer_counter_, HcalObjRepresent::CalcIeta(), gather_cfg::cout, HcalBaseDQMonitor::currentLS, deadevt_, deadmon_test_digis_, deadmon_test_rechits_, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, DigiPresentByDepth, eta(), excludeHO1P02_, excludeHORing2_, MonitorElement::Fill(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, i, HcalBaseDQMonitor::ievt_, is_RBX_loss_, isSiPM(), HcalBaseDQMonitor::KnownBadCells_, min, minDeadEventCount_, Nevents, NumBadHB, NumBadHE, NumBadHF, NumBadHFLUMI, NumBadHO, NumBadHO0, NumBadHO12, NumBadHO1P02, NumberOfNeverPresentDigis, NumberOfNeverPresentDigisHB, NumberOfNeverPresentDigisHE, NumberOfNeverPresentDigisHF, NumberOfNeverPresentDigisHO, NumberOfNeverPresentRecHits, NumberOfNeverPresentRecHitsHB, NumberOfNeverPresentRecHitsHE, NumberOfNeverPresentRecHitsHF, NumberOfNeverPresentRecHitsHO, NumberOfRecentMissingDigis, NumberOfRecentMissingDigisHB, NumberOfRecentMissingDigisHE, NumberOfRecentMissingDigisHF, NumberOfRecentMissingDigisHO, NumberOfRecentMissingRecHits, NumberOfRecentMissingRecHitsHB, NumberOfRecentMissingRecHitsHE, NumberOfRecentMissingRecHitsHF, NumberOfRecentMissingRecHitsHO, occupancy_RBX, phi, present_digi, present_rechit, ProblemsInLastNLB_HBHEHF_alarm, ProblemsVsLB, ProblemsVsLB_HB, HcalBaseDQMonitor::ProblemsVsLB_HBHEHF, ProblemsVsLB_HE, ProblemsVsLB_HF, ProblemsVsLB_HO, DetId::rawId(), RBX_loss_VS_LB, recentoccupancy_digi, recentoccupancy_rechit, and validDetId().

Referenced by endLuminosityBlock(), and endRun().

1158 {
1159  //fillNevents_problemCells now only performs checks of never-present cells
1160 
1161  if (debug_>0)
1162  std::cout <<"<HcalDeadCellMonitor::fillNevents_problemCells> FILLING PROBLEM CELL PLOTS"<<std::endl;
1163 
1164  int ieta=0;
1165  int iphi=0;
1166 
1167  // Count problem cells in each subdetector
1168 
1169  NumBadHB=0;
1170  NumBadHE=0;
1171  NumBadHO=0;
1172  NumBadHF=0;
1173  NumBadHFLUMI=0;
1174  NumBadHO0=0;
1175  NumBadHO12=0;
1176  NumBadHO1P02=0;
1177 
1178  int knownBadHB=0;
1179  int knownBadHE=0;
1180  int knownBadHF=0;
1181  int knownBadHO=0;
1182  int knownBadHFLUMI=0;
1183  int knownBadHO0=0;
1184  int knownBadHO12=0;
1185 
1186 
1187  unsigned int neverpresentHB=0;
1188  unsigned int neverpresentHE=0;
1189  unsigned int neverpresentHO=0;
1190  unsigned int neverpresentHF=0;
1191 
1192  unsigned int unoccupiedHB=0;
1193  unsigned int unoccupiedHE=0;
1194  unsigned int unoccupiedHO=0;
1195  unsigned int unoccupiedHF=0;
1196 
1197  unsigned int belowenergyHB=0;
1198  unsigned int belowenergyHE=0;
1199  unsigned int belowenergyHO=0;
1200  unsigned int belowenergyHF=0;
1201 
1202  unsigned int energyneverpresentHB=0;
1203  unsigned int energyneverpresentHE=0;
1204  unsigned int energyneverpresentHO=0;
1205  unsigned int energyneverpresentHF=0;
1206 
1208  Nevents->Fill(1,deadevt_);
1209 
1210  int etabins=0;
1211  int phibins=0;
1212 
1213  // Store values for number of bad channels in each lumi section, for plots of ProblemsVsLS.
1214  // This is different than the NumBadHB, etc. values, which must included even known bad channels
1215  // in order to calculate reportSummaryByLS values correctly.
1216 
1218  //Check for RBX data loss
1219  unsigned int RBX_loss_HB=0;
1220  unsigned int RBX_loss_HE=0;
1221  unsigned int RBX_loss_HO=0;
1222 
1223  unsigned int counter_HB = 0;
1224  unsigned int counter_HE = 0;
1225  unsigned int counter_HO = 0;
1226 
1227  for(int i=0; i<132; i++)
1228  {
1229  if(occupancy_RBX[i]==0 && is_RBX_loss_ == 1)
1230  {
1231  if(i<=35) //HB
1232  { counter_HB ++ ; RBX_loss_HB = 72*(counter_HB); }
1233  if(i>=36 && i<=71) //HE
1234  { counter_HE ++ ; RBX_loss_HE = 72*(counter_HE); }
1235  if(i>=72 && i<=132) //HO
1236  { counter_HO ++ ; RBX_loss_HO = 72*(counter_HO); }
1237 
1238  if(excludeHO1P02_==true && i==109) NumBadHO1P02 = 72; // exclude HO1P02
1239  }
1240 
1241  if(occupancy_RBX[i]>0)
1243  if(occupancy_RBX[i]==0 && is_RBX_loss_ == 1)
1245  }
1246 
1247  if (deadevt_ >= 10 && deadevt_<minDeadEventCount_) // maybe not enough events to run the standard test
1248  if( is_RBX_loss_ == 1 ) // but enough to detect RBX loss
1249  {
1250  NumBadHB+=RBX_loss_HB;
1251  NumBadHE+=RBX_loss_HE;
1252  NumBadHO+=RBX_loss_HO;
1253 
1254  belowenergyHB+=RBX_loss_HB;
1255  belowenergyHE+=RBX_loss_HE;
1256  belowenergyHO+=RBX_loss_HO;
1257 
1258  unoccupiedHB+=RBX_loss_HB;
1259  unoccupiedHE+=RBX_loss_HE;
1260  unoccupiedHO+=RBX_loss_HO;
1261  }
1263 
1264  for (unsigned int depth=0;depth<DigiPresentByDepth.depth.size();++depth)
1265  {
1266  DigiPresentByDepth.depth[depth]->setBinContent(0,0,ievt_);
1267  etabins=DigiPresentByDepth.depth[depth]->getNbinsX();
1268  phibins=DigiPresentByDepth.depth[depth]->getNbinsY();
1269  for (int eta=0;eta<etabins;++eta)
1270  {
1271  for (int phi=0;phi<phibins;++phi)
1272  {
1273  iphi=phi+1;
1274  for (int subdet=1;subdet<=4;++subdet)
1275  {
1276  ieta=CalcIeta((HcalSubdetector)subdet,eta,depth+1);
1277  if (ieta==-9999) continue;
1278  if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1))
1279  continue;
1280  // Ignore subdetectors that weren't in run?
1281  /*
1282  if ((subdet==HcalBarrel && !HBpresent_) ||
1283  (subdet==HcalEndcap &&!HEpresent_) ||
1284  (subdet==HcalOuter &&!HOpresent_) ||
1285  (subdet==HcalForward &&!HFpresent_)) continue;
1286  */
1287 
1288  /*
1289  if ((!checkHB_ && subdet==HcalBarrel) ||
1290  (!checkHE_ && subdet==HcalEndcap) ||
1291  (!checkHO_ && subdet==HcalOuter) ||
1292  (!checkHF_ && subdet==HcalForward)) continue;
1293  */
1294 
1295  // now check which dead cell tests failed; increment counter if any failed
1296  if ((present_digi[eta][phi][depth]==0) ||
1299  )
1300  {
1301  HcalDetId TempID((HcalSubdetector)subdet, ieta, iphi, (int)depth+1);
1302  if (subdet==HcalBarrel)
1303  {
1304  ++NumBadHB;
1305  if (KnownBadCells_.find(TempID.rawId())!=KnownBadCells_.end())
1306  ++knownBadHB;
1307  }
1308  else if (subdet==HcalEndcap)
1309  {
1310  ++NumBadHE;
1311  if (KnownBadCells_.find(TempID.rawId())!=KnownBadCells_.end())
1312  ++knownBadHE;
1313  }
1314 
1315  else if (subdet==HcalOuter)
1316  {
1317  ++NumBadHO;
1318  if (abs(ieta)<5) ++NumBadHO0;
1319  else ++NumBadHO12;
1320  // Don't include HORing2 if boolean set; subtract away those counters
1321  if (excludeHORing2_==true && abs(ieta)>10 && isSiPM(ieta,iphi,depth+1)==false)
1322  {
1323  --NumBadHO;
1324  --NumBadHO12;
1325  }
1326  // Don't include HO1P02 if boolean set, RBX does not repsond well to resets,; subtract away those counters
1327  if (excludeHO1P02_==true && ( (ieta>4 && ieta<10) && (iphi<=10 || iphi>70) ) )
1328  ++NumBadHO1P02;
1329 
1330  if (KnownBadCells_.find(TempID.rawId())!=KnownBadCells_.end())
1331  {
1332  ++knownBadHO;
1333  if (abs(ieta)<5) ++knownBadHO0;
1334  else ++knownBadHO12;
1335  // Don't include HORing2 if boolean set; subtract away those counters
1336  if (excludeHORing2_==true && abs(ieta)>10 && isSiPM(ieta,iphi,depth+1)==false)
1337  {
1338  --knownBadHO;
1339  --knownBadHO12;
1340  }
1341  }
1342  }
1343  else if (subdet==HcalForward)
1344  {
1345  ++NumBadHF;
1346  if (depth==1 && (abs(ieta)==33 || abs(ieta)==34))
1347  ++NumBadHFLUMI;
1348  else if (depth==2 && (abs(ieta)==35 || abs(ieta)==36))
1349  ++NumBadHFLUMI;
1350  if (KnownBadCells_.find(TempID.rawId())!=KnownBadCells_.end())
1351  {
1352  ++knownBadHF;
1353  if (depth==1 && (abs(ieta)==33 || abs(ieta)==34))
1354  ++knownBadHFLUMI;
1355  else if (depth==2 && (abs(ieta)==35 || abs(ieta)==36))
1356  ++knownBadHFLUMI;
1357  }
1358  }
1359  }
1360  if (present_digi[eta][phi][depth]==0 )
1361  {
1362  if (subdet==HcalBarrel) ++neverpresentHB;
1363  else if (subdet==HcalEndcap) ++neverpresentHE;
1364  else if (subdet==HcalOuter)
1365  {
1366  ++neverpresentHO;
1367  if (excludeHORing2_==true && abs(ieta)>10 && isSiPM(ieta,iphi,depth+1)==false)
1368  --neverpresentHO;
1369  }
1370  else if (subdet==HcalForward) ++neverpresentHF;
1371  }
1372  // Count recent unoccupied digis if the total events in this lumi section is > minEvents_
1374  {
1375  HcalDetId TempID((HcalSubdetector)subdet, ieta, iphi, (int)depth+1);
1376  if (subdet==HcalBarrel) ++unoccupiedHB;
1377  else if (subdet==HcalEndcap) ++unoccupiedHE;
1378  else if (subdet==HcalOuter)
1379  {
1380  ++unoccupiedHO;
1381  if (excludeHORing2_==true && abs(ieta)>10 && isSiPM(ieta,iphi,depth+1)==false)
1382  --unoccupiedHO;
1383  if (KnownBadCells_.find(TempID.rawId())!=KnownBadCells_.end() && abs(ieta)<=10)
1384  --unoccupiedHO;
1385  }
1386  else if (subdet==HcalForward) ++unoccupiedHF;
1387  }
1388  // Look at rechit checks
1390  {
1391  if (present_rechit[eta][phi][depth]==0)
1392  {
1393  if (subdet==HcalBarrel) ++energyneverpresentHB;
1394  else if (subdet==HcalEndcap) ++energyneverpresentHE;
1395  else if (subdet==HcalOuter)
1396  {
1397  ++energyneverpresentHO;
1398  if (excludeHORing2_==true && abs(ieta)>10 && isSiPM(ieta,iphi,depth+1)==false)
1399  --energyneverpresentHO;
1400  }
1401  else if (subdet==HcalForward) ++energyneverpresentHF;
1402  }
1404  {
1405  HcalDetId TempID((HcalSubdetector)subdet, ieta, iphi, (int)depth+1);
1406  if (subdet==HcalBarrel) ++belowenergyHB;
1407  else if (subdet==HcalEndcap) ++belowenergyHE;
1408  else if (subdet==HcalOuter)
1409  {
1410  ++belowenergyHO;
1411  if (excludeHORing2_==true && abs(ieta)>10 && isSiPM(ieta,iphi,depth+1)==false)
1412  --belowenergyHO;
1413  if (KnownBadCells_.find(TempID.rawId())!=KnownBadCells_.end() && abs(ieta)<=10)
1414  --belowenergyHO;
1415  }
1416  else if (subdet==HcalForward) ++belowenergyHF;
1417  }
1418  }
1419  } // subdet loop
1420  } // phi loop
1421  } //eta loop
1422  } // depth loop
1423 
1424  // Fill with number of problem cells found on this pass
1425  NumberOfNeverPresentDigisHB->Fill(currentLS,neverpresentHB);
1426  NumberOfNeverPresentDigisHE->Fill(currentLS,neverpresentHE);
1427  NumberOfNeverPresentDigisHO->Fill(currentLS,neverpresentHO);
1428  NumberOfNeverPresentDigisHF->Fill(currentLS,neverpresentHF);
1429  NumberOfNeverPresentDigis->Fill(currentLS,neverpresentHB+neverpresentHE+neverpresentHO+neverpresentHF);
1430 
1432  {
1433  if( NumBadHB<RBX_loss_HB )
1434  NumBadHB+=RBX_loss_HB;
1435  if( NumBadHE<RBX_loss_HE )
1436  NumBadHE+=RBX_loss_HE;
1437  if( NumBadHO<RBX_loss_HO )
1438  NumBadHO+=RBX_loss_HO;
1439 
1440  if( belowenergyHB<RBX_loss_HB )
1441  belowenergyHB+=RBX_loss_HB;
1442  if( belowenergyHE<RBX_loss_HE )
1443  belowenergyHE+=RBX_loss_HE;
1444  if( belowenergyHO<RBX_loss_HO )
1445  belowenergyHO+=RBX_loss_HO;
1446 
1447  if( unoccupiedHB<RBX_loss_HB )
1448  unoccupiedHB+=RBX_loss_HB;
1449  if( unoccupiedHE<RBX_loss_HE )
1450  unoccupiedHE+=RBX_loss_HE;
1451  if( unoccupiedHO<RBX_loss_HO )
1452  unoccupiedHO+=RBX_loss_HO;
1453 
1454  is_RBX_loss_ = 0;
1455  }
1456 
1457  ProblemsVsLB_HB->Fill(currentLS,NumBadHB-knownBadHB+0.0001); // add a small offset, so that the histograms reset when no errors follow
1458  ProblemsVsLB_HE->Fill(currentLS,NumBadHE-knownBadHE+0.0001); // problematic LSs
1459  ProblemsVsLB_HO->Fill(currentLS,NumBadHO-knownBadHO+0.0001);
1460  ProblemsVsLB_HF->Fill(currentLS,NumBadHF-knownBadHF+0.0001);
1461  ProblemsVsLB_HBHEHF->Fill(currentLS,NumBadHB+NumBadHE+NumBadHF-knownBadHB-knownBadHE-knownBadHF+0.0001);
1462  ProblemsVsLB->Fill(currentLS,NumBadHB+NumBadHE+NumBadHO+NumBadHF-knownBadHB-knownBadHE-knownBadHO-knownBadHF+0.0001);
1463 
1464  if(excludeHO1P02_==true)
1466 
1467  if( NumBadHB+NumBadHE+NumBadHF-knownBadHB-knownBadHE-knownBadHF < 50 )
1468  alarmer_counter_ = 0;
1469 
1470  if( alarmer_counter_ >= 10 )
1471  ProblemsInLastNLB_HBHEHF_alarm->Fill( std::min(int(NumBadHB+NumBadHE+NumBadHF-knownBadHB-knownBadHE-knownBadHF), 99) );
1472 
1473  // if (deadevt_<minDeadEventCount_)
1474  // return;
1475 
1476  if (deadmon_test_digis_)
1477  {
1482  NumberOfRecentMissingDigis->Fill(currentLS,unoccupiedHB+unoccupiedHE+unoccupiedHO+unoccupiedHF);
1483  }
1484 
1486  {
1487  NumberOfNeverPresentRecHitsHB->Fill(currentLS,energyneverpresentHB);
1488  NumberOfNeverPresentRecHitsHE->Fill(currentLS,energyneverpresentHE);
1489  NumberOfNeverPresentRecHitsHO->Fill(currentLS,energyneverpresentHO);
1490  NumberOfNeverPresentRecHitsHF->Fill(currentLS,energyneverpresentHF);
1491  NumberOfNeverPresentRecHits->Fill(currentLS,energyneverpresentHB+energyneverpresentHE+energyneverpresentHO+energyneverpresentHF);
1492 
1497  NumberOfRecentMissingRecHits->Fill(currentLS,belowenergyHB+belowenergyHE+belowenergyHO+belowenergyHF);
1498  }
1499 
1500  return;
1501 } // void HcalDeadCellMonitor::fillNevents_problemCells(void)
int i
Definition: DBlmapReader.cc:9
MonitorElement * NumberOfNeverPresentRecHitsHO
unsigned int occupancy_RBX[132]
MonitorElement * NumberOfRecentMissingRecHitsHF
MonitorElement * NumberOfNeverPresentRecHits
MonitorElement * NumberOfNeverPresentDigisHB
MonitorElement * NumberOfRecentMissingRecHits
bool present_digi[85][72][4]
MonitorElement * NumberOfNeverPresentDigisHE
std::map< unsigned int, int > KnownBadCells_
#define abs(x)
Definition: mlp_lapack.h:159
MonitorElement * NumberOfRecentMissingDigisHB
#define min(a, b)
Definition: mlp_lapack.h:161
T eta() const
MonitorElement * NumberOfRecentMissingDigisHE
bool present_rechit[85][72][4]
void Fill(long long x)
bool isSiPM(int ieta, int iphi, int depth)
MonitorElement * RBX_loss_VS_LB
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
MonitorElement * ProblemsVsLB
MonitorElement * NumberOfNeverPresentDigisHF
MonitorElement * ProblemsVsLB_HBHEHF
MonitorElement * NumberOfNeverPresentDigisHO
MonitorElement * NumberOfNeverPresentRecHitsHB
HcalSubdetector
Definition: HcalAssistant.h:32
MonitorElement * Nevents
unsigned int recentoccupancy_rechit[85][72][4]
MonitorElement * NumberOfRecentMissingRecHitsHE
MonitorElement * ProblemsVsLB_HF
MonitorElement * NumberOfRecentMissingDigisHO
MonitorElement * NumberOfNeverPresentRecHitsHF
MonitorElement * ProblemsVsLB_HB
unsigned int recentoccupancy_digi[85][72][4]
MonitorElement * NumberOfRecentMissingRecHitsHO
EtaPhiHists DigiPresentByDepth
MonitorElement * NumberOfNeverPresentRecHitsHE
MonitorElement * ProblemsVsLB_HE
MonitorElement * NumberOfNeverPresentDigis
MonitorElement * NumberOfRecentMissingDigis
MonitorElement * NumberOfRecentMissingDigisHF
tuple cout
Definition: gather_cfg.py:41
MonitorElement * ProblemsInLastNLB_HBHEHF_alarm
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)
MonitorElement * NumberOfRecentMissingRecHitsHB
MonitorElement * ProblemsVsLB_HO
Definition: DDAxes.h:10
void HcalDeadCellMonitor::fillNevents_recentdigis ( )
private

Definition at line 939 of file HcalDeadCellMonitor.cc.

References abs, HcalObjRepresent::CalcIeta(), gather_cfg::cout, deadevt_, deadmon_test_digis_, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, eta(), excludeHORing2_, HcalObjRepresent::FillUnphysicalHEHFBins(), HcalLogicalMap::getHcalFrontEndId(), HcalForward, HcalBaseDQMonitor::ievt_, getHLTprescales::index, is_RBX_loss_, isSiPM(), logicalMap_, minDeadEventCount_, occupancy_RBX, phi, present_digi, HcalFrontEndId::rbxIndex(), RecentMissingDigisByDepth, recentoccupancy_digi, and validDetId().

Referenced by endLuminosityBlock().

940 {
941  // Fill Histograms showing digi cells with no occupancy for the past few lumiblocks
942  if (!deadmon_test_digis_) return; // extra protection here against calling histograms than don't exist
943 
944 
945  if (deadevt_ < minDeadEventCount_) return; // not enough entries to make a determination for this LS
946 
947  if (debug_>0)
948  std::cout <<"<HcalDeadCellMonitor::fillNevents_recentdigis> CHECKING FOR RECENT MISSING DIGIS evtcount = "<<deadevt_<<std::endl;
949 
950  int ieta=0;
951  int iphi=0;
952 
953  int etabins=0;
954  int phibins=0;
955 
957  if (deadevt_ >= 10 && deadevt_<minDeadEventCount_) // maybe not enough events to run the standard test
958  if( is_RBX_loss_ == 1 ) // but enough to detect RBX loss
959  for (unsigned int depth=0;depth<RecentMissingDigisByDepth.depth.size();++depth)
960  {
961  RecentMissingDigisByDepth.depth[depth]->setBinContent(0,0,ievt_);
962  etabins=RecentMissingDigisByDepth.depth[depth]->getNbinsX();
963  phibins=RecentMissingDigisByDepth.depth[depth]->getNbinsY();
964  for (int eta=0;eta<etabins;++eta)
965  for (int phi=0;phi<phibins;++phi)
966  {
967  iphi=phi+1;
968  for (int subdet=1;subdet<=4;++subdet)
969  {
970  ieta=CalcIeta((HcalSubdetector)subdet,eta,depth+1);
971  if (ieta==-9999) continue;
972  if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1))
973  continue;
974  // now check which dead cell tests failed; increment counter if any failed
975  HcalDetId TempID((HcalSubdetector)subdet, ieta, iphi, (int)depth+1);
976 
977  int index = logicalMap_->getHcalFrontEndId(TempID).rbxIndex();
978  if(subdet==HcalForward) continue;
979 
980  if(occupancy_RBX[index]==0)
981  {
982  recentoccupancy_digi[eta][phi][depth] = 0;
983  RecentMissingDigisByDepth.depth[depth]->Fill(ieta,iphi,deadevt_);
984  }
985  }
986  }
987  }
989 
990  for (unsigned int depth=0;depth<RecentMissingDigisByDepth.depth.size();++depth)
991  {
992  RecentMissingDigisByDepth.depth[depth]->setBinContent(0,0,ievt_);
993  etabins=RecentMissingDigisByDepth.depth[depth]->getNbinsX();
994  phibins=RecentMissingDigisByDepth.depth[depth]->getNbinsY();
995  for (int eta=0;eta<etabins;++eta)
996  {
997  for (int subdet=1;subdet<=4;++subdet)
998  {
999  ieta=CalcIeta((HcalSubdetector)subdet,eta,depth+1);
1000  if (ieta==-9999) continue;
1001  for (int phi=0;phi<phibins;++phi)
1002  {
1003  iphi=phi+1;
1004 
1005  if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1))
1006  continue;
1007 
1008  // Ignore subdetectors that weren't in run?
1009  /*
1010  if ((subdet==HcalBarrel && !HBpresent_) ||
1011  (subdet==HcalEndcap &&!HEpresent_) ||
1012  (subdet==HcalOuter &&!HOpresent_) ||
1013  (subdet==HcalForward &&!HFpresent_)) continue;
1014  */
1015  int zside=0;
1016  if (subdet==HcalForward) // shift HcalForward ieta
1017  ieta<0 ? zside=-1 : zside=+1;
1018 
1019  if (recentoccupancy_digi[eta][phi][depth]==0)
1020  {
1021  if (debug_>0)
1022  {
1023  std::cout <<"DEAD CELL; NO RECENT OCCUPANCY: subdet = "<<subdet<<", ieta = "<<ieta<<", iphi = "<<iphi<<" depth = "<<depth+1<<std::endl;
1024  std::cout <<"\t RAW COORDINATES: eta = "<<eta<< " phi = "<<phi<<" depth = "<<depth<<std::endl;
1025  std::cout <<"\t Present? "<<present_digi[eta][phi][depth]<<std::endl;
1026  }
1027 
1028  // Don't fill HORing2 if boolean enabled
1029  if (excludeHORing2_==true && abs(ieta)>10 && isSiPM(ieta,iphi,depth+1)==false)
1030  continue;
1031 
1032  // no digi was found for the N events; Fill cell as bad for all N events (N = checkN);
1033  if (RecentMissingDigisByDepth.depth[depth]) RecentMissingDigisByDepth.depth[depth]->Fill(ieta+zside,iphi,deadevt_);
1034  }
1035  } // for (int subdet=1;subdet<=4;++subdet)
1036  } // for (int phi=0;...)
1037  } // for (int eta=0;...)
1038  } //for (int depth=1;...)
1040 
1041  return;
1042 
1043 } // void HcalDeadCellMonitor::fillNevents_recentdigis()
unsigned int occupancy_RBX[132]
bool present_digi[85][72][4]
#define abs(x)
Definition: mlp_lapack.h:159
T eta() const
bool isSiPM(int ieta, int iphi, int depth)
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
HcalSubdetector
Definition: HcalAssistant.h:32
const HcalFrontEndId getHcalFrontEndId(const DetId &)
unsigned int recentoccupancy_digi[85][72][4]
EtaPhiHists RecentMissingDigisByDepth
int rbxIndex() const
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
tuple cout
Definition: gather_cfg.py:41
HcalLogicalMap * logicalMap_
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)
Definition: DDAxes.h:10
void HcalDeadCellMonitor::fillNevents_recentrechits ( )
private

Definition at line 1049 of file HcalDeadCellMonitor.cc.

References abs, HcalObjRepresent::CalcIeta(), gather_cfg::cout, deadevt_, deadmon_test_rechits_, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, eta(), excludeHORing2_, HcalObjRepresent::FillUnphysicalHEHFBins(), HcalLogicalMap::getHcalFrontEndId(), HcalForward, HcalBaseDQMonitor::ievt_, getHLTprescales::index, is_RBX_loss_, isSiPM(), logicalMap_, minDeadEventCount_, occupancy_RBX, phi, HcalFrontEndId::rbxIndex(), RecentMissingRecHitsByDepth, recentoccupancy_rechit, RecHitPresentByDepth, and validDetId().

Referenced by endLuminosityBlock().

1050 {
1051  // Fill Histograms showing unoccupied rechits, or rec hits with low energy
1052 
1053  // This test is a bit pointless, unless the energy threshold is greater than the ZS threshold.
1054  // If we require that cells are always < thresh to be flagged by this test, and if
1055  // thresh < ZS, then we will never catch any cells, since they'll show up as dead in the
1056  // neverpresent/occupancy test plots first.
1057  // Only exception is if something strange is going on between ZS ADC value an RecHit energy?
1058 
1059  if (!deadmon_test_rechits_) return;
1061 
1062  if (debug_>0)
1063  std::cout <<"<HcalDeadCellMonitor::fillNevents_energy> BELOW-ENERGY-THRESHOLD PLOTS"<<std::endl;
1064 
1065  int ieta=0;
1066  int iphi=0;
1067 
1068  int etabins=0;
1069  int phibins=0;
1070 
1072  if (deadevt_ >= 10 && deadevt_<minDeadEventCount_) // maybe not enough events to run the standard test
1073  if( is_RBX_loss_ == 1 ) // but enough to detect RBX loss
1074  for (unsigned int depth=0;depth<RecentMissingRecHitsByDepth.depth.size();++depth)
1075  {
1076  RecentMissingRecHitsByDepth.depth[depth]->setBinContent(0,0,ievt_);
1077  etabins=RecentMissingRecHitsByDepth.depth[depth]->getNbinsX();
1078  phibins=RecentMissingRecHitsByDepth.depth[depth]->getNbinsY();
1079  for (int eta=0;eta<etabins;++eta)
1080  for (int phi=0;phi<phibins;++phi)
1081  {
1082  iphi=phi+1;
1083  for (int subdet=1;subdet<=4;++subdet)
1084  {
1085  ieta=CalcIeta((HcalSubdetector)subdet,eta,depth+1);
1086  if (ieta==-9999) continue;
1087  if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1))
1088  continue;
1089  // now check which dead cell tests failed; increment counter if any failed
1090  HcalDetId TempID((HcalSubdetector)subdet, ieta, iphi, (int)depth+1);
1091 
1092  int index = logicalMap_->getHcalFrontEndId(TempID).rbxIndex();
1093  if(subdet==HcalForward) continue;
1094 
1095  if(occupancy_RBX[index]==0)
1096  {
1097  recentoccupancy_rechit[eta][phi][depth] = 0;
1098  RecentMissingRecHitsByDepth.depth[depth]->Fill(ieta,iphi,deadevt_);
1099  }
1100  }
1101  }
1102  }
1104 
1105  if (deadevt_ < minDeadEventCount_) return; // not enough entries to make a determination for this LS
1106 
1107  for (unsigned int depth=0;depth<RecentMissingRecHitsByDepth.depth.size();++depth)
1108  {
1109  RecentMissingRecHitsByDepth.depth[depth]->setBinContent(0,0,ievt_);
1110  etabins=RecentMissingRecHitsByDepth.depth[depth]->getNbinsX();
1111  phibins=RecentMissingRecHitsByDepth.depth[depth]->getNbinsY();
1112  for (int eta=0;eta<etabins;++eta)
1113  {
1114  for (int subdet=1;subdet<=4;++subdet)
1115  {
1116  ieta=CalcIeta((HcalSubdetector)subdet,eta,depth+1);
1117  if (ieta==-9999) continue;
1118  for (int phi=0;phi<phibins;++phi)
1119  {
1120  iphi=phi+1;
1121  if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1))
1122  continue;
1123 
1124  if (recentoccupancy_rechit[eta][phi][depth]>0) continue; // cell exceeded energy at least once, so it's not dead
1125 
1126  // Ignore subdetectors that weren't in run?
1127  /*
1128  if ((subdet==HcalBarrel && !HBpresent_) ||
1129  (subdet==HcalEndcap &&!HEpresent_) ||
1130  (subdet==HcalOuter &&!HOpresent_) ||
1131  (subdet==HcalForward &&!HFpresent_)) continue;
1132  */
1133 
1134  int zside=0;
1135  if (subdet==HcalForward) // shift HcalForward ieta
1136  {
1137  ieta<0 ? zside=-1 : zside=+1;
1138  }
1139 
1140  if (debug_>2)
1141  std::cout <<"DEAD CELL; BELOW ENERGY THRESHOLD; subdet = "<<subdet<<" ieta = "<<ieta<<", phi = "<<iphi<<" depth = "<<depth+1<<std::endl;
1142  if (excludeHORing2_==true && abs(ieta)>10 && isSiPM(ieta,iphi,depth+1)==false)
1143  continue;
1144 
1145  if (RecentMissingRecHitsByDepth.depth[depth]) RecentMissingRecHitsByDepth.depth[depth]->Fill(ieta+zside,iphi,deadevt_);
1146  } // loop on phi bins
1147  } // for (unsigned int depth=1;depth<=4;++depth)
1148  } // // loop on subdetectors
1149  } // for (int eta=0;...)
1150 
1152 
1153  return;
1154 } // void HcalDeadCellMonitor::fillNevents_recentrechits()
unsigned int occupancy_RBX[132]
#define abs(x)
Definition: mlp_lapack.h:159
T eta() const
bool isSiPM(int ieta, int iphi, int depth)
EtaPhiHists RecHitPresentByDepth
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
HcalSubdetector
Definition: HcalAssistant.h:32
unsigned int recentoccupancy_rechit[85][72][4]
const HcalFrontEndId getHcalFrontEndId(const DetId &)
int rbxIndex() const
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
EtaPhiHists RecentMissingRecHitsByDepth
tuple cout
Definition: gather_cfg.py:41
HcalLogicalMap * logicalMap_
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)
Definition: DDAxes.h:10
template<class T >
void HcalDeadCellMonitor::process_Digi ( T digi)
private
template<class DIGI >
void HcalDeadCellMonitor::process_Digi ( DIGI &  digi)

Definition at line 844 of file HcalDeadCellMonitor.cc.

References CalcEtaBin(), EtaPhiHists::depth, DigiPresentByDepth, present_digi, and recentoccupancy_digi.

845 {
846  // Remove the validate check when we figure out how to access bad digis in digi monitor
847  //if (!digi.validate()) return; // digi must be good to be counted
848  int ieta=digi.id().ieta();
849  int iphi=digi.id().iphi();
850  int depth=digi.id().depth();
851 
852  // Fill occupancy counter
853  ++recentoccupancy_digi[CalcEtaBin(digi.id().subdet(),ieta,depth)][iphi-1][depth-1];
854 
855  // If previously-missing digi found, change boolean status and fill histogram
856  if (present_digi[CalcEtaBin(digi.id().subdet(),ieta,depth)][iphi-1][depth-1]==false)
857  {
858  if (DigiPresentByDepth.depth[depth-1])
859  {
860  DigiPresentByDepth.depth[depth-1]->setBinContent(CalcEtaBin(digi.id().subdet(),ieta,depth)+1,iphi,1);
861  }
862  present_digi[CalcEtaBin(digi.id().subdet(),ieta,depth)][iphi-1][depth-1]=true;
863  }
864  return;
865 }
bool present_digi[85][72][4]
std::vector< MonitorElement * > depth
unsigned int recentoccupancy_digi[85][72][4]
EtaPhiHists DigiPresentByDepth
int CalcEtaBin(int subdet, int ieta, int depth)
template<class T >
void HcalDeadCellMonitor::process_RecHit ( T rechit)
private

Referenced by processEvent().

template<class RECHIT >
void HcalDeadCellMonitor::process_RecHit ( RECHIT &  rechit)

Definition at line 870 of file HcalDeadCellMonitor.cc.

References CalcEtaBin(), EtaPhiHists::depth, HcalLogicalMap::getHcalFrontEndId(), HBenergyThreshold_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HEenergyThreshold_, HFenergyThreshold_, HOenergyThreshold_, HcalDetId::ieta(), logicalMap_, occupancy_RBX, present_rechit, recentoccupancy_rechit, and RecHitPresentByDepth.

871 {
872  float en = rechit->energy();
873  HcalDetId id(rechit->detid().rawId());
874  int ieta = id.ieta();
875  int iphi = id.iphi();
876  int depth = id.depth();
877 
878  if (id.subdet()==HcalBarrel)
879  {
880  if (en>=HBenergyThreshold_)
881  {
882  ++recentoccupancy_rechit[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
883  present_rechit[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1]=true;
884  if (RecHitPresentByDepth.depth[depth-1])
885  RecHitPresentByDepth.depth[depth-1]->setBinContent(CalcEtaBin(id.subdet(),ieta,depth)+1,iphi,1);
886  }
888  // RBX index, HB RBX indices are 0-35
889  int RBXindex = logicalMap_->getHcalFrontEndId(rechit->detid()).rbxIndex();
890 
891  occupancy_RBX[RBXindex]++;
893  }
894  else if (id.subdet()==HcalEndcap)
895  {
896  if (en>=HEenergyThreshold_)
897  {
898  ++recentoccupancy_rechit[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
899  present_rechit[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1]=true;
900  if (RecHitPresentByDepth.depth[depth-1])
901  RecHitPresentByDepth.depth[depth-1]->setBinContent(CalcEtaBin(id.subdet(),ieta,depth)+1,iphi,1);
902  }
904  // RBX index, HE RBX indices are 36-71
905  int RBXindex = logicalMap_->getHcalFrontEndId(rechit->detid()).rbxIndex();
906 
907  occupancy_RBX[RBXindex]++;
909  }
910  else if (id.subdet()==HcalForward)
911  {
912  if (en>=HFenergyThreshold_)
913  {
914  ++recentoccupancy_rechit[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
915 
916  present_rechit[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1]=true;
917  if (RecHitPresentByDepth.depth[depth-1])
918  RecHitPresentByDepth.depth[depth-1]->setBinContent(CalcEtaBin(id.subdet(),ieta,depth)+1,iphi,1);
919  }
920  }
921  else if (id.subdet()==HcalOuter)
922  {
923  if (en>=HOenergyThreshold_)
924  {
925  ++recentoccupancy_rechit[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
926  present_rechit[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1]=true;
927  if (RecHitPresentByDepth.depth[depth-1])
928  RecHitPresentByDepth.depth[depth-1]->setBinContent(CalcEtaBin(id.subdet(),ieta,depth)+1,iphi,1);
929  }
931  // RBX index, HO RBX indices are 85-95 (odd), 96-107 (all), 108-119 (odd), 120-130 (EXCL), 131
932  int RBXindex = logicalMap_->getHcalFrontEndId(rechit->detid()).rbxIndex();
933 
934  occupancy_RBX[RBXindex]++;
936  }
937 }
unsigned int occupancy_RBX[132]
bool present_rechit[85][72][4]
EtaPhiHists RecHitPresentByDepth
std::vector< MonitorElement * > depth
int ieta() const
get the cell ieta
Definition: HcalDetId.h:38
unsigned int recentoccupancy_rechit[85][72][4]
const HcalFrontEndId getHcalFrontEndId(const DetId &)
int CalcEtaBin(int subdet, int ieta, int depth)
HcalLogicalMap * logicalMap_
void HcalDeadCellMonitor::processEvent ( const HBHERecHitCollection hbHits,
const HORecHitCollection hoHits,
const HFRecHitCollection hfHits,
const HBHEDigiCollection hbhedigi,
const HODigiCollection hodigi,
const HFDigiCollection hfdigi 
)

Definition at line 707 of file HcalDeadCellMonitor.cc.

References abs, edm::SortedCollection< T, SORT >::begin(), binmapd2, gather_cfg::cout, deadmon_test_digis_, deadmon_test_rechits_, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, DigiPresentByDepth, edm::SortedCollection< T, SORT >::end(), eta(), MonitorElement::Fill(), HcalObjRepresent::FillUnphysicalHEHFBins(), HBDeadVsEvent, HEDeadVsEvent, HFDeadVsEvent, HODeadVsEvent, i, j, gen::k, HcalBaseDQMonitor::makeDiagnostics_, HcalBaseDQMonitor::NLumiBlocks_, NumberOfNeverPresentDigis, NumberOfNeverPresentDigisHB, NumberOfNeverPresentDigisHE, NumberOfNeverPresentDigisHF, NumberOfNeverPresentDigisHO, NumberOfRecentMissingDigis, NumberOfRecentMissingDigisHB, NumberOfRecentMissingDigisHE, NumberOfRecentMissingDigisHF, NumberOfRecentMissingDigisHO, NumberOfRecentMissingRecHits, NumberOfRecentMissingRecHitsHB, NumberOfRecentMissingRecHitsHE, NumberOfRecentMissingRecHitsHF, NumberOfRecentMissingRecHitsHO, phi, present_digi, process_Digi(), process_RecHit(), processEvent_HBHEdigi(), RecentMissingDigisByDepth, RecentMissingRecHitsByDepth, HcalBaseDQMonitor::tevt_, and MonitorElement::update().

Referenced by analyze().

713 {
714  if (debug_>1) std::cout <<"<HcalDeadCellMonitor::processEvent> Processing event..."<<std::endl;
715 
716  // Do Digi-Based dead cell searches
717 
718  // Make sure histograms update
719  for (unsigned int i=0;i<DigiPresentByDepth.depth.size();++i)
720  DigiPresentByDepth.depth[i]->update();
721 
727 
729  {
730 
731  for (unsigned int i=0;i<RecentMissingDigisByDepth.depth.size();++i)
732  RecentMissingDigisByDepth.depth[i]->update();
733 
739  }
740 
742  j!=hbhedigi.end(); ++j)
743  {
744  const HBHEDataFrame digi = (const HBHEDataFrame)(*j);
745  processEvent_HBHEdigi(digi);
746  }
747 
749  j!=hodigi.end(); ++j)
750  {
751  const HODataFrame digi = (const HODataFrame)(*j);
752  process_Digi(digi);
753  }
755  j!=hfdigi.end(); ++j)
756  {
757  const HFDataFrame digi = (const HFDataFrame)(*j);
758  process_Digi(digi);
759  }
761 
762  // Search for "dead" cells below a certain energy
764  {
765  // Normalization Fill
766  for (unsigned int i=0;i<RecentMissingRecHitsByDepth.depth.size();++i)
768 
774 
776  j!=hbHits.end(); ++j)
777  process_RecHit(j);
778 
780  k!=hoHits.end(); ++k)
781  process_RecHit(k);
782 
784  j!=hfHits.end(); ++j)
785  process_RecHit(j);
786 
787  } // if (deadmon_test_rechits)
788 
789  if (!makeDiagnostics_) return;
790  if (tevt_>=NLumiBlocks_) return;
791  // Diagnostic plots -- add number of missing channels vs event number
792  int hbpresent=0;
793  int hepresent=0;
794  int hopresent=0;
795  int hfpresent=0;
796  int ieta=0;
797  for (int d=0;d<4;++d)
798  {
799  for (int phi=0;phi<72;++phi)
800  {
801  for (int eta=0;eta<85;++eta)
802  {
803  if (!present_digi[eta][phi][d]) continue;
804  if (d==3) ++hopresent;
805  else if (d==2) ++hepresent;
806  else if (d==1)
807  {
808  ieta=binmapd2[eta];
809  //if (abs(ieta)>29) continue;
810  if (abs(ieta)>29) ++hfpresent;
811  else if (abs(ieta)<17) ++hbpresent; //depths 15&16
812  else ++hepresent;
813  }
814  else if (d==0)
815  {
816  ieta=eta-42;
817  if (abs(ieta)>29) ++hfpresent;
818  else if (abs(ieta)<17) ++hbpresent;
819  else ++hepresent;
820  }
821  }
822  }
823  } // for (int d=0;d<4;++d)
824  HBDeadVsEvent->Fill(tevt_,2592-hbpresent);
825  HEDeadVsEvent->Fill(tevt_,2592-hepresent);
826  HODeadVsEvent->Fill(tevt_,2160-hopresent);
827  HFDeadVsEvent->Fill(tevt_,1728-hfpresent);
828  return;
829 } // void HcalDeadCellMonitor::processEvent(...)
int i
Definition: DBlmapReader.cc:9
MonitorElement * NumberOfRecentMissingRecHitsHF
MonitorElement * NumberOfNeverPresentDigisHB
const int binmapd2[]
MonitorElement * HEDeadVsEvent
MonitorElement * NumberOfRecentMissingRecHits
bool present_digi[85][72][4]
MonitorElement * NumberOfNeverPresentDigisHE
std::vector< T >::const_iterator const_iterator
#define abs(x)
Definition: mlp_lapack.h:159
MonitorElement * NumberOfRecentMissingDigisHB
void update(void)
Mark the object updated.
void process_RecHit(T &rechit)
T eta() const
MonitorElement * NumberOfRecentMissingDigisHE
void Fill(long long x)
std::vector< MonitorElement * > depth
MonitorElement * NumberOfNeverPresentDigisHF
MonitorElement * NumberOfNeverPresentDigisHO
void processEvent_HBHEdigi(const HBHEDataFrame digi)
int j
Definition: DBlmapReader.cc:9
MonitorElement * NumberOfRecentMissingRecHitsHE
MonitorElement * NumberOfRecentMissingDigisHO
int k[5][pyjets_maxn]
const_iterator end() const
EtaPhiHists RecentMissingDigisByDepth
MonitorElement * NumberOfRecentMissingRecHitsHO
EtaPhiHists DigiPresentByDepth
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
EtaPhiHists RecentMissingRecHitsByDepth
MonitorElement * HBDeadVsEvent
MonitorElement * NumberOfNeverPresentDigis
MonitorElement * NumberOfRecentMissingDigis
MonitorElement * NumberOfRecentMissingDigisHF
tuple cout
Definition: gather_cfg.py:41
void process_Digi(T &digi)
MonitorElement * HFDeadVsEvent
MonitorElement * HODeadVsEvent
const_iterator begin() const
MonitorElement * NumberOfRecentMissingRecHitsHB
Definition: DDAxes.h:10
void HcalDeadCellMonitor::processEvent_HBHEdigi ( const HBHEDataFrame  digi)
private

Definition at line 836 of file HcalDeadCellMonitor.cc.

References process_Digi().

Referenced by processEvent().

837 {
838  // Simply check whether a digi is present. If so, increment occupancy counter.
839  process_Digi(digi);
840  return;
841 } //void HcalDeadCellMonitor::processEvent_HBHEdigi(HBHEDigiCollection::const_iterator j)
void process_Digi(T &digi)
void HcalDeadCellMonitor::reset ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 398 of file HcalDeadCellMonitor.cc.

References alarmer_counter_, gather_cfg::cout, deadevt_, deadmon_test_digis_, deadmon_test_rechits_, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, DigiPresentByDepth, excludeHORing2_, HcalObjRepresent::FillUnphysicalHEHFBins(), hbhedcsON, hfdcsON, is_RBX_loss_, isSiPM(), Nevents, NumberOfNeverPresentDigis, NumberOfNeverPresentDigisHB, NumberOfNeverPresentDigisHE, NumberOfNeverPresentDigisHF, NumberOfNeverPresentDigisHO, NumberOfNeverPresentRecHits, NumberOfNeverPresentRecHitsHB, NumberOfNeverPresentRecHitsHE, NumberOfNeverPresentRecHitsHF, NumberOfNeverPresentRecHitsHO, NumberOfRecentMissingDigis, NumberOfRecentMissingDigisHB, NumberOfRecentMissingDigisHE, NumberOfRecentMissingDigisHF, NumberOfRecentMissingDigisHO, NumberOfRecentMissingRecHits, NumberOfRecentMissingRecHitsHB, NumberOfRecentMissingRecHitsHE, NumberOfRecentMissingRecHitsHF, NumberOfRecentMissingRecHitsHO, ProblemsInLastNLB_HBHEHF_alarm, ProblemsVsLB, ProblemsVsLB_HB, HcalBaseDQMonitor::ProblemsVsLB_HBHEHF, ProblemsVsLB_HE, ProblemsVsLB_HF, ProblemsVsLB_HO, RBX_loss_VS_LB, RecentMissingDigisByDepth, RecentMissingRecHitsByDepth, RecHitPresentByDepth, HcalBaseDQMonitor::reset(), MonitorElement::Reset(), EtaPhiHists::Reset(), and zeroCounters().

Referenced by beginRun(), and setup().

399 {
400  if (debug_>1) std::cout <<"HcalDeadCellMonitor::reset()"<<std::endl;
402  zeroCounters();
403  deadevt_=0;
404  is_RBX_loss_ = 0;
405  alarmer_counter_ = 0;
406  hbhedcsON = true; hfdcsON = true;
411 
412  for (unsigned int depth=0;depth<DigiPresentByDepth.depth.size();++depth)
413  DigiPresentByDepth.depth[depth]->Reset();
414 
415  // Mark HORing2 channels as present (fill with a 2, rather than a 1, to distinguish between this setting and actual presence)
416  if (excludeHORing2_==true && DigiPresentByDepth.depth.size()>3)
417  {
418  for (int ieta=11;ieta<=15;++ieta)
419  for (int iphi=1;iphi<=72;++iphi)
420  {
421  // Don't fill ring2 SiPMs, since they will still be active even if the rest of HO is excluded.
422  if (isSiPM(ieta,iphi,4)==false)
423  DigiPresentByDepth.depth[3]->Fill(ieta,iphi,2);
424  //std::cout <<" FILLING ("<<-1*ieta<<", "<<iphi<<") with '2'"<<std::endl;
425  DigiPresentByDepth.depth[3]->Fill(-1*ieta,iphi,2);
426  }
427  }
429 
430 
432  {
435  }
437  {
450 
451  // Mark HORing2 channels as present (fill with a 2, rather than a 1, to distinguish between this setting and actual presence)
452  if (excludeHORing2_==true && RecHitPresentByDepth.depth.size()>3)
453  {
454  for (int ieta=11;ieta<=15;++ieta)
455  for (int iphi=1;iphi<=72;++iphi)
456  {
457  RecHitPresentByDepth.depth[3]->Fill(ieta,iphi,2);
458  RecHitPresentByDepth.depth[3]->Fill(-1*ieta,iphi,2);
459  }
460  }
462  }
463 
464  Nevents->Reset();
465 } // reset function is empty for now
MonitorElement * NumberOfNeverPresentRecHitsHO
MonitorElement * NumberOfRecentMissingRecHitsHF
MonitorElement * NumberOfNeverPresentRecHits
MonitorElement * NumberOfNeverPresentDigisHB
MonitorElement * NumberOfRecentMissingRecHits
void zeroCounters(bool resetpresent=false)
MonitorElement * NumberOfNeverPresentDigisHE
void Reset(void)
MonitorElement * NumberOfRecentMissingDigisHB
MonitorElement * NumberOfRecentMissingDigisHE
bool isSiPM(int ieta, int iphi, int depth)
EtaPhiHists RecHitPresentByDepth
MonitorElement * RBX_loss_VS_LB
std::vector< MonitorElement * > depth
MonitorElement * ProblemsVsLB
MonitorElement * NumberOfNeverPresentDigisHF
MonitorElement * ProblemsVsLB_HBHEHF
MonitorElement * NumberOfNeverPresentDigisHO
MonitorElement * NumberOfNeverPresentRecHitsHB
MonitorElement * Nevents
MonitorElement * NumberOfRecentMissingRecHitsHE
MonitorElement * ProblemsVsLB_HF
MonitorElement * NumberOfRecentMissingDigisHO
MonitorElement * NumberOfNeverPresentRecHitsHF
MonitorElement * ProblemsVsLB_HB
EtaPhiHists RecentMissingDigisByDepth
MonitorElement * NumberOfRecentMissingRecHitsHO
EtaPhiHists DigiPresentByDepth
virtual void reset(void)
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
EtaPhiHists RecentMissingRecHitsByDepth
MonitorElement * NumberOfNeverPresentRecHitsHE
MonitorElement * ProblemsVsLB_HE
MonitorElement * NumberOfNeverPresentDigis
MonitorElement * NumberOfRecentMissingDigis
MonitorElement * NumberOfRecentMissingDigisHF
tuple cout
Definition: gather_cfg.py:41
MonitorElement * ProblemsInLastNLB_HBHEHF_alarm
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * NumberOfRecentMissingRecHitsHB
MonitorElement * ProblemsVsLB_HO
void HcalDeadCellMonitor::setup ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 72 of file HcalDeadCellMonitor.cc.

References DQMStore::book1D(), DQMStore::book2D(), DQMStore::bookFloat(), DQMStore::bookInt(), DQMStore::bookProfile(), gather_cfg::cout, HcalBaseDQMonitor::dbe_, deadmon_test_digis_, deadmon_test_rechits_, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, DigiPresentByDepth, excludeHORing2_, MonitorElement::Fill(), HcalObjRepresent::FillUnphysicalHEHFBins(), MonitorElement::getTProfile(), HBDeadVsEvent, HBenergyThreshold_, HEDeadVsEvent, HEenergyThreshold_, HFDeadVsEvent, HFenergyThreshold_, HODeadVsEvent, HOenergyThreshold_, HcalBaseDQMonitor::makeDiagnostics_, minDeadEventCount_, mergeVDriftHistosByStation::name, Nevents, HcalBaseDQMonitor::NLumiBlocks_, NumberOfNeverPresentDigis, NumberOfNeverPresentDigisHB, NumberOfNeverPresentDigisHE, NumberOfNeverPresentDigisHF, NumberOfNeverPresentDigisHO, NumberOfNeverPresentRecHits, NumberOfNeverPresentRecHitsHB, NumberOfNeverPresentRecHitsHE, NumberOfNeverPresentRecHitsHF, NumberOfNeverPresentRecHitsHO, NumberOfRecentMissingDigis, NumberOfRecentMissingDigisHB, NumberOfRecentMissingDigisHE, NumberOfRecentMissingDigisHF, NumberOfRecentMissingDigisHO, NumberOfRecentMissingRecHits, NumberOfRecentMissingRecHitsHB, NumberOfRecentMissingRecHitsHE, NumberOfRecentMissingRecHitsHF, NumberOfRecentMissingRecHitsHO, ProblemsInLastNLB_HBHEHF_alarm, ProblemsVsLB, ProblemsVsLB_HB, HcalBaseDQMonitor::ProblemsVsLB_HBHEHF, ProblemsVsLB_HE, ProblemsVsLB_HF, ProblemsVsLB_HO, RBX_loss_VS_LB, RecentMissingDigisByDepth, RecentMissingRecHitsByDepth, RecHitPresentByDepth, reset(), MonitorElement::setBinLabel(), DQMStore::setCurrentFolder(), HcalBaseDQMonitor::setup(), HcalBaseDQMonitor::SetupEtaPhiHists(), HcalBaseDQMonitor::subdir_, and zeroCounters().

Referenced by beginRun().

73 {
75  zeroCounters(1); // make sure arrays are set up
76  if (debug_>0)
77  std::cout <<"<HcalDeadCellMonitor::setup> Setting up histograms"<<std::endl;
78 
79  if (!dbe_) return;
80 
82  MonitorElement* excludeHO2=dbe_->bookInt("ExcludeHOring2");
83  // Fill with 0 if ring is not to be excluded; fill with 1 if it is to be excluded
84  if (excludeHO2) excludeHO2->Fill(excludeHORing2_==true ? 1 : 0);
85 
86  Nevents = dbe_->book1D("NumberOfDeadCellEvents","Number of Events Seen by DeadCellMonitor",2,0,2);
87  Nevents->setBinLabel(1,"allEvents");
88  Nevents->setBinLabel(2,"lumiCheck");
89  // 1D plots count number of bad cells vs. luminosity block
90  ProblemsVsLB=dbe_->bookProfile("TotalDeadCells_HCAL_vs_LS",
91  "Total Number of Dead Hcal Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
92  NLumiBlocks_,0.5,NLumiBlocks_+0.5,
93  100,0,10000);
94  ProblemsVsLB_HB=dbe_->bookProfile("TotalDeadCells_HB_vs_LS",
95  "Total Number of Dead HB Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
96  NLumiBlocks_,0.5,NLumiBlocks_+0.5,
97  100,0,10000);
98  ProblemsVsLB_HE=dbe_->bookProfile("TotalDeadCells_HE_vs_LS",
99  "Total Number of Dead HE Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
100  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
101  ProblemsVsLB_HO=dbe_->bookProfile("TotalDeadCells_HO_vs_LS",
102  "Total Number of Dead HO Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
103  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
104  ProblemsVsLB_HF=dbe_->bookProfile("TotalDeadCells_HF_vs_LS",
105  "Total Number of Dead HF Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
106  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
107  ProblemsVsLB_HBHEHF=dbe_->bookProfile("TotalDeadCells_HBHEHF_vs_LS",
108  "Total Number of Dead HBHEHF Cells (excluding known problems) vs LS;Lumi Section;Dead Cells",
109  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
110 
111  (ProblemsVsLB->getTProfile())->SetMarkerStyle(20);
112  (ProblemsVsLB_HB->getTProfile())->SetMarkerStyle(20);
113  (ProblemsVsLB_HE->getTProfile())->SetMarkerStyle(20);
114  (ProblemsVsLB_HO->getTProfile())->SetMarkerStyle(20);
115  (ProblemsVsLB_HF->getTProfile())->SetMarkerStyle(20);
116  (ProblemsVsLB_HBHEHF->getTProfile())->SetMarkerStyle(20);
117 
118  RBX_loss_VS_LB=dbe_->book2D("RBX_loss_VS_LB",
119  "RBX loss vs LS; Lumi Section; Index of lost RBX",
120  NLumiBlocks_,0.5,NLumiBlocks_+0.5,132,0,132);
121 
122  ProblemsInLastNLB_HBHEHF_alarm=dbe_->book1D("ProblemsInLastNLB_HBHEHF_alarm",
123  "Total Number of Dead HBHEHF Cells in last 10 LS. Last bin contains OverFlow",
124  100,0,100);
125 
126 
127  dbe_->setCurrentFolder(subdir_+"dead_cell_parameters");
128  MonitorElement* me=dbe_->bookInt("Test_NeverPresent_Digis");
129  me->Fill(1);
130  me=dbe_->bookInt("Test_DigiMissing_Periodic_Lumi_Check");
132  me->Fill(1);
133  else
134  me->Fill(0);
135  me=dbe_->bookInt("Min_Events_Required_Periodic_Lumi_Check");
137  me=dbe_->bookInt("Test_NeverPresent_RecHits");
138  deadmon_test_rechits_>0 ? me->Fill(1) : me->Fill(0);
139  me=dbe_->bookFloat("HBMinimumRecHitEnergy");
141  me=dbe_->bookFloat("HEMinimumRecHitEnergy");
143  me=dbe_->bookFloat("HOMinimumRecHitEnergy");
145  me=dbe_->bookFloat("HFMinimumRecHitEnergy");
147  me=dbe_->bookInt("Test_RecHitsMissing_Periodic_Lumi_Check");
148  deadmon_test_rechits_>0 ? me->Fill(1) : me->Fill(0);
149 
150  // ProblemCells plots are in HcalDeadCellClient!
151 
152  // Set up plots for each failure mode of dead cells
153  std::stringstream units; // We'll need to set the titles individually, rather than passing units to SetupEtaPhiHists (since this also would affect the name of the histograms)
154  std::stringstream name;
155 
156  // Never-present test will always be called, by definition of dead cell
157 
158  dbe_->setCurrentFolder(subdir_+"dead_digi_never_present");
160  "Digi Present At Least Once","");
161  // 1D plots count number of bad cells
162  NumberOfNeverPresentDigis=dbe_->bookProfile("Problem_NeverPresentDigis_HCAL_vs_LS",
163  "Total Number of Never-Present Hcal Cells vs LS;Lumi Section;Dead Cells",
164  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
165 
166  NumberOfNeverPresentDigisHB=dbe_->bookProfile("Problem_NeverPresentDigis_HB_vs_LS",
167  "Total Number of Never-Present HB Cells vs LS;Lumi Section;Dead Cells",
168  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
169 
170  NumberOfNeverPresentDigisHE=dbe_->bookProfile("Problem_NeverPresentDigis_HE_vs_LS",
171  "Total Number of Never-Present HE Cells vs LS;Lumi Section;Dead Cells",
172  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
173 
174  NumberOfNeverPresentDigisHO=dbe_->bookProfile("Problem_NeverPresentDigis_HO_vs_LS",
175  "Total Number of Never-Present HO Cells vs LS;Lumi Section;Dead Cells",
176  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
177 
178  NumberOfNeverPresentDigisHF=dbe_->bookProfile("Problem_NeverPresentDigis_HF_vs_LS",
179  "Total Number of Never-Present HF Cells vs LS;Lumi Section;Dead Cells",
180  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
181  (NumberOfNeverPresentDigis->getTProfile())->SetMarkerStyle(20);
182  (NumberOfNeverPresentDigisHB->getTProfile())->SetMarkerStyle(20);
183  (NumberOfNeverPresentDigisHE->getTProfile())->SetMarkerStyle(20);
184  (NumberOfNeverPresentDigisHO->getTProfile())->SetMarkerStyle(20);
185  (NumberOfNeverPresentDigisHF->getTProfile())->SetMarkerStyle(20);
186 
188 
190  {
191  dbe_->setCurrentFolder(subdir_+"dead_digi_often_missing");
192  //units<<"("<<deadmon_checkNevents_<<" consec. events)";
193  name<<"Dead Cells with No Digis";
195  name.str(),
196  "");
197  name.str("");
198  name<<"HB HE HF Depth 1 Dead Cells with No Digis for at least 1 Full Luminosity Block";
199  RecentMissingDigisByDepth.depth[0]->setTitle(name.str().c_str());
200 
201  name.str("");
202  name<<"HB HE HF Depth 2 Dead Cells with No Digis for at least 1 Full Luminosity Block";
203  RecentMissingDigisByDepth.depth[1]->setTitle(name.str().c_str());
204 
205  name.str("");
206  name<<"HE Depth 3 Dead Cells with No Digis for at least 1 Full Luminosity Block";
207  RecentMissingDigisByDepth.depth[2]->setTitle(name.str().c_str());
208 
209  name.str("");
210  name<<"HO Depth 4 Dead Cells with No Digis for at least 1 Full Luminosity Block";
211  RecentMissingDigisByDepth.depth[3]->setTitle(name.str().c_str());
212  name.str("");
213 
214  // 1D plots count number of bad cells
215  name<<"Total Number of Hcal Digis Unoccupied for at least 1 Full Luminosity Block";
216  NumberOfRecentMissingDigis=dbe_->bookProfile("Problem_RecentMissingDigis_HCAL_vs_LS",
217  name.str(),
218  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
219  name.str("");
220  name<<"Total Number of HB Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
221  NumberOfRecentMissingDigisHB=dbe_->bookProfile("Problem_RecentMissingDigis_HB_vs_LS",
222  name.str(),
223  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
224  name.str("");
225  name<<"Total Number of HE Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
226  NumberOfRecentMissingDigisHE=dbe_->bookProfile("Problem_RecentMissingDigis_HE_vs_LS",
227  name.str(),
228  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
229  name.str("");
230  name<<"Total Number of HO Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
231  NumberOfRecentMissingDigisHO=dbe_->bookProfile("Problem_RecentMissingDigis_HO_vs_LS",
232  name.str(),
233  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
234  name.str("");
235  name<<"Total Number of HF Digis Unoccupied for at least 1 Full LS vs LS;Lumi Section; Dead Cells";
236  NumberOfRecentMissingDigisHF=dbe_->bookProfile("Problem_RecentMissingDigis_HF_vs_LS",
237  name.str(),
238  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
239  (NumberOfRecentMissingDigis->getTProfile())->SetMarkerStyle(20);
240  (NumberOfRecentMissingDigisHB->getTProfile())->SetMarkerStyle(20);
241  (NumberOfRecentMissingDigisHE->getTProfile())->SetMarkerStyle(20);
242  (NumberOfRecentMissingDigisHO->getTProfile())->SetMarkerStyle(20);
243  (NumberOfRecentMissingDigisHF->getTProfile())->SetMarkerStyle(20);
244 
245  }
246 
248  {
249  // test 1: energy never above threshold
250  dbe_->setCurrentFolder(subdir_+"dead_rechit_neverpresent");
251  SetupEtaPhiHists(RecHitPresentByDepth,"RecHit Above Threshold At Least Once","");
252  // set more descriptive titles for threshold plots
253  units.str("");
254  units<<"Cells Above Energy Threshold At Least Once: Depth 1 -- HB >="<<HBenergyThreshold_<<" GeV, HE >= "<<HEenergyThreshold_<<", HF >="<<HFenergyThreshold_<<" GeV";
255  RecHitPresentByDepth.depth[0]->setTitle(units.str().c_str());
256  units.str("");
257  units<<"Cells Above Energy Threshold At Least Once: Depth 2 -- HB >="<<HBenergyThreshold_<<" GeV, HE >= "<<HEenergyThreshold_<<", HF >="<<HFenergyThreshold_<<" GeV";
258  RecHitPresentByDepth.depth[1]->setTitle(units.str().c_str());
259  units.str("");
260  units<<"Cells Above Energy Threshold At Least Once: Depth 3 -- HE >="<<HEenergyThreshold_<<" GeV";
261  RecHitPresentByDepth.depth[2]->setTitle(units.str().c_str());
262  units.str("");
263  units<<"Cells Above Energy Threshold At Least Once: Depth 4 -- HO >="<<HOenergyThreshold_<<" GeV";
264  RecHitPresentByDepth.depth[3]->setTitle(units.str().c_str());
265  units.str("");
266 
267  // 1D plots count number of bad cells
268  NumberOfNeverPresentRecHits=dbe_->bookProfile("Problem_RecHitsNeverPresent_HCAL_vs_LS",
269  "Total Number of Hcal Rechits with Low Energy;Lumi Section;Dead Cells",
270  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
271  name.str("");
272  name<<"Total Number of HB RecHits with Energy Never >= "<<HBenergyThreshold_<<" GeV;Lumi Section;Dead Cells";
273  NumberOfNeverPresentRecHitsHB=dbe_->bookProfile("Problem_RecHitsNeverPresent_HB_vs_LS",
274  name.str(),
275  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
276  name.str("");
277  name<<"Total Number of HE RecHits with Energy Never >= "<<HEenergyThreshold_<<" GeV;Lumi Section;Dead Cells";
278  NumberOfNeverPresentRecHitsHE=dbe_->bookProfile("Problem_RecHitsNeverPresent_HE_vs_LS",
279  name.str(),
280  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
281  name.str("");
282  name<<"Total Number of HO RecHits with Energy Never >= "<<HOenergyThreshold_<<" GeV;Lumi Section;Dead Cells";
283  NumberOfNeverPresentRecHitsHO=dbe_->bookProfile("Problem_RecHitsNeverPresent_HO_vs_LS",
284  name.str(),
285  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
286  name.str("");
287  name<<"Total Number of HF RecHits with Energy Never >= "<<HFenergyThreshold_<<" GeV;Lumi Section;Dead Cells";
288  NumberOfNeverPresentRecHitsHF=dbe_->bookProfile("Problem_RecHitsNeverPresent_HF_vs_LS",
289  name.str(),
290  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
291  (NumberOfNeverPresentRecHits->getTProfile())->SetMarkerStyle(20);
292  (NumberOfNeverPresentRecHitsHB->getTProfile())->SetMarkerStyle(20);
293  (NumberOfNeverPresentRecHitsHE->getTProfile())->SetMarkerStyle(20);
294  (NumberOfNeverPresentRecHitsHO->getTProfile())->SetMarkerStyle(20);
295  (NumberOfNeverPresentRecHitsHF->getTProfile())->SetMarkerStyle(20);
296 
297  dbe_->setCurrentFolder(subdir_+"dead_rechit_often_missing");
298  SetupEtaPhiHists(RecentMissingRecHitsByDepth,"RecHits Failing Energy Threshold Test","");
299  // set more descriptive titles for threshold plots
300  units.str("");
301  units<<"RecHits with Consistent Low Energy Depth 1 -- HB <"<<HBenergyThreshold_<<" GeV, HE < "<<HEenergyThreshold_<<", HF <"<<HFenergyThreshold_<<" GeV";
302  RecentMissingRecHitsByDepth.depth[0]->setTitle(units.str().c_str());
303  units.str("");
304  units<<"RecHits with Consistent Low Energy Depth 2 -- HB <"<<HBenergyThreshold_<<" GeV, HE < "<<HEenergyThreshold_<<", HF <"<<HFenergyThreshold_<<" GeV";
305  RecentMissingRecHitsByDepth.depth[1]->setTitle(units.str().c_str());
306  units.str("");
307  units<<"RecHits with Consistent Low Energy Depth 3 -- HE <"<<HEenergyThreshold_<<" GeV";
308  RecentMissingRecHitsByDepth.depth[2]->setTitle(units.str().c_str());
309  units.str("");
310  units<<"RecHits with Consistent Low Energy Depth 4 -- HO <"<<HOenergyThreshold_<<" GeV";
311  RecentMissingRecHitsByDepth.depth[3]->setTitle(units.str().c_str());
312  units.str("");
313 
314 
315  // 1D plots count number of bad cells
316  name.str("");
317  name<<"Total Number of Hcal RecHits with Consistent Low Energy;Lumi Section;Dead Cells";
318  NumberOfRecentMissingRecHits=dbe_->bookProfile("Problem_BelowEnergyRecHits_HCAL_vs_LS",
319  name.str(),
320  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
321  name.str("");
322  name<<"Total Number of HB RecHits with Consistent Low Energy < "<<HBenergyThreshold_<<" GeV;Lumi Section;Dead Cells";
323  NumberOfRecentMissingRecHitsHB=dbe_->bookProfile("Problem_BelowEnergyRecHits_HB_vs_LS",
324  name.str(),
325  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
326  name.str("");
327  name<<"Total Number of HE RecHits with Consistent Low Energy < "<<HEenergyThreshold_<<" GeV;Lumi Section;Dead Cells";
328  NumberOfRecentMissingRecHitsHE=dbe_->bookProfile("Problem_BelowEnergyRecHits_HE_vs_LS",
329  name.str(),
330  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
331  name.str("");
332  name<<"Total Number of HO RecHits with Consistent Low Energy < "<<HOenergyThreshold_<<" GeV;Lumi Section;Dead Cells";
333  NumberOfRecentMissingRecHitsHO=dbe_->bookProfile("Problem_BelowEnergyRecHits_HO_vs_LS",
334  name.str(),
335  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
336  name.str("");
337  name<<"Total Number of HF RecHits with Consistent Low Energy < "<<HFenergyThreshold_<<" GeV;Lumi Section;Dead Cells";
338  NumberOfRecentMissingRecHitsHF=dbe_->bookProfile("Problem_BelowEnergyRecHits_HF_vs_LS",
339  name.str(),
340  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
341  (NumberOfRecentMissingRecHits->getTProfile())->SetMarkerStyle(20);
342  (NumberOfRecentMissingRecHitsHB->getTProfile())->SetMarkerStyle(20);
343  (NumberOfRecentMissingRecHitsHE->getTProfile())->SetMarkerStyle(20);
344  (NumberOfRecentMissingRecHitsHO->getTProfile())->SetMarkerStyle(20);
345  (NumberOfRecentMissingRecHitsHF->getTProfile())->SetMarkerStyle(20);
346 
347  } // if (deadmon_test_rechits)
348 
349 
350  if (makeDiagnostics_)
351  {
352  dbe_->setCurrentFolder(subdir_+"DiagnosticPlots");
353  HBDeadVsEvent=dbe_->book1D("HBDeadVsEvent","HB Total Dead Cells Vs Event", NLumiBlocks_/10,-0.5,NLumiBlocks_-0.5);
354  HEDeadVsEvent=dbe_->book1D("HEDeadVsEvent","HE Total Dead Cells Vs Event", NLumiBlocks_/10,-0.5,NLumiBlocks_-0.5);
355  HODeadVsEvent=dbe_->book1D("HODeadVsEvent","HO Total Dead Cells Vs Event", NLumiBlocks_/10,-0.5,NLumiBlocks_-0.5);
356  HFDeadVsEvent=dbe_->book1D("HFDeadVsEvent","HF Total Dead Cells Vs Event", NLumiBlocks_/10,-0.5,NLumiBlocks_-0.5);
357  }
358 
359  this->reset();
360  return;
361 
362 } // void HcalDeadCellMonitor::setup(...)
MonitorElement * NumberOfNeverPresentRecHitsHO
MonitorElement * NumberOfRecentMissingRecHitsHF
MonitorElement * NumberOfNeverPresentRecHits
MonitorElement * NumberOfNeverPresentDigisHB
MonitorElement * HEDeadVsEvent
MonitorElement * NumberOfRecentMissingRecHits
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
void zeroCounters(bool resetpresent=false)
MonitorElement * NumberOfNeverPresentDigisHE
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * NumberOfRecentMissingDigisHB
MonitorElement * NumberOfRecentMissingDigisHE
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:451
void Fill(long long x)
EtaPhiHists RecHitPresentByDepth
MonitorElement * RBX_loss_VS_LB
std::vector< MonitorElement * > depth
MonitorElement * ProblemsVsLB
MonitorElement * NumberOfNeverPresentDigisHF
MonitorElement * ProblemsVsLB_HBHEHF
MonitorElement * NumberOfNeverPresentDigisHO
MonitorElement * NumberOfNeverPresentRecHitsHB
MonitorElement * Nevents
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:828
MonitorElement * NumberOfRecentMissingRecHitsHE
MonitorElement * ProblemsVsLB_HF
MonitorElement * NumberOfRecentMissingDigisHO
MonitorElement * NumberOfNeverPresentRecHitsHF
MonitorElement * ProblemsVsLB_HB
EtaPhiHists RecentMissingDigisByDepth
MonitorElement * NumberOfRecentMissingRecHitsHO
EtaPhiHists DigiPresentByDepth
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
EtaPhiHists RecentMissingRecHitsByDepth
void SetupEtaPhiHists(EtaPhiHists &hh, std::string Name, std::string Units)
MonitorElement * HBDeadVsEvent
MonitorElement * NumberOfNeverPresentRecHitsHE
MonitorElement * ProblemsVsLB_HE
TProfile * getTProfile(void) const
MonitorElement * NumberOfNeverPresentDigis
MonitorElement * NumberOfRecentMissingDigis
MonitorElement * NumberOfRecentMissingDigisHF
tuple cout
Definition: gather_cfg.py:41
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:421
MonitorElement * ProblemsInLastNLB_HBHEHF_alarm
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
virtual void setup(void)
MonitorElement * HFDeadVsEvent
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
MonitorElement * HODeadVsEvent
MonitorElement * NumberOfRecentMissingRecHitsHB
MonitorElement * ProblemsVsLB_HO
void HcalDeadCellMonitor::zeroCounters ( bool  resetpresent = false)
private

Definition at line 1504 of file HcalDeadCellMonitor.cc.

References i, j, gen::k, occupancy_RBX, present_digi, present_rechit, rbxlost, recentoccupancy_digi, and recentoccupancy_rechit.

Referenced by endLuminosityBlock(), reset(), and setup().

1505 {
1506 
1507  // zero all counters
1508 
1509  // 2D histogram counters
1510  for (unsigned int i=0;i<85;++i)
1511  {
1512  for (unsigned int j=0;j<72;++j)
1513  {
1514  for (unsigned int k=0;k<4;++k)
1515  {
1516  if (resetpresent) present_digi[i][j][k]=false; // keeps track of whether digi was ever present
1517  if (resetpresent) present_rechit[i][j][k]=false;
1518  recentoccupancy_digi[i][j][k]=0; // counts occupancy in last (checkNevents) events
1519  recentoccupancy_rechit[i][j][k]=0; // counts instances of cell above threshold energy in last (checkNevents)
1520  }
1521  }
1522  }
1523 
1524  for (unsigned int i=0;i<132;++i)
1525  {
1526  occupancy_RBX[i] = 0;
1527  rbxlost[i] = 0;
1528  }
1529 
1530  return;
1531 } // void HcalDeadCellMonitor::zeroCounters(bool resetpresent)
int i
Definition: DBlmapReader.cc:9
unsigned int occupancy_RBX[132]
bool present_digi[85][72][4]
bool present_rechit[85][72][4]
int j
Definition: DBlmapReader.cc:9
unsigned int recentoccupancy_rechit[85][72][4]
int k[5][pyjets_maxn]
unsigned int recentoccupancy_digi[85][72][4]

Member Data Documentation

int HcalDeadCellMonitor::alarmer_counter_
private

Definition at line 110 of file HcalDeadCellMonitor.h.

Referenced by endLuminosityBlock(), fillNevents_problemCells(), and reset().

int HcalDeadCellMonitor::deadevt_
private
bool HcalDeadCellMonitor::deadmon_makeDiagnostics_
private

Definition at line 64 of file HcalDeadCellMonitor.h.

bool HcalDeadCellMonitor::deadmon_test_digis_
private
bool HcalDeadCellMonitor::deadmon_test_rechits_
private
edm::InputTag HcalDeadCellMonitor::digiLabel_
private

Definition at line 113 of file HcalDeadCellMonitor.h.

Referenced by analyze(), and HcalDeadCellMonitor().

EtaPhiHists HcalDeadCellMonitor::DigiPresentByDepth
private
bool HcalDeadCellMonitor::endLumiProcessed_
private

Definition at line 116 of file HcalDeadCellMonitor.h.

Referenced by analyze(), endLuminosityBlock(), and endRun().

double HcalDeadCellMonitor::energyThreshold_
private

Definition at line 78 of file HcalDeadCellMonitor.h.

Referenced by HcalDeadCellMonitor().

bool HcalDeadCellMonitor::excludeHO1P02_
private

Definition at line 119 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), and HcalDeadCellMonitor().

bool HcalDeadCellMonitor::excludeHORing2_
private
MonitorElement* HcalDeadCellMonitor::HBDeadVsEvent
private

Definition at line 100 of file HcalDeadCellMonitor.h.

Referenced by processEvent(), and setup().

double HcalDeadCellMonitor::HBenergyThreshold_
private

Definition at line 79 of file HcalDeadCellMonitor.h.

Referenced by HcalDeadCellMonitor(), process_RecHit(), and setup().

bool HcalDeadCellMonitor::hbhedcsON
private

Definition at line 111 of file HcalDeadCellMonitor.h.

Referenced by analyze(), endLuminosityBlock(), and reset().

edm::InputTag HcalDeadCellMonitor::hbheRechitLabel_
private

Definition at line 114 of file HcalDeadCellMonitor.h.

Referenced by analyze(), and HcalDeadCellMonitor().

MonitorElement * HcalDeadCellMonitor::HEDeadVsEvent
private

Definition at line 100 of file HcalDeadCellMonitor.h.

Referenced by processEvent(), and setup().

double HcalDeadCellMonitor::HEenergyThreshold_
private

Definition at line 80 of file HcalDeadCellMonitor.h.

Referenced by HcalDeadCellMonitor(), process_RecHit(), and setup().

bool HcalDeadCellMonitor::hfdcsON
private

Definition at line 111 of file HcalDeadCellMonitor.h.

Referenced by analyze(), endLuminosityBlock(), and reset().

MonitorElement * HcalDeadCellMonitor::HFDeadVsEvent
private

Definition at line 100 of file HcalDeadCellMonitor.h.

Referenced by processEvent(), and setup().

double HcalDeadCellMonitor::HFenergyThreshold_
private

Definition at line 82 of file HcalDeadCellMonitor.h.

Referenced by HcalDeadCellMonitor(), process_RecHit(), and setup().

edm::InputTag HcalDeadCellMonitor::hfRechitLabel_
private

Definition at line 114 of file HcalDeadCellMonitor.h.

Referenced by analyze(), and HcalDeadCellMonitor().

MonitorElement * HcalDeadCellMonitor::HODeadVsEvent
private

Definition at line 100 of file HcalDeadCellMonitor.h.

Referenced by processEvent(), and setup().

double HcalDeadCellMonitor::HOenergyThreshold_
private

Definition at line 81 of file HcalDeadCellMonitor.h.

Referenced by HcalDeadCellMonitor(), process_RecHit(), and setup().

edm::InputTag HcalDeadCellMonitor::hoRechitLabel_
private

Definition at line 114 of file HcalDeadCellMonitor.h.

Referenced by analyze(), and HcalDeadCellMonitor().

int HcalDeadCellMonitor::is_RBX_loss_
private
HcalLogicalMap* HcalDeadCellMonitor::logicalMap_
private
int HcalDeadCellMonitor::minDeadEventCount_
private
MonitorElement* HcalDeadCellMonitor::Nevents
private

Definition at line 98 of file HcalDeadCellMonitor.h.

Referenced by analyze(), fillNevents_problemCells(), reset(), and setup().

unsigned int HcalDeadCellMonitor::NumBadHB
private

Definition at line 112 of file HcalDeadCellMonitor.h.

Referenced by endLuminosityBlock(), and fillNevents_problemCells().

unsigned int HcalDeadCellMonitor::NumBadHE
private

Definition at line 112 of file HcalDeadCellMonitor.h.

Referenced by endLuminosityBlock(), and fillNevents_problemCells().

unsigned int HcalDeadCellMonitor::NumBadHF
private

Definition at line 112 of file HcalDeadCellMonitor.h.

Referenced by endLuminosityBlock(), and fillNevents_problemCells().

unsigned int HcalDeadCellMonitor::NumBadHFLUMI
private

Definition at line 112 of file HcalDeadCellMonitor.h.

Referenced by endLuminosityBlock(), and fillNevents_problemCells().

unsigned int HcalDeadCellMonitor::NumBadHO
private

Definition at line 112 of file HcalDeadCellMonitor.h.

Referenced by endLuminosityBlock(), and fillNevents_problemCells().

unsigned int HcalDeadCellMonitor::NumBadHO0
private

Definition at line 112 of file HcalDeadCellMonitor.h.

Referenced by endLuminosityBlock(), and fillNevents_problemCells().

unsigned int HcalDeadCellMonitor::NumBadHO12
private

Definition at line 112 of file HcalDeadCellMonitor.h.

Referenced by endLuminosityBlock(), and fillNevents_problemCells().

int HcalDeadCellMonitor::NumBadHO1P02
private

Definition at line 120 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells().

MonitorElement* HcalDeadCellMonitor::NumberOfNeverPresentDigis
private

Definition at line 93 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfNeverPresentDigisHB
private

Definition at line 93 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfNeverPresentDigisHE
private

Definition at line 93 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfNeverPresentDigisHF
private

Definition at line 93 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfNeverPresentDigisHO
private

Definition at line 93 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement* HcalDeadCellMonitor::NumberOfNeverPresentRecHits
private

Definition at line 96 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfNeverPresentRecHitsHB
private

Definition at line 96 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfNeverPresentRecHitsHE
private

Definition at line 96 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfNeverPresentRecHitsHF
private

Definition at line 96 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfNeverPresentRecHitsHO
private

Definition at line 96 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), reset(), and setup().

MonitorElement* HcalDeadCellMonitor::NumberOfRecentMissingDigis
private

Definition at line 94 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfRecentMissingDigisHB
private

Definition at line 94 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfRecentMissingDigisHE
private

Definition at line 94 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfRecentMissingDigisHF
private

Definition at line 94 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfRecentMissingDigisHO
private

Definition at line 94 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement* HcalDeadCellMonitor::NumberOfRecentMissingRecHits
private

Definition at line 95 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfRecentMissingRecHitsHB
private

Definition at line 95 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfRecentMissingRecHitsHE
private

Definition at line 95 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfRecentMissingRecHitsHF
private

Definition at line 95 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::NumberOfRecentMissingRecHitsHO
private

Definition at line 95 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), processEvent(), reset(), and setup().

unsigned int HcalDeadCellMonitor::occupancy_RBX[132]
private
bool HcalDeadCellMonitor::present_digi[85][72][4]
private
bool HcalDeadCellMonitor::present_rechit[85][72][4]
private

Definition at line 102 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), process_RecHit(), and zeroCounters().

MonitorElement* HcalDeadCellMonitor::ProblemsInLastNLB_HBHEHF_alarm
private

Definition at line 92 of file HcalDeadCellMonitor.h.

Referenced by endLuminosityBlock(), fillNevents_problemCells(), reset(), and setup().

MonitorElement* HcalDeadCellMonitor::ProblemsVsLB
private

Definition at line 90 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::ProblemsVsLB_HB
private

Definition at line 90 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::ProblemsVsLB_HE
private

Definition at line 90 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::ProblemsVsLB_HF
private

Definition at line 90 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), reset(), and setup().

MonitorElement * HcalDeadCellMonitor::ProblemsVsLB_HO
private

Definition at line 90 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), reset(), and setup().

MonitorElement* HcalDeadCellMonitor::RBX_loss_VS_LB
private

Definition at line 91 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_problemCells(), reset(), and setup().

int HcalDeadCellMonitor::rbxlost[132]
private

Definition at line 109 of file HcalDeadCellMonitor.h.

Referenced by analyze(), endLuminosityBlock(), and zeroCounters().

EtaPhiHists HcalDeadCellMonitor::RecentMissingDigisByDepth
private

Definition at line 84 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_recentdigis(), processEvent(), reset(), and setup().

EtaPhiHists HcalDeadCellMonitor::RecentMissingRecHitsByDepth
private

Definition at line 86 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_recentrechits(), processEvent(), reset(), and setup().

unsigned int HcalDeadCellMonitor::recentoccupancy_digi[85][72][4]
private
unsigned int HcalDeadCellMonitor::recentoccupancy_rechit[85][72][4]
private
EtaPhiHists HcalDeadCellMonitor::RecHitPresentByDepth
private

Definition at line 87 of file HcalDeadCellMonitor.h.

Referenced by fillNevents_recentrechits(), process_RecHit(), reset(), and setup().