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