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
HcalHotCellMonitor Class Reference

#include <HcalHotCellMonitor.h>

Inheritance diagram for HcalHotCellMonitor:
HcalBaseDQMonitor edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (edm::Event const &e, edm::EventSetup const &s)
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void beginRun (const edm::Run &run, const edm::EventSetup &c)
 
void cleanup (void)
 
void done ()
 
void endJob ()
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void endRun (const edm::Run &run, const edm::EventSetup &c)
 
 HcalHotCellMonitor (const edm::ParameterSet &ps)
 
void periodicReset ()
 
void processEvent (const HBHERecHitCollection &hbHits, const HORecHitCollection &hoHits, const HFRecHitCollection &hfHits)
 
void processEvent_rechitenergy (const HBHERecHitCollection &hbheHits, const HORecHitCollection &hoHits, const HFRecHitCollection &hfHits)
 
template<class R , class C >
void processHit_rechitNeighbors (R &rechititer, C &collection, hotNeighborParams &params)
 
template<class RECHIT , class RECHITCOLLECTION >
void processHit_rechitNeighbors (RECHIT &rechit, RECHITCOLLECTION &coll, hotNeighborParams &params)
 
void reset ()
 
void setup ()
 
 ~HcalHotCellMonitor ()
 
- Public Member Functions inherited from HcalBaseDQMonitor
 HcalBaseDQMonitor (const edm::ParameterSet &ps)
 
 HcalBaseDQMonitor ()
 
virtual ~HcalBaseDQMonitor ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void fillNevents_energy ()
 
void fillNevents_neighbor ()
 
void fillNevents_persistentenergy ()
 
void fillNevents_problemCells ()
 
void zeroCounters ()
 

Private Attributes

int aboveenergy [85][72][4]
 
EtaPhiHists AboveEnergyThresholdCellsByDepth
 
int aboveet [85][72][4]
 
EtaPhiHists AboveETThresholdCellsByDepth
 
int aboveneighbors [85][72][4]
 
EtaPhiHists AboveNeighborsHotCellsByDepth
 
int abovepersistent [85][72][4]
 
int abovepersistentET [85][72][4]
 
EtaPhiHists AbovePersistentETThresholdCellsByDepth
 
EtaPhiHists AbovePersistentThresholdCellsByDepth
 
MonitorElementd_HBenergyVsNeighbor
 
MonitorElementd_HEenergyVsNeighbor
 
MonitorElementd_HFenergyVsNeighbor
 
MonitorElementd_HOenergyVsNeighbor
 
double energyThreshold_
 
double ETThreshold_
 
bool excludeHORing2_
 
double HBenergyThreshold_
 
double HBETThreshold_
 
hotNeighborParams HBHENeighborParams_
 
edm::InputTag hbheRechitLabel_
 
double HBnsigma_
 
double HBpersistentETThreshold_
 
double HBpersistentThreshold_
 
int hbVsNeighbor [500]
 
double HEenergyThreshold_
 
double HEETThreshold_
 
double HEnsigma_
 
double HEpersistentETThreshold_
 
double HEpersistentThreshold_
 
int heVsNeighbor [500]
 
double HFenergyThreshold_
 
double HFETThreshold_
 
double HFfarfwdScale_
 
hotNeighborParams HFNeighborParams_
 
double HFnsigma_
 
double HFpersistentETThreshold_
 
double HFpersistentThreshold_
 
edm::InputTag hfRechitLabel_
 
int hfVsNeighbor [500]
 
double HOenergyThreshold_
 
double HOETThreshold_
 
hotNeighborParams HONeighborParams_
 
double HOnsigma_
 
double HOpersistentETThreshold_
 
double HOpersistentThreshold_
 
edm::InputTag hoRechitLabel_
 
int hoVsNeighbor [500]
 
double minErrorFlag_
 
int minEvents_
 
double nsigma_
 
double persistentETThreshold_
 
double persistentThreshold_
 
int rechit_occupancy_sum [85][72][4]
 
bool setupDone_
 
double SiPMscale_
 
bool test_energy_
 
bool test_et_
 
bool test_neighbor_
 
bool test_persistent_
 

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)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from HcalBaseDQMonitor
virtual void beginJob ()
 
void getLogicalMap (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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- 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_
 
HcalLogicalMaplogicalMap_
 
bool makeDiagnostics_
 
MonitorElementmeIevt_
 
MonitorElementmeLevt_
 
bool mergeRuns_
 
MonitorElementmeTevt_
 
MonitorElementmeTevtHist_
 
bool needLogicalMap_
 
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:
2012/06/27 13:20:29
Revision:
1.45
Author
J. Temple - Univ. of Maryland

Definition at line 30 of file HcalHotCellMonitor.h.

Constructor & Destructor Documentation

HcalHotCellMonitor::HcalHotCellMonitor ( const edm::ParameterSet ps)

Definition at line 5 of file HcalHotCellMonitor.cc.

References HcalBaseDQMonitor::AllowedCalibTypes_, HcalBaseDQMonitor::debug_, hotNeighborParams::DeltaDepth, hotNeighborParams::DeltaIeta, hotNeighborParams::DeltaIphi, HcalBaseDQMonitor::enableCleanup_, energyThreshold_, ETThreshold_, excludeHORing2_, edm::ParameterSet::getUntrackedParameter(), HBenergyThreshold_, HBETThreshold_, HBHENeighborParams_, hbheRechitLabel_, HBpersistentETThreshold_, HBpersistentThreshold_, HEenergyThreshold_, HEETThreshold_, HEpersistentETThreshold_, HEpersistentThreshold_, HFenergyThreshold_, HFETThreshold_, HFfarfwdScale_, HFNeighborParams_, HFpersistentETThreshold_, HFpersistentThreshold_, hfRechitLabel_, HOenergyThreshold_, HOETThreshold_, HONeighborParams_, HOpersistentETThreshold_, HOpersistentThreshold_, hoRechitLabel_, hotNeighborParams::HotEnergyFrac, HcalBaseDQMonitor::makeDiagnostics_, hotNeighborParams::maxEnergy, HcalBaseDQMonitor::mergeRuns_, hotNeighborParams::minCellEnergy, minErrorFlag_, minEvents_, hotNeighborParams::minNeighborEnergy, HcalBaseDQMonitor::NLumiBlocks_, HcalBaseDQMonitor::Online_, persistentETThreshold_, persistentThreshold_, HcalBaseDQMonitor::prefixME_, setupDone_, SiPMscale_, HcalBaseDQMonitor::skipOutOfOrderLS_, AlCaHLTBitMon_QueryRunRegistry::string, HcalBaseDQMonitor::subdir_, test_energy_, test_et_, test_neighbor_, and test_persistent_.

6 {
7  // Standard information, inherited from base class
8  Online_ = ps.getUntrackedParameter<bool>("online",false);
9  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns",false);
10  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup",false);
11  debug_ = ps.getUntrackedParameter<int>("debug",0);
12  makeDiagnostics_ = ps.getUntrackedParameter<bool>("makeDiagnostics",false);
13  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
14  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
15  prefixME_.append("/");
16  subdir_ = ps.getUntrackedParameter<std::string>("TaskFolder","HotCellMonitor_Hcal/"); // HotCellMonitor_Hcal
17  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
18  subdir_.append("/");
19  subdir_=prefixME_+subdir_;
20  AllowedCalibTypes_ = ps.getUntrackedParameter<std::vector<int> > ("AllowedCalibTypes");
21  skipOutOfOrderLS_ = ps.getUntrackedParameter<bool>("skipOutOfOrderLS",true);
22  NLumiBlocks_ = ps.getUntrackedParameter<int>("NLumiBlocks",4000);
23 
24  // Collection type info
25  hbheRechitLabel_ = ps.getUntrackedParameter<edm::InputTag>("hbheRechitLabel");
26  hoRechitLabel_ = ps.getUntrackedParameter<edm::InputTag>("hoRechitLabel");
27  hfRechitLabel_ = ps.getUntrackedParameter<edm::InputTag>("hfRechitLabel");
28 
29  // Hot Cell-specific tests
30  minEvents_ = ps.getUntrackedParameter<int>("minEvents");
31  minErrorFlag_ = ps.getUntrackedParameter<double>("minErrorFlag",1);
32 
33  // exclude HO ring 2
34  excludeHORing2_ = ps.getUntrackedParameter<bool>("excludeHORing2",false);
35 
36 
37  // Set which hot cell checks will be performed
38  test_persistent_ = ps.getUntrackedParameter<bool>("test_persistent"); // true by default
39  test_neighbor_ = ps.getUntrackedParameter<bool>("test_neighbor"); // false by default; test disabled
40  test_energy_ = ps.getUntrackedParameter<bool>("test_energy"); // true by default
41  test_et_ = ps.getUntrackedParameter<bool>("test_et"); // true by default
42 
43 
44  // rechit energy test -- cell must be above threshold value for a number of consecutive events to be considered hot
45  energyThreshold_ = ps.getUntrackedParameter<double>("energyThreshold");
46  ETThreshold_ = ps.getUntrackedParameter<double>("ETThreshold");
47 
48  HBenergyThreshold_ = ps.getUntrackedParameter<double>("energyThreshold_HB",energyThreshold_);
49  HEenergyThreshold_ = ps.getUntrackedParameter<double>("energyThreshold_HE",energyThreshold_);
50  HOenergyThreshold_ = ps.getUntrackedParameter<double>("energyThreshold_HO",energyThreshold_);
51  HFenergyThreshold_ = ps.getUntrackedParameter<double>("energyThreshold_HF",energyThreshold_);
52 
53  HBETThreshold_ = ps.getUntrackedParameter<double>("ETThreshold_HB",ETThreshold_);
54  HEETThreshold_ = ps.getUntrackedParameter<double>("ETThreshold_HE",ETThreshold_);
55  HOETThreshold_ = ps.getUntrackedParameter<double>("ETThreshold_HO",ETThreshold_);
56  HFETThreshold_ = ps.getUntrackedParameter<double>("ETThreshold_HF",ETThreshold_);
57 
58  // rechit event-by-event energy test -- cell must be above threshold to be considered hot
59  persistentThreshold_ = ps.getUntrackedParameter<double>("persistentThreshold");
60 
61  HBpersistentThreshold_ = ps.getUntrackedParameter<double>("persistentThreshold_HB",persistentThreshold_);
62  HEpersistentThreshold_ = ps.getUntrackedParameter<double>("persistentThreshold_HE",persistentThreshold_);
63  HOpersistentThreshold_ = ps.getUntrackedParameter<double>("persistentThreshold_HO",persistentThreshold_);
64  HFpersistentThreshold_ = ps.getUntrackedParameter<double>("persistentThreshold_HF",persistentThreshold_);
65 
66  persistentETThreshold_ = ps.getUntrackedParameter<double>("persistentETThreshold");
67 
68  HBpersistentETThreshold_ = ps.getUntrackedParameter<double>("persistentETThreshold_HB",persistentETThreshold_);
69  HEpersistentETThreshold_ = ps.getUntrackedParameter<double>("persistentETThreshold_HE",persistentETThreshold_);
70  HOpersistentETThreshold_ = ps.getUntrackedParameter<double>("persistentETThreshold_HO",persistentETThreshold_);
71  HFpersistentETThreshold_ = ps.getUntrackedParameter<double>("persistentETThreshold_HF",persistentETThreshold_);
72 
73  HFfarfwdScale_ = ps.getUntrackedParameter<double>("HFfwdScale",2.);
74  SiPMscale_ = ps.getUntrackedParameter<double>("HO_SiPMscalefactor",1.); // default scale factor of 4?
75 
76  // neighboring-cell tests
77  HBHENeighborParams_.DeltaIphi = ps.getUntrackedParameter<int>("HBHE_neighbor_deltaIphi", 1);
78  HBHENeighborParams_.DeltaIeta = ps.getUntrackedParameter<int>("HBHE_neighbor_deltaIeta", 1);
79  HBHENeighborParams_.DeltaDepth = ps.getUntrackedParameter<int>("HBHE_neighbor_deltaDepth", 2);
80  HBHENeighborParams_.minCellEnergy = ps.getUntrackedParameter<double>("HBHE_neighbor_minCellEnergy",3.);
81  HBHENeighborParams_.minNeighborEnergy = ps.getUntrackedParameter<double>("HBHE_neighbor_minNeighborEnergy",0.);
82  HBHENeighborParams_.maxEnergy = ps.getUntrackedParameter<double>("HBHE_neighbor_maxEnergy",100);
83  HBHENeighborParams_.HotEnergyFrac = ps.getUntrackedParameter<double>("HBHE_neighbor_HotEnergyFrac",0.05);
84 
85  HONeighborParams_.DeltaIphi = ps.getUntrackedParameter<int>("HO_neighbor_deltaIphi", 1);
86  HONeighborParams_.DeltaIeta = ps.getUntrackedParameter<int>("HO_neighbor_deltaIeta", 1);
87  HONeighborParams_.DeltaDepth = ps.getUntrackedParameter<int>("HO_neighbor_deltaDepth", 0);
88  HONeighborParams_.minCellEnergy = ps.getUntrackedParameter<double>("HO_neighbor_minCellEnergy",10.);
89  HONeighborParams_.minNeighborEnergy = ps.getUntrackedParameter<double>("HO_neighbor_minNeighborEnergy",0.);
90  HONeighborParams_.maxEnergy = ps.getUntrackedParameter<double>("HO_neighbor_maxEnergy",100);
91  HONeighborParams_.HotEnergyFrac = ps.getUntrackedParameter<double>("HO_neighbor_HotEnergyFrac",0.01);
92 
93  HFNeighborParams_.DeltaIphi = ps.getUntrackedParameter<int>("HF_neighbor_deltaIphi", 1);
94  HFNeighborParams_.DeltaIeta = ps.getUntrackedParameter<int>("HF_neighbor_deltaIeta", 1);
95  HFNeighborParams_.DeltaDepth = ps.getUntrackedParameter<int>("HF_neighbor_deltaDepth", 1);
96  HFNeighborParams_.minCellEnergy = ps.getUntrackedParameter<double>("HF_neighbor_minCellEnergy",10.);
97  HFNeighborParams_.minNeighborEnergy = ps.getUntrackedParameter<double>("HF_neighbor_minNeighborEnergy",0.);
98  HFNeighborParams_.maxEnergy = ps.getUntrackedParameter<double>("HF_neighbor_maxEnergy",100);
99  HFNeighborParams_.HotEnergyFrac = ps.getUntrackedParameter<double>("HF_neighbor_HotEnergyFrac",0.01);
100  setupDone_=false;
101 } //constructor
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag hoRechitLabel_
hotNeighborParams HONeighborParams_
std::vector< int > AllowedCalibTypes_
hotNeighborParams HBHENeighborParams_
edm::InputTag hbheRechitLabel_
edm::InputTag hfRechitLabel_
hotNeighborParams HFNeighborParams_
HcalHotCellMonitor::~HcalHotCellMonitor ( )

Definition at line 103 of file HcalHotCellMonitor.cc.

104 {
105 } //destructor

Member Function Documentation

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 371 of file HcalHotCellMonitor.cc.

References HcalBaseDQMonitor::analyze(), gather_cfg::cout, HcalBaseDQMonitor::debug_, edm::Event::getByLabel(), hbheRechitLabel_, hfRechitLabel_, hoRechitLabel_, HcalBaseDQMonitor::ievt_, HcalBaseDQMonitor::IsAllowedCalibType(), HcalBaseDQMonitor::LumiInOrder(), edm::EventBase::luminosityBlock(), and processEvent().

372 {
373 
374  if (!IsAllowedCalibType()) return;
375  if (LumiInOrder(e.luminosityBlock())==false) return;
376 
377  // try to get rechits
381 
382  if (!(e.getByLabel(hbheRechitLabel_,hbhe_rechit)))
383  {
384  edm::LogWarning("HcalHotCellMonitor")<< hbheRechitLabel_<<" hbhe_rechit not available";
385  return;
386  }
387 
388  if (!(e.getByLabel(hfRechitLabel_,hf_rechit)))
389  {
390  edm::LogWarning("HcalHotCellMonitor")<< hfRechitLabel_<<" hf_rechit not available";
391  return;
392  }
393  if (!(e.getByLabel(hoRechitLabel_,ho_rechit)))
394  {
395  edm::LogWarning("HcalHotCellMonitor")<< hoRechitLabel_<<" ho_rechit not available";
396  return;
397  }
398 
399  // Good event found; increment counter (via base class analyze method)
400 
402  if (debug_>1) std::cout <<"\t<HcalHotCellMonitor::analyze> Processing good event! event # = "<<ievt_<<std::endl;
403 
404  processEvent(*hbhe_rechit, *ho_rechit, *hf_rechit);
405 
406 } // void HcalHotCellMonitor::analyze(...)
bool LumiInOrder(int lumisec)
edm::InputTag hoRechitLabel_
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
void processEvent(const HBHERecHitCollection &hbHits, const HORecHitCollection &hoHits, const HFRecHitCollection &hfHits)
edm::InputTag hbheRechitLabel_
edm::InputTag hfRechitLabel_
tuple cout
Definition: gather_cfg.py:121
void HcalHotCellMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 328 of file HcalHotCellMonitor.cc.

References HcalBaseDQMonitor::beginLuminosityBlock(), HcalBaseDQMonitor::LumiInOrder(), edm::LuminosityBlockBase::luminosityBlock(), HcalBaseDQMonitor::ProblemsCurrentLB, MonitorElement::Reset(), and zeroCounters().

330 {
331  if (LumiInOrder(lumiSeg.luminosityBlock())==false) return;
333  zeroCounters(); // zero hot cell counters at the start of each luminosity block
335  return;
336 } // beginLuminosityBlock(...)
bool LumiInOrder(int lumisec)
MonitorElement * ProblemsCurrentLB
LuminosityBlockNumber_t luminosityBlock() const
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
void Reset(void)
reset ME (ie. contents, errors, etc)
void HcalHotCellMonitor::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 280 of file HcalHotCellMonitor.cc.

References HcalBaseDQMonitor::beginRun(), gather_cfg::cout, HcalBaseDQMonitor::debug_, HcalBaseDQMonitor::mergeRuns_, reset(), setup(), and HcalBaseDQMonitor::tevt_.

281 {
282  if (debug_>1) std::cout <<"HcalHotCellMonitor::beginRun"<<std::endl;
284 
285  if (tevt_==0) this->setup(); // set up histograms if they have not been created before
286  if (mergeRuns_==false)
287  this->reset();
288 
289  return;
290 } //void HcalHotCellMonitor::beginRun(...)
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
tuple cout
Definition: gather_cfg.py:121
void HcalHotCellMonitor::cleanup ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 1144 of file HcalHotCellMonitor.cc.

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

Referenced by endJob().

1145 {
1146  if (debug_>0) std::cout <<"HcalHotCellMonitor::cleanup()"<<std::endl;
1147  if (!enableCleanup_) return;
1148  if (dbe_)
1149  {
1150  // removeContents doesn't remove subdirectories
1152  dbe_->removeContents();
1153  dbe_->setCurrentFolder(subdir_+"hot_rechit_above_threshold");
1154  dbe_->removeContents();
1155  dbe_->setCurrentFolder(subdir_+"hot_rechit_always_above_threshold");
1156  dbe_->removeContents();
1157  dbe_->setCurrentFolder(subdir_+"hot_neighbortest");
1158  dbe_->removeContents();
1159  dbe_->setCurrentFolder(subdir_+"LSvalues");
1160  dbe_->removeContents();
1161  }
1162 } // cleanup
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:2569
tuple cout
Definition: gather_cfg.py:121
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void HcalHotCellMonitor::done ( )

Definition at line 363 of file HcalHotCellMonitor.cc.

364 {
365  // moved database dumps to client; we want to be able to sum over results in offline
366  return;
367 
368 } // void HcalHotCellMonitor::done()
void HcalHotCellMonitor::endJob ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 1138 of file HcalHotCellMonitor.cc.

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

1139 {
1140  if (debug_>0) std::cout <<"HcalHotCellMonitor::endJob()"<<std::endl;
1141  if (enableCleanup_) cleanup(); // when do we force cleanup?
1142 }
tuple cout
Definition: gather_cfg.py:121
void HcalHotCellMonitor::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 339 of file HcalHotCellMonitor.cc.

References fillNevents_energy(), fillNevents_neighbor(), fillNevents_persistentenergy(), fillNevents_problemCells(), HcalBaseDQMonitor::LumiInOrder(), edm::LuminosityBlockBase::luminosityBlock(), HcalBaseDQMonitor::makeDiagnostics_, test_energy_, test_et_, test_neighbor_, and test_persistent_.

341 {
342  //FIX with check on whether LB already processed
343 
344  if (LumiInOrder(lumiSeg.luminosityBlock())==false) return;
345 
348 
349  if (test_energy_ || test_et_)
351 
352  if (test_persistent_)
354 
356  return;
357 } //endLuminosityBlock(...)
bool LumiInOrder(int lumisec)
LuminosityBlockNumber_t luminosityBlock() const
void HcalHotCellMonitor::endRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 1133 of file HcalHotCellMonitor.cc.

1134 {
1135  // Anything to do here?
1136 }
void HcalHotCellMonitor::fillNevents_energy ( void  )
private

Definition at line 807 of file HcalHotCellMonitor.cc.

References aboveenergy, AboveEnergyThresholdCellsByDepth, aboveet, AboveETThresholdCellsByDepth, HcalObjRepresent::CalcIeta(), gather_cfg::cout, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, eta(), HcalObjRepresent::FillUnphysicalHEHFBins(), h, HcalForward, HcalBaseDQMonitor::ievt_, phi, test_energy_, test_et_, and validDetId().

Referenced by endLuminosityBlock().

808 {
809  // Fill Histograms showing rec hits that are above some energy value
810  // (Fill for each instance when cell is above energy; don't require it to be hot for a number of consecutive events)
811 
812  if (debug_>0)
813  std::cout <<"<HcalHotCellMonitor::fillNevents_energy> ABOVE-ENERGY-THRESHOLD PLOTS"<<std::endl;
814 
815  if (test_energy_)
816  {
817  for (unsigned int h=0;h<AboveEnergyThresholdCellsByDepth.depth.size();++h)
818  AboveEnergyThresholdCellsByDepth.depth[h]->setBinContent(0,0,ievt_);
819  }
820  if (test_et_)
821  {
822  for (unsigned int h=0;h<AboveETThresholdCellsByDepth.depth.size();++h)
823  AboveETThresholdCellsByDepth.depth[h]->setBinContent(0,0,ievt_);
824  }
825 
826  int ieta=0;
827  int iphi=0;
828  int etabins=0;
829  int phibins=0;
830  unsigned int maxdepth=0;
831 
832  if (test_energy_)
833  maxdepth = AboveEnergyThresholdCellsByDepth.depth.size();
834  if (maxdepth==0 && test_et_)
835  maxdepth = AboveETThresholdCellsByDepth.depth.size();
836  for (unsigned int depth=0;depth<maxdepth;++depth)
837  {
838  if (test_energy_)
839  {
840  etabins=AboveEnergyThresholdCellsByDepth.depth[depth]->getNbinsX();
841  phibins=AboveEnergyThresholdCellsByDepth.depth[depth]->getNbinsY();
842  }
843  if (test_et_)
844  {
845  etabins=AboveETThresholdCellsByDepth.depth[depth]->getNbinsX();
846  phibins=AboveETThresholdCellsByDepth.depth[depth]->getNbinsY();
847  }
848  for (int eta=0;eta<etabins;++eta)
849  {
850  for (int phi=0;phi<phibins;++phi)
851  {
852  iphi=phi+1;
853  for (int subdet=1;subdet<=4;++subdet)
854  {
855  ieta=CalcIeta((HcalSubdetector)subdet,eta,depth+1); //converts bin to ieta
856  if (ieta==-9999) continue;
857  if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1))
858  continue;
859  if (subdet==HcalForward) // shift HcalForward ieta by 1 for filling purposes
860  ieta<0 ? ieta-- : ieta++;
861 
862  if (test_energy_)
863  {
864  if (aboveenergy[eta][phi][depth]>0)
865  {
866  if (debug_>2)
867  std::cout <<"HOT CELL; ABOVE ENERGY THRESHOLD at subdet = "<<subdet<<", eta = "<<ieta<<", phi = "<<iphi<<" depth = "<<depth+1<<" ABOVE THRESHOLD IN "<<aboveenergy[eta][phi][depth]<<" EVENTS"<<std::endl;
868  AboveEnergyThresholdCellsByDepth.depth[depth]->Fill(ieta,iphi, aboveenergy[eta][phi][depth]);
869  aboveenergy[eta][phi][depth]=0;
870  } // if (aboveenergy[eta][phi][depth])
871  } // if (test_energy_)
872  if (test_et_)
873  {
874  if (aboveet[eta][phi][depth]>0)
875  {
876  if (debug_>2)
877  std::cout <<"HOT CELL; ABOVE ET THRESHOLD at subdet = "<<subdet<<", eta = "<<ieta<<", phi = "<<iphi<<" depth = "<<depth+1<<" ABOVE THRESHOLD IN "<<aboveet[eta][phi][depth]<<" EVENTS"<<std::endl;
878  AboveETThresholdCellsByDepth.depth[depth]->Fill(ieta,iphi, aboveet[eta][phi][depth]);
879  aboveet[eta][phi][depth]=0;
880  } // if (aboveet[eta][phi][depth])
881  } // if (test_et_)
882  } // for (int subdet=0)
883  } // for (int phi=0;...)
884  } // for (int eta=0;...)
885  } // for (int depth=0;...)
886 
887  if (test_energy_)
889 
890  if (test_et_)
892 
893  return;
894 
895 
896 } // void HcalHotCellMonitor::fillNevents_energy(void)
EtaPhiHists AboveEnergyThresholdCellsByDepth
int aboveenergy[85][72][4]
T eta() const
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
EtaPhiHists AboveETThresholdCellsByDepth
HcalSubdetector
Definition: HcalAssistant.h:32
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
int aboveet[85][72][4]
tuple cout
Definition: gather_cfg.py:121
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)
Definition: DDAxes.h:10
void HcalHotCellMonitor::fillNevents_neighbor ( void  )
private

Definition at line 902 of file HcalHotCellMonitor.cc.

References aboveneighbors, AboveNeighborsHotCellsByDepth, HcalObjRepresent::CalcIeta(), gather_cfg::cout, d_HBenergyVsNeighbor, d_HEenergyVsNeighbor, d_HFenergyVsNeighbor, d_HOenergyVsNeighbor, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, eta(), MonitorElement::Fill(), HcalObjRepresent::FillUnphysicalHEHFBins(), h, hbVsNeighbor, HcalForward, heVsNeighbor, hfVsNeighbor, hoVsNeighbor, i, HcalBaseDQMonitor::ievt_, HcalBaseDQMonitor::makeDiagnostics_, phi, and validDetId().

Referenced by endLuminosityBlock().

903 {
904  // Fill Histograms showing rec hits with energy much less than neighbors' average
905 
906  if (debug_>0)
907  std::cout <<"<HcalHotCellMonitor::fillNevents_neighbor> FILLING ABOVE-NEIGHBOR-ENERGY PLOTS"<<std::endl;
908 
909  for (unsigned int h=0;h<AboveNeighborsHotCellsByDepth.depth.size();++h)
910  AboveNeighborsHotCellsByDepth.depth[h]->setBinContent(0,0,ievt_);
911 
912  int ieta=0;
913  int iphi=0;
914  int etabins=0;
915  int phibins=0;
916 
917  for (unsigned int depth=0;depth<AboveNeighborsHotCellsByDepth.depth.size();++depth)
918  {
919  etabins=AboveNeighborsHotCellsByDepth.depth[depth]->getNbinsX();
920  phibins=AboveNeighborsHotCellsByDepth.depth[depth]->getNbinsY();
921 
922  for (int eta=0;eta<etabins;++eta)
923  {
924  for (int phi=0;phi<phibins;++phi)
925  {
926  iphi=phi+1;
927  for (int subdet=1;subdet<=4;++subdet)
928  {
929  ieta=CalcIeta((HcalSubdetector)subdet,eta,depth+1); //converts bin to ieta
930  if (ieta==-9999) continue;
931  if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1))
932  continue;
933  if (subdet==HcalForward) // shift HcalForward ieta by 1 for filling purposes
934  ieta<0 ? ieta-- : ieta++;
935 
936  if (aboveneighbors[eta][phi][depth]>0)
937  {
938  if (debug_>2) std::cout <<"HOT CELL; ABOVE NEIGHBORS at eta = "<<ieta<<", phi = "<<iphi<<" depth = "<<(depth>4 ? depth+1 : depth-3)<<std::endl;
939  AboveNeighborsHotCellsByDepth.depth[depth]->Fill(ieta,iphi,aboveneighbors[eta][phi][depth]);
940  //reset counter
941  aboveneighbors[eta][phi][depth]=0;
942  } // if (aboveneighbors[eta][phi][mydepth]>0)
943  } // for (int subdet=1;...)
944  } // for (int phi=0;...)
945  } // for (int eta=0;...)
946  } // for (unsigned int depth=0;...)
948 
949  if (!makeDiagnostics_) return;
950  for (int i=0;i<500;++i)
951  {
953  hbVsNeighbor[i]=0;
955  heVsNeighbor[i]=0;
957  hoVsNeighbor[i]=0;
959  hfVsNeighbor[i]=0;
960  }
961 
962  return;
963 
964 } // void HcalHotCellMonitor::fillNevents_neighbor(void)
int i
Definition: DBlmapReader.cc:9
int aboveneighbors[85][72][4]
T eta() const
void Fill(long long x)
std::vector< MonitorElement * > depth
MonitorElement * d_HFenergyVsNeighbor
int CalcIeta(int subdet, int eta, int depth)
HcalSubdetector
Definition: HcalAssistant.h:32
MonitorElement * d_HBenergyVsNeighbor
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
MonitorElement * d_HOenergyVsNeighbor
EtaPhiHists AboveNeighborsHotCellsByDepth
tuple cout
Definition: gather_cfg.py:121
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)
Definition: DDAxes.h:10
MonitorElement * d_HEenergyVsNeighbor
void HcalHotCellMonitor::fillNevents_persistentenergy ( void  )
private

Definition at line 698 of file HcalHotCellMonitor.cc.

References abovepersistent, abovepersistentET, AbovePersistentETThresholdCellsByDepth, AbovePersistentThresholdCellsByDepth, HcalObjRepresent::CalcIeta(), gather_cfg::cout, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, eta(), HcalObjRepresent::FillUnphysicalHEHFBins(), h, HcalForward, HcalBaseDQMonitor::ievt_, HcalBaseDQMonitor::levt_, minEvents_, phi, test_energy_, test_et_, and validDetId().

Referenced by endLuminosityBlock().

699 {
700  // Fill Histograms showing rechits with energies > some threshold for N consecutive events
701 
702  if (levt_<minEvents_) return;
703 
704  if (debug_>0)
705  std::cout <<"<HcalHotCellMonitor::fillNevents_persistentenergy> FILLING PERSISTENT ENERGY PLOTS"<<std::endl;
706 
707  if (test_energy_)
708  {
709  for (unsigned int h=0;h<AbovePersistentThresholdCellsByDepth.depth.size();++h)
710  AbovePersistentThresholdCellsByDepth.depth[h]->setBinContent(0,0,ievt_);
711 
712  int ieta=0;
713  int iphi=0;
714  int etabins=0;
715  int phibins=0;
716 
717  for (unsigned int depth=0;depth<AbovePersistentThresholdCellsByDepth.depth.size();++depth)
718  {
719  etabins=AbovePersistentThresholdCellsByDepth.depth[depth]->getNbinsX();
720  phibins=AbovePersistentThresholdCellsByDepth.depth[depth]->getNbinsY();
721 
722  for (int eta=0;eta<etabins;++eta)
723  {
724  for (int phi=0;phi<phibins;++phi)
725  {
726  iphi=phi+1;
727  for (int subdet=1;subdet<=4;++subdet)
728  {
729  ieta=CalcIeta((HcalSubdetector)subdet,eta,depth+1); //converts bin to ieta
730  if (ieta==-9999) continue;
731  if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1))
732  continue;
733  if (subdet==HcalForward) // shift HcalForward ieta by 1 for filling purposes
734  ieta<0 ? ieta-- : ieta++;
735 
736  // MUST BE ABOVE ENERGY THRESHOLD FOR ALL N EVENTS in a luminosity block
737  if (abovepersistent[eta][phi][depth]<levt_)
738  {
739  abovepersistent[eta][phi][depth]=0;
740  continue;
741  }
742  if (debug_>0) std::cout <<"HOT CELL; PERSISTENT ENERGY at subdet = "<<subdet<<", eta = "<<ieta<<", phi = "<<iphi<<" depth = "<<depth<<std::endl;
743  AbovePersistentThresholdCellsByDepth.depth[depth]->Fill(ieta,iphi,abovepersistent[eta][phi][depth]);
744  AbovePersistentThresholdCellsByDepth.depth[depth]->setBinContent(0,0,ievt_);
745  abovepersistent[eta][phi][depth]=0; // reset counter
746  } // for (int subdet=1; subdet<=4;++subdet)
747  } // for (int phi=0;...)
748  } // for (int eta=0;...)
749  } // for (unsigned int depth=0;...)
751  } // if (test_energy_)
752 
753  if (test_et_)
754  {
755  for (unsigned int h=0;h<AbovePersistentETThresholdCellsByDepth.depth.size();++h)
757 
758  int ieta=0;
759  int iphi=0;
760  int etabins=0;
761  int phibins=0;
762 
763  for (unsigned int depth=0;depth<AbovePersistentETThresholdCellsByDepth.depth.size();++depth)
764  {
765  etabins=AbovePersistentETThresholdCellsByDepth.depth[depth]->getNbinsX();
766  phibins=AbovePersistentETThresholdCellsByDepth.depth[depth]->getNbinsY();
767 
768  for (int eta=0;eta<etabins;++eta)
769  {
770  for (int phi=0;phi<phibins;++phi)
771  {
772  iphi=phi+1;
773  for (int subdet=1;subdet<=4;++subdet)
774  {
775  ieta=CalcIeta((HcalSubdetector)subdet,eta,depth+1); //converts bin to ieta
776  if (ieta==-9999) continue;
777  if (!validDetId((HcalSubdetector)subdet, ieta, iphi, depth+1))
778  continue;
779  if (subdet==HcalForward) // shift HcalForward ieta by 1 for filling purposes
780  ieta<0 ? ieta-- : ieta++;
781 
782  // MUST BE ABOVE ET THRESHOLD FOR ALL N EVENTS in a luminosity block
783  if (abovepersistentET[eta][phi][depth]<levt_)
784  {
785  abovepersistentET[eta][phi][depth]=0;
786  continue;
787  }
788  if (debug_>0) std::cout <<"HOT CELL; PERSISTENT ENERGY at subdet = "<<subdet<<", eta = "<<ieta<<", phi = "<<iphi<<" depth = "<<depth<<std::endl;
789  AbovePersistentETThresholdCellsByDepth.depth[depth]->Fill(ieta,iphi,abovepersistentET[eta][phi][depth]);
790  AbovePersistentETThresholdCellsByDepth.depth[depth]->setBinContent(0,0,ievt_);
791  abovepersistentET[eta][phi][depth]=0; // reset counter
792  } // for (int subdet=1; subdet<=4;++subdet)
793  } // for (int phi=0;...)
794  } // for (int eta=0;...)
795  } // for (unsigned int depth=0;...)
797 
798  } // if (test_et_)
799  // Add test_ET
800  return;
801 } // void HcalHotCellMonitor::fillNevents_persistentenergy(void)
int abovepersistent[85][72][4]
int abovepersistentET[85][72][4]
EtaPhiHists AbovePersistentThresholdCellsByDepth
EtaPhiHists AbovePersistentETThresholdCellsByDepth
T eta() const
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
HcalSubdetector
Definition: HcalAssistant.h:32
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
tuple cout
Definition: gather_cfg.py:121
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)
Definition: DDAxes.h:10
void HcalHotCellMonitor::fillNevents_problemCells ( void  )
private

Definition at line 971 of file HcalHotCellMonitor.cc.

References AboveEnergyThresholdCellsByDepth, AboveETThresholdCellsByDepth, AboveNeighborsHotCellsByDepth, AbovePersistentETThresholdCellsByDepth, AbovePersistentThresholdCellsByDepth, abs, HcalObjRepresent::CalcIeta(), gather_cfg::cout, HcalBaseDQMonitor::currentLS, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, eta(), MonitorElement::Fill(), HcalBaseDQMonitor::ievt_, isHB(), isHE(), isHF(), isHO(), HcalBaseDQMonitor::levt_, minErrorFlag_, phi, HcalBaseDQMonitor::ProblemsCurrentLB, HcalBaseDQMonitor::ProblemsVsLB, HcalBaseDQMonitor::ProblemsVsLB_HB, HcalBaseDQMonitor::ProblemsVsLB_HBHEHF, HcalBaseDQMonitor::ProblemsVsLB_HE, HcalBaseDQMonitor::ProblemsVsLB_HF, HcalBaseDQMonitor::ProblemsVsLB_HO, test_energy_, test_et_, test_neighbor_, and test_persistent_.

Referenced by endLuminosityBlock().

972 {
973  if (debug_>0)
974  std::cout <<"<HcalHotCellMonitor::fillNevents_problemCells> FILLING PROBLEM CELL PLOTS"<<std::endl;
975 
976  if (ievt_==0) return; // no events; no need to bother with this
977 
978  int ieta=0;
979  int etabins=0;
980  int phibins=0;
981  bool problemvalue=false;
982 
983  // Count problem cells in each subdetector
984  int NumBadHB=0;
985  int NumBadHE=0;
986  int NumBadHO=0;
987  int NumBadHF=0;
988  int NumBadHO0=0;
989  int NumBadHO12=0;
990  int NumBadHFLUMI=0;
991 
992  unsigned int DEPTH = 0;
993 
994  if (test_persistent_)
995  {
996  if (test_energy_)
998  else if (test_et_)
1000  }
1001  else if (test_energy_ && DEPTH==0) DEPTH = AboveEnergyThresholdCellsByDepth.depth.size();
1002  else if (test_et_ && DEPTH==0) DEPTH = AboveETThresholdCellsByDepth.depth.size();
1003  else if (test_neighbor_ && DEPTH==0) DEPTH = AboveNeighborsHotCellsByDepth.depth.size();
1004 
1005  if (DEPTH==0) return;
1006 
1007  for (unsigned int depth=0;depth<DEPTH;++depth)
1008  {
1009  if (test_persistent_)
1010  {
1011  if (test_energy_)
1012  {
1013  etabins=AbovePersistentThresholdCellsByDepth.depth[depth]->getNbinsX();
1014  phibins=AbovePersistentThresholdCellsByDepth.depth[depth]->getNbinsY();
1015  }
1016  else if (test_et_)
1017  {
1018  etabins=AbovePersistentETThresholdCellsByDepth.depth[depth]->getNbinsX();
1019  phibins=AbovePersistentETThresholdCellsByDepth.depth[depth]->getNbinsY();
1020  }
1021  }
1022 
1023  if (test_neighbor_ && (etabins==0 || phibins==0))
1024  {
1025  etabins=AboveNeighborsHotCellsByDepth.depth[depth]->getNbinsX();
1026  phibins=AboveNeighborsHotCellsByDepth.depth[depth]->getNbinsY();
1027  }
1028 
1029  if (test_energy_ && (etabins==0 || phibins==0))
1030  {
1031  etabins=AboveEnergyThresholdCellsByDepth.depth[depth]->getNbinsX();
1032  phibins=AboveEnergyThresholdCellsByDepth.depth[depth]->getNbinsY();
1033  }
1034 
1035  if (test_et_ && (etabins==0 || phibins==0))
1036  {
1037  etabins=AboveETThresholdCellsByDepth.depth[depth]->getNbinsX();
1038  phibins=AboveETThresholdCellsByDepth.depth[depth]->getNbinsY();
1039  }
1040 
1041  for (int eta=0;eta<etabins;++eta)
1042  {
1043  ieta=CalcIeta(eta,depth+1);
1044  if (ieta==-9999) continue;
1045  for (int phi=0;phi<phibins;++phi)
1046  {
1047  if (abs(ieta)>20 && phi%2==1) continue; //skip non-physical cells
1048  else if (abs(ieta)>39 && (phi+1)%4!=3) continue;
1049  // find problem rate for particular cell
1050  problemvalue=false;
1052  problemvalue=true;
1053  if (test_neighbor_ && AboveNeighborsHotCellsByDepth.depth[depth]->getBinContent(eta+1,phi+1)>minErrorFlag_*ievt_)
1054  problemvalue=true;
1055  if (test_energy_ && AboveEnergyThresholdCellsByDepth.depth[depth]->getBinContent(eta+1,phi+1)>minErrorFlag_*ievt_)
1056  problemvalue=true;
1057  if (test_et_ && AboveETThresholdCellsByDepth.depth[depth]->getBinContent(eta+1,phi+1)>minErrorFlag_*ievt_)
1058  problemvalue=true;
1060  problemvalue=true;
1061  if (problemvalue==false) continue;
1062  if (isHB(eta,depth+1)) ++NumBadHB;
1063  else if (isHE(eta,depth+1))
1064  ++NumBadHE;
1065  else if (isHO(eta,depth+1))
1066  {
1067  ++NumBadHO;
1068  if (abs(ieta)<5) ++NumBadHO0;
1069  else ++NumBadHO12;
1070  }
1071  else if (isHF(eta,depth+1))
1072  {
1073  ++NumBadHF;
1074  if (depth+1==1 && (abs(ieta)==33 || abs(ieta)==34)) ++NumBadHFLUMI;
1075  else if (depth+1==2 && (abs(ieta)==35 || abs(ieta)==36)) ++NumBadHFLUMI;
1076  }
1077  } // for (int phi=0;...)
1078  } //for (int eta=0;...)
1079  } // for (int depth=0;...)
1080 
1081  if (debug_>2) std::cout <<"<HcalHotCellMonitor::fillNevents_problemCells> Num Bad HB = "<<NumBadHB<<" Num Bad HE = "<<NumBadHE<<" Num Bad HO = "<<NumBadHO<<" Num Bad HF = "<<NumBadHF<<" CURRENT LS = "<<currentLS<<std::endl;
1082  // Fill number of problem cells
1083  ProblemsVsLB_HB->Fill(currentLS,NumBadHB);
1084  ProblemsVsLB_HE->Fill(currentLS,NumBadHE);
1085  ProblemsVsLB_HO->Fill(currentLS,NumBadHO);
1086  ProblemsVsLB_HF->Fill(currentLS,NumBadHF);
1087  ProblemsVsLB_HBHEHF->Fill(currentLS,NumBadHB+NumBadHE+NumBadHF);
1088  ProblemsVsLB->Fill(currentLS,NumBadHB+NumBadHE+NumBadHO+NumBadHF);
1089 
1090  ProblemsCurrentLB->Fill(-1,-1,levt_);
1091  ProblemsCurrentLB->Fill(0,0,NumBadHB);
1092  ProblemsCurrentLB->Fill(1,0,NumBadHE);
1093  ProblemsCurrentLB->Fill(2,0,NumBadHO);
1094  ProblemsCurrentLB->Fill(3,0,NumBadHF);
1095  ProblemsCurrentLB->Fill(4,0,NumBadHO0);
1096  ProblemsCurrentLB->Fill(5,0,NumBadHO12);
1097  ProblemsCurrentLB->Fill(6,0,NumBadHFLUMI);
1098 
1099 } // void HcalHotCellMonitor::fillNevents_problemCells(void)
bool isHO(int etabin, int depth)
EtaPhiHists AboveEnergyThresholdCellsByDepth
MonitorElement * ProblemsCurrentLB
MonitorElement * ProblemsVsLB_HF
#define abs(x)
Definition: mlp_lapack.h:159
EtaPhiHists AbovePersistentThresholdCellsByDepth
EtaPhiHists AbovePersistentETThresholdCellsByDepth
bool isHE(int etabin, int depth)
T eta() const
void Fill(long long x)
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
MonitorElement * ProblemsVsLB_HBHEHF
MonitorElement * ProblemsVsLB_HB
EtaPhiHists AboveETThresholdCellsByDepth
bool isHB(int etabin, int depth)
bool isHF(int etabin, int depth)
MonitorElement * ProblemsVsLB_HE
EtaPhiHists AboveNeighborsHotCellsByDepth
tuple cout
Definition: gather_cfg.py:121
MonitorElement * ProblemsVsLB_HO
MonitorElement * ProblemsVsLB
Definition: DDAxes.h:10
void HcalHotCellMonitor::periodicReset ( )

Definition at line 1164 of file HcalHotCellMonitor.cc.

References AboveEnergyThresholdCellsByDepth, AboveETThresholdCellsByDepth, AboveNeighborsHotCellsByDepth, AbovePersistentETThresholdCellsByDepth, AbovePersistentThresholdCellsByDepth, HcalBaseDQMonitor::makeDiagnostics_, EtaPhiHists::Reset(), test_energy_, test_et_, test_neighbor_, test_persistent_, and zeroCounters().

1165 {
1166 
1167  // first reset base class objects
1168  //FIX HcalBaseMonitor::periodicReset();
1169 
1170  // then reset the temporary histograms
1171  zeroCounters();
1172 
1173  // now reset all the MonitorElements
1174 
1175  // resetting eta-phi histograms
1176  if (test_neighbor_)
1180  if (test_et_ || makeDiagnostics_)
1182  if (test_persistent_)
1183  {
1185  if (test_et_)
1187  }
1188  return;
1189 }
EtaPhiHists AboveEnergyThresholdCellsByDepth
void Reset(void)
EtaPhiHists AbovePersistentThresholdCellsByDepth
EtaPhiHists AbovePersistentETThresholdCellsByDepth
EtaPhiHists AboveETThresholdCellsByDepth
EtaPhiHists AboveNeighborsHotCellsByDepth
void HcalHotCellMonitor::processEvent ( const HBHERecHitCollection hbHits,
const HORecHitCollection hoHits,
const HFRecHitCollection hfHits 
)

Definition at line 414 of file HcalHotCellMonitor.cc.

References gather_cfg::cout, HcalBaseDQMonitor::debug_, processEvent_rechitenergy(), test_energy_, test_et_, and test_persistent_.

Referenced by analyze().

418 {
419 
420  if (debug_>1) std::cout <<"<HcalHotCellMonitor::processEvent> Processing event..."<<std::endl;
421 
422  // Search for hot cells above a certain energy
424  {
425  processEvent_rechitenergy(hbHits, hoHits,hfHits);
426  }
427 
428  return;
429 } // void HcalHotCellMonitor::processEvent(...)
void processEvent_rechitenergy(const HBHERecHitCollection &hbheHits, const HORecHitCollection &hoHits, const HFRecHitCollection &hfHits)
tuple cout
Definition: gather_cfg.py:121
void HcalHotCellMonitor::processEvent_rechitenergy ( const HBHERecHitCollection hbheHits,
const HORecHitCollection hoHits,
const HFRecHitCollection hfHits 
)

Definition at line 435 of file HcalHotCellMonitor.cc.

References aboveenergy, AboveEnergyThresholdCellsByDepth, aboveet, AboveETThresholdCellsByDepth, AboveNeighborsHotCellsByDepth, abovepersistent, abovepersistentET, AbovePersistentThresholdCellsByDepth, abs, edm::SortedCollection< T, SORT >::begin(), CalcEtaBin(), gather_cfg::cout, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, edm::SortedCollection< T, SORT >::end(), excludeHORing2_, HBenergyThreshold_, HBETThreshold_, HBHENeighborParams_, HBpersistentETThreshold_, HBpersistentThreshold_, HcalBarrel, HcalEndcap, HEenergyThreshold_, HEETThreshold_, HEpersistentETThreshold_, HEpersistentThreshold_, HFenergyThreshold_, HFETThreshold_, HFfarfwdScale_, HFNeighborParams_, HFpersistentETThreshold_, HFpersistentThreshold_, HOenergyThreshold_, HOETThreshold_, HONeighborParams_, HOpersistentETThreshold_, HOpersistentThreshold_, i, HcalDetId::ieta(), isSiPM(), HcalBaseDQMonitor::makeDiagnostics_, processHit_rechitNeighbors(), SiPMscale_, test_energy_, test_et_, test_neighbor_, theHBHEEtaBounds, theHFEtaBounds, and dtDQMClient_cfg::threshold.

Referenced by processEvent().

439 {
440  // Looks at rechits of cells and compares to threshold energies.
441  // Cells above thresholds get marked as hot candidates
442 
443  if (debug_>1) std::cout <<"<HcalHotCellMonitor::processEvent_rechitenergy> Processing rechits..."<<std::endl;
444 
445  // loop over HBHE
446  for (HBHERecHitCollection::const_iterator HBHEiter=hbheHits.begin(); HBHEiter!=hbheHits.end(); ++HBHEiter)
447  { // loop over all hits
448  float en = HBHEiter->energy();
449  //float ti = HBHEiter->time();
450 
451  HcalDetId id(HBHEiter->detid().rawId());
452  int ieta = id.ieta();
453  int iphi = id.iphi();
454  int depth = id.depth();
455  double fEta=fabs(0.5*(theHBHEEtaBounds[abs(ieta)-1]+theHBHEEtaBounds[abs(ieta)]));
456  float et = en/cosh(fEta);
457 
459  {
460  processHit_rechitNeighbors(HBHEiter, hbheHits, HBHENeighborParams_);
461  }
462  if (id.subdet()==HcalBarrel)
463  {
464  if (en>=HBenergyThreshold_)
465  ++aboveenergy[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
466  if (et>=HBETThreshold_)
467  ++aboveet[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
469  ++abovepersistent[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
471  ++abovepersistentET[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
472  }
473  else if (id.subdet()==HcalEndcap)
474  {
475  if (en>=HEenergyThreshold_)
476  ++aboveenergy[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
477  if (et>=HEETThreshold_)
478  ++aboveet[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
479  if (test_energy_)
480  if (en>=HEpersistentThreshold_)
481  ++abovepersistent[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
482  if (test_et_)
483  if (et>=HEpersistentETThreshold_)
484  ++abovepersistentET[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
485  }
486  } //for (HBHERecHitCollection::const_iterator HBHEiter=...)
487 
488  // loop over HO
489  for (HORecHitCollection::const_iterator HOiter=hoHits.begin(); HOiter!=hoHits.end(); ++HOiter)
490  { // loop over all hits
491  float en = HOiter->energy();
492 
493  HcalDetId id(HOiter->detid().rawId());
494  int ieta = id.ieta();
495  int iphi = id.iphi();
496  int depth = id.depth();
497  double fEta=fabs(0.5*(theHBHEEtaBounds[abs(ieta)-1]+theHBHEEtaBounds[abs(ieta)]));
498  float et = en/cosh(fEta);
499 
502 
503  if (isSiPM(ieta,iphi,depth))
504  {
506  ++aboveenergy[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
507  if (et>=HOETThreshold_*SiPMscale_)
508  ++aboveet[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
509  if (test_energy_)
510  if (en>=HOpersistentThreshold_*SiPMscale_)
511  ++abovepersistent[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
512  if (test_et_)
513  if (et>=HOpersistentETThreshold_*SiPMscale_)
514  ++abovepersistentET[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
515  }
516  else
517  {
518  // Skip HO ring 2 when required
519  if (abs(ieta)>10 && excludeHORing2_==true)
520  continue;
521 
522  if (en>=HOenergyThreshold_)
523  ++aboveenergy[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
524  if (et>=HOETThreshold_)
525  ++aboveet[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
526  if (test_energy_)
527  if (en>=HOpersistentThreshold_)
528  ++abovepersistent[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
529  if (test_et_)
530  if (en>=HOpersistentETThreshold_)
531  ++abovepersistentET[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
532  }
533  }
534 
535  // loop over HF
536  for (HFRecHitCollection::const_iterator HFiter=hfHits.begin(); HFiter!=hfHits.end(); ++HFiter)
537  { // loop over all hits
538  float en = HFiter->energy();
540  float threshold_pers = HFpersistentThreshold_;
541  float etthreshold=HFETThreshold_;
542  HcalDetId id(HFiter->detid().rawId());
543  int ieta = id.ieta();
544  int iphi = id.iphi();
545  int depth = id.depth();
546  double fEta=fabs(0.5*(theHFEtaBounds[abs(ieta)-29]+theHFEtaBounds[abs(ieta)-28]));
547  float et = en/cosh(fEta);
548 
551 
552  if (abs(ieta)>39) // increase the thresholds in far-forward part of HF
553  {
554  threshold*=HFfarfwdScale_;
555  threshold_pers*=HFfarfwdScale_;
556  }
557 
558  if (en>=threshold)
559  ++aboveenergy[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
560  if (et>=etthreshold)
561  ++aboveet[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
562  if (test_energy_) {
563  if (en>=threshold_pers)
564  ++abovepersistent[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
565  }
566  if (test_et_) {
567  if (et>=HFpersistentETThreshold_)
568  ++abovepersistentET[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
569  }
570  }
571 
572  // call update every event -- still necessary?
573 
574  for (unsigned int i=0;i<AbovePersistentThresholdCellsByDepth.depth.size();++i)
576  for (unsigned int i=0;i<AboveEnergyThresholdCellsByDepth.depth.size();++i)
578  for (unsigned int i=0;i<AboveETThresholdCellsByDepth.depth.size();++i)
580  for (unsigned int i=0;i<AboveNeighborsHotCellsByDepth.depth.size();++i)
582 
583  return;
584 } // void HcalHotCellMonitor::processEvent_rechitenergy
int abovepersistent[85][72][4]
int i
Definition: DBlmapReader.cc:9
EtaPhiHists AboveEnergyThresholdCellsByDepth
hotNeighborParams HONeighborParams_
void processHit_rechitNeighbors(R &rechititer, C &collection, hotNeighborParams &params)
int abovepersistentET[85][72][4]
std::vector< T >::const_iterator const_iterator
#define abs(x)
Definition: mlp_lapack.h:159
EtaPhiHists AbovePersistentThresholdCellsByDepth
int aboveenergy[85][72][4]
bool isSiPM(int ieta, int iphi, int depth)
std::vector< MonitorElement * > depth
EtaPhiHists AboveETThresholdCellsByDepth
int ieta() const
get the cell ieta
Definition: HcalDetId.h:38
hotNeighborParams HBHENeighborParams_
const_iterator end() const
static const double theHFEtaBounds[]
int aboveet[85][72][4]
int CalcEtaBin(int subdet, int ieta, int depth)
EtaPhiHists AboveNeighborsHotCellsByDepth
tuple cout
Definition: gather_cfg.py:121
static const double theHBHEEtaBounds[]
hotNeighborParams HFNeighborParams_
const_iterator begin() const
template<class R , class C >
void HcalHotCellMonitor::processHit_rechitNeighbors ( R &  rechititer,
C &  collection,
hotNeighborParams params 
)
template<class RECHIT , class RECHITCOLLECTION >
void HcalHotCellMonitor::processHit_rechitNeighbors ( RECHIT &  rechit,
RECHITCOLLECTION &  coll,
hotNeighborParams params 
)

Definition at line 590 of file HcalHotCellMonitor.cc.

References aboveneighbors, abs, CalcEtaBin(), d_HBenergyVsNeighbor, d_HEenergyVsNeighbor, d_HFenergyVsNeighbor, d_HOenergyVsNeighbor, hotNeighborParams::DeltaDepth, hotNeighborParams::DeltaIeta, hotNeighborParams::DeltaIphi, MonitorElement::Fill(), hbVsNeighbor, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, heVsNeighbor, hfVsNeighbor, hotNeighborParams::HotEnergyFrac, hoVsNeighbor, HcalDetId::ieta(), HcalBaseDQMonitor::makeDiagnostics_, hotNeighborParams::maxEnergy, hotNeighborParams::minCellEnergy, hotNeighborParams::minNeighborEnergy, pftools::RECHIT, theHBHEEtaBounds, and theHFEtaBounds.

594 {
595  // Compares energy to energy of neighboring cells.
596  // This is a slightly simplified version of D0's NADA algorithm
597  // 17 June 2009 -- this needs major work. I'm not sure I have the [eta][phi][depth] array mapping correct everywhere.
598  // Maybe even tear it apart and start again?
599 
600  int ieta, iphi, depth;
601  float en;
602 
603  int neighborsfound=0;
604  float enNeighbor=0;
605 
606  en = rechit->energy();
607  HcalDetId id(rechit->detid().rawId());
608  ieta = id.ieta();
609  iphi = id.iphi();
610  depth = id.depth();
611 
612  double fEta=0;
613  if (id.subdet()!=HcalForward)
614  fEta=fabs(0.5*(theHBHEEtaBounds[abs(ieta)-1]+theHBHEEtaBounds[abs(ieta)]));
615  else
616  fEta=fabs(0.5*(theHFEtaBounds[abs(ieta)-29]+theHFEtaBounds[abs(ieta)-28]));
617 
618  float et = en/cosh(fEta);
619 
620  // Case 0: ET too low to trigger hot cell check
621  if (et<=params.minCellEnergy) return;
622 
623  // Case 1: above threshold energy; always count as hot
624  if (et>params.maxEnergy)
625  {
626  aboveneighbors[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1];
627  if (makeDiagnostics_)
628  {
629  // fill overflow bin when energy > max threshold
630  if (id.subdet()==HcalBarrel) d_HBenergyVsNeighbor->Fill(1000);
631  else if (id.subdet()==HcalEndcap) d_HEenergyVsNeighbor->Fill(1000);
632  else if (id.subdet()==HcalOuter) d_HOenergyVsNeighbor->Fill(1000);
633  else if (id.subdet()==HcalForward) d_HFenergyVsNeighbor->Fill(1000);
634  }
635  return;
636  }
637 
638  // Case 2: Search keys for neighboring cells
639 
640  neighborsfound=0;
641  enNeighbor=0;
642 
643  int mydeltaphi=params.DeltaIphi;
644  // scale appropriately for larger cells at higher eta values
645  if (abs(ieta)>39) mydeltaphi*=4;
646  else if (abs(ieta)>20) mydeltaphi*=2;
647 
648  for (int nD=-1*params.DeltaDepth;nD<=params.DeltaDepth;++nD)
649  {
650  for (int nP =-1*mydeltaphi;nP<=mydeltaphi;++nP)
651  {
652  for (int nE =-1*params.DeltaIeta;nE<=params.DeltaIeta;++nE)
653  {
654  if (nD==0 && nE==0 && nP==0)
655  continue; // don't count the cell itself
656  int myphi=(nP+iphi)%72;
657  HcalDetId myid((HcalSubdetector)(1), nE+ieta, myphi, nD+depth); // HB
658  RECHIT part=coll.find(myid);
659  if (part==coll.end())
660  continue;
661  if (part->energy()<params.minNeighborEnergy)
662  continue;
663  ++neighborsfound;
664  enNeighbor+=part->energy();
665  } // loop over nE (neighbor eta)
666  } // loop over nP (neighbor phi)
667  } // loop over nD depths
668 
669  // Case 2a: Not enough good neighbors found -- do we want to implement this?
670  //if (neighborsfound==0)
671  // return;
672 
673  // Case 2b: (avg. neighbor energy)/energy too large for cell to be considered hot
674  if (makeDiagnostics_)
675  {
676  int myval=(int)(enNeighbor/en*50);
677  if (myval<0) myval=0;
678  if (myval>499) myval=499;
679  if (enNeighbor/en<0 || enNeighbor/en>=10) return;
680  if (id.subdet()==HcalBarrel) ++hbVsNeighbor[myval];
681  else if (id.subdet()==HcalEndcap) ++heVsNeighbor[myval];
682  else if (id.subdet()==HcalOuter) ++hoVsNeighbor[myval];
683  else if (id.subdet()==HcalForward) ++hfVsNeighbor[myval];
684  }
685  if ((1.*enNeighbor/en)>params.HotEnergyFrac && en>0 && enNeighbor>0)
686  return;
687 
688  // Case 2c: Tests passed; cell marked as hot
689  aboveneighbors[CalcEtaBin(id.subdet(),ieta,depth)][iphi-1][depth-1]++;
690 
691  return;
692 } // void HcalHotCellMonitor::processEvent_rechitneighbor
int aboveneighbors[85][72][4]
#define abs(x)
Definition: mlp_lapack.h:159
void Fill(long long x)
MonitorElement * d_HFenergyVsNeighbor
int ieta() const
get the cell ieta
Definition: HcalDetId.h:38
HcalSubdetector
Definition: HcalAssistant.h:32
MonitorElement * d_HBenergyVsNeighbor
JetCorrectorParametersCollection coll
Definition: classes.h:16
static const double theHFEtaBounds[]
part
Definition: HCALResponse.h:20
int CalcEtaBin(int subdet, int ieta, int depth)
MonitorElement * d_HOenergyVsNeighbor
static const double theHBHEEtaBounds[]
MonitorElement * d_HEenergyVsNeighbor
void HcalHotCellMonitor::reset ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 295 of file HcalHotCellMonitor.cc.

References AboveEnergyThresholdCellsByDepth, AboveETThresholdCellsByDepth, AboveNeighborsHotCellsByDepth, AbovePersistentETThresholdCellsByDepth, AbovePersistentThresholdCellsByDepth, d_HBenergyVsNeighbor, d_HEenergyVsNeighbor, d_HFenergyVsNeighbor, d_HOenergyVsNeighbor, HcalBaseDQMonitor::makeDiagnostics_, HcalBaseDQMonitor::reset(), MonitorElement::Reset(), EtaPhiHists::Reset(), test_energy_, test_et_, test_neighbor_, test_persistent_, and zeroCounters().

Referenced by beginRun(), and setup().

296 {
298  zeroCounters();
299 
300  // now reset all the MonitorElements
301 
302  // resetting eta-phi histograms
305 
306  if (test_energy_ )
308 
309  if ( test_et_ )
311 
312  if (test_persistent_)
313  {
316  }
317  if (makeDiagnostics_)
318  {
323  }
324 }
EtaPhiHists AboveEnergyThresholdCellsByDepth
void Reset(void)
EtaPhiHists AbovePersistentThresholdCellsByDepth
EtaPhiHists AbovePersistentETThresholdCellsByDepth
MonitorElement * d_HFenergyVsNeighbor
EtaPhiHists AboveETThresholdCellsByDepth
MonitorElement * d_HBenergyVsNeighbor
virtual void reset(void)
MonitorElement * d_HOenergyVsNeighbor
EtaPhiHists AboveNeighborsHotCellsByDepth
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * d_HEenergyVsNeighbor
void HcalHotCellMonitor::setup ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 110 of file HcalHotCellMonitor.cc.

References AboveEnergyThresholdCellsByDepth, AboveETThresholdCellsByDepth, AboveNeighborsHotCellsByDepth, AbovePersistentETThresholdCellsByDepth, AbovePersistentThresholdCellsByDepth, DQMStore::book1D(), DQMStore::bookFloat(), DQMStore::bookInt(), DQMStore::bookProfile(), gather_cfg::cout, d_HBenergyVsNeighbor, d_HEenergyVsNeighbor, d_HFenergyVsNeighbor, d_HOenergyVsNeighbor, HcalBaseDQMonitor::dbe_, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, MonitorElement::Fill(), MonitorElement::getTProfile(), HBenergyThreshold_, HBETThreshold_, HBpersistentETThreshold_, HBpersistentThreshold_, HEenergyThreshold_, HEETThreshold_, HEpersistentETThreshold_, HEpersistentThreshold_, HFenergyThreshold_, HFETThreshold_, HFpersistentETThreshold_, HFpersistentThreshold_, HOenergyThreshold_, HOETThreshold_, HOpersistentETThreshold_, HOpersistentThreshold_, HcalBaseDQMonitor::makeDiagnostics_, minErrorFlag_, minEvents_, HcalBaseDQMonitor::NLumiBlocks_, HcalBaseDQMonitor::ProblemsVsLB, HcalBaseDQMonitor::ProblemsVsLB_HB, HcalBaseDQMonitor::ProblemsVsLB_HBHEHF, HcalBaseDQMonitor::ProblemsVsLB_HE, HcalBaseDQMonitor::ProblemsVsLB_HF, HcalBaseDQMonitor::ProblemsVsLB_HO, reset(), DQMStore::setCurrentFolder(), HcalBaseDQMonitor::setup(), setupDone_, HcalBaseDQMonitor::SetupEtaPhiHists(), HcalBaseDQMonitor::subdir_, test_energy_, test_et_, test_neighbor_, test_persistent_, and create_public_lumi_plots::units.

Referenced by beginRun().

111 {
112  if (setupDone_)
113  return;
114  setupDone_ = true;
115  // Call base class setup
117 
118  if (debug_>1)
119  std::cout <<"<HcalHotCellMonitor::setup> Setting up histograms"<<std::endl;
120 
122 
123  MonitorElement* me;
124  me=dbe_->bookFloat("minErrorFractionPerLumiSection");
125  me->Fill(minErrorFlag_);
126  // Create plots of problems vs LB
127 
128  // 1D plots count number of bad cells vs. luminosity block
129  ProblemsVsLB=dbe_->bookProfile("TotalHotCells_HCAL_vs_LS",
130  "Total Number of Hot Hcal Cells vs lumi section",
131  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
132 
133  ProblemsVsLB_HB=dbe_->bookProfile("TotalHotCells_HB_vs_LS",
134  "Total Number of Hot HB Cells vs lumi section",
135  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,3000);
136  ProblemsVsLB_HE=dbe_->bookProfile("TotalHotCells_HE_vs_LS",
137  "Total Number of Hot HE Cells vs lumi section",
138  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,3000);
139  ProblemsVsLB_HO=dbe_->bookProfile("TotalHotCells_HO_vs_LS",
140  "Total Number of Hot HO Cells vs lumi section",
141  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,3000);
142  ProblemsVsLB_HF=dbe_->bookProfile("TotalHotCells_HF_vs_LS",
143  "Total Number of Hot HF Cells vs lumi section",
144  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,2000);
145  ProblemsVsLB_HBHEHF=dbe_->bookProfile("TotalHotCells_HBHEHF_vs_LS",
146  "Total Number of Hot HBHEHF Cells vs lumi section",
147  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,2000);
148 
149  ProblemsVsLB->getTProfile()->SetMarkerStyle(20);
150  ProblemsVsLB_HB->getTProfile()->SetMarkerStyle(20);
151  ProblemsVsLB_HE->getTProfile()->SetMarkerStyle(20);
152  ProblemsVsLB_HO->getTProfile()->SetMarkerStyle(20);
153  ProblemsVsLB_HF->getTProfile()->SetMarkerStyle(20);
154  ProblemsVsLB_HBHEHF->getTProfile()->SetMarkerStyle(20);
155 
156  // Set up plots for each failure mode of hot cells
157  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)
158 
159  dbe_->setCurrentFolder(subdir_+"hot_rechit_above_threshold");
160  me=dbe_->bookInt("HotCellAboveThresholdTestEnabled");
161  me->Fill(0);
162 
163  if (test_energy_)
164  {
165  me->Fill(1);
167  "Hot Cells Above Energy Threshold","");
168  //setMinMaxHists2D(AboveEnergyThresholdCellsByDepth,0.,1.);
169 
170  // set more descriptive titles for plots
171  units.str("");
172  units<<"Hot Cells: Depth 1 -- HB > "<<HBenergyThreshold_<<" GeV, HE > "<<HEenergyThreshold_<<" GeV, HF > "<<HFenergyThreshold_<<" GeV";
173  AboveEnergyThresholdCellsByDepth.depth[0]->setTitle(units.str().c_str());
174  units.str("");
175  units<<"Hot Cells: Depth 2 -- HB > "<<HBenergyThreshold_<<" GeV, HE > "<<HEenergyThreshold_<<" GeV, HF > "<<HFenergyThreshold_<<" GeV";
176  AboveEnergyThresholdCellsByDepth.depth[1]->setTitle(units.str().c_str());
177  units.str("");
178  units<<"Hot Cells: Depth 3 -- HE > "<<HEenergyThreshold_<<" GeV";
179  AboveEnergyThresholdCellsByDepth.depth[2]->setTitle(units.str().c_str());
180  units.str("");
181  units<<"Hot Cells: HO > "<<HOenergyThreshold_<<" GeV";
182  AboveEnergyThresholdCellsByDepth.depth[3]->setTitle(units.str().c_str());
183  units.str("");
184  }
185  if (test_et_)
186  {
187  me->Fill(1);
189  "Hot Cells Above ET Threshold","");
190  //setMinMaxHists2D(AboveETThresholdCellsByDepth,0.,1.);
191 
192  // set more descriptive titles for plots
193  units.str("");
194  units<<"Hot Cells: Depth 1 -- HB > "<<HBETThreshold_<<" GeV (ET), HE > "<<HEETThreshold_<<" GeV (ET), HF > "<<HFETThreshold_<<" GeV (ET)";
195  AboveETThresholdCellsByDepth.depth[0]->setTitle(units.str().c_str());
196  units.str("");
197  units<<"Hot Cells: Depth 2 -- HB > "<<HBETThreshold_<<" GeV (ET), HE > "<<HEETThreshold_<<" GeV (ET), HF > "<<HFETThreshold_<<" GeV (ET)";
198  AboveETThresholdCellsByDepth.depth[1]->setTitle(units.str().c_str());
199  units.str("");
200  units<<"Hot Cells: Depth 3 -- HE > "<<HEETThreshold_<<" GeV (ET)";
201  AboveETThresholdCellsByDepth.depth[2]->setTitle(units.str().c_str());
202  units.str("");
203  units<<"Hot Cells: HO > "<<HOETThreshold_<<" GeV (ET)";
204  AboveETThresholdCellsByDepth.depth[3]->setTitle(units.str().c_str());
205  units.str("");
206  }
207 
208  dbe_->setCurrentFolder(subdir_+"hot_rechit_always_above_threshold");
209  me=dbe_->bookInt("PersistentHotCellTestEnabled");
210  me->Fill(0);
211  if (test_persistent_)
212  {
213  me->Fill(1);
214  me=dbe_->bookInt("minEventsPerLS");
215  me->Fill(minEvents_);
216 
217  if (test_energy_) {
219  "Hot Cells Persistently Above Energy Threshold","");
220  //setMinMaxHists2D(AbovePersistentThresholdCellsByDepth,0.,1.);
221 
222  // set more descriptive titles for plots
223  units.str("");
224  units<<"Hot Cells: Depth 1 -- HB > "<<HBpersistentThreshold_<<" GeV, HE > "<<HEpersistentThreshold_<<", HF > "<<HFpersistentThreshold_<<" GeV for 1 full Lumi Block";
225  AbovePersistentThresholdCellsByDepth.depth[0]->setTitle(units.str().c_str());
226  units.str("");
227  units<<"Hot Cells: Depth 2 -- HB > "<<HBpersistentThreshold_<<" GeV, HE > "<<HEpersistentThreshold_<<", HF > "<<HFpersistentThreshold_<<" GeV for 1 full Lumi Block";
228  AbovePersistentThresholdCellsByDepth.depth[1]->setTitle(units.str().c_str());
229  units.str("");
230  units<<"Hot Cells: Depth 3 -- HE > "<<HEpersistentThreshold_<<" GeV for 1 full Lumi Block";
231  AbovePersistentThresholdCellsByDepth.depth[2]->setTitle(units.str().c_str());
232  units.str("");
233  units<<"Hot Cells: HO > "<<HOpersistentThreshold_<<" GeV for 1 full Lumi Block";
234  AbovePersistentThresholdCellsByDepth.depth[3]->setTitle(units.str().c_str());
235  units.str("");
236  }
237 
238  if (test_et_) {
240  "Hot Cells Persistently Above ET Threshold","");
241  //setMinMaxHists2D(AbovePersistentThresholdCellsByDepth,0.,1.);
242 
243  // set more descriptive titles for plots
244  units.str("");
245  units<<"Hot Cells: Depth 1 -- HB > "<<HBpersistentETThreshold_<<" GeV (ET), HE > "<<HEpersistentETThreshold_<<" GeV (ET), HF > "<<HFpersistentETThreshold_<<" GeV (ET) for 1 full Lumi Block";
246  AbovePersistentETThresholdCellsByDepth.depth[0]->setTitle(units.str().c_str());
247  units.str("");
248  units<<"Hot Cells: Depth 2 -- HB > "<<HBpersistentETThreshold_<<" GeV (ET), HE > "<<HEpersistentETThreshold_<<" GeV (ET), HF > "<<HFpersistentETThreshold_<<" GeV (ET) for 1 full Lumi Block";
249  AbovePersistentETThresholdCellsByDepth.depth[1]->setTitle(units.str().c_str());
250  units.str("");
251  units<<"Hot Cells: Depth 3 -- HE > "<<HEpersistentETThreshold_<<" GeV (ET) for 1 full Lumi Block";
252  AbovePersistentETThresholdCellsByDepth.depth[2]->setTitle(units.str().c_str());
253  units.str("");
254  units<<"Hot Cells: HO > "<<HOpersistentETThreshold_<<" GeV (ET) for 1 full Lumi Block";
255  AbovePersistentETThresholdCellsByDepth.depth[3]->setTitle(units.str().c_str());
256  units.str("");
257  }
258  }
259 
260  dbe_->setCurrentFolder(subdir_+"hot_neighbortest");
261  me=dbe_->bookInt("NeighborTestEnabled");
262  me->Fill(0);
263  if (test_neighbor_)
264  me->Fill(1);
266  {
267  SetupEtaPhiHists(AboveNeighborsHotCellsByDepth,"Hot Cells Failing Neighbor Test","");
268  if (makeDiagnostics_)
269  {
270  d_HBenergyVsNeighbor=dbe_->book1D("NeighborSumOverEnergyHB","HB Neighbor Sum Energy/Cell Energy;sum(neighbors)/E_cell",500,0,10);
271  d_HEenergyVsNeighbor=dbe_->book1D("NeighborSumOverEnergyHE","HE Neighbor Sum Energy/Cell Energy;sum(neighbors)/E_cell",500,0,10);
272  d_HOenergyVsNeighbor=dbe_->book1D("NeighborSumOverEnergyHO","HO Neighbor Sum Energy/Cell Energy;sum(neighbors)/E_cell",500,0,10);
273  d_HFenergyVsNeighbor=dbe_->book1D("NeighborSumOverEnergyHF","HF Neighbor Sum Energy/Cell Energy;sum(neighbors)/E_cell",500,0,10);
274  }
275  } // if (test_neighbor_ || makeDiagnostics_)
276 
277  this->reset();
278 } // void HcalHotCellMonitor::setup(...)
EtaPhiHists AboveEnergyThresholdCellsByDepth
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
MonitorElement * ProblemsVsLB_HF
EtaPhiHists AbovePersistentThresholdCellsByDepth
EtaPhiHists AbovePersistentETThresholdCellsByDepth
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:659
void Fill(long long x)
std::vector< MonitorElement * > depth
MonitorElement * d_HFenergyVsNeighbor
MonitorElement * ProblemsVsLB_HBHEHF
MonitorElement * ProblemsVsLB_HB
EtaPhiHists AboveETThresholdCellsByDepth
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:1036
MonitorElement * d_HBenergyVsNeighbor
MonitorElement * ProblemsVsLB_HE
void SetupEtaPhiHists(EtaPhiHists &hh, std::string Name, std::string Units)
MonitorElement * d_HOenergyVsNeighbor
EtaPhiHists AboveNeighborsHotCellsByDepth
TProfile * getTProfile(void) const
tuple cout
Definition: gather_cfg.py:121
MonitorElement * ProblemsVsLB_HO
MonitorElement * ProblemsVsLB
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:629
virtual void setup(void)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
MonitorElement * d_HEenergyVsNeighbor
void HcalHotCellMonitor::zeroCounters ( void  )
private

Definition at line 1102 of file HcalHotCellMonitor.cc.

References aboveenergy, aboveet, aboveneighbors, abovepersistent, abovepersistentET, hbVsNeighbor, heVsNeighbor, hfVsNeighbor, hoVsNeighbor, i, j, gen::k, and rechit_occupancy_sum.

Referenced by beginLuminosityBlock(), periodicReset(), and reset().

1103 {
1104 
1105  // zero all counters
1106  for (int i=0;i<85;++i)
1107  {
1108  for (int j=0;j<72;++j)
1109  {
1110  for (int k=0;k<4;++k)
1111  {
1112  abovepersistent[i][j][k]=0;
1113  abovepersistentET[i][j][k]=0;
1114  aboveneighbors[i][j][k]=0;
1115  aboveenergy[i][j][k]=0;
1116  aboveet[i][j][k]=0;
1117  rechit_occupancy_sum[i][j][k]=0;
1118  }
1119  }
1120  }
1121 
1122  for (int i=0;i<500;++i)
1123  {
1124  hbVsNeighbor[i]=0;
1125  heVsNeighbor[i]=0;
1126  hoVsNeighbor[i]=0;
1127  hfVsNeighbor[i]=0;
1128  }
1129  return;
1130 
1131 } // void HcalHotCellMonitor::zeroCounters()
int abovepersistent[85][72][4]
int i
Definition: DBlmapReader.cc:9
int aboveneighbors[85][72][4]
int abovepersistentET[85][72][4]
int rechit_occupancy_sum[85][72][4]
int aboveenergy[85][72][4]
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]
int aboveet[85][72][4]

Member Data Documentation

int HcalHotCellMonitor::aboveenergy[85][72][4]
private
EtaPhiHists HcalHotCellMonitor::AboveEnergyThresholdCellsByDepth
private
int HcalHotCellMonitor::aboveet[85][72][4]
private
EtaPhiHists HcalHotCellMonitor::AboveETThresholdCellsByDepth
private
int HcalHotCellMonitor::aboveneighbors[85][72][4]
private
EtaPhiHists HcalHotCellMonitor::AboveNeighborsHotCellsByDepth
private
int HcalHotCellMonitor::abovepersistent[85][72][4]
private
int HcalHotCellMonitor::abovepersistentET[85][72][4]
private
EtaPhiHists HcalHotCellMonitor::AbovePersistentETThresholdCellsByDepth
private
EtaPhiHists HcalHotCellMonitor::AbovePersistentThresholdCellsByDepth
private
MonitorElement* HcalHotCellMonitor::d_HBenergyVsNeighbor
private
MonitorElement* HcalHotCellMonitor::d_HEenergyVsNeighbor
private
MonitorElement* HcalHotCellMonitor::d_HFenergyVsNeighbor
private
MonitorElement* HcalHotCellMonitor::d_HOenergyVsNeighbor
private
double HcalHotCellMonitor::energyThreshold_
private

Definition at line 89 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor().

double HcalHotCellMonitor::ETThreshold_
private

Definition at line 90 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor().

bool HcalHotCellMonitor::excludeHORing2_
private

Definition at line 114 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), and processEvent_rechitenergy().

double HcalHotCellMonitor::HBenergyThreshold_
private

Definition at line 89 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

double HcalHotCellMonitor::HBETThreshold_
private

Definition at line 90 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

hotNeighborParams HcalHotCellMonitor::HBHENeighborParams_
private

Definition at line 128 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), and processEvent_rechitenergy().

edm::InputTag HcalHotCellMonitor::hbheRechitLabel_
private

Definition at line 130 of file HcalHotCellMonitor.h.

Referenced by analyze(), and HcalHotCellMonitor().

double HcalHotCellMonitor::HBnsigma_
private

Definition at line 99 of file HcalHotCellMonitor.h.

double HcalHotCellMonitor::HBpersistentETThreshold_
private

Definition at line 92 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

double HcalHotCellMonitor::HBpersistentThreshold_
private

Definition at line 91 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

int HcalHotCellMonitor::hbVsNeighbor[500]
private
double HcalHotCellMonitor::HEenergyThreshold_
private

Definition at line 89 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

double HcalHotCellMonitor::HEETThreshold_
private

Definition at line 90 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

double HcalHotCellMonitor::HEnsigma_
private

Definition at line 99 of file HcalHotCellMonitor.h.

double HcalHotCellMonitor::HEpersistentETThreshold_
private

Definition at line 92 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

double HcalHotCellMonitor::HEpersistentThreshold_
private

Definition at line 91 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

int HcalHotCellMonitor::heVsNeighbor[500]
private
double HcalHotCellMonitor::HFenergyThreshold_
private

Definition at line 89 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

double HcalHotCellMonitor::HFETThreshold_
private

Definition at line 90 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

double HcalHotCellMonitor::HFfarfwdScale_
private

Definition at line 94 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), and processEvent_rechitenergy().

hotNeighborParams HcalHotCellMonitor::HFNeighborParams_
private

Definition at line 128 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), and processEvent_rechitenergy().

double HcalHotCellMonitor::HFnsigma_
private

Definition at line 99 of file HcalHotCellMonitor.h.

double HcalHotCellMonitor::HFpersistentETThreshold_
private

Definition at line 92 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

double HcalHotCellMonitor::HFpersistentThreshold_
private

Definition at line 91 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

edm::InputTag HcalHotCellMonitor::hfRechitLabel_
private

Definition at line 130 of file HcalHotCellMonitor.h.

Referenced by analyze(), and HcalHotCellMonitor().

int HcalHotCellMonitor::hfVsNeighbor[500]
private
double HcalHotCellMonitor::HOenergyThreshold_
private

Definition at line 89 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

double HcalHotCellMonitor::HOETThreshold_
private

Definition at line 90 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

hotNeighborParams HcalHotCellMonitor::HONeighborParams_
private

Definition at line 128 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), and processEvent_rechitenergy().

double HcalHotCellMonitor::HOnsigma_
private

Definition at line 99 of file HcalHotCellMonitor.h.

double HcalHotCellMonitor::HOpersistentETThreshold_
private

Definition at line 92 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

double HcalHotCellMonitor::HOpersistentThreshold_
private

Definition at line 91 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), processEvent_rechitenergy(), and setup().

edm::InputTag HcalHotCellMonitor::hoRechitLabel_
private

Definition at line 130 of file HcalHotCellMonitor.h.

Referenced by analyze(), and HcalHotCellMonitor().

int HcalHotCellMonitor::hoVsNeighbor[500]
private
double HcalHotCellMonitor::minErrorFlag_
private

Definition at line 96 of file HcalHotCellMonitor.h.

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

int HcalHotCellMonitor::minEvents_
private

Definition at line 81 of file HcalHotCellMonitor.h.

Referenced by fillNevents_persistentenergy(), HcalHotCellMonitor(), and setup().

double HcalHotCellMonitor::nsigma_
private

Definition at line 98 of file HcalHotCellMonitor.h.

double HcalHotCellMonitor::persistentETThreshold_
private

Definition at line 92 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor().

double HcalHotCellMonitor::persistentThreshold_
private

Definition at line 91 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor().

int HcalHotCellMonitor::rechit_occupancy_sum[85][72][4]
private

Definition at line 112 of file HcalHotCellMonitor.h.

Referenced by zeroCounters().

bool HcalHotCellMonitor::setupDone_
private

Definition at line 87 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), and setup().

double HcalHotCellMonitor::SiPMscale_
private

Definition at line 106 of file HcalHotCellMonitor.h.

Referenced by HcalHotCellMonitor(), and processEvent_rechitenergy().

bool HcalHotCellMonitor::test_energy_
private
bool HcalHotCellMonitor::test_et_
private
bool HcalHotCellMonitor::test_neighbor_
private
bool HcalHotCellMonitor::test_persistent_
private