CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalDigiMonitor.cc
Go to the documentation of this file.
3 #include <cmath>
4 
12 
13 // constructor
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","DigiMonitor_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  hfRechitLabel_ = ps.getUntrackedParameter<edm::InputTag>("hfRechitLabel");
33  shapeThresh_ = ps.getUntrackedParameter<int>("shapeThresh",20);
34  //shapeThresh_ is used for plotting pulse shapes for all digis with pedestal-subtracted ADC sum > shapeThresh_;
35  shapeThreshHB_ = ps.getUntrackedParameter<int>("shapeThreshHB",shapeThresh_);
36  shapeThreshHE_ = ps.getUntrackedParameter<int>("shapeThreshHE",shapeThresh_);
37  shapeThreshHF_ = ps.getUntrackedParameter<int>("shapeThreshHF",shapeThresh_);
38  shapeThreshHO_ = ps.getUntrackedParameter<int>("shapeThreshHO",shapeThresh_);
39 
40  hltresultsLabel_ = ps.getUntrackedParameter<edm::InputTag>("HLTResultsLabel");
41  MinBiasHLTBits_ = ps.getUntrackedParameter<std::vector<std::string> >("MinBiasHLTBits");
42  excludeHORing2_ = ps.getUntrackedParameter<bool>("excludeHORing2",false);
43 
44  if (debug_>0)
45  std::cout <<"<HcalDigiMonitor> Digi shape ADC threshold set to: >" << shapeThresh_ <<" counts above nominal pedestal (3*10)"<< std::endl;
46 
47  // Specify which tests to run when looking for problem digis
48  digi_checkoccupancy_ = ps.getUntrackedParameter<bool>("checkForMissingDigis",false); // off by default -- checked by dead cell monitor
49  digi_checkcapid_ = ps.getUntrackedParameter<bool>("checkCapID",true);
50  digi_checkdigisize_ = ps.getUntrackedParameter<bool>("checkDigiSize",true);
51  digi_checkadcsum_ = ps.getUntrackedParameter<bool>("checkADCsum",true);
52  digi_checkdverr_ = ps.getUntrackedParameter<bool>("checkDVerr",true);
53  mindigisize_ = ps.getUntrackedParameter<int>("minDigiSize",10);
54  maxdigisize_ = ps.getUntrackedParameter<int>("maxDigiSize",10);
55 
56  if (debug_>1)
57  {
58  std::cout <<"<HcalDigiMonitor> Checking for the following problems:"<<std::endl;
59  if (digi_checkcapid_) std::cout <<"\tChecking that cap ID rotation is correct;"<<std::endl;
60  if (digi_checkdigisize_) std::cout <<"\tChecking that digi size is between ["<<mindigisize_<<" - "<<maxdigisize_<<"];"<<std::endl;
61  if (digi_checkadcsum_) std::cout <<"\tChecking that ADC sum of digi is greater than 0;"<<std::endl;
62  if (digi_checkdverr_) std::cout <<"\tChecking that data valid bit is true and digi error bit is false;\n"<<std::endl;
63  }
64 
65  shutOffOrbitTest_ = ps.getUntrackedParameter<bool>("shutOffOrbitTest",false);
66  DigiMonitor_ExpectedOrbitMessageTime_=ps.getUntrackedParameter<int>("ExpectedOrbitMessageTime",3559); // -1 means that orbit mismatches won't be checked
67 
71  HFP_shape=0;
72  HFM_shape=0;
73 }
74 
75 // destructor
77 
78 // Checks capid rotation; returns false if no problems with rotation
79 static bool bitUpset(int last, int now){
80  if(last ==-1) return false;
81  int v = last+1;
82  if(v==4) v=0;
83  if(v==now) return false;
84  return true;
85 } // static bool bitUpset(...)
86 
88 {
89  // Need to add code to clear out subfolders as well?
90  if (debug_>0) std::cout <<"HcalDigiMonitor::cleanup()"<<std::endl;
91  if (!enableCleanup_) return;
92  if (dbe_)
93  {
94  // removeContents doesn't remove subdirectories
97  dbe_->setCurrentFolder(subdir_+"digi_parameters"); dbe_->removeContents();
98  dbe_->setCurrentFolder(subdir_+"bad_digis/bad_digi_occupancy"); dbe_->removeContents();
99  dbe_->setCurrentFolder(subdir_+"bad_digis/1D_digi_plots"); dbe_->removeContents();
100  dbe_->setCurrentFolder(subdir_+"bad_digis/badcapID"); dbe_->removeContents();
101  dbe_->setCurrentFolder(subdir_+"bad_digis/data_invalid_error"); dbe_->removeContents();
102  dbe_->setCurrentFolder(subdir_+"bad_digis/bad_reportUnpackerErrors"); dbe_->removeContents();
103  dbe_->setCurrentFolder(subdir_+"bad_digis/baddigisize"); dbe_->removeContents();
104  dbe_->setCurrentFolder(subdir_+"digi_info"); dbe_->removeContents();
105  dbe_->setCurrentFolder(subdir_+"bad_digis/badfibBCNoff"); dbe_->removeContents();
106  dbe_->setCurrentFolder(subdir_+"good_digis/1D_digi_plots"); dbe_->removeContents();
107  dbe_->setCurrentFolder(subdir_+"good_digis/digi_occupancy"); dbe_->removeContents();
108  dbe_->setCurrentFolder(subdir_+"bad_digis/bad_digi_occupancy"); dbe_->removeContents();
109  dbe_->setCurrentFolder(subdir_+"bad_digis"); dbe_->removeContents();
110  dbe_->setCurrentFolder(subdir_+"good_digis/"); dbe_->removeContents();
111  dbe_->setCurrentFolder(subdir_+"digi_info/HB"); dbe_->removeContents();
112  dbe_->setCurrentFolder(subdir_+"digi_info/HE"); dbe_->removeContents();
113  dbe_->setCurrentFolder(subdir_+"digi_info/HO"); dbe_->removeContents();
114  dbe_->setCurrentFolder(subdir_+"digi_info/HF"); dbe_->removeContents();
115  dbe_->setCurrentFolder(subdir_+"LSvalues");
116  dbe_->removeContents();
117  } // if(dbe_)
118 
119 } // void HcalDigiMonitor::cleanup();
120 
121 
123 {
124  // Anything to do here?
125 }
126 
128 {
129  if (debug_>0) std::cout <<"HcalDigiMonitor::endJob()"<<std::endl;
130  if (enableCleanup_) cleanup(); // when do we force cleanup?
131 }
132 
133 
135 {
136  // Call base class setup
138  if (!dbe_) return;
139 
140  /******* Set up all histograms ********/
141  if (debug_>1)
142  std::cout <<"<HcalDigiMonitor::beginRun> Setting up histograms"<<std::endl;
143 
144  std::ostringstream name;
146 
147  dbe_->setCurrentFolder(subdir_+"digi_parameters");
148  MonitorElement* ExpectedOrbit = dbe_->bookInt("ExpectedOrbitMessageTime");
150 
151  MonitorElement* shapeT = dbe_->bookInt("DigiShapeThresh");
152  shapeT->Fill(shapeThresh_);
153  MonitorElement* shapeTHB = dbe_->bookInt("DigiShapeThreshHB");
154  shapeTHB->Fill(shapeThreshHB_);
155  MonitorElement* shapeTHE = dbe_->bookInt("DigiShapeThreshHE");
156  shapeTHE->Fill(shapeThreshHE_);
157  MonitorElement* shapeTHO = dbe_->bookInt("DigiShapeThreshHO");
158  shapeTHO->Fill(shapeThreshHO_);
159  MonitorElement* shapeTHF = dbe_->bookInt("DigiShapeThreshHF");
160  shapeTHF->Fill(shapeThreshHF_);
161 
162  dbe_->setCurrentFolder(subdir_+"bad_digis/bad_digi_occupancy");
163  SetupEtaPhiHists(DigiErrorsByDepth,"Bad Digi Map","");
164  dbe_->setCurrentFolder(subdir_+"bad_digis/1D_digi_plots");
165  ProblemsVsLB=dbe_->bookProfile("BadDigisVsLB","Number Bad Digis vs Luminosity block;Lumi block;# of Bad digis",
166  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
167  ProblemsVsLB_HB=dbe_->bookProfile("HB Bad Quality Digis vs LB","HB Bad Quality Digis vs Luminosity Block",
168  NLumiBlocks_,0.5,NLumiBlocks_+0.5,
169  100,0,10000);
170  ProblemsVsLB_HE=dbe_->bookProfile("HE Bad Quality Digis vs LB","HE Bad Quality Digis vs Luminosity Block",
171  NLumiBlocks_,0.5,NLumiBlocks_+0.5,
172  100,0,10000);
173  ProblemsVsLB_HO=dbe_->bookProfile("HO Bad Quality Digis vs LB","HO Bad Quality Digis vs Luminosity Block",
174  NLumiBlocks_,0.5,NLumiBlocks_+0.5,
175  100,0,10000);
176  ProblemsVsLB_HF=dbe_->bookProfile("HF Bad Quality Digis vs LB","HF Bad Quality Digis vs Luminosity Block",
177  NLumiBlocks_,0.5,NLumiBlocks_+0.5,
178  100,0,10000);
179  ProblemsVsLB_HBHEHF=dbe_->bookProfile("HBHEHF Bad Quality Digis vs LB","HBHEHF Bad Quality Digis vs Luminosity Block",
180  NLumiBlocks_,0.5,NLumiBlocks_+0.5,
181  100,0,10000);
182 
183  if (makeDiagnostics_)
184  {
185  // by default, unpacked digis won't have these errors
186  dbe_->setCurrentFolder(subdir_+"diagnostics/bad_digis/badcapID");
187  SetupEtaPhiHists(DigiErrorsBadCapID," Digis with Bad Cap ID Rotation", "");
188  dbe_->setCurrentFolder(subdir_+"diagnostics/bad_digis/data_invalid_error");
189  SetupEtaPhiHists(DigiErrorsDVErr," Digis with Data Invalid or Error Bit Set", "");
190  }
191 
192  if (Online_)
193  {
194  // Special histograms for Pawel's timing study
195  dbe_->setCurrentFolder(subdir_+"HFTimingStudy");
196  HFtiming_etaProfile=dbe_->bookProfile("HFTiming_etaProfile","HFTiming Eta Profile;ieta;average time (time slice)",83,-41.5,41.5,200,0,10);
197  HFP_shape=dbe_->book1D("HFP_signal_shape","HFP signal shape",10,-0.5,9.5);
198  HFM_shape=dbe_->book1D("HFM_signal_shape","HFM signal shape",10,-0.5,9.5);
199  dbe_->setCurrentFolder(subdir_+"HFTimingStudy/sumplots");
200  HFtiming_totaltime2D=dbe_->book2D("HFTiming_Total_Time","HFTiming Total Time",83,-41.5,41.5,72,0.5,72.5);
201  HFtiming_occupancy2D=dbe_->book2D("HFTiming_Occupancy","HFTiming Occupancy",83,-41.5,41.5,72,0.5,72.5);
202  }
203 
204  dbe_->setCurrentFolder(subdir_+"bad_digis/bad_reportUnpackerErrors");
205  SetupEtaPhiHists(DigiErrorsUnpacker," Bad Unpacker Digis", "");
206 
207  dbe_->setCurrentFolder(subdir_+"bad_digis/baddigisize");
208  SetupEtaPhiHists(DigiErrorsBadDigiSize," Digis with Bad Size", "");
209 
210  dbe_->setCurrentFolder(subdir_+"digi_info");
211 
212  h_valid_digis=dbe_->book1D("ValidEvents","Events with minimum number of valid digis",2,-0.5,1.5);
213  h_valid_digis->setBinLabel(1,"Valid");
214  h_valid_digis->setBinLabel(2,"Invalid");
215 
216  h_invalid_orbitnumMod103=dbe_->book1D("InvalidDigiEvents_ORN","Orbit Number (mod 103) for Events with Many Unpacker Errors",103,-0.5,102.5);
217  h_invalid_bcn=dbe_->book1D("InvalidDigiEvents_BCN","Bunch Crossing Number fo Events with Many Unpacker Errors",3464,-0.5,3563.5);
218 
219  DigiSize = dbe_->book2D("Digi Size", "Digi Size",4,0,4,20,-0.5,19.5);
220  DigiSize->setBinLabel(1,"HB",1);
221  DigiSize->setBinLabel(2,"HE",1);
222  DigiSize->setBinLabel(3,"HO",1);
223  DigiSize->setBinLabel(4,"HF",1);
224  DigiSize->setAxisTitle("Subdetector",1);
225  DigiSize->setAxisTitle("Digi Size",2);
226 
227  dbe_->setCurrentFolder(subdir_+"bad_digis/badfibBCNoff");
228  SetupEtaPhiHists(DigiErrorsBadFibBCNOff," Digis with non-zero Fiber Orbit Msg Idle BCN Offsets", "");
229 
230  dbe_->setCurrentFolder(subdir_+"good_digis/1D_digi_plots");
231  HBocc_vs_LB=dbe_->bookProfile("HBoccVsLB","HB digi occupancy vs Luminosity Block;Lumi block;# of Good digis",
232  NLumiBlocks_,0.5,NLumiBlocks_+0.5,
233  0,2600);
234  HEocc_vs_LB=dbe_->bookProfile("HEoccVsLB","HE digi occupancy vs Luminosity Block;Lumi block;# of Good digis",
235  NLumiBlocks_,0.5,NLumiBlocks_+0.5,
236  0,2600);
237  HOocc_vs_LB=dbe_->bookProfile("HOoccVsLB","HO digi occupancy vs Luminosity Block;Lumi block;# of Good digis",
238  NLumiBlocks_,0.5,NLumiBlocks_+0.5,
239  0,2200);
240  HFocc_vs_LB=dbe_->bookProfile("HFoccVsLB","HF digi occupancy vs Luminosity Block;Lumi block;# of Good digis",
241  NLumiBlocks_,0.5,NLumiBlocks_+0.5,
242  0,1800);
243 
244  dbe_->setCurrentFolder(subdir_+"good_digis/digi_occupancy");
245  SetupEtaPhiHists(DigiOccupancyByDepth," Digi Eta-Phi Occupancy Map","");
246  DigiOccupancyPhi= dbe_->book1D("Digi Phi Occupancy Map",
247  "Digi Phi Occupancy Map;i#phi;# of Events",
248  72,0.5,72.5);
249  DigiOccupancyEta= dbe_->book1D("Digi Eta Occupancy Map",
250  "Digi Eta Occupancy Map;i#eta;# of Events",
251  83,-41.5,41.5);
252  DigiOccupancyVME = dbe_->book2D("Digi VME Occupancy Map",
253  "Digi VME Occupancy Map;HTR Slot;VME Crate Id",
254  40,-0.25,19.75,18,-0.5,17.5);
255 
256  DigiOccupancySpigot = dbe_->book2D("Digi Spigot Occupancy Map",
257  "Digi Spigot Occupancy Map;Spigot;DCC Id",
259  36,-0.5,35.5);
260 
261  dbe_->setCurrentFolder(subdir_+"bad_digis/bad_digi_occupancy");
262  DigiErrorVME = dbe_->book2D("Digi VME Error Map",
263  "Digi VME Error Map;HTR Slot;VME Crate Id",
264  40,-0.25,19.75,18,-0.5,17.5);
265 
266  DigiErrorSpigot = dbe_->book2D("Digi Spigot Error Map",
267  "Digi Spigot Error Map;Spigot;DCC Id",
269  36,-0.5,35.5);
270 
271  dbe_->setCurrentFolder(subdir_+"bad_digis");
272  int nbins = sizeof(bins_cellcount_new)/sizeof(float)-1;
273 
274  DigiBQ = dbe_->book1D("NumBadQualDigis","Number Bad Qual Digis within Digi Collection",nbins, bins_cellcount_new);
275 
276  nbins=sizeof(bins_fraccount_new)/sizeof(float)-1;
277 
278  DigiBQFrac = dbe_->book1D("Bad Digi Fraction","Bad Digi Fraction;Bad Quality Digi Fraction for digis in collection; # of Events",
279  nbins, bins_fraccount_new);
280 
281  nbins = sizeof(bins_cellcount_new)/sizeof(float)-1;
282  DigiUnpackerErrorCount = dbe_->book1D("Unpacker Error Count", "Number of Bad Digis from Unpacker; Bad Unpacker Digis; # of Events",nbins, bins_cellcount_new);
283 
284  nbins=sizeof(bins_fraccount_new)/sizeof(float)-1;
285  DigiUnpackerErrorFrac = dbe_->book1D("Unpacker Bad Digi Fraction",
286  "Bad Digis From Unpacker/ (Bad Digis From Unpacker + Good Digis); Bad Unpacker Fraction; # of Events",
287  nbins,bins_fraccount_new);
288 
289  dbe_->setCurrentFolder(subdir_+"good_digis/");
290  DigiNum = dbe_->book1D("NumGoodDigis","Number of Digis;# of Good Digis;# of Events",DIGI_NUM+1,-0.5,DIGI_NUM+1-0.5);
291 
296 
297  this->reset();
298  return;
299 } // void HcalDigiMonitor::setup()
300 
302 {
304  if (mergeRuns_ && tevt_>0) return; // don't reset counters if merging runs
305 
306  if (debug_>1) std::cout <<"\t<HcalDigiMonitor::setup> Getting conditions from DB!"<<std::endl;
307  c.get<HcalDbRecord>().get(conditions_);
308 
309  // Get all pedestals by Cap ID
311  c.get<HcalChannelQualityRcd>().get(p);
312  HcalChannelQuality *chanquality= new HcalChannelQuality(*p.product());
313  std::vector<DetId> mydetids = chanquality->getAllChannels();
314  PedestalsByCapId_.clear();
315 
316  const HcalQIEShape* shape = conditions_->getHcalShape();
317  for (std::vector<DetId>::const_iterator chan = mydetids.begin();chan!=mydetids.end();++chan)
318  {
319  if (chan->det()!=DetId::Hcal) continue; // not hcal
320  std::vector <double> peds; // could be ints, right?
321  peds.clear();
322  HcalCalibrations calibs=conditions_->getHcalCalibrations(*chan);
323  const HcalQIECoder* channelCoder = conditions_->getHcalCoder(*chan);
324  //double total=0; // use this is we want to calculate average pedestal value
325  for (int capid=0;capid<4;++capid)
326  {
327  // temp_ADC should be an int, right?
328  double temp_ADC=channelCoder->adc(*shape,(float)calibs.pedestal(capid),capid);
329  peds.push_back(temp_ADC);
330  //total=total+temp_ADC;
331  }
332  //for (int capid=0;capid<4;++capid) peds.push_back(total/4.); // use this if we just want to use average value
333  PedestalsByCapId_[*chan]=peds;
334  } // loop on DetIds
335 
336  if (tevt_==0) this->setup(); // create all histograms; not necessary if merging runs together
337  if (mergeRuns_==false) this->reset(); // call reset at start of all runs
338 } // void HcalDigiMonitor::beginRun()
339 
340 
342 {
343  if (!dbe_) return;
344  std::stringstream name;
345  int nChan=0;
346  if (subdet=="HB" || subdet=="HE") nChan=2592;
347  else if (subdet == "HO") nChan=2160;
348  else if (subdet == "HF") nChan=1728;
349 
350  dbe_->setCurrentFolder(subdir_+"digi_info/"+subdet);
351  hist.shape = dbe_->book1D(subdet+" Digi Shape",subdet+" Digi Shape;Time Slice",10,-0.5,9.5);
352  hist.shapeThresh = dbe_->book1D(subdet+" Digi Shape - over thresh",
353  subdet+" Digi Shape - over thresh passing trigger and HF HT cuts;Time slice",
354  10,-0.5,9.5);
355  hist.ThreshCount = dbe_->book1D(subdet+" Total Digis Over Threshold",
356  subdet+" Total Digis Over Threshold",
357  1,-0.5,0.5);
358  // Create plots of sums of adjacent time slices
359  for (int ts=0;ts<9;++ts)
360  {
361  name<<subdet<<" Plus Time Slices "<<ts<<" and "<<ts+1;
362  hist.TS_sum_plus.push_back(dbe_->book1D(name.str().c_str(),name.str().c_str(),50,-5.5,44.5));
363  name.str("");
364  name<<subdet<<" Minus Time Slices "<<ts<<" and "<<ts+1;
365  hist.TS_sum_minus.push_back(dbe_->book1D(name.str().c_str(),name.str().c_str(),50,-5.5,44.5));
366  name.str("");
367  }
368  hist.presample= dbe_->book1D(subdet+" Digi Presamples",subdet+" Digi Presamples",50,-0.5,49.5);
369  hist.BQ = dbe_->book1D(subdet+" Bad Quality Digis",subdet+" Bad Quality Digis",nChan+1,-0.5,nChan+0.5);
370  //(hist.BQ->getTH1F())->LabelsOption("v");
371  hist.BQFrac = dbe_->book1D(subdet+" Bad Quality Digi Fraction",subdet+" Bad Quality Digi Fraction",DIGI_BQ_FRAC_NBINS,(0-0.5/(DIGI_BQ_FRAC_NBINS-1)),1+0.5/(DIGI_BQ_FRAC_NBINS-1));
372  hist.DigiFirstCapID = dbe_->book1D(subdet+" Capid 1st Time Slice",subdet+" Capid for 1st Time Slice;CapId (T0)- 1st CapId (T0);# of Events",7,-3.5,3.5);
373 
374  hist.DVerr = dbe_->book1D(subdet+" Data Valid Err Bits",subdet+" QIE Data Valid Err Bits",4,-0.5,3.5);
375  hist.DVerr ->setBinLabel(1,"Err=0, DV=0",1);
376  hist.DVerr ->setBinLabel(2,"Err=0, DV=1",1);
377  hist.DVerr ->setBinLabel(3,"Err=1, DV=0",1);
378  hist.DVerr ->setBinLabel(4,"Err=1, DV=1",1);
379  hist.CapID = dbe_->book1D(subdet+" CapID",subdet+" CapID",4,-0.5,3.5);
380  hist.ADC = dbe_->book1D(subdet+" ADC count per time slice",subdet+" ADC count per time slice",200,-0.5,199.5);
381  hist.ADCsum = dbe_->book1D(subdet+" ADC sum", subdet+" ADC sum",200,-0.5,199.5);
382  hist.fibBCNOff = dbe_->book1D(subdet+" Fiber Orbit Message Idle BCN Offset", subdet+" Fiber Orbit Message Idle BCN Offset;Offset from Expected",
383  15, -7.5, 7.5);
384 }
385 
387 {
388  if (!IsAllowedCalibType()) return;
389  if (LumiInOrder(e.luminosityBlock())==false) return;
390 
391  // Get HLT trigger information for HF timing study
392  passedMinBiasHLT_=false;
393 
395  if (!(e.getByLabel(hltresultsLabel_,hltRes)))
396  {
397  if (debug_>0) edm::LogWarning("HcalDigiMonitor")<<" Could not get HLT results with tag "<<hltresultsLabel_<<std::endl;
398  }
399  else
400  {
401  const edm::TriggerNames & triggerNames = e.triggerNames(*hltRes);
402  const unsigned int nTrig(triggerNames.size());
403  for (unsigned int i=0;i<nTrig;++i){
404  // repeat for minbias triggers
405  for (unsigned int k=0;k<MinBiasHLTBits_.size();++k)
406  {
407  if (triggerNames.triggerName(i)==MinBiasHLTBits_[k] && hltRes->accept(i))
408  {
409  passedMinBiasHLT_=true;
410  break;
411  }
412  }
413  }
414  } //else
415 
416  // Now get collections we need
417  HT_HFP_=0;
418  HT_HFM_=0;
419  bool rechitsFound=false;
421  if (e.getByLabel(hfRechitLabel_,hf_rechit))
422  {
423  rechitsFound=true;
424  for (HFRecHitCollection::const_iterator HF=hf_rechit->begin();HF!=hf_rechit->end();++HF)
425  {
426  float en=HF->energy();
427  int ieta=HF->id().ieta();
428  // ieta for HF starts at 29, so subtract away 29 when computing fEta
429  double fEta=fabs(0.5*(theHFEtaBounds[abs(ieta)-28]+theHFEtaBounds[abs(ieta)-29]));
430  ieta>0 ? HT_HFP_+=en/cosh(fEta) : HT_HFM_+=en/cosh(fEta);
431  }
432  }
433  else
434  {
435  // if no rechits found, form above-threshold plots based only on digi comparison to ADC threshold
436  HT_HFP_=999;
437  HT_HFM_=999;
438  }
439 
440  // try to get digis
444 
445  if (!(e.getByLabel(digiLabel_,hbhe_digi)))
446  {
447  edm::LogWarning("HcalDigiMonitor")<< digiLabel_<<" hbhe_digi not available";
448  return;
449  }
450 
451  if (!(e.getByLabel(digiLabel_,hf_digi)))
452  {
453  edm::LogWarning("HcalDigiMonitor")<< digiLabel_<<" hf_digi not available";
454  return;
455  }
456  if (!(e.getByLabel(digiLabel_,ho_digi)))
457  {
458  edm::LogWarning("HcalDigiMonitor")<< digiLabel_<<" ho_digi not available";
459  return;
460  }
462  if (!(e.getByLabel(digiLabel_,report)))
463  {
464  edm::LogWarning("HcalDigiMonitor")<< digiLabel_<<" unpacker report not available";
465  return;
466  }
467 
468  // all objects grabbed; event is good
469  if (debug_>1) std::cout <<"\t<HcalDigiMonitor::analyze> Processing good event! event # = "<<ievt_<<std::endl;
470 
471  HcalBaseDQMonitor::analyze(e,s); // base class increments ievt_, etc. counters
472 
473  // Digi collection was grabbed successfully; process the Event
474  processEvent(*hbhe_digi, *ho_digi, *hf_digi, *conditions_,
475  *report, e.orbitNumber(),e.bunchCrossing());
476 
477 } //void HcalDigiMonitor::analyze(...)
478 
480  const HODigiCollection& ho,
481  const HFDigiCollection& hf,
482  const HcalDbService& cond,
483  const HcalUnpackerReport& report,
484  int orN, int bcN)
485 {
486  if(!dbe_)
487  {
488  if(debug_)
489  std::cout <<"HcalDigiMonitor::processEvent DQMStore not instantiated!!!"<<std::endl;
490  return;
491  }
492 
493  // Skip events in which minimal good digis found -- still getting some strange (calib?) events through DQM
494 
496 
497  unsigned int allgooddigis= hbhe.size()+ho.size()+hf.size();
498  // bad threshold: ignore events in which bad outnumber good by more than 100:1
499  // (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)
500  if ((allgooddigis==0) ||
501  (1.*report.badQualityDigis()>100*allgooddigis))
502  {
503  h_valid_digis->Fill(1);
504  if (bcN>-1)
505  h_invalid_bcn->Fill(bcN);
506  if (orN>-1)
507  h_invalid_orbitnumMod103->Fill(orN%103);
508  return;
509  }
510 
511  h_valid_digis->Fill(0);
512 
513  hbHists.count_bad=0;
515  heHists.count_bad=0;
517  hoHists.count_bad=0;
519  hfHists.count_bad=0;
521 
522  int HO0bad=0;
523  int HO12bad=0;
524  int HFlumibad=0;
525 
526  // Check unpacker report for bad digis
527 
528  typedef std::vector<DetId> DetIdVector;
529 
530  DetIdVector::const_iterator dummy = report.bad_quality_begin();
531  DetIdVector::const_iterator dumm2 = report.bad_quality_end();
532 
533  for ( DetIdVector::const_iterator baddigi_iter=report.bad_quality_begin();
534  baddigi_iter != report.bad_quality_end();
535  ++baddigi_iter)
536  {
537  HcalDetId id(baddigi_iter->rawId());
538  int rDepth = id.depth();
539  int rPhi = id.iphi();
540  int rEta = id.ieta();
541  int binEta = CalcEtaBin(id.subdet(), rEta, rDepth); // why is this here?
542  if (id.subdet()==HcalBarrel) ++hbHists.count_bad;
543  else if (id.subdet()==HcalEndcap) ++heHists.count_bad;
544  else if (id.subdet()==HcalForward)
545  {
546  ++hfHists.count_bad;
547  if (rDepth==1 && (abs(rEta)==33 || abs(rEta)==34)) ++HFlumibad;
548  else if (rDepth==2 && (abs(rEta)==35 || abs(rEta)==36)) ++HFlumibad;
549  }
550  else if (id.subdet()==HcalOuter)
551  {
552  // Mark HORing+/-2 channels as present, HO/YB+/-2 has HV off (at 100V).
553  if (excludeHORing2_==true && rDepth==4)
554  if (abs(rEta)>=11 && abs(rEta)<=15 && !isSiPM(rEta,rPhi,rDepth)) continue;
555 
556  ++hoHists.count_bad;
557  if (abs(rEta)<5) ++HO0bad;
558  else ++HO12bad;
559  }
560  else
561  continue; // skip anything that isn't HB, HE, HO, HF
562  // extra protection against nonsensical values -- prevents occasional crashes
563  if (binEta < 85 && binEta >= 0
564  && (rPhi-1) >= 0 && (rPhi-1)<72
565  && (rDepth-1) >= 0 && (rDepth-1)<4)
566  {
567  ++badunpackerreport[binEta][rPhi-1][rDepth-1];
568  ++baddigis[binEta][rPhi-1][rDepth-1];
569  }
570 
571  }
572 
574 
575  int firsthbcap=-1;
576  int firsthecap=-1;
577  int firsthocap=-1;
578  int firsthfcap=-1;
579 
580  for (HBHEDigiCollection::const_iterator j=hbhe.begin(); j!=hbhe.end(); ++j)
581  {
582  const HBHEDataFrame digi = (const HBHEDataFrame)(*j);
583 
584  if (digi.id().subdet()==HcalBarrel)
585  {
586  if (!HBpresent_) continue;
587  process_Digi(digi, hbHists, firsthbcap);
588  }
589  else if (digi.id().subdet()==HcalEndcap)
590  {
591  if (!HEpresent_) continue;
592  process_Digi(digi, heHists,firsthecap);
593  }
594 
595  }
596 
597  // Fill good digis vs lumi block; also fill bad errors?
600 
601  // Calculate number of bad quality cells and bad quality fraction
603  {
605  if (counter<DIGI_SUBDET_NUM)
608  if (counter2<DIGI_SUBDET_NUM) ++hbHists.count_BQFrac[(int)counter2];
609  }
611  {
613  if (counter<DIGI_SUBDET_NUM)
616  if (counter2<DIGI_SUBDET_NUM) ++heHists.count_BQFrac[int(counter2)];
617  }
618 
620  if (HOpresent_)
621  {
622  for (HODigiCollection::const_iterator j=ho.begin(); j!=ho.end(); ++j)
623  {
624  const HODataFrame digi = (const HODataFrame)(*j);
625  process_Digi(digi, hoHists, firsthocap);
626  } // for (HODigiCollection)
627 
628  if (hoHists.count_bad>0 || hoHists.count_good>0)
629  {
631  if (counter<DIGI_SUBDET_NUM)
633 
635  if (counter2<DIGI_SUBDET_NUM) ++hoHists.count_BQFrac[int(counter2)];
636  }
638  } // if (HOpresent_)
639 
641  if (HFpresent_)
642  {
643  for (HFDigiCollection::const_iterator j=hf.begin(); j!=hf.end(); ++j)
644  {
645  const HFDataFrame digi = (const HFDataFrame)(*j);
646  process_Digi(digi, hfHists, firsthfcap);
647  } // for (HFDigiCollection)
648 
649  if (hfHists.count_bad>0 || hfHists.count_good>0)
650  {
652  if (counter<DIGI_SUBDET_NUM)
655  if (counter2<DIGI_SUBDET_NUM) ++hfHists.count_BQFrac[int(counter2)];
656  }
658  } // if (HFpresent_)
659 
660 
661  // This only counts digis that are present but bad somehow; it does not count digis that are missing
664 
665  if (count_good<DIGI_NUM)
666  ++diginum[count_good];
667 
668  // Fill bad quality histograms
669  DigiUnpackerErrorFrac->Fill(1.*report.badQualityDigis()/(report.badQualityDigis()+count_good));
670  DigiBQ->Fill(count_bad);
671  if (count_bad>0 || count_good>0)
672  DigiBQFrac->Fill(1.*count_bad/(count_bad+count_good));
673 
674  // Call 'update' on all histograms so that they update in online DQM
679 
680  // Now update global (non-subdetector-specific) histograms
681  DigiNum->update();
682  DigiErrorVME->update();
684  DigiBQ->update();
685  DigiBQFrac->update();
688 
689  // Update eta-phi hists
690  for (unsigned int zz=0;zz<DigiErrorOccupancyByDepth.depth.size();++zz)
691  DigiErrorOccupancyByDepth.depth[zz]->update();
692  for (unsigned int zz=0;zz<DigiErrorsByDepth.depth.size();++zz)
693  DigiErrorsByDepth.depth[zz]->update();
694  for (unsigned int zz=0;zz<DigiErrorsBadCapID.depth.size();++zz)
695  DigiErrorsBadCapID.depth[zz]->update();
696  for (unsigned int zz=0;zz<DigiErrorsDVErr.depth.size();++zz)
697  DigiErrorsDVErr.depth[zz]->update();
698  for (unsigned int zz=0;zz<DigiErrorsBadDigiSize.depth.size();++zz)
699  DigiErrorsBadDigiSize.depth[zz]->update();
700  for (unsigned int zz=0;zz<DigiErrorsBadADCSum.depth.size();++zz)
701  DigiErrorsBadADCSum.depth[zz]->update();
702  for (unsigned int zz=0;zz<DigiErrorsUnpacker.depth.size();++zz)
703  DigiErrorsUnpacker.depth[zz]->update();
704  for (unsigned int zz=0;zz<DigiErrorsBadFibBCNOff.depth.size();++zz)
705  DigiErrorsBadFibBCNOff.depth[zz]->update();
706 
711  DigiSize->update();
712 
713  // Fill problems vs. lumi block plots
714  ProblemsVsLB->Fill(currentLS,count_bad);
720 
721  // Fill the number of problem digis in each channel
722  ProblemsCurrentLB->Fill(-1,-1,1); // event counter
727  ProblemsCurrentLB->Fill(4,0,HO0bad);
728  ProblemsCurrentLB->Fill(5,0,HO12bad);
729  ProblemsCurrentLB->Fill(6,0,HFlumibad);
730 
731  // Call fill method every checkNevents
732  //fill_Nevents();
733 
734  return;
735 } // void HcalDigiMonitor::processEvent(...)
736 
737 
738 
739 template <class DIGI>
740 int HcalDigiMonitor::process_Digi(DIGI& digi, DigiHists& h, int& firstcap)
741 {
742  int err=0x0;
743  bool bitUp = false;
744  int ADCcount=0;
745 
746  int shapeThresh=0;
747  if (digi.id().subdet()==HcalBarrel)
748  shapeThresh=shapeThreshHB_;
749  else if (digi.id().subdet()==HcalEndcap)
750  shapeThresh=shapeThreshHE_;
751  else if (digi.id().subdet()==HcalOuter)
752  shapeThresh=shapeThreshHO_;
753  else if (digi.id().subdet()==HcalForward)
754  shapeThresh=shapeThreshHF_;
755 
756  int iEta = digi.id().ieta();
757  int iPhi = digi.id().iphi();
758  int iDepth = digi.id().depth();
759  int calcEta = CalcEtaBin(digi.id().subdet(),iEta,iDepth);
760 
761  // Check that digi size is correct
762  if (digi.size()<mindigisize_ || digi.size()>maxdigisize_)
763  {
764  if (digi_checkdigisize_) err|=0x1;
765  ++baddigisize[calcEta][iPhi-1][iDepth-1];
766  }
767  // Check digi size; if > 20, increment highest bin of digisize array
768  if (digi.size()<20)
769  ++digisize[static_cast<int>(digi.size())][digi.id().subdet()-1];
770  else
771  ++digisize[19][digi.id().subdet()-1];
772 
773  // loop over time slices of digi to check capID and errors
774  ++h.count_presample[digi.presamples()];
775 
776  // Check CapID rotation
777  if (firstcap==-1) firstcap = digi.sample(0).capid();
778  int capdif = digi.sample(0).capid() - firstcap;
779  //capdif = capdif%3 - capdif/3; // unnecessary?
780  // capdif should run from -3 to +3
781  if (capdif >-4 && capdif<4)
782  ++h.capIDdiff[capdif+3];
783  else
784  ++h.capIDdiff[7];
785 
786  int last=-1;
787 
788  int offset = digi.fiberIdleOffset();
789 
790  // Only count BCN offset errors if ExpectedOrbitMessage Time is >-1
791  // For offline (and thus cfg default), this won't be checked, since
792  // we can't keep up to date with changes.
793  if (offset != -1000 && DigiMonitor_ExpectedOrbitMessageTime_>-1)
794  {
795  // increment counters only for non-zero offsets?
796  ++h.fibbcnoff[offset + 7];
797  if (offset != 0)
798  {
799  ++badFibBCNOff[calcEta][iPhi-1][iDepth-1];
800  if (shutOffOrbitTest_ == false) err |= 0xF; // not an error if test turned off
801  }
802  }
803 
804  int tssum=0;
805 
806  bool digi_error=false;
807 
808  const int DigiSize=digi.size();
809  for (int i=0;i<10;++i) pedSubtractedADC_[i]=0;
810  const int pedSubADCsize=sizeof(pedSubtractedADC_)/sizeof(double);
811 
812  std::map<HcalDetId, std::vector<double> >::iterator foundID = PedestalsByCapId_.find(digi.id());
813  for (int i=0;i<DigiSize;++i)
814  {
815  int thisCapid = digi.sample(i).capid();
816  if (thisCapid>=0 && thisCapid<4) ++h.capid[thisCapid];
817 
818  if (makeDiagnostics_)
819  {
820  if(bitUpset(last,thisCapid)) bitUp=true; // checking capID rotation
821  last = thisCapid;
822  // Check for digi error bits
823  if (digi_checkdverr_)
824  {
825  if(digi.sample(i).er()) err=(err|0x2);
826  if(!digi.sample(i).dv()) err=(err|0x2);
827  }
828  if ((digi_error==false) && (digi.sample(i).er() || !digi.sample(i).dv()))
829  {
830  ++digierrorsdverr[calcEta][iPhi-1][iDepth-1];
831  digi_error=true; // only count 1 error per digi in this plot
832  }
833  ++h.dverr[static_cast<int>(2*digi.sample(i).er()+digi.sample(i).dv())];
834  } // if (makeDiagnostics_)
835 
836  h.count_shape[i]+=digi.sample(i).adc();
837 
838  // Calculate ADC sum of adjacent samples -- still necessary?
839  if (i==digi.size()-1) continue;
840  tssum= digi.sample(i).adc()+digi.sample(i+1).adc();
841  if (tssum<45 && tssum>=-5)
842  {
843  if (iEta>0)
844  ++h.tssumplus[tssum+5][i];
845  else
846  ++h.tssumminus[tssum+5][i];
847  }
848 
849  if (digi.sample(i).adc()<0) ++h.adc[0];
850  else if (digi.sample(i).adc()<200) ++h.adc[digi.sample(i).adc()];
851  else ++h.adc[199];
852 
853  if (i>=pedSubADCsize) continue; // don't exceed maximum array length when checking digis
854 
855  if (foundID!=PedestalsByCapId_.end())
856  {
857  pedSubtractedADC_[i]=digi.sample(i).adc()-(foundID->second)[thisCapid];
858  ADCcount+=(int)(digi.sample(i).adc()-(foundID->second)[thisCapid]);
859  }
860  else
861  {
862  pedSubtractedADC_[i]=digi.sample(i).adc()-3;
863  ADCcount+=digi.sample(i).adc()-3; // default pedestal subtraction of 3 ADC counts
864  }
865  } // for (int i=0;i<digi.size();++i)
866 
867  // capid error found
868  if(bitUp)
869  {
870  if (digi_checkcapid_) err=(err|0x4);
871  ++badcapID[calcEta][iPhi-1][iDepth-1];
872  }
873 
874  // These plots generally don't get filled, unless we turn off the suppression of bad digis
875  if (err>0)
876  {
877  ++h.count_bad;
878  ++baddigis[calcEta][iPhi-1][iDepth-1];
879  ++errorVME[static_cast<int>(2*(digi.elecId().htrSlot()+0.5*digi.elecId().htrTopBottom()))][static_cast<int>(digi.elecId().readoutVMECrateId())];
880  ++errorSpigot[static_cast<int>(digi.elecId().spigot())][static_cast<int>(digi.elecId().dccid())];
881  return err;
882  }
883 
884  if (ADCcount<0) ADCcount=0;
885  if (ADCcount<199)
886  ++h.adcsum[ADCcount];
887  else
888  ++h.adcsum[199]; // effective overflow bin
889 
890  // require larger threshold to look at pulse shapes
891 
892  if (ADCcount>shapeThresh && passedMinBiasHLT_ && HT_HFP_>1 && HT_HFM_>1)
893  {
894  h.ThreshCount->Fill(0,1);
895  if (digi.id().subdet()!=HcalOuter || isSiPM(iEta,iPhi, iDepth)==false)
896  {
897  for (int i=0;i<pedSubADCsize;++i)
899  }
900  }
901 
902  // occupancy plots are only filled for good histograms
903  ++h.count_good;
904  ++occupancyEtaPhi[calcEta][iPhi-1][iDepth-1];
905  ++occupancyEta[iEta+41];
906  ++occupancyPhi[iPhi-1];
907  // htr Slots run from 0-20, incremented by 0.5 for top/bottom
908  ++occupancyVME[static_cast<int>(2*(digi.elecId().htrSlot()+0.5*digi.elecId().htrTopBottom()))][static_cast<int>(digi.elecId().readoutVMECrateId())];
909  ++occupancySpigot[static_cast<int>(digi.elecId().spigot())][static_cast<int>(digi.elecId().dccid())];
910 
911  // Pawel's code for HF timing checks -- run only in online mode for non-calib events
912  if (digi.id().subdet()==HcalForward
913  && Online_ //only run online
914  && currenttype_==0 // require non-calibration event
915  && passedMinBiasHLT_ // require min bias trigger
916  )
917  {
918  int maxtime=-1;
919  double maxenergy=-1, fullenergy=0;
920  int digisize=digi.size();
921  for (int ff=0;ff<digisize;++ff)
922  {
923  fullenergy+=digi.sample(ff).nominal_fC()-2.5;
924  if (digi.sample(ff).nominal_fC()-2.5>maxenergy)
925  {
926  maxenergy=digi.sample(ff).nominal_fC()-2.5;
927  maxtime=ff;
928  }
929  }
930 
931  if (maxtime>=2 && maxtime<=5 && maxenergy>20 && maxenergy<100) // only look between time slices 2-5; anything else should be nonsense
932  {
933  for (int ff=0;ff<digisize;++ff){
934  if(fullenergy>0){
935  if(digi.id().ieta()>0)HFP_shape->Fill(ff,(digi.sample(ff).nominal_fC()-2.5)/fullenergy);
936  if(digi.id().ieta()<0)HFM_shape->Fill(ff,(digi.sample(ff).nominal_fC()-2.5)/fullenergy);
937  }
938  }
939 
940  double time_den=0, time_num=0;
941  // form weighted time sum
942  int startslice=std::max(0,maxtime-1);
943  int endslice=std::min(digisize-1,maxtime+1);
944  for (int ss=startslice;ss<=endslice;++ss)
945  {
946  // subtract 'default' pedestal of 2.5 fC
947  time_num+=ss*(digi.sample(ss).nominal_fC()-2.5);
948  time_den+=digi.sample(ss).nominal_fC()-2.5;
949  }
950 
951  int myiphi=iPhi;
952  if (iDepth==2) ++myiphi;
953  if (HFtiming_etaProfile!=0 && time_den!=0)
954  HFtiming_etaProfile->Fill(iEta,time_num/time_den);
955  if (HFtiming_totaltime2D!=0 && time_den!=0)
956  HFtiming_totaltime2D->Fill(iEta,myiphi,time_num/time_den);
957  if (HFtiming_occupancy2D!=0 && time_den!=0)
958  HFtiming_occupancy2D->Fill(iEta,myiphi,1);
959  } //maxtime>-1
960  } // if HcalForward
961 
962  return err;
963 } // template <class DIGI> int HcalDigiMonitor::process_Digi
964 
966  const edm::EventSetup& c)
967 {
970 }
971 
973  const edm::EventSetup& c)
974 {
975  if (LumiInOrder(lumiSeg.luminosityBlock())==false) return;
976  fill_Nevents();
977  return;
978 }
979 
981 {
982  if (debug_>0)
983  std::cout <<"<HcalDigiMonitor> Calling fill_Nevents for event "<<tevt_<< " (processed events = "<<ievt_<<")"<<std::endl;
984  int iPhi, iEta, iDepth;
985  bool valid=false;
986 
987  // Fill plots of sums of adjacent digi samples
988  for (int i=0;i<10;++i)
989  {
990  for (int j=0;j<50;++j)
991  {
992  if (hbHists.tssumplus[j][i]>0) hbHists.TS_sum_plus[i]->Fill(j, hbHists.tssumplus[j][i]);
993  if (hbHists.tssumminus[j][i]>0) hbHists.TS_sum_minus[i]->Fill(j, hbHists.tssumminus[j][i]);
994  if (heHists.tssumplus[j][i]>0) heHists.TS_sum_plus[i]->Fill(j, heHists.tssumplus[j][i]);
995  if (heHists.tssumminus[j][i]>0) heHists.TS_sum_minus[i]->Fill(j, heHists.tssumminus[j][i]);
996  if (hoHists.tssumplus[j][i]>0) hoHists.TS_sum_plus[i]->Fill(j, hoHists.tssumplus[j][i]);
997  if (hoHists.tssumminus[j][i]>0) hoHists.TS_sum_minus[i]->Fill(j, hoHists.tssumminus[j][i]);
998  if (hfHists.tssumplus[j][i]>0) hfHists.TS_sum_plus[i]->Fill(j, hfHists.tssumplus[j][i]);
999  if (hfHists.tssumminus[j][i]>0) hfHists.TS_sum_minus[i]->Fill(j, hfHists.tssumminus[j][i]);
1000  }
1001  } // for (int i=0;i<10;++i)
1002 
1003  for (int i=0;i<DIGI_NUM;++i)
1004  {
1005  if (diginum[i]>0) DigiNum->Fill(i, diginum[i]);
1006  if (i>=DIGI_SUBDET_NUM) continue;
1007 
1008  if (hbHists.count_BQ[i]>0) hbHists.BQ->Fill(i, hbHists.count_BQ[i]);
1009  if (heHists.count_BQ[i]>0) heHists.BQ->Fill(i, heHists.count_BQ[i]);
1010  if (hoHists.count_BQ[i]>0) hoHists.BQ->Fill(i, hoHists.count_BQ[i]);
1011  if (hfHists.count_BQ[i]>0) hfHists.BQ->Fill(i, hfHists.count_BQ[i]);
1012  }//for int i=0;i<DIGI_NUM;++i)
1013 
1014 
1015  // Fill data-valid/error plots and capid plots
1016  for (int i=0;i<4;++i)
1017  {
1018  if (hbHists.dverr[i]>0) hbHists.DVerr->Fill(i, hbHists.dverr[i]);
1019  if (heHists.dverr[i]>0) heHists.DVerr->Fill(i, heHists.dverr[i]);
1020  if (hoHists.dverr[i]>0) hoHists.DVerr->Fill(i, hoHists.dverr[i]);
1021  if (hfHists.dverr[i]>0) hfHists.DVerr->Fill(i, hfHists.dverr[i]);
1022 
1023  if (hbHists.capid[i]>0) hbHists.CapID->Fill(i, hbHists.capid[i]);
1024  if (heHists.capid[i]>0) heHists.CapID->Fill(i, heHists.capid[i]);
1025  if (hoHists.capid[i]>0) hoHists.CapID->Fill(i, hoHists.capid[i]);
1026  if (hfHists.capid[i]>0) hfHists.CapID->Fill(i, hfHists.capid[i]);
1027  }
1028 
1029  for (int i=0;i<200;++i)
1030  {
1031  if (hbHists.adc[i]>0) hbHists.ADC->Fill(i, hbHists.adc[i]);
1032 
1033  if (heHists.adc[i]>0) heHists.ADC->Fill(i, heHists.adc[i]);
1034  if (hoHists.adc[i]>0) hoHists.ADC->Fill(i, hoHists.adc[i]);
1035  if (hfHists.adc[i]>0) hfHists.ADC->Fill(i, hfHists.adc[i]);
1036 
1041  }
1042 
1043  for (int i = 0; i < 15; ++i)
1044  {
1045  if (hbHists.fibbcnoff[i]>0) hbHists.fibBCNOff->Fill(i-7,
1046  hbHists.fibbcnoff[i]);
1047  if (heHists.fibbcnoff[i]>0) heHists.fibBCNOff->Fill(i-7,
1048  heHists.fibbcnoff[i]);
1049  if (hfHists.fibbcnoff[i]>0) hfHists.fibBCNOff->Fill(i-7,
1050  hfHists.fibbcnoff[i]);
1051  if (hoHists.fibbcnoff[i]>0) hoHists.fibBCNOff->Fill(i-7,
1052  hoHists.fibbcnoff[i]);
1053  }
1054 
1055  // Fill plots of bad fraction of digis found
1056  for (int i=0;i<DIGI_BQ_FRAC_NBINS;++i)
1057  {
1058  if (DIGI_BQ_FRAC_NBINS==1) break;
1059  if (hbHists.count_BQFrac[i]>0) hbHists.BQFrac->Fill(1.*i/(DIGI_BQ_FRAC_NBINS-1), hbHists.count_BQFrac[i]);
1060  if (heHists.count_BQFrac[i]>0) heHists.BQFrac->Fill(1.*i/(DIGI_BQ_FRAC_NBINS-1), heHists.count_BQFrac[i]);
1061  if (hoHists.count_BQFrac[i]>0)
1062  {
1063  hoHists.BQFrac->Fill(1.*i/(DIGI_BQ_FRAC_NBINS), hoHists.count_BQFrac[i]);
1064  }
1065  if (hfHists.count_BQFrac[i]>0) hfHists.BQFrac->Fill(1.*i/(DIGI_BQ_FRAC_NBINS-1), hfHists.count_BQFrac[i]);
1066  }//for (int i=0;i<DIGI_BQ_FRAC_NBINS;++i)
1067 
1068  // Fill presample plots
1069  for (int i=0;i<50;++i)
1070  {
1075  } //for (int i=0;i<50;++i)
1076 
1077  // Fill shape plots
1078  for (int i=0;i<10;++i)
1079  {
1088  }// for (int i=0;i<10;++i)
1089 
1090  // Fill capID difference plots
1091  for (int i=0;i<8;++i)
1092  {
1097  }
1098 
1099  // Fill VME plots
1100  for (int i=0;i<40;++i)
1101  {
1102  for (int j=0;j<18;++j)
1103  {
1104  if (errorVME[i][j]>0) DigiErrorVME->Fill(i, j,errorVME[i][j]);
1105  if (occupancyVME[i][j]>0) DigiOccupancyVME->Fill(i, j,occupancyVME[i][j]);
1106  }
1107  } //for (int i=0;i<40;++i)
1108 
1109  // Fill SPIGOT plots
1110  for (int i=0;i<HcalDCCHeader::SPIGOT_COUNT;++i)
1111  {
1112  for (int j=0;j<36;++j)
1113  {
1114  if (errorSpigot[i][j]>0) DigiErrorSpigot->Fill(i, j,errorSpigot[i][j]);
1116  }
1117  } //for (int i=0;i<HcalDCCHeader::SPIGOT_COUNT;++i)
1118 
1119  // Loop over subdetectors
1120  for (int sub=0;sub<4;++sub)
1121  {
1122  for (int dsize=0;dsize<20;++dsize)
1123  {
1124  if (digisize[dsize][sub]>0)
1125  DigiSize->Fill(sub,dsize,digisize[dsize][sub]);
1126  }
1127  } // for (int sub=0;sub<4;++sub)
1128 
1129  // Loop over eta, phi, depth
1130  for (int d=0;d<4;++d)
1131  {
1132  iDepth=d+1;
1133  DigiErrorsByDepth.depth[d]->setBinContent(0,0,ievt_); // underflow bin contains event counter
1134  DigiOccupancyByDepth.depth[d]->setBinContent(0,0,ievt_);
1135  DigiErrorsBadDigiSize.depth[d]->setBinContent(0,0,ievt_);
1136  DigiErrorsUnpacker.depth[d]->setBinContent(0,0,ievt_);
1137  DigiErrorsBadFibBCNOff.depth[d]->setBinContent(0,0,ievt_);
1138 
1139  for (int phi=0;phi<72;++phi)
1140  {
1141  iPhi=phi+1;
1143  for (int eta=0;eta<83;++eta)
1144  {
1145  // DigiOccupanyEta uses 'true' ieta (included the overlap at +/- 29)
1146  iEta=eta-41;
1147  if (phi==0)
1149  valid=false;
1150 
1151  // HB
1152  if (validDetId(HcalBarrel, iEta, iPhi, iDepth))
1153  {
1154  valid=true;
1155  if (HBpresent_)
1156  {
1157  int calcEta = CalcEtaBin(HcalBarrel,iEta,iDepth);
1158 
1159  DigiOccupancyByDepth.depth[d]->Fill(iEta, iPhi,
1160  occupancyEtaPhi[calcEta][phi][d]);
1161 
1162  if (makeDiagnostics_)
1163  {
1164  DigiErrorsBadCapID.depth[d]->Fill(iEta, iPhi,
1165  badcapID[calcEta][phi][d]);
1166  DigiErrorsDVErr.depth[d]->Fill(iEta, iPhi,
1167  digierrorsdverr[calcEta][phi][d]);
1168  }
1169  DigiErrorsBadDigiSize.depth[d]->Fill(iEta, iPhi,
1170  baddigisize[calcEta][phi][d]);
1171  DigiErrorsBadFibBCNOff.depth[d]->Fill(iEta, iPhi,
1172  badFibBCNOff[calcEta][phi][d]);
1173  DigiErrorsUnpacker.depth[d]->Fill(iEta, iPhi,
1174  badunpackerreport[calcEta][phi][d]);
1175  DigiErrorsByDepth.depth[d]->Fill(iEta, iPhi,
1176  baddigis[calcEta][phi][d]);
1177  // Use this for testing purposes only
1178  //DigiErrorsByDepth[d]->Fill(iEta, iPhi, ievt_);
1179  } // if (HBpresent_)
1180  } // validDetId(HB)
1181  // HE
1182  if (validDetId(HcalEndcap, iEta, iPhi, iDepth))
1183  {
1184  valid=true;
1185  if (HEpresent_)
1186  {
1187  int calcEta = CalcEtaBin(HcalEndcap,iEta,iDepth);
1188 
1189  DigiOccupancyByDepth.depth[d]->Fill(iEta, iPhi,
1190  occupancyEtaPhi[calcEta][phi][d]);
1191 
1192  if (makeDiagnostics_)
1193  {
1194  DigiErrorsBadCapID.depth[d]->Fill(iEta, iPhi,
1195  badcapID[calcEta][phi][d]);
1196  DigiErrorsDVErr.depth[d]->Fill(iEta, iPhi,
1197  digierrorsdverr[calcEta][phi][d]);
1198  }
1199  DigiErrorsBadDigiSize.depth[d]->Fill(iEta, iPhi,
1200  baddigisize[calcEta][phi][d]);
1201  DigiErrorsBadFibBCNOff.depth[d]->Fill(iEta, iPhi,
1202  badFibBCNOff[calcEta][phi][d]);
1203  DigiErrorsUnpacker.depth[d]->Fill(iEta, iPhi,
1204  badunpackerreport[calcEta][phi][d]);
1205  DigiErrorsByDepth.depth[d]->Fill(iEta, iPhi,
1206  baddigis[calcEta][phi][d]);
1207  } // if (HEpresent_)
1208  } // valid HE found
1209  // HO
1210  if (validDetId(HcalOuter,iEta,iPhi,iDepth))
1211  {
1212  valid=true;
1213  if (HOpresent_)
1214  {
1215  int calcEta = CalcEtaBin(HcalOuter,iEta,iDepth);
1216  DigiOccupancyByDepth.depth[d]->Fill(iEta, iPhi,
1217  occupancyEtaPhi[calcEta][phi][d]);
1218  if (makeDiagnostics_)
1219  {
1220  DigiErrorsBadCapID.depth[d]->Fill(iEta, iPhi,
1221  badcapID[calcEta][phi][d]);
1222  DigiErrorsDVErr.depth[d]->Fill(iEta, iPhi,
1223  digierrorsdverr[calcEta][phi][d]);
1224  }
1225  DigiErrorsBadDigiSize.depth[d]->Fill(iEta, iPhi,
1226  baddigisize[calcEta][phi][d]);
1227  DigiErrorsBadFibBCNOff.depth[d]->Fill(iEta, iPhi,
1228  badFibBCNOff[calcEta][phi][d]);
1229  DigiErrorsUnpacker.depth[d]->Fill(iEta, iPhi,
1230  badunpackerreport[calcEta][phi][d]);
1231 
1232  DigiErrorsByDepth.depth[d]->Fill(iEta,iPhi,
1233  baddigis[calcEta][phi][d]);
1234  } // if (HOpresent_)
1235  }//validDetId(HO)
1236  // HF
1237  if (validDetId(HcalForward,iEta,iPhi,iDepth))
1238  {
1239  valid=true;
1240  if (HFpresent_)
1241  {
1242  int calcEta = CalcEtaBin(HcalForward,iEta,iDepth);
1243  int zside = iEta/abs(iEta);
1244  DigiOccupancyByDepth.depth[d]->Fill(iEta+zside, iPhi,
1245  occupancyEtaPhi[calcEta][phi][d]);
1246 
1247  if (makeDiagnostics_)
1248  {
1249  DigiErrorsBadCapID.depth[d]->Fill(iEta+zside, iPhi,
1250  badcapID[calcEta][phi][d]);
1251  DigiErrorsDVErr.depth[d]->Fill(iEta+zside, iPhi,
1252  digierrorsdverr[calcEta][phi][d]);
1253  }
1254  DigiErrorsBadDigiSize.depth[d]->Fill(iEta+zside, iPhi,
1255  baddigisize[calcEta][phi][d]);
1256  DigiErrorsBadFibBCNOff.depth[d]->Fill(iEta+zside, iPhi,
1257  badFibBCNOff[calcEta][phi][d]);
1258  DigiErrorsUnpacker.depth[d]->Fill(iEta+zside, iPhi,
1259  badunpackerreport[calcEta][phi][d]);
1260  DigiErrorsByDepth.depth[d]->Fill(iEta+zside, iPhi,
1261  baddigis[calcEta][phi][d]);
1262  } // if (HFpresent_)
1263  }
1264  } // for (int eta=0;...)
1265  } // for (int phi=0;...)
1266  } // for (int d=0;...)
1267 
1268  // Now fill all the unphysical cell values
1270  if (makeDiagnostics_)
1271  {
1274  }
1279 
1280  zeroCounters(); // reset counters of good/bad digis
1281 
1282  return;
1283 } // void HcalDigiMonitor::fill_Nevents()
1284 
1285 
1287 {
1288  // Set all histogram counters back to 0
1289  // Call this after all every N evnets
1290 
1291  /******** Zero all counters *******/
1292 
1293  for (int i=0;i<85;++i)
1294  {
1295  occupancyEta[i]=0;
1296  if (i<72)
1297  occupancyPhi[i]=0;
1298  for (int j=0;j<72;++j)
1299  {
1300  for (int k=0;k<4;++k)
1301  {
1302  baddigis[i][j][k]=0;
1303  badcapID[i][j][k]=0;
1304  baddigisize[i][j][k]=0;
1305  occupancyEtaPhi[i][j][k]=0;
1306  digierrorsdverr[i][j][k]=0;
1307  badFibBCNOff[i][j][k]=0;
1308  badunpackerreport[i][j][k]=0;
1309  }
1310  } // for (int j=0;j<72;++i)
1311  } // for (int i=0;i<85;++i)
1312 
1313  for (int i=0;i<40;++i)
1314  {
1315  for (int j=0;j<18;++j)
1316  {
1317  occupancyVME[i][j]=0;
1318  errorVME[i][j]=0;
1319  }
1320  }
1321 
1322  for (int i=0;i<HcalDCCHeader::SPIGOT_COUNT;++i)
1323  {
1324  for (int j=0;j<36;++j)
1325  {
1326  occupancySpigot[i][j]=0;
1327  errorSpigot[i][j]=0;
1328  }
1329  }
1330 
1331 
1332  for (int i=0;i<20;++i)
1333  {
1334  for (int j=0;j<4;++j)
1335  digisize[i][j]=0;
1336  }
1337 
1338  for (int i=0;i<DIGI_NUM;++i)
1339  {
1340  diginum[i]=0;
1341 
1342  // set all DigiHists counters to 0
1343  if (i<4)
1344  {
1345  hbHists.dverr[i]=0;
1346  heHists.dverr[i]=0;
1347  hoHists.dverr[i]=0;
1348  hfHists.dverr[i]=0;
1349  hbHists.capid[i]=0;
1350  heHists.capid[i]=0;
1351  hoHists.capid[i]=0;
1352  hfHists.capid[i]=0;
1353  }
1354  if (i<8)
1355  {
1356  hbHists.capIDdiff[i]=0;
1357  heHists.capIDdiff[i]=0;
1358  hoHists.capIDdiff[i]=0;
1359  hfHists.capIDdiff[i]=0;
1360  }
1361 
1362  if (i<10)
1363  {
1364  hbHists.count_shape[i]=0;
1365  heHists.count_shape[i]=0;
1366  hoHists.count_shape[i]=0;
1367  hfHists.count_shape[i]=0;
1368 
1373  }
1374  if (i<50)
1375  {
1380  for (int j=0;j<10;++j)
1381  {
1382  hbHists.tssumplus[i][j]=0;
1383  heHists.tssumplus[i][j]=0;
1384  hoHists.tssumplus[i][j]=0;
1385  hfHists.tssumplus[i][j]=0;
1386  hbHists.tssumminus[i][j]=0;
1387  heHists.tssumminus[i][j]=0;
1388  hoHists.tssumminus[i][j]=0;
1389  hfHists.tssumminus[i][j]=0;
1390  }
1391  }
1392 
1393  if (i<15)
1394  {
1395  hbHists.fibbcnoff[i]=0;
1396  heHists.fibbcnoff[i]=0;
1397  hoHists.fibbcnoff[i]=0;
1398  hfHists.fibbcnoff[i]=0;
1399  }
1400 
1401  if (i<200)
1402  {
1403  hbHists.adc[i]=0;
1404  heHists.adc[i]=0;
1405  hoHists.adc[i]=0;
1406  hfHists.adc[i]=0;
1407  hbHists.adcsum[i]=0;
1408  heHists.adcsum[i]=0;
1409  hoHists.adcsum[i]=0;
1410  hfHists.adcsum[i]=0;
1411  }
1412  if (i<DIGI_SUBDET_NUM)
1413  {
1414  hbHists.count_BQ[i]=0;
1415  heHists.count_BQ[i]=0;
1416  hoHists.count_BQ[i]=0;
1417  hfHists.count_BQ[i]=0;
1418  }
1419  if (i<DIGI_BQ_FRAC_NBINS)
1420  {
1421  hbHists.count_BQFrac[i]=0;
1422  heHists.count_BQFrac[i]=0;
1423  hoHists.count_BQFrac[i]=0;
1424  hfHists.count_BQFrac[i]=0;
1425  }
1426  } // for (int i=0;i<DIGI_NUM;++i)
1427 
1428 
1429  return;
1430 }
1431 
1433 {
1434  // call update command for all histograms (should make them update when running in online DQM?)
1435  h.shape->update();
1436  h.shapeThresh->update();
1437  h.presample->update();
1438  h.BQ->update();
1439  h.BQFrac->update();
1440  h.DigiFirstCapID->update();
1441  h.DVerr->update();
1442  h.CapID->update();
1443  h.ADC->update();
1444  h.ADCsum->update();
1445  h.fibBCNOff->update();
1446 
1447  for (unsigned int i=0;i<h.TS_sum_plus.size();++i)
1448  h.TS_sum_plus[i]->update();
1449  for (unsigned int i=0;i<h.TS_sum_minus.size();++i)
1450  h.TS_sum_minus[i]->update();
1451 } //void HcalDigiMonitor::UpdateHists(DigiHists& h)
1452 
1453 
1455 {
1456  // reset the temporary histograms
1457  zeroCounters();
1458 
1459  // then reset the MonitorElements
1460 
1470 
1475  DigiErrorVME->Reset();
1477 
1478  DigiBQ->Reset();
1479  DigiBQFrac->Reset();
1482 
1483  DigiNum->Reset();
1484 
1485  hbHists.shape->Reset();
1487  hbHists.presample->Reset();
1488  hbHists.BQ->Reset();
1489  hbHists.BQFrac->Reset();
1491  hbHists.DVerr->Reset();
1492  hbHists.CapID->Reset();
1493  hbHists.ADC->Reset();
1494  hbHists.ADCsum->Reset();
1495  hbHists.fibBCNOff->Reset();
1496  for (unsigned int i=0;i<hbHists.TS_sum_plus.size();++i)
1497  hbHists.TS_sum_plus[i]->Reset();
1498  for (unsigned int i=0;i<hbHists.TS_sum_minus.size();++i)
1499  hbHists.TS_sum_minus[i]->Reset();
1500 
1501  heHists.shape->Reset();
1503  heHists.presample->Reset();
1504  heHists.BQ->Reset();
1505  heHists.BQFrac->Reset();
1507  heHists.DVerr->Reset();
1508  heHists.CapID->Reset();
1509  heHists.ADC->Reset();
1510  heHists.ADCsum->Reset();
1511  heHists.fibBCNOff->Reset();
1512  for (unsigned int i=0;i<heHists.TS_sum_plus.size();++i)
1513  heHists.TS_sum_plus[i]->Reset();
1514  for (unsigned int i=0;i<heHists.TS_sum_minus.size();++i)
1515  heHists.TS_sum_minus[i]->Reset();
1516 
1517  hoHists.shape->Reset();
1519  hoHists.presample->Reset();
1520  hoHists.BQ->Reset();
1521  hoHists.BQFrac->Reset();
1523  hoHists.DVerr->Reset();
1524  hoHists.CapID->Reset();
1525  hoHists.ADC->Reset();
1526  hoHists.ADCsum->Reset();
1527  hoHists.fibBCNOff->Reset();
1528  for (unsigned int i=0;i<hoHists.TS_sum_plus.size();++i)
1529  hoHists.TS_sum_plus[i]->Reset();
1530  for (unsigned int i=0;i<hoHists.TS_sum_minus.size();++i)
1531  hoHists.TS_sum_minus[i]->Reset();
1532 
1533  hfHists.shape->Reset();
1535  hfHists.presample->Reset();
1536  hfHists.BQ->Reset();
1537  hfHists.BQFrac->Reset();
1539  hfHists.DVerr->Reset();
1540  hfHists.CapID->Reset();
1541  hfHists.ADC->Reset();
1542  hfHists.ADCsum->Reset();
1543  hfHists.fibBCNOff->Reset();
1544  for (unsigned int i=0;i<hfHists.TS_sum_plus.size();++i)
1545  hfHists.TS_sum_plus[i]->Reset();
1546  for (unsigned int i=0;i<hfHists.TS_sum_minus.size();++i)
1547  hfHists.TS_sum_minus[i]->Reset();
1548 
1549  return;
1550 }
1552 
MonitorElement * h_invalid_bcn
bool passedMinBiasHLT_
Methods, variables accessible only within class code.
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
int capid[4]
bool LumiInOrder(int lumisec)
int count_presample[50]
MonitorElement * DigiBQFrac
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:208
MonitorElement * ProblemsCurrentLB
MonitorElement * HFtiming_occupancy2D
edm::InputTag digiLabel_
MonitorElement * ADC
std::vector< std::string > MinBiasHLTBits_
EtaPhiHists DigiErrorsDVErr
int occupancySpigot[40][36]
HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:32
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
int tssumminus[50][10]
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
MonitorElement * shape
MonitorElement * DigiSize
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * HFP_shape
ProductID id() const
Definition: HandleBase.cc:15
int occupancyVME[40][18]
MonitorElement * BQ
MonitorElement * ProblemsVsLB_HF
int errorVME[40][18]
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
MonitorElement * HFtiming_totaltime2D
std::vector< int > AllowedCalibTypes_
MonitorElement * shapeThresh
void beginRun(const edm::Run &run, const edm::EventSetup &c)
MonitorElement * HFM_shape
void Reset(void)
int badcapID[85][72][4]
EtaPhiHists DigiErrorOccupancyByDepth
#define DIGI_BQ_FRAC_NBINS
std::vector< T >::const_iterator const_iterator
int bunchCrossing() const
Definition: EventBase.h:62
int fibbcnoff[15]
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
#define abs(x)
Definition: mlp_lapack.h:159
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
HcalDigiMonitor(const edm::ParameterSet &ps)
#define min(a, b)
Definition: mlp_lapack.h:161
double pedestal(int fCapId) const
get pedestal for capid=0..3
Strings::size_type size() const
Definition: TriggerNames.cc:39
void update(void)
Mark the object updated.
int badFibBCNOff[85][72][4]
MonitorElement * DigiOccupancyEta
MonitorElement * DigiErrorVME
MonitorElement * DigiOccupancyVME
int dverr[4]
T eta() const
MonitorElement * DigiNum
MonitorElement * HOocc_vs_LB
int baddigis[85][72][4]
MonitorElement * ThreshCount
void Fill(long long x)
int adcsum[200]
LuminosityBlockNumber_t luminosityBlock() const
std::map< HcalDetId, std::vector< double > > PedestalsByCapId_
MonitorElement * DigiErrorSpigot
tuple report
Definition: zeeHLT_cff.py:9
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
edm::InputTag hfRechitLabel_
EtaPhiHists DigiErrorsBadFibBCNOff
void UpdateHists(DigiHists &h)
int adc[200]
bool isSiPM(int ieta, int iphi, int depth)
std::vector< MonitorElement * > depth
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
int DigiMonitor_ExpectedOrbitMessageTime_
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:2330
MonitorElement * HBocc_vs_LB
int baddigisize[85][72][4]
#define DIGI_SUBDET_NUM
const T & max(const T &a, const T &b)
MonitorElement * ProblemsVsLB_HBHEHF
MonitorElement * ProblemsVsLB_HB
int digierrorsdverr[85][72][4]
std::vector< DetId > getAllChannels() const
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
int j
Definition: DBlmapReader.cc:9
float bins_cellcount_new[]
DetIdVector::const_iterator bad_quality_begin() const
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:833
int orbitNumber() const
Definition: EventBase.h:63
std::vector< MonitorElement * > TS_sum_minus
MonitorElement * HFocc_vs_LB
unsigned int offset(bool)
std::vector< MonitorElement * > TS_sum_plus
int process_Digi(T &digi, DigiHists &hist, int &firstcap)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
int k[5][pyjets_maxn]
const_iterator end() const
MonitorElement * DigiBQ
MonitorElement * DigiUnpackerErrorCount
MonitorElement * HEocc_vs_LB
MonitorElement * ADCsum
EtaPhiHists DigiErrorsBadDigiSize
int errorSpigot[15][36]
int diginum[DIGI_NUM]
MonitorElement * fibBCNOff
static const double theHFEtaBounds[]
#define DIGI_NUM
int count_BQFrac[DIGI_BQ_FRAC_NBINS]
static bool bitUpset(int last, int now)
MonitorElement * DigiOccupancySpigot
tuple ff
Definition: createTree.py:204
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:27
EtaPhiHists DigiErrorsBadADCSum
edm::InputTag hltresultsLabel_
int count_BQ[DIGI_SUBDET_NUM]
const T & get() const
Definition: EventSetup.h:55
MonitorElement * HFtiming_etaProfile
T const * product() const
Definition: ESHandle.h:62
void FillUnphysicalHEHFBins(EtaPhiHists &hh)
MonitorElement * ProblemsVsLB_HE
int CalcEtaBin(int subdet, int ieta, int depth)
void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * DVerr
MonitorElement * h_invalid_orbitnumMod103
void SetupEtaPhiHists(EtaPhiHists &hh, std::string Name, std::string Units)
int badQualityDigis() const
int occupancyEtaPhi[85][72][4]
MonitorElement * CapID
int tssumplus[50][10]
static const int SPIGOT_COUNT
Definition: HcalDCCHeader.h:21
float bins_fraccount_new[]
size_type size() const
MonitorElement * h_valid_digis
double count_shapeThresh[10]
unsigned adc(const HcalQIEShape &fShape, float fCharge, unsigned fCapId) const
fC + capid [0..3] -&gt; ADC conversion
Definition: HcalQIECoder.cc:27
int capIDdiff[8]
perl if(1 lt scalar(@::datatypes))
Definition: edlooper.cc:31
const HcalDetId & id() const
Definition: HBHEDataFrame.h:22
tuple cout
Definition: gather_cfg.py:41
MonitorElement * DigiUnpackerErrorFrac
MonitorElement * DigiFirstCapID
EtaPhiHists DigiErrorsBadCapID
MonitorElement * ProblemsVsLB_HO
string s
Definition: asciidump.py:422
void setupSubdetHists(DigiHists &hist, std::string subdet)
EtaPhiHists DigiOccupancyByDepth
MonitorElement * BQFrac
MonitorElement * ProblemsVsLB
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:426
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
virtual void setup(void)
int badunpackerreport[85][72][4]
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
MonitorElement * presample
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void processEvent(const HBHEDigiCollection &hbhe, const HODigiCollection &ho, const HFDigiCollection &hf, const HcalDbService &cond, const HcalUnpackerReport &report, int orN, int bcN)
void Reset(void)
reset ME (ie. contents, errors, etc)
int count_shape[10]
EtaPhiHists DigiErrorsByDepth
EtaPhiHists DigiErrorsUnpacker
int digisize[20][4]
mathSSE::Vec4< T > v
edm::ESHandle< HcalDbService > conditions_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
const_iterator begin() const
Definition: Run.h:31
DetIdVector::const_iterator bad_quality_end() const
MonitorElement * DigiOccupancyPhi
double pedSubtractedADC_[10]
bool validDetId(HcalSubdetector sd, int ies, int ip, int dp)
void endRun(const edm::Run &run, const edm::EventSetup &c)
Definition: DDAxes.h:10