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

#include <HcalCoarsePedestalMonitor.h>

Inheritance diagram for HcalCoarsePedestalMonitor:
HcalBaseDQMonitor edm::EDAnalyzer

Public Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
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)
 
 HcalCoarsePedestalMonitor (const edm::ParameterSet &ps)
 
void processEvent (const HBHEDigiCollection &hbhe, const HODigiCollection &ho, const HFDigiCollection &hf, const HcalUnpackerReport &report)
 
void reset ()
 
void setup ()
 
 ~HcalCoarsePedestalMonitor ()
 
- 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 fill_Nevents ()
 Methods, variables accessible only within class code. More...
 
void zeroCounters ()
 

Private Attributes

double ADCDiffThresh_
 
EtaPhiHists CoarsePedestalsOccByDepth
 
EtaPhiHists CoarsePedestalsSumByDepth
 
edm::InputTag digiLabel_
 
bool excludeHORing2_
 
int minEvents_
 
int pedestalocc_ [85][72][4]
 
double pedestalsum_ [85][72][4]
 

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 ()
 
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:
2010/11/17 19:17:30
Revision:
1.5
Author
J. Temple - Univ. of Maryland

Definition at line 18 of file HcalCoarsePedestalMonitor.h.

Constructor & Destructor Documentation

HcalCoarsePedestalMonitor::HcalCoarsePedestalMonitor ( const edm::ParameterSet ps)

Definition at line 14 of file HcalCoarsePedestalMonitor.cc.

References ADCDiffThresh_, HcalBaseDQMonitor::AllowedCalibTypes_, HcalBaseDQMonitor::debug_, digiLabel_, HcalBaseDQMonitor::enableCleanup_, excludeHORing2_, edm::ParameterSet::getUntrackedParameter(), HcalBaseDQMonitor::makeDiagnostics_, HcalBaseDQMonitor::mergeRuns_, minEvents_, HcalBaseDQMonitor::NLumiBlocks_, HcalBaseDQMonitor::Online_, HcalBaseDQMonitor::prefixME_, HcalBaseDQMonitor::skipOutOfOrderLS_, and HcalBaseDQMonitor::subdir_.

15 {
16  Online_ = ps.getUntrackedParameter<bool>("online",false);
17  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns",false);
18  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup",false);
19  debug_ = ps.getUntrackedParameter<int>("debug",0);
20  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
21  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
22  prefixME_.append("/");
23  subdir_ = ps.getUntrackedParameter<std::string>("TaskFolder","CoarsePedestalMonitor_Hcal");
24  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
25  subdir_.append("/");
26  subdir_=prefixME_+subdir_;
27  AllowedCalibTypes_ = ps.getUntrackedParameter<std::vector<int> > ("AllowedCalibTypes");
28  skipOutOfOrderLS_ = ps.getUntrackedParameter<bool>("skipOutOfOrderLS",true);
29  NLumiBlocks_ = ps.getUntrackedParameter<int>("NLumiBlocks",4000);
30  makeDiagnostics_ = ps.getUntrackedParameter<bool>("makeDiagnostics",false);
32  ADCDiffThresh_ = ps.getUntrackedParameter<double>("ADCDiffThresh",1.);
33  minEvents_ = ps.getUntrackedParameter<int>("minEvents",100); // minimum number of events needed before histograms are filled
34  excludeHORing2_ = ps.getUntrackedParameter<bool>("excludeHORing2",false);
35 
36 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< int > AllowedCalibTypes_
HcalCoarsePedestalMonitor::~HcalCoarsePedestalMonitor ( )

Definition at line 40 of file HcalCoarsePedestalMonitor.cc.

40 {}

Member Function Documentation

void HcalCoarsePedestalMonitor::analyze ( const edm::Event e,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 120 of file HcalCoarsePedestalMonitor.cc.

References HcalBaseDQMonitor::analyze(), gather_cfg::cout, HcalBaseDQMonitor::debug_, digiLabel_, edm::Event::getByLabel(), HcalBaseDQMonitor::ievt_, HcalBaseDQMonitor::IsAllowedCalibType(), HcalBaseDQMonitor::LumiInOrder(), edm::EventBase::luminosityBlock(), processEvent(), and zeeHLT_cff::report.

121 {
122  if (!IsAllowedCalibType()) return;
123  if (LumiInOrder(e.luminosityBlock())==false) return;
124 
125 
126  // try to get digis
131 
132  if (!(e.getByLabel(digiLabel_,hbhe_digi)))
133  {
134  edm::LogWarning("HcalCoarsePedestalMonitor")<< digiLabel_<<" hbhe_digi not available";
135  return;
136  }
137 
138  if (!(e.getByLabel(digiLabel_,hf_digi)))
139  {
140  edm::LogWarning("HcalCoarsePedestalMonitor")<< digiLabel_<<" hf_digi not available";
141  return;
142  }
143  if (!(e.getByLabel(digiLabel_,ho_digi)))
144  {
145  edm::LogWarning("HcalCoarsePedestalMonitor")<< digiLabel_<<" ho_digi not available";
146  return;
147  }
148  if (!(e.getByLabel(digiLabel_,report)))
149  {
150  edm::LogWarning("HcalCoarsePedestalMonitor")<< digiLabel_<<" unpacker report not available";
151  return;
152  }
153 
154  // all objects grabbed; event is good
155  if (debug_>1) std::cout <<"\t<HcalCoarsePedestalMonitor::analyze> Processing good event! event # = "<<ievt_<<std::endl;
156 
157  HcalBaseDQMonitor::analyze(e,s); // base class increments ievt_, etc. counters
158 
159  // Digi collection was grabbed successfully; process the Event
160  processEvent(*hbhe_digi, *ho_digi, *hf_digi, *report);
161 
162 } //void HcalCoarsePedestalMonitor::analyze(...)
bool LumiInOrder(int lumisec)
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
void processEvent(const HBHEDigiCollection &hbhe, const HODigiCollection &ho, const HFDigiCollection &hf, const HcalUnpackerReport &report)
tuple report
Definition: zeeHLT_cff.py:9
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
tuple cout
Definition: gather_cfg.py:121
void HcalCoarsePedestalMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 288 of file HcalCoarsePedestalMonitor.cc.

References HcalBaseDQMonitor::beginLuminosityBlock(), HcalBaseDQMonitor::ProblemsCurrentLB, and MonitorElement::Reset().

290 {
293 }
MonitorElement * ProblemsCurrentLB
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
void Reset(void)
reset ME (ie. contents, errors, etc)
void HcalCoarsePedestalMonitor::beginRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 110 of file HcalCoarsePedestalMonitor.cc.

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

111 {
113  if (mergeRuns_ && tevt_>0) return; // don't reset counters if merging runs
114 
115  if (tevt_==0) this->setup(); // create all histograms; not necessary if merging runs together
116  if (mergeRuns_==false) this->reset(); // call reset at start of all runs
117 } // void HcalCoarsePedestalMonitor::beginRun()
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
void HcalCoarsePedestalMonitor::cleanup ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 44 of file HcalCoarsePedestalMonitor.cc.

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

Referenced by endJob().

45 {
46  // Need to add code to clear out subfolders as well?
47  if (debug_>0) std::cout <<"HcalCoarsePedestalMonitor::cleanup()"<<std::endl;
48  if (!enableCleanup_) return;
49  if (dbe_)
50  {
51  // removeContents doesn't remove subdirectories
54  dbe_->setCurrentFolder(subdir_+"CoarsePedestal_parameters");
56  dbe_->setCurrentFolder(subdir_+"LSvalues");
58  } // if(dbe_)
59 
60 } // void HcalCoarsePedestalMonitor::cleanup();
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:2564
tuple cout
Definition: gather_cfg.py:121
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
void HcalCoarsePedestalMonitor::endJob ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 68 of file HcalCoarsePedestalMonitor.cc.

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

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

Reimplemented from HcalBaseDQMonitor.

Definition at line 295 of file HcalCoarsePedestalMonitor.cc.

References fill_Nevents(), HcalBaseDQMonitor::LumiInOrder(), and edm::LuminosityBlockBase::luminosityBlock().

297 {
298  if (LumiInOrder(lumiSeg.luminosityBlock())==false) return;
299  fill_Nevents();
300  return;
301 }
bool LumiInOrder(int lumisec)
LuminosityBlockNumber_t luminosityBlock() const
void fill_Nevents()
Methods, variables accessible only within class code.
void HcalCoarsePedestalMonitor::endRun ( const edm::Run run,
const edm::EventSetup c 
)
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 63 of file HcalCoarsePedestalMonitor.cc.

64 {
65  // Anything to do here?
66 }
void HcalCoarsePedestalMonitor::fill_Nevents ( )
private

Methods, variables accessible only within class code.

Definition at line 302 of file HcalCoarsePedestalMonitor.cc.

References abs, CalcEtaBin(), CoarsePedestalsOccByDepth, CoarsePedestalsSumByDepth, EtaPhiHists::depth, eta(), HcalObjRepresent::FillUnphysicalHEHFBins(), HcalBarrel, HcalEndcap, HcalForward, HcalOuter, i, HcalBaseDQMonitor::ievt_, minEvents_, pedestalocc_, pedestalsum_, phi, and validDetId().

Referenced by endLuminosityBlock().

303 {
304 
305  // require minimum number of events before processing
306  if (ievt_<minEvents_)
307  return;
308 
309 
310  // Set underflow bin to the number of pedestal events processed
311  // (Assume that number of ped events is the same for all channels/subdetectors)
312  for (unsigned int i=0;i<CoarsePedestalsSumByDepth.depth.size();++i)
313  CoarsePedestalsSumByDepth.depth[i]->setBinContent(0,0,ievt_);
314  for (unsigned int i=0;i<CoarsePedestalsOccByDepth.depth.size();++i)
315  CoarsePedestalsOccByDepth.depth[i]->setBinContent(0,0,ievt_);
316 
317 
318  int iphi=-1, ieta=-99, idepth=0, calcEta=-99;
319  // Loop over all depths, eta, phi
320  for (int d=0;d<4;++d)
321  {
322  idepth=d+1;
323  for (int phi=0;phi<72;++phi)
324  {
325  iphi=phi+1; // actual iphi value
326  for (int eta=0;eta<83;++eta)
327  {
328  ieta=eta-41; // actual ieta value;
329  if (validDetId(HcalBarrel, ieta, iphi, idepth))
330  {
331  calcEta = CalcEtaBin(HcalBarrel,ieta,idepth);
332  CoarsePedestalsSumByDepth.depth[d]->Fill(ieta,iphi,pedestalsum_[calcEta][phi][d]);
333  CoarsePedestalsOccByDepth.depth[d]->Fill(ieta,iphi,pedestalocc_[calcEta][phi][d]);
334  }
335  if (validDetId(HcalEndcap, ieta, iphi, idepth))
336  {
337  calcEta = CalcEtaBin(HcalEndcap,ieta,idepth);
338  CoarsePedestalsSumByDepth.depth[d]->Fill(ieta,iphi,pedestalsum_[calcEta][phi][d]);
339  CoarsePedestalsOccByDepth.depth[d]->Fill(ieta,iphi,pedestalocc_[calcEta][phi][d]);
340  }
341  if (validDetId(HcalOuter, ieta, iphi, idepth))
342  {
343  calcEta = CalcEtaBin(HcalOuter,ieta,idepth);
344  CoarsePedestalsSumByDepth.depth[d]->Fill(ieta,iphi,pedestalsum_[calcEta][phi][d]);
345  CoarsePedestalsOccByDepth.depth[d]->Fill(ieta,iphi,pedestalocc_[calcEta][phi][d]);
346  }
347  if (validDetId(HcalForward, ieta, iphi, idepth))
348  {
349  calcEta = CalcEtaBin(HcalBarrel,ieta,idepth);
350  int zside=ieta/abs(ieta);
351  CoarsePedestalsSumByDepth.depth[d]->Fill(ieta+zside,iphi,pedestalsum_[calcEta][phi][d]);
352  CoarsePedestalsOccByDepth.depth[d]->Fill(ieta+zside,iphi,pedestalocc_[calcEta][phi][d]);
353  }
354  }
355  }
356  }
357  // Fill unphysical bins
360 
361  return;
362 } // void HcalCoarsePedestalMonitor::fill_Nevents()
int i
Definition: DBlmapReader.cc:9
#define abs(x)
Definition: mlp_lapack.h:159
T eta() const
std::vector< MonitorElement * > depth
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
int CalcEtaBin(int subdet, int ieta, int depth)
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)
Definition: DDAxes.h:10
void HcalCoarsePedestalMonitor::processEvent ( const HBHEDigiCollection hbhe,
const HODigiCollection ho,
const HFDigiCollection hf,
const HcalUnpackerReport report 
)

Definition at line 165 of file HcalCoarsePedestalMonitor.cc.

References abs, HcalQIESample::adc(), HcalUnpackerReport::badQualityDigis(), edm::SortedCollection< T, SORT >::begin(), CalcEtaBin(), gather_cfg::cout, HcalBaseDQMonitor::dbe_, HcalBaseDQMonitor::debug_, HcalDetId::depth(), edm::SortedCollection< T, SORT >::end(), excludeHORing2_, HcalBaseDQMonitor::HBpresent_, HcalBarrel, HcalEndcap, HcalForward, HcalOuter, HcalBaseDQMonitor::HEpresent_, HcalBaseDQMonitor::HFpresent_, HcalBaseDQMonitor::HOpresent_, i, HBHEDataFrame::id(), HFDataFrame::id(), HODataFrame::id(), HcalDetId::ieta(), HcalDetId::iphi(), isSiPM(), j, pedestalocc_, pedestalsum_, HFDataFrame::sample(), HBHEDataFrame::sample(), HODataFrame::sample(), HBHEDataFrame::size(), HFDataFrame::size(), HODataFrame::size(), edm::SortedCollection< T, SORT >::size(), HcalDetId::subdet(), and relativeConstraints::value.

Referenced by analyze().

169 {
170  if(!dbe_)
171  {
172  if(debug_)
173  std::cout <<"HcalCoarsePedestalMonitor::processEvent DQMStore not instantiated!!!"<<std::endl;
174  return;
175  }
176 
177  // Skip events in which minimal good digis found -- still getting some strange (calib?) events through DQM
178 
179  unsigned int allgooddigis= hbhe.size()+ho.size()+hf.size();
180  // bad threshold: ignore events in which bad outnumber good by more than 100:1
181  // (one RBX in HBHE seems to send valid data occasionally even on QIE resets, which is why we can't just require allgooddigis==0 when looking for events to skip)
182  if ((allgooddigis==0) ||
183  (1.*report.badQualityDigis()>100*allgooddigis))
184  {
185  return;
186  }
187 
189 
190  unsigned int digisize=0;
191  int depth=0, iphi=0, ieta=0, binEta=-9999;
192 
193  double value=0;
194 
195  for (HBHEDigiCollection::const_iterator j=hbhe.begin(); j!=hbhe.end(); ++j)
196  {
197  const HBHEDataFrame digi = (const HBHEDataFrame)(*j);
198  if (digi.id().subdet()==HcalBarrel)
199  {if (!HBpresent_) continue;}
200  else if (digi.id().subdet()==HcalEndcap)
201  {if (!HEpresent_) continue;}
202  else continue;
203  digisize=digi.size();
204  if (digisize<8)
205  continue;
206 
207  depth=digi.id().depth();
208  iphi=digi.id().iphi();
209  ieta=digi.id().ieta();
210 
211  digi.id().subdet()==HcalBarrel ?
212  binEta=CalcEtaBin(HcalBarrel, ieta, depth) :
213  binEta=CalcEtaBin(HcalEndcap, ieta, depth);
214 
215  // 'value' is the average pedestal over the 8 time slices.
216  // In the CoarsePedestal client, we will divide the summed value by Nevents (in underflow bin)
217  // in order to calculate average pedestals.
218  value=0;
219  for (unsigned int i=0;i<8;++i)
220  value+=digi.sample(i).adc()/8.;
221  pedestalsum_[binEta][iphi-1][depth-1]+=value;
222  ++pedestalocc_[binEta][iphi-1][depth-1];
223  }
224 
225 
227  if (HOpresent_)
228  {
229  for (HODigiCollection::const_iterator j=ho.begin(); j!=ho.end(); ++j)
230  {
231  const HODataFrame digi = (const HODataFrame)(*j);
232  digisize=digi.size();
233  if (digisize<8)
234  continue;
235 
236  depth=digi.id().depth();
237  iphi=digi.id().iphi();
238  ieta=digi.id().ieta();
239  binEta=CalcEtaBin(HcalOuter, ieta, depth);
240 
241  // Don't fill cells that are part of HO ring 2 if an exclusion is applied
242  if (excludeHORing2_==true && abs(ieta)>10 && isSiPM(ieta,iphi,4)==false)
243  continue;
244 
245  // 'value' is the average pedestal over the 8 time slices.
246  // In the CoarsePedestal client, we will divide the summed value by Nevents (in underflow bin)
247  // in order to calculate average pedestals.
248  value=0;
249  for (unsigned int i=0;i<8;++i)
250  value+=digi.sample(i).adc()/8.;
251  pedestalsum_[binEta][iphi-1][depth-1]+=value;
252  ++pedestalocc_[binEta][iphi-1][depth-1];
253  } // for (HODigiCollection)
254  }
255 
257  if (HFpresent_)
258  {
259  for (HFDigiCollection::const_iterator j=hf.begin(); j!=hf.end(); ++j)
260  {
261  const HFDataFrame digi = (const HFDataFrame)(*j);
262  digisize=digi.size();
263  if (digisize<8)
264  continue;
265  digisize=digi.size();
266  if (digisize<8)
267  continue;
268 
269  depth=digi.id().depth();
270  iphi=digi.id().iphi();
271  ieta=digi.id().ieta();
272  binEta=CalcEtaBin(HcalForward, ieta, depth);
273  // 'value' is the average pedestal over the 8 time slices.
274  // In the CoarsePedestal client, we will divide the summed value by Nevents (in underflow bin)
275  // in order to calculate average pedestals.
276  value=0;
277  for (unsigned int i=0;i<8;++i)
278  value+=digi.sample(i).adc()/8.;
279  pedestalsum_[binEta][iphi-1][depth-1]+=value;
280  ++pedestalocc_[binEta][iphi-1][depth-1];
281  } // for (HFDigiCollection)
282  } // if (HFpresent_)
283 
284  return;
285 } // void HcalCoarsePedestalMonitor::processEvent(...)
int i
Definition: DBlmapReader.cc:9
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:32
int adc() const
get the ADC sample
Definition: HcalQIESample.h:24
int size() const
total number of samples in the digi
Definition: HBHEDataFrame.h:26
std::vector< T >::const_iterator const_iterator
#define abs(x)
Definition: mlp_lapack.h:159
const HcalQIESample & sample(int i) const
access a sample
Definition: HODataFrame.h:40
const HcalDetId & id() const
Definition: HODataFrame.h:23
bool isSiPM(int ieta, int iphi, int depth)
int depth() const
get the tower depth
Definition: HcalDetId.h:42
int ieta() const
get the cell ieta
Definition: HcalDetId.h:38
int size() const
total number of samples in the digi
Definition: HODataFrame.h:27
const HcalQIESample & sample(int i) const
access a sample
Definition: HFDataFrame.h:39
int j
Definition: DBlmapReader.cc:9
const_iterator end() const
int iphi() const
get the cell iphi
Definition: HcalDetId.h:40
int size() const
total number of samples in the digi
Definition: HFDataFrame.h:26
const HcalQIESample & sample(int i) const
access a sample
Definition: HBHEDataFrame.h:39
int CalcEtaBin(int subdet, int ieta, int depth)
int badQualityDigis() const
size_type size() const
const HcalDetId & id() const
Definition: HBHEDataFrame.h:22
tuple cout
Definition: gather_cfg.py:121
const HcalDetId & id() const
Definition: HFDataFrame.h:22
const_iterator begin() const
void HcalCoarsePedestalMonitor::reset ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 365 of file HcalCoarsePedestalMonitor.cc.

References CoarsePedestalsOccByDepth, CoarsePedestalsSumByDepth, EtaPhiHists::Reset(), and zeroCounters().

Referenced by beginRun(), and setup().

366 {
367  // then reset the MonitorElements
368  zeroCounters();
371  return;
372 }
void Reset(void)
void HcalCoarsePedestalMonitor::setup ( void  )
virtual

Reimplemented from HcalBaseDQMonitor.

Definition at line 75 of file HcalCoarsePedestalMonitor.cc.

References ADCDiffThresh_, DQMStore::bookFloat(), DQMStore::bookInt(), CoarsePedestalsOccByDepth, CoarsePedestalsSumByDepth, gather_cfg::cout, HcalBaseDQMonitor::dbe_, HcalBaseDQMonitor::debug_, EtaPhiHists::depth, excludeHORing2_, MonitorElement::Fill(), i, minEvents_, mergeVDriftHistosByStation::name, reset(), DQMStore::setCurrentFolder(), HcalBaseDQMonitor::setup(), HcalBaseDQMonitor::SetupEtaPhiHists(), and HcalBaseDQMonitor::subdir_.

Referenced by beginRun().

76 {
77  // Call base class setup
79  if (!dbe_) return;
80 
81  /******* Set up all histograms ********/
82  if (debug_>1)
83  std::cout <<"<HcalCoarsePedestalMonitor::beginRun> Setting up histograms"<<std::endl;
84 
85  std::ostringstream name;
86  dbe_->setCurrentFolder(subdir_ +"CoarsePedestalSumPlots");
87  SetupEtaPhiHists(CoarsePedestalsSumByDepth,"Coarse Pedestal Summed Map","");
88  SetupEtaPhiHists(CoarsePedestalsOccByDepth,"Coarse Pedestal Occupancy Map","");
89  for (unsigned int i=0;i<CoarsePedestalsSumByDepth.depth.size();++i)
90  (CoarsePedestalsSumByDepth.depth[i]->getTH2F())->SetOption("colz");
91  for (unsigned int i=0;i<CoarsePedestalsOccByDepth.depth.size();++i)
92  (CoarsePedestalsOccByDepth.depth[i]->getTH2F())->SetOption("colz");
93 
94 
95  dbe_->setCurrentFolder(subdir_+"CoarsePedestal_parameters");
96  MonitorElement* ADCDiffThresh = dbe_->bookFloat("ADCdiff_Problem_Threshold");
97  ADCDiffThresh->Fill(ADCDiffThresh_);
98  MonitorElement* minevents = dbe_->bookInt("minEventsNeededForPedestalCalculation");
99  minevents->Fill(minEvents_);
100  MonitorElement* excludeHORing2 = dbe_->bookInt("excludeHORing2");
101  if (excludeHORing2_==true)
102  excludeHORing2->Fill(1);
103  else
104  excludeHORing2->Fill(0);
105 
106  this->reset();
107  return;
108 } // void HcalCoarsePedestalMonitor::setup()
int i
Definition: DBlmapReader.cc:9
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:654
void Fill(long long x)
std::vector< MonitorElement * > depth
void SetupEtaPhiHists(EtaPhiHists &hh, std::string Name, std::string Units)
tuple cout
Definition: gather_cfg.py:121
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:624
virtual void setup(void)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
void HcalCoarsePedestalMonitor::zeroCounters ( )
private

Definition at line 374 of file HcalCoarsePedestalMonitor.cc.

References i, j, gen::k, pedestalocc_, and pedestalsum_.

Referenced by reset().

375 {
376  for (int i=0;i<85;++i)
377  for (int j=0;j<72;++j)
378  for (int k=0;k<4;++k)
379  {
380  pedestalsum_[i][j][k]=0;
381  pedestalocc_[i][j][k]=0;
382  }
383 }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
int k[5][pyjets_maxn]

Member Data Documentation

double HcalCoarsePedestalMonitor::ADCDiffThresh_
private

Definition at line 60 of file HcalCoarsePedestalMonitor.h.

Referenced by HcalCoarsePedestalMonitor(), and setup().

EtaPhiHists HcalCoarsePedestalMonitor::CoarsePedestalsOccByDepth
private

Definition at line 55 of file HcalCoarsePedestalMonitor.h.

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

EtaPhiHists HcalCoarsePedestalMonitor::CoarsePedestalsSumByDepth
private

Definition at line 54 of file HcalCoarsePedestalMonitor.h.

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

edm::InputTag HcalCoarsePedestalMonitor::digiLabel_
private

Definition at line 62 of file HcalCoarsePedestalMonitor.h.

Referenced by analyze(), and HcalCoarsePedestalMonitor().

bool HcalCoarsePedestalMonitor::excludeHORing2_
private

Definition at line 64 of file HcalCoarsePedestalMonitor.h.

Referenced by HcalCoarsePedestalMonitor(), processEvent(), and setup().

int HcalCoarsePedestalMonitor::minEvents_
private

Definition at line 63 of file HcalCoarsePedestalMonitor.h.

Referenced by fill_Nevents(), HcalCoarsePedestalMonitor(), and setup().

int HcalCoarsePedestalMonitor::pedestalocc_[85][72][4]
private

Definition at line 58 of file HcalCoarsePedestalMonitor.h.

Referenced by fill_Nevents(), processEvent(), and zeroCounters().

double HcalCoarsePedestalMonitor::pedestalsum_[85][72][4]
private

Definition at line 57 of file HcalCoarsePedestalMonitor.h.

Referenced by fill_Nevents(), processEvent(), and zeroCounters().