CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalTrigPrimMonitor.cc
Go to the documentation of this file.
3 
5  dataLabel_(ps.getParameter<edm::InputTag>("dataLabel")),
6  emulLabel_(ps.getParameter<edm::InputTag>("emulLabel")),
7  ZSBadTPThreshold_(ps.getParameter< std::vector<int> >("ZSBadTPThreshold")),
8  ZSAlarmThreshold_(ps.getParameter< std::vector<int> >("ZSAlarmThreshold"))
9 {
10  Online_ = ps.getUntrackedParameter<bool>("online",false);
11  mergeRuns_ = ps.getUntrackedParameter<bool>("mergeRuns",false);
12  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup",false);
13  debug_ = ps.getUntrackedParameter<int>("debug",false);
14  prefixME_ = ps.getUntrackedParameter<std::string>("subSystemFolder","Hcal/");
15  if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!="/")
16  prefixME_.append("/");
17  subdir_ = ps.getUntrackedParameter<std::string>("TaskFolder","TrigPrimMonitor_Hcal");
18  if (subdir_.size()>0 && subdir_.substr(subdir_.size()-1,subdir_.size())!="/")
19  subdir_.append("/");
20  subdir_=prefixME_+subdir_;
21  AllowedCalibTypes_ = ps.getUntrackedParameter<std::vector<int> > ("AllowedCalibTypes");
22  skipOutOfOrderLS_ = ps.getUntrackedParameter<bool>("skipOutOfOrderLS",true);
23  NLumiBlocks_ = ps.getUntrackedParameter<int>("NLumiBlocks",4000);
24  makeDiagnostics_ = ps.getUntrackedParameter<bool>("makeDiagnostics",false);
25 
26  // register for data access
27  tok_data_ = consumes<HcalTrigPrimDigiCollection>(dataLabel_);
28  tok_emu_ = consumes<HcalTrigPrimDigiCollection>(emulLabel_);
29 }
30 
31 
33 }
34 
35 
36 void
38 }
39 
40 
41 void
44 
45  if (dbe_ == 0)
46  return;
47 
48  dbe_->setCurrentFolder(subdir_ + "TP Occupancy");
49  TPOccupancyEta_ = dbe_->book1D("TPOccupancyVsEta", "TPOccupancyVsEta", 65, -32.5, 32.5);
50  TPOccupancyPhi_ = dbe_->book1D("TPOccupancyVsPhi", "TPOccupancyVsPhi", 72, 0.5, 72.5);
51  TPOccupancyPhiHFP_ = dbe_->book1D("TPOccupancyHFPVsPhi", "TPOccupancyHFPVsPhi", 72, 0.5, 72.5);
52  TPOccupancyPhiHFM_ = dbe_->book1D("TPOccupancyHFMVsPhi", "TPOccupancyHFMVsPhi", 72, 0.5, 72.5);
53  TPOccupancy_ = create_map(subdir_ + "TP Occupancy", "TPOccupancy");
54 
55  for (int isZS = 0; isZS <= 1; ++isZS) {
56 
57  std::string folder(subdir_);
58  std::string zsname="_ZS";
59  if (isZS == 0)
60  {
61  folder += "noZS/";
62  zsname="_noZS";
63  }
64 
65  std::string problem_folder(folder);
66  problem_folder += "Problem TPs/";
67 
68  good_tps[isZS] = create_map(folder, "Good TPs"+zsname);
69  bad_tps[isZS] = create_map(folder, "Bad TPs"+zsname);
70 
71  errorflag[isZS] = create_errorflag(folder, "Error Flag"+zsname);
72  problem_map[isZS][kMismatchedEt] = create_map(problem_folder, "Mismatched Et"+zsname);
73  problem_map[isZS][kMismatchedFG] = create_map(problem_folder, "Mismatched FG"+zsname);
74  problem_map[isZS][kMissingData] = create_map(problem_folder, "Missing Data"+zsname);
75  problem_map[isZS][kMissingEmul] = create_map(problem_folder, "Missing Emul"+zsname);
76 
77  for (int isHF = 0; isHF <= 1; ++isHF) {
78  std::string subdet = (isHF == 0 ? "HBHE " : "HF ");
79  tp_corr[isZS][isHF] = create_tp_correlation(folder, subdet + "TP Correlation"+zsname);
80  fg_corr[isZS][isHF] = create_fg_correlation(folder, subdet + "FG Correlation"+zsname);
81 
83  = create_et_histogram(problem_folder + "TP Values/", subdet + "Mismatched FG"+zsname);
84 
86  = create_et_histogram(problem_folder + "TP Values/", subdet + "Missing Data"+zsname);
87 
89  = create_et_histogram(problem_folder + "TP Values/", subdet + "Missing Emul"+zsname);
90  }//isHF
91  }//isZS
92 
93  // Copy for OOT TPs
94  for (int isZS = 0; isZS <= 1; ++isZS) {
95 
96  std::string folder(subdir_);
97  std::string zsname="_ZS";
98  if (isZS == 0)
99  {
100  folder += "noZS/";
101  zsname="_noZS";
102  }
103 
104  std::string problem_folder(folder);
105  problem_folder += "Problem OOT TPs/";
106 
107  good_tps_oot[isZS] = create_map(folder, "Good OOT TPs"+zsname);
108  bad_tps_oot[isZS] = create_map(folder, "Bad OOT TPs"+zsname);
109 
110  errorflag_oot[isZS] = create_errorflag(folder, "Error Flag OOT"+zsname);
111  problem_map_oot[isZS][kMismatchedEt] = create_map(problem_folder, "Mismatched OOT Et"+zsname);
112  problem_map_oot[isZS][kMismatchedFG] = create_map(problem_folder, "Mismatched OOT FG"+zsname);
113  problem_map_oot[isZS][kMissingData] = create_map(problem_folder, "Missing OOT Data"+zsname);
114  problem_map_oot[isZS][kMissingEmul] = create_map(problem_folder, "Missing OOT Emul"+zsname);
115 
116  for (int isHF = 0; isHF <= 1; ++isHF) {
117  std::string subdet = (isHF == 0 ? "HBHE " : "HF ");
118  tp_corr_oot[isZS][isHF] = create_tp_correlation(folder, subdet + "OOT TP Correlation"+zsname);
119  fg_corr_oot[isZS][isHF] = create_fg_correlation(folder, subdet + "OOT FG Correlation"+zsname);
120 
122  = create_et_histogram(problem_folder + "TP Values/", subdet + "OOT Mismatched FG"+zsname);
123 
125  = create_et_histogram(problem_folder + "TP Values/", subdet + "OOT Missing Data"+zsname);
126 
128  = create_et_histogram(problem_folder + "TP Values/", subdet + "OOT Missing Emul"+zsname);
129  }//isHF
130  }//isZS
131 
132  // Number of bad cells vs. luminosity block
134  "TotalBadTPs_HCAL_vs_LS",
135  "Total Number of Bad HCAL TPs vs lumi section",
136  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,10000);
137 
139  "TotalBadTPs_HB_vs_LS",
140  "Total Number of Bad HB TPs vs lumi section",
141  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,3000);
142 
144  "TotalBadTPs_HE_vs_LS",
145  "Total Number of Bad HE TPs vs lumi section",
146  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,3000);
147 
149  "TotalBadTPs_HF_vs_LS",
150  "Total Number of Bad HF TPs vs lumi section",
151  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,3000);
152 
153  // No TPs for HO, DO NOT fill this histogram
155  "TotalBadTPs_HO_vs_LS",
156  "Total Number of Bad HO TPs vs lumi section",
157  NLumiBlocks_,0.5,NLumiBlocks_+0.5,100,0,3000);
158 
159  ProblemsVsLB->getTProfile()->SetMarkerStyle(20);
160  ProblemsVsLB_HB->getTProfile()->SetMarkerStyle(20);
161  ProblemsVsLB_HE->getTProfile()->SetMarkerStyle(20);
162  ProblemsVsLB_HO->getTProfile()->SetMarkerStyle(20);
163  ProblemsVsLB_HF->getTProfile()->SetMarkerStyle(20);
164 }
165 
167 {
169  if (mergeRuns_ && tevt_>0) return; // don't reset counters if merging runs
170  if (tevt_==0) this->setup(); // create all histograms; not necessary if merging runs together
171  if (mergeRuns_==false) this->reset(); // call reset at start of all runs
172 } // void HcalTrigPrimMonitor::beginRun()
173 
174 void
176  if (!IsAllowedCalibType()) return;
177  if (LumiInOrder(e.luminosityBlock())==false) return;
178 
180  if (!e.getByToken(tok_data_, data_tp_col)) {
181  edm::LogWarning("HcalTrigPrimMonitor")<< dataLabel_<< " data TP not available";
182  return;
183  }
184 
186  if (!e.getByToken(tok_emu_, emul_tp_col)) {
187  edm::LogWarning("HcalTrigPrimMonitor")<< emulLabel_<< " emul TP not available";
188  return;
189  }
190 
191  HcalBaseDQMonitor::analyze(e,s); // base class increments ievt_, etc. counters
192  processEvent(data_tp_col, emul_tp_col);
193 }
194 
195 
196 void
198  const edm::Handle <HcalTrigPrimDigiCollection>& data_tp_col,
199  const edm::Handle <HcalTrigPrimDigiCollection>& emul_tp_col) {
200 
201  if(dbe_ == 0)
202  return;
203 
204  std::vector<int> errorflag_per_event[2][2];
205  std::vector<int> errorflag_per_event_oot[2][2];
206  for (int isZS = 0; isZS <= 1; ++isZS) {
207  for (int isHF = 0; isHF <= 1; ++isHF) {
208  errorflag_per_event[isZS][isHF] = std::vector<int>(kNErrorFlag, 0);
209  errorflag_per_event_oot[isZS][isHF] = std::vector<int>(kNErrorFlag, 0);
210  }//for isHF
211  }//for isZS
212 
213  for (int isZS = 0; isZS <= 1; ++isZS) {
214  good_tps[isZS]->setBinContent(-1,-1,ievt_);
215  bad_tps[isZS]->setBinContent(-1,-1,ievt_);
216  good_tps_oot[isZS]->setBinContent(-1,-1,ievt_);
217  bad_tps_oot[isZS]->setBinContent(-1,-1,ievt_);
218  }
219 
220  for (HcalTrigPrimDigiCollection::const_iterator data_tp = data_tp_col->begin();
221  data_tp != data_tp_col->end();
222  ++data_tp) {
223  int ieta = data_tp->id().ieta();
224  int iphi = data_tp->id().iphi();
225  int isHF = data_tp->id().ietaAbs() >= 29 ? 1 : 0;
226 
227 
228  //
229  if (data_tp->SOI_compressedEt() > 0) {
230  TPOccupancy_->Fill(ieta, iphi);
231  TPOccupancyEta_->Fill(ieta);
232  TPOccupancyPhi_->Fill(iphi);
233 
234  if (isHF) {
235  if (ieta > 0) {
236  TPOccupancyPhiHFP_->Fill(iphi);
237  }
238  else {
239  TPOccupancyPhiHFM_->Fill(iphi);
240  }
241  }
242  }
243 
244  //check missing from emulator
245  HcalTrigPrimDigiCollection::const_iterator emul_tp = emul_tp_col->find(data_tp->id());
246  if (emul_tp == emul_tp_col->end()) {
247  bool pass_ZS = true;
248  bool pass_ZS_OOT = true;
249 
250  for (int i=0; i<data_tp->size(); ++i) {
251  if(i==2) {
252  int dataEt(data_tp->sample(i).compressedEt());
253  problem_et[0][isHF][kMissingEmul]->Fill(dataEt);
254 
255  if (dataEt > ZSAlarmThreshold_[abs(ieta)]) {
256  problem_et[1][isHF][kMissingEmul]->Fill(dataEt);
257  pass_ZS = false;
258  }
259 
260  problem_map[0][kMissingEmul]->Fill(ieta, iphi);
261  ++errorflag_per_event[0][isHF][kMissingEmul];
262  bad_tps[0]->Fill(ieta, iphi);
263 
264  if (!pass_ZS) {
265  problem_map[1][kMissingEmul]->Fill(ieta, iphi);
266  ++errorflag_per_event[1][isHF][kMissingEmul];
267  bad_tps[1]->Fill(ieta, iphi);
268 
269  // counts per LS, only for inTime TP
270  if (abs(ieta) <= 16)
272  else if(abs(ieta) <= 28)
274  else
276  }
277  }
278 
279  if(i!=2) {
280  int dataEt(data_tp->sample(i).compressedEt());
281  problem_et_oot[0][isHF][kMissingEmul]->Fill(dataEt);
282 
283  if (dataEt > ZSAlarmThreshold_[abs(ieta)]) {
284  problem_et_oot[1][isHF][kMissingEmul]->Fill(dataEt);
285  pass_ZS_OOT = false;
286  }
287 
288  problem_map_oot[0][kMissingEmul]->Fill(ieta, iphi);
289  ++errorflag_per_event_oot[0][isHF][kMissingEmul];
290  bad_tps_oot[0]->Fill(ieta, iphi);
291 
292  if (!pass_ZS_OOT) {
293  problem_map_oot[1][kMissingEmul]->Fill(ieta, iphi);
294  ++errorflag_per_event_oot[1][isHF][kMissingEmul];
295  bad_tps_oot[1]->Fill(ieta, iphi);
296  }
297  }
298  }
299  } //emul tp not found
300  else {
301  bool mismatchedEt_noZS = false;
302  bool mismatchedEt_ZS = false;
303  bool mismatchedFG_noZS = false;
304  bool mismatchedFG_ZS = false;
305 
306  bool mismatchedEt_OOT_noZS = false;
307  bool mismatchedEt_OOT_ZS = false;
308  bool mismatchedFG_OOT_noZS = false;
309  bool mismatchedFG_OOT_ZS = false;
310 
311  for (int i=0; i<data_tp->size(); ++i) {
312  int dataEt(data_tp->sample(i).compressedEt());
313  int dataFG(data_tp->sample(i).fineGrain());
314  int emulEt(emul_tp->sample(i).compressedEt());
315  int emulFG(emul_tp->sample(i).fineGrain());
316 
317  int diff = abs(dataEt - emulEt);
318  bool fill_corr_ZS = true;
319  bool fill_corr_OOT_ZS = true;
320 
321  if (std::max(dataEt, emulEt) < ZSAlarmThreshold_.at(abs(ieta)))
322  continue;
323 
324  if (diff == 0) {
325  if (dataFG != emulFG) {
326  if(i==2) {
327  mismatchedFG_noZS = true;
328  problem_et[0][isHF][kMismatchedFG]->Fill(dataEt);
329 
330  // exclude mismatched FG when HF TP < ZS_AlarmThreshold
331  if (isHF == 1 && dataEt <= ZSAlarmThreshold_.at(abs(ieta))) {
332  // Do not fill ZS correlation plots.
333  fill_corr_ZS = false;
334  }
335  else {
336  mismatchedFG_ZS = true;
337  problem_et[1][isHF][kMismatchedFG]->Fill(dataEt);
338  }
339  }
340  if(i!=2){
341  mismatchedFG_OOT_noZS = true;
342  problem_et_oot[0][isHF][kMismatchedFG]->Fill(dataEt);
343 
344  // exclude mismatched FG when HF TP < ZS_AlarmThreshold
345  if (isHF == 1 && dataEt <= ZSAlarmThreshold_.at(abs(ieta))) {
346  // Do not fill ZS correlation plots.
347  fill_corr_OOT_ZS = false;
348  }
349  else {
350  mismatchedFG_OOT_ZS = true;
351  problem_et_oot[1][isHF][kMismatchedFG]->Fill(dataEt);
352  }
353  }
354  } // matched et but not fg
355  }
356  else {
357  if(i==2) {
358  mismatchedEt_noZS = true;
359  //if (diff > ZSAlarmThreshold_.at(abs(ieta))) {
360  if (diff > ZSBadTPThreshold_.at(abs(ieta))) {
361  mismatchedEt_ZS = true;
362  fill_corr_ZS = false;
363  }
364  }
365  if(i!=2) {
366  mismatchedEt_OOT_noZS = true;
367  //if (diff > ZSAlarmThreshold_.at(abs(ieta))) {
368  if (diff > ZSBadTPThreshold_.at(abs(ieta))) {
369  mismatchedEt_OOT_ZS = true;
370  fill_corr_OOT_ZS = false;
371  }
372  }
373  } // mismatche et
374 
375  // Correlation plots
376  if(i==2) {
377  tp_corr[0][isHF]->Fill(dataEt, emulEt);
378  fg_corr[0][isHF]->Fill(dataFG, emulFG);
379 
380  if (fill_corr_ZS) {
381  tp_corr[1][isHF]->Fill(dataEt, emulEt);
382  fg_corr[1][isHF]->Fill(dataFG, emulFG);
383  }
384  }
385  if(i!=2) {
386  tp_corr_oot[0][isHF]->Fill(dataEt, emulEt);
387  fg_corr_oot[0][isHF]->Fill(dataFG, emulFG);
388 
389  if (fill_corr_OOT_ZS) {
390  tp_corr_oot[1][isHF]->Fill(dataEt, emulEt);
391  fg_corr_oot[1][isHF]->Fill(dataFG, emulFG);
392  }
393  }
394  }//for tp sample
395 
396  // Fill Problem Map and error counts
397  if (mismatchedEt_noZS) {
398  problem_map[0][kMismatchedEt]->Fill(ieta, iphi);
399  ++errorflag_per_event[0][isHF][kMismatchedEt];
400  }
401  if (mismatchedEt_ZS) {
402  problem_map[1][kMismatchedEt]->Fill(ieta, iphi);
403  ++errorflag_per_event[1][isHF][kMismatchedEt];
404  }
405  if (mismatchedFG_noZS) {
406  problem_map[0][kMismatchedFG]->Fill(ieta, iphi);
407  ++errorflag_per_event[0][isHF][kMismatchedFG];
408  }
409  if (mismatchedFG_ZS) {
410  problem_map[1][kMismatchedFG]->Fill(ieta, iphi);
411  ++errorflag_per_event[1][isHF][kMismatchedFG];
412  }
413  if (mismatchedEt_noZS || mismatchedFG_noZS)
414  bad_tps[0]->Fill(ieta, iphi);
415  else
416  good_tps[0]->Fill(ieta, iphi);
417  if (mismatchedEt_ZS || mismatchedFG_ZS) {
418 
419  bad_tps[1]->Fill(ieta, iphi);
420 
421  // counts per LS
422  if (abs(ieta) <= 16)
424  else if(abs(ieta) <= 28)
426  else
428  }
429  else
430  good_tps[1]->Fill(ieta, iphi);
431 
432  // OOT Copy
433  // Fill Problem Map and error counts
434  if (mismatchedEt_OOT_noZS) {
435  problem_map_oot[0][kMismatchedEt]->Fill(ieta, iphi);
436  ++errorflag_per_event_oot[0][isHF][kMismatchedEt];
437  }
438  if (mismatchedEt_OOT_ZS) {
439  problem_map_oot[1][kMismatchedEt]->Fill(ieta, iphi);
440  ++errorflag_per_event_oot[1][isHF][kMismatchedEt];
441  }
442  if (mismatchedFG_noZS) {
443  problem_map_oot[0][kMismatchedFG]->Fill(ieta, iphi);
444  ++errorflag_per_event_oot[0][isHF][kMismatchedFG];
445  }
446  if (mismatchedFG_OOT_ZS) {
447  problem_map_oot[1][kMismatchedFG]->Fill(ieta, iphi);
448  ++errorflag_per_event_oot[1][isHF][kMismatchedFG];
449  }
450  if (mismatchedEt_OOT_noZS || mismatchedFG_OOT_noZS)
451  bad_tps_oot[0]->Fill(ieta, iphi);
452  else
453  good_tps_oot[0]->Fill(ieta, iphi);
454  if (mismatchedEt_OOT_ZS || mismatchedFG_OOT_ZS) {
455 
456  bad_tps_oot[1]->Fill(ieta, iphi);
457  }
458  else
459  good_tps_oot[1]->Fill(ieta, iphi);
460  }//emul tp found
461  }//for data_tp_col
462 
463 
464  //check missing from data
465  for (HcalTrigPrimDigiCollection::const_iterator emul_tp = emul_tp_col->begin();
466  emul_tp != emul_tp_col->end();
467  ++emul_tp) {
468  int ieta(emul_tp->id().ieta());
469  int iphi(emul_tp->id().iphi());
470  int isHF = emul_tp->id().ietaAbs() >= 29 ? 1 : 0;
471 
472  HcalTrigPrimDigiCollection::const_iterator data_tp = data_tp_col->find(emul_tp->id());
473  if (data_tp == data_tp_col->end()) {
474  bool pass_ZS = true;
475  bool pass_OOT_ZS = true;
476 
477  for (int i=0; i<emul_tp->size(); ++i) {
478  int emulEt(emul_tp->sample(i).compressedEt());
479  if(i==2) {
480  problem_et[0][isHF][kMissingData]->Fill(emulEt);
481 
482  if (emulEt > ZSAlarmThreshold_[abs(ieta)]) {
483  problem_et[1][isHF][kMissingData]->Fill(emulEt);
484  pass_ZS = false;
485  }
486 
487  problem_map[0][kMissingData]->Fill(ieta, iphi);
488  ++errorflag_per_event[0][isHF][kMissingData];
489  bad_tps[0]->Fill(ieta, iphi);
490 
491  if (!pass_ZS) {
492  problem_map[1][kMissingData]->Fill(ieta, iphi);
493  ++errorflag_per_event[1][isHF][kMissingData];
494  bad_tps[1]->Fill(ieta, iphi);
495 
496  // counts per LS
497  if (abs(ieta) <= 16)
499  else if(abs(ieta) <= 28)
501  else
503  }
504  }
505  else {
506  problem_et_oot[0][isHF][kMissingData]->Fill(emulEt);
507 
508  if (emulEt > ZSAlarmThreshold_[abs(ieta)]) {
509  problem_et_oot[1][isHF][kMissingData]->Fill(emulEt);
510  pass_OOT_ZS = false;
511  }
512 
513  problem_map_oot[0][kMissingData]->Fill(ieta, iphi);
514  ++errorflag_per_event_oot[0][isHF][kMissingData];
515  bad_tps_oot[0]->Fill(ieta, iphi);
516 
517  if (!pass_OOT_ZS) {
518  problem_map_oot[1][kMissingData]->Fill(ieta, iphi);
519  ++errorflag_per_event_oot[1][isHF][kMissingData];
520  bad_tps_oot[1]->Fill(ieta, iphi);
521  }
522  }
523  }//for tp sample
524  } //data tp not found
525  } //for emul_tp_col
526 
527  // Fill error flag per event
528  for (int isZS = 0; isZS <= 1; ++isZS) {
529  for (int isHF = 0; isHF <= 1; ++isHF) {
530  for (int i=0; i<kNErrorFlag; ++i) {
531  if (errorflag_per_event[isZS][isHF][i] > 0)
532  errorflag[isZS]->Fill(i, isHF);
533  if (errorflag_per_event_oot[isZS][isHF][i] > 0)
534  errorflag_oot[isZS]->Fill(i, isHF);
535  }//for i
536  }//for isHF
537  }//for isZS
538 }
539 
540 void
542  if (!enableCleanup_) return;
543  if (dbe_) {
545  dbe_->removeContents();
546 
547  dbe_->setCurrentFolder(subdir_ + "noZS/Problem TPs/TP Values");
548  dbe_->removeContents();
549  dbe_->setCurrentFolder(subdir_ + "noZS/Problem TPs");
550  dbe_->removeContents();
551  dbe_->setCurrentFolder(subdir_ + "noZS");
552 
553  dbe_->setCurrentFolder(subdir_ + "Problem TPs/TP Values");
554  dbe_->removeContents();
555  dbe_->setCurrentFolder(subdir_ + "Problem TPs");
556  dbe_->removeContents();
557 
558  dbe_->setCurrentFolder(subdir_ + "Problem OOT TPs/TP Values");
559  dbe_->removeContents();
560  dbe_->setCurrentFolder(subdir_ + "Problem OOT TPs");
561  dbe_->removeContents();
562  }
563 }
564 
566 {
567  if (enableCleanup_) cleanup();
568 }
569 
571  if (LumiInOrder(lumiSeg.luminosityBlock())==false) return;
574  // Rest counter
575  nBad_TP_per_LS_HB_ = 0;
576  nBad_TP_per_LS_HE_ = 0;
577  nBad_TP_per_LS_HF_ = 0;
578 }
579 
581  if (LumiInOrder(lumiSeg.luminosityBlock())==false) return;
582  // Fill histograms for this LS
587 
588  ProblemsCurrentLB->Fill(-1,-1,levt_);
592 }
593 
594 
597  edm::LogInfo("HcalTrigPrimMonitor") << "Creating MonitorElement " << name << " in folder " << folder << "\n";
598 
599  dbe_->setCurrentFolder(folder);
600  return dbe_->book2D(name, name, 65, -32.5, 32.5, 72, 0.5, 72.5);
601 }
602 
605  edm::LogInfo("HcalTrigPrimMonitor") << "Creating MonitorElement " << name << " in folder " << folder << "\n";
606 
607  dbe_->setCurrentFolder(folder);
608  MonitorElement* element = dbe_->book2D(name, name, 4, 1, 5, 2, 0, 2);
609  element->setBinLabel(1, "Mismatched E");
610  element->setBinLabel(2, "Mismatched FG");
611  element->setBinLabel(3, "Missing Data");
612  element->setBinLabel(4, "Missing Emul");
613  element->setBinLabel(1, "HBHE", 2);
614  element->setBinLabel(2, "HF", 2);
615  return element;
616 }
617 
620  edm::LogInfo("HcalTrigPrimMonitor") << "Creating MonitorElement " << name << " in folder " << folder << "\n";
621 
622  dbe_->setCurrentFolder(folder);
623  MonitorElement* element = dbe_->book2D(name, name, 50, 0, 256, 50, 0, 256);
624  element->setAxisTitle("data TP", 1);
625  element->setAxisTitle("emul TP", 2);
626  return element;
627 }
628 
631  edm::LogInfo("HcalTrigPrimMonitor") << "Creating MonitorElement " << name << " in folder " << folder << "\n";
632 
633  dbe_->setCurrentFolder(folder);
634  MonitorElement* element = dbe_->book2D(name, name, 2, 0, 2, 2, 0, 2);
635  element->setAxisTitle("data FG", 1);
636  element->setAxisTitle("emul FG", 2);
637  return element;
638 }
639 
642  edm::LogInfo("HcalTrigPrimMonitor") << "Creating MonitorElement " << name << " in folder " << folder << "\n";
643 
644  dbe_->setCurrentFolder(folder);
645  std::string title = name +";ieta;iphi";
646  return dbe_->book2D(name, title, 65, -32.5, 32.5, 72, 0.5, 72.5);
647 }
648 
651  edm::LogInfo("HcalTrigPrimMonitor") << "Creating MonitorElement " << name << " in folder " << folder << "\n";
652 
653  dbe_->setCurrentFolder(folder);
654  return dbe_->book1D(name, name, 256, 0, 256);
655 }
656 
MonitorElement * bad_tps_oot[2]
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_emu_
MonitorElement * TPOccupancy_
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
void processEvent(const edm::Handle< HcalTrigPrimDigiCollection > &data_tp_col, const edm::Handle< HcalTrigPrimDigiCollection > &emul_tp_col)
bool LumiInOrder(int lumisec)
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * ProblemsCurrentLB
MonitorElement * TPOccupancyPhiHFM_
virtual void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * good_tps_oot[2]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
MonitorElement * ProblemsVsLB_HF
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::map< ErrorFlag, MonitorElement * > problem_et_oot[2][2]
std::vector< int > AllowedCalibTypes_
std::vector< HcalTriggerPrimitiveDigi >::const_iterator const_iterator
MonitorElement * TPOccupancyEta_
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)
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
MonitorElement * create_fg_correlation(const std::string &folder, const std::string &name)
edm::EDGetTokenT< HcalTrigPrimDigiCollection > tok_data_
MonitorElement * create_tp_correlation(const std::string &folder, const std::string &name)
void Fill(long long x)
MonitorElement * fg_corr_oot[2][2]
LuminosityBlockNumber_t luminosityBlock() const
std::map< ErrorFlag, MonitorElement * > problem_et[2][2]
MonitorElement * errorflag_oot[2]
virtual void beginRun(const edm::Run &run, const edm::EventSetup &c)
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:3135
const T & max(const T &a, const T &b)
MonitorElement * ProblemsVsLB_HB
virtual void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< int > ZSBadTPThreshold_
MonitorElement * good_tps[2]
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:1268
MonitorElement * create_et_histogram(const std::string &folder, const std::string &name)
MonitorElement * create_errorflag(const std::string &folder, const std::string &name)
MonitorElement * TPOccupancyPhiHFP_
MonitorElement * fg_corr[2][2]
bool isHF(int etabin, int depth)
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
MonitorElement * ProblemsVsLB_HE
std::map< ErrorFlag, MonitorElement * > problem_map_oot[2]
HcalTrigPrimMonitor(const edm::ParameterSet &ps)
TProfile * getTProfile(void) const
MonitorElement * tp_corr_oot[2][2]
MonitorElement * create_map(const std::string &folder, const std::string &name)
void beginRun(const edm::Run &run, const edm::EventSetup &c)
MonitorElement * bad_tps[2]
MonitorElement * TPOccupancyPhi_
MonitorElement * ProblemsVsLB_HO
MonitorElement * ProblemsVsLB
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:1082
virtual void setup(void)
void analyze(const edm::Event &e, const edm::EventSetup &c)
MonitorElement * errorflag[2]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
std::vector< int > ZSAlarmThreshold_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
Definition: Run.h:41
std::map< ErrorFlag, MonitorElement * > problem_map[2]
MonitorElement * tp_corr[2][2]
MonitorElement * create_summary(const std::string &folder, const std::string &name)