CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1ExtraDQM.cc
Go to the documentation of this file.
1 
15 // this class header
17 
18 // system include files
19 #include <iostream>
20 #include <iomanip>
21 #include <memory>
22 #include <string>
23 
24 // user include files
26 
27 
28 // constructor
30  //
31  m_retrieveL1Extra(paramSet.getParameter<edm::ParameterSet>("L1ExtraInputTags"),consumesCollector()),
32  m_dirName(paramSet.getUntrackedParameter("DirName", std::string(
33  "L1T/L1ExtraDQM"))),
34  //
35  m_nrBxInEventGmt(paramSet.getParameter<int>("NrBxInEventGmt")),
36  m_nrBxInEventGct(paramSet.getParameter<int>("NrBxInEventGct")),
37  //
38  m_resetModule(true), m_currentRun(-99),
39  //
40  m_nrEvJob(0),
41  m_nrEvRun(0)
42 
43  {
44 
45 
46  //
47  if ((m_nrBxInEventGmt > 0) && ((m_nrBxInEventGmt % 2) == 0)) {
49 
50  edm::LogInfo("L1ExtraDQM")
51  << "\nWARNING: Number of bunch crossing to be monitored for GMT rounded to: "
53  << "\n The number must be an odd number!\n"
54  << std::endl;
55  }
56 
57  if ((m_nrBxInEventGct > 0) && ((m_nrBxInEventGct % 2) == 0)) {
59 
60  edm::LogInfo("L1ExtraDQM")
61  << "\nWARNING: Number of bunch crossing to be monitored for GCT rounded to: "
63  << "\n The number must be an odd number!\n"
64  << std::endl;
65  }
66 
67  //
80 
81 }
82 
83 // destructor
85 
86  // empty
87 
88 }
89 
91  const edm::EventSetup& evSetup) {
92 
93  bool bookEta = true;
94  bool bookPhi = true;
95 
96  bool isL1Coll = true;
97 
98  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGmt; ++iBxInEvent) {
99 
100  // convert to actual convention used in the hardware
101  // (from [o, m_nrBxInEventGmt] -> [-X, 0, +X]
102  int bxInEvent = iBxInEvent + (m_nrBxInEventGmt + 1) / 2
103  - m_nrBxInEventGmt;
104 
105  (m_meAnalysisL1ExtraMuon.at(iBxInEvent))->fillNrObjects(
107  m_retrieveL1Extra.validL1ExtraMuon(), isL1Coll, bxInEvent);
108  (m_meAnalysisL1ExtraMuon.at(iBxInEvent))->fillPtPhiEta(
110  m_retrieveL1Extra.validL1ExtraMuon(), bookPhi, bookEta,
111  isL1Coll, bxInEvent);
112 
113  }
114 
115 }
116 
118  const edm::EventSetup& evSetup) {
119 
120  bool bookEta = true;
121  bool bookPhi = true;
122 
123  bool isL1Coll = true;
124 
125  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
126 
127  // convert to actual convention used in the hardware
128  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
129  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
130  - m_nrBxInEventGct;
131 
132  (m_meAnalysisL1ExtraIsoEG.at(iBxInEvent))->fillNrObjects(
134  m_retrieveL1Extra.validL1ExtraIsoEG(), isL1Coll, bxInEvent);
135  (m_meAnalysisL1ExtraIsoEG.at(iBxInEvent))->fillPtPhiEta(
137  m_retrieveL1Extra.validL1ExtraIsoEG(), bookPhi, bookEta,
138  isL1Coll, bxInEvent);
139  }
140 
141 }
142 
144  const edm::EventSetup& evSetup) {
145 
146  bool bookEta = true;
147  bool bookPhi = true;
148 
149  bool isL1Coll = true;
150 
151  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
152 
153  // convert to actual convention used in the hardware
154  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
155  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
156  - m_nrBxInEventGct;
157 
158  (m_meAnalysisL1ExtraNoIsoEG.at(iBxInEvent))->fillNrObjects(
160  m_retrieveL1Extra.validL1ExtraNoIsoEG(), isL1Coll, bxInEvent);
161  (m_meAnalysisL1ExtraNoIsoEG.at(iBxInEvent))->fillPtPhiEta(
163  m_retrieveL1Extra.validL1ExtraNoIsoEG(), bookPhi, bookEta,
164  isL1Coll, bxInEvent);
165  }
166 
167 }
168 
170  const edm::EventSetup& evSetup) {
171 
172  bool bookEta = true;
173  bool bookPhi = true;
174 
175  bool isL1Coll = true;
176 
177  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
178 
179  // convert to actual convention used in the hardware
180  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
181  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
182  - m_nrBxInEventGct;
183 
184  (m_meAnalysisL1ExtraCenJet.at(iBxInEvent))->fillNrObjects(
186  m_retrieveL1Extra.validL1ExtraCenJet(), isL1Coll, bxInEvent);
187  (m_meAnalysisL1ExtraCenJet.at(iBxInEvent))->fillEtPhiEta(
189  m_retrieveL1Extra.validL1ExtraCenJet(), bookPhi, bookEta,
190  isL1Coll, bxInEvent);
191  }
192 
193 }
194 
195 
197  const edm::EventSetup& evSetup) {
198 
199  bool bookPhi = true;
200  bool bookEta = true;
201 
202  bool isL1Coll = true;
203 
204  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
205 
206  // convert to actual convention used in the hardware
207  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
208  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
209  - m_nrBxInEventGct;
210 
211  (m_meAnalysisL1ExtraForJet.at(iBxInEvent))->fillNrObjects(
213  m_retrieveL1Extra.validL1ExtraForJet(), isL1Coll, bxInEvent);
214  (m_meAnalysisL1ExtraForJet.at(iBxInEvent))->fillEtPhiEta(
216  m_retrieveL1Extra.validL1ExtraForJet(), bookPhi, bookEta,
217  isL1Coll, bxInEvent);
218  }
219 
220 }
221 
223  const edm::EventSetup& evSetup) {
224 
225  bool bookPhi = true;
226  bool bookEta = true;
227 
228  bool isL1Coll = true;
229 
230  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
231 
232  // convert to actual convention used in the hardware
233  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
234  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
235  - m_nrBxInEventGct;
236 
237  (m_meAnalysisL1ExtraTauJet.at(iBxInEvent))->fillNrObjects(
239  m_retrieveL1Extra.validL1ExtraTauJet(), isL1Coll, bxInEvent);
240  (m_meAnalysisL1ExtraTauJet.at(iBxInEvent))->fillEtPhiEta(
242  m_retrieveL1Extra.validL1ExtraTauJet(), bookPhi, bookEta,
243  isL1Coll, bxInEvent);
244  }
245 
246 }
247 
249  const edm::EventSetup& evSetup) {
250 
251  bool isL1Coll = true;
252 
253  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
254 
255  // convert to actual convention used in the hardware
256  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
257  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
258  - m_nrBxInEventGct;
259 
260  (m_meAnalysisL1ExtraETT.at(iBxInEvent))->fillEtTotal(m_retrieveL1Extra.l1ExtraETT(),
261  m_retrieveL1Extra.validL1ExtraETT(), isL1Coll, bxInEvent);
262 
263  }
264 
265 }
266 
268  const edm::EventSetup& evSetup) {
269 
270  bool bookPhi = true;
271  bool bookEta = false;
272 
273  bool isL1Coll = true;
274 
275  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
276 
277  // convert to actual convention used in the hardware
278  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
279  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
280  - m_nrBxInEventGct;
281 
282  (m_meAnalysisL1ExtraETM.at(iBxInEvent))->fillEtPhiEta(m_retrieveL1Extra.l1ExtraETM(),
283  m_retrieveL1Extra.validL1ExtraETM(), bookPhi, bookEta,
284  isL1Coll, bxInEvent);
285 
286  }
287 
288 }
289 
291  const edm::EventSetup& evSetup) {
292 
293  bool isL1Coll = true;
294 
295  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
296 
297  // convert to actual convention used in the hardware
298  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
299  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
300  - m_nrBxInEventGct;
301 
302  (m_meAnalysisL1ExtraHTT.at(iBxInEvent))->fillEtTotal(m_retrieveL1Extra.l1ExtraHTT(),
303  m_retrieveL1Extra.validL1ExtraHTT(), isL1Coll, bxInEvent);
304 
305  }
306 }
307 
309  const edm::EventSetup& evSetup) {
310 
311  bool bookPhi = true;
312  bool bookEta = false;
313 
314  bool isL1Coll = true;
315 
316  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
317 
318  // convert to actual convention used in the hardware
319  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
320  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
321  - m_nrBxInEventGct;
322 
323  (m_meAnalysisL1ExtraHTM.at(iBxInEvent))->fillEtPhiEta(m_retrieveL1Extra.l1ExtraHTM(),
324  m_retrieveL1Extra.validL1ExtraHTM(), bookPhi, bookEta,
325  isL1Coll, bxInEvent);
326  }
327 
328 }
329 
331  const edm::EventSetup& evSetup) {
332 
333  bool isL1Coll = true;
334 
335  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
336 
337  // convert to actual convention used in the hardware
338  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
339  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
340  - m_nrBxInEventGct;
341 
342  for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
343  (m_meAnalysisL1ExtraHfBitCounts.at(iBxInEvent))->fillHfBitCounts(
346  isL1Coll, bxInEvent);
347  }
348  }
349 
350 }
351 
353  const edm::EventSetup& evSetup) {
354 
355  bool isL1Coll = true;
356 
357  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
358 
359  // convert to actual convention used in the hardware
360  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
361  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
362  - m_nrBxInEventGct;
363 
364  for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
365  (m_meAnalysisL1ExtraHfRingEtSums.at(iBxInEvent))->fillHfRingEtSums(
368  isL1Coll, bxInEvent);
369  }
370  }
371 }
372 
373 
374 void L1ExtraDQM::dqmBeginRun(edm::Run const& iRun, edm::EventSetup const& evSetup){
375 
376 }
377 
379 
380 }
381 
383 
384  m_nrEvRun = 0;
385 
386  std::vector<L1GtObject> l1Obj;
387  //const edm::EventSetup& evSetup;
388 
389  // define standard sets of histograms
390 
391  //
392  l1Obj.clear();
393  l1Obj.push_back(Mu);
394  int nrMonElements = 5;
395 
396  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGmt; ++iBxInEvent) {
397 
399 
400  // convert to actual convention used in the hardware
401  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
402  // write it in hex [..., E, F, 0, 1, 2, ...]
403  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
404  int bxInEventHex = (bxInEvent+ 16) % 16;
405 
406  std::stringstream ss;
407  std::string bxInEventHexString;
408  ss << std::uppercase << std::hex << bxInEventHex;
409  ss >> bxInEventHexString;
410 
411  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
412 
413  (m_meAnalysisL1ExtraMuon.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_Mu", l1Obj);
414 
415  }
416 
417  //
418  l1Obj.clear();
419  l1Obj.push_back(IsoEG);
420  nrMonElements = 4;
421 
422  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
423 
425 
426  // convert to actual convention used in the hardware
427  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
428  // write it in hex [..., E, F, 0, 1, 2, ...]
429  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
430  int bxInEventHex = (bxInEvent+ 16) % 16;
431 
432  std::stringstream ss;
433  std::string bxInEventHexString;
434  ss << std::uppercase << std::hex << bxInEventHex;
435  ss >> bxInEventHexString;
436 
437  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
438 
439  (m_meAnalysisL1ExtraIsoEG.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_IsoEG", l1Obj);
440  }
441 
442  //
443  l1Obj.clear();
444  l1Obj.push_back(NoIsoEG);
445  nrMonElements = 4;
446 
447  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
448 
450 
451  // convert to actual convention used in the hardware
452  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
453  // write it in hex [..., E, F, 0, 1, 2, ...]
454  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
455  int bxInEventHex = (bxInEvent+ 16) % 16;
456 
457  std::stringstream ss;
458  std::string bxInEventHexString;
459  ss << std::uppercase << std::hex << bxInEventHex;
460  ss >> bxInEventHexString;
461 
462  //if (m_dbe) {
463  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
464  //}
465 
466  (m_meAnalysisL1ExtraNoIsoEG.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_NoIsoEG", l1Obj);
467  }
468 
469  //
470  l1Obj.clear();
471  l1Obj.push_back(CenJet);
472  nrMonElements = 4;
473 
474  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
475 
477 
478  // convert to actual convention used in the hardware
479  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
480  // write it in hex [..., E, F, 0, 1, 2, ...]
481  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
482  int bxInEventHex = (bxInEvent+ 16) % 16;
483 
484  std::stringstream ss;
485  std::string bxInEventHexString;
486  ss << std::uppercase << std::hex << bxInEventHex;
487  ss >> bxInEventHexString;
488 
489  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
490 
491  (m_meAnalysisL1ExtraCenJet.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_CenJet", l1Obj);
492  }
493 
494  //
495  l1Obj.clear();
496  l1Obj.push_back(ForJet);
497 
498  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
499 
501 
502  // convert to actual convention used in the hardware
503  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
504  // write it in hex [..., E, F, 0, 1, 2, ...]
505  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
506  int bxInEventHex = (bxInEvent+ 16) % 16;
507 
508  std::stringstream ss;
509  std::string bxInEventHexString;
510  ss << std::uppercase << std::hex << bxInEventHex;
511  ss >> bxInEventHexString;
512 
513  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
514 
515  (m_meAnalysisL1ExtraForJet.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_ForJet", l1Obj);
516  }
517 
518  //
519  l1Obj.clear();
520  l1Obj.push_back(TauJet);
521 
522  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
523 
525 
526  // convert to actual convention used in the hardware
527  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
528  // write it in hex [..., E, F, 0, 1, 2, ...]
529  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
530  int bxInEventHex = (bxInEvent+ 16) % 16;
531 
532  std::stringstream ss;
533  std::string bxInEventHexString;
534  ss << std::uppercase << std::hex << bxInEventHex;
535  ss >> bxInEventHexString;
536 
537  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
538 
539  (m_meAnalysisL1ExtraTauJet.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_TauJet", l1Obj);
540  }
541 
542  //
543  l1Obj.clear();
544  l1Obj.push_back(ETT);
545  nrMonElements = 1;
546 
547  bool bookPhi = false;
548  bool bookEta = false;
549 
550  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
551 
553 
554  // convert to actual convention used in the hardware
555  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
556  // write it in hex [..., E, F, 0, 1, 2, ...]
557  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
558  int bxInEventHex = (bxInEvent+ 16) % 16;
559 
560  std::stringstream ss;
561  std::string bxInEventHexString;
562  ss << std::uppercase << std::hex << bxInEventHex;
563  ss >> bxInEventHexString;
564 
565  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
566 
567  (m_meAnalysisL1ExtraETT.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_ETT", l1Obj, bookPhi, bookEta);
568  }
569 
570  //
571  l1Obj.clear();
572  l1Obj.push_back(ETM);
573  nrMonElements = 2;
574 
575  bookPhi = true;
576  bookEta = false;
577 
578  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
579 
581 
582  // convert to actual convention used in the hardware
583  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
584  // write it in hex [..., E, F, 0, 1, 2, ...]
585  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
586  int bxInEventHex = (bxInEvent+ 16) % 16;
587 
588  std::stringstream ss;
589  std::string bxInEventHexString;
590  ss << std::uppercase << std::hex << bxInEventHex;
591  ss >> bxInEventHexString;
592 
593  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
594 
595  (m_meAnalysisL1ExtraETM.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_ETM", l1Obj, bookPhi, bookEta);
596  }
597 
598  //
599  l1Obj.clear();
600  l1Obj.push_back(HTT);
601  nrMonElements = 1;
602 
603  bookPhi = false;
604  bookEta = false;
605 
606  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
607 
609 
610  // convert to actual convention used in the hardware
611  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
612  // write it in hex [..., E, F, 0, 1, 2, ...]
613  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
614  int bxInEventHex = (bxInEvent+ 16) % 16;
615 
616  std::stringstream ss;
617  std::string bxInEventHexString;
618  ss << std::uppercase << std::hex << bxInEventHex;
619  ss >> bxInEventHexString;
620 
621  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
622 
623  (m_meAnalysisL1ExtraHTT.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_HTT", l1Obj, bookPhi, bookEta);
624  }
625 
626  //
627  l1Obj.clear();
628  l1Obj.push_back(HTM);
629  nrMonElements = 2;
630 
631  bookPhi = true;
632  bookEta = false;
633 
634  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
635 
637 
638  // convert to actual convention used in the hardware
639  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
640  // write it in hex [..., E, F, 0, 1, 2, ...]
641  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
642  int bxInEventHex = (bxInEvent+ 16) % 16;
643 
644  std::stringstream ss;
645  std::string bxInEventHexString;
646  ss << std::uppercase << std::hex << bxInEventHex;
647  ss >> bxInEventHexString;
648 
649  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
650 
651  (m_meAnalysisL1ExtraHTM.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_HTM", l1Obj, bookPhi, bookEta);
652  }
653 
654  //
655  l1Obj.clear();
656  l1Obj.push_back(HfBitCounts);
657  nrMonElements = 1;
658 
659  bookPhi = false;
660  bookEta = false;
661 
662  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
663 
666 
667  // convert to actual convention used in the hardware
668  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
669  // write it in hex [..., E, F, 0, 1, 2, ...]
670  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
671  int bxInEventHex = (bxInEvent+ 16) % 16;
672 
673  std::stringstream ss;
674  std::string bxInEventHexString;
675  ss << std::uppercase << std::hex << bxInEventHex;
676  ss >> bxInEventHexString;
677 
678  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
679 
680  (m_meAnalysisL1ExtraHfBitCounts.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_HfBitCounts", l1Obj, bookPhi, bookEta);
681  }
682 
683  //
684  l1Obj.clear();
685  l1Obj.push_back(HfRingEtSums);
686  nrMonElements = 1;
687 
688  bookPhi = false;
689  bookEta = false;
690 
691  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
692 
695  evSetup, nrMonElements));
696 
697  // convert to actual convention used in the hardware
698  // (from [o, m_nrBxInEventGct] -> [-X, 0, +X]
699  // write it in hex [..., E, F, 0, 1, 2, ...]
700  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
701  - m_nrBxInEventGct;
702  int bxInEventHex = (bxInEvent+ 16) % 16;
703 
704  std::stringstream ss;
705  std::string bxInEventHexString;
706  ss << std::uppercase << std::hex << bxInEventHex;
707  ss >> bxInEventHexString;
708 
709  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
710 
711  (m_meAnalysisL1ExtraHfRingEtSums.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_HfRingEtSums", l1Obj, bookPhi, bookEta);
712  }
713 
714 }
715 
716 
717 //
719  const edm::EventSetup& evSetup) {
720 
721  ++m_nrEvJob;
722  ++m_nrEvRun;
723 
724  //
725  m_retrieveL1Extra.retrieveL1ExtraObjects(iEvent, evSetup);
726  //
727  analyzeL1ExtraMuon(iEvent, evSetup);
728  analyzeL1ExtraIsoEG(iEvent, evSetup);
729  analyzeL1ExtraNoIsoEG(iEvent, evSetup);
730  analyzeL1ExtraCenJet(iEvent, evSetup);
731  analyzeL1ExtraForJet(iEvent, evSetup);
732  analyzeL1ExtraTauJet(iEvent, evSetup);
733  analyzeL1ExtraETT(iEvent, evSetup);
734  analyzeL1ExtraETM(iEvent, evSetup);
735  analyzeL1ExtraHTT(iEvent, evSetup);
736  analyzeL1ExtraHTM(iEvent, evSetup);
737  analyzeL1ExtraHfBitCounts(iEvent, evSetup);
738  analyzeL1ExtraHfRingEtSums(iEvent, evSetup);
739 }
740 
741 
742 void L1ExtraDQM::endRun(const edm::Run& run, const edm::EventSetup& evSetup) {
743 
744  // delete if event setup has changed only FIXME
745 
746  for (std::vector<L1ExtraMonElement<l1extra::L1MuonParticleCollection>*>::iterator
747  iterME = m_meAnalysisL1ExtraMuon.begin(); iterME
748  != m_meAnalysisL1ExtraMuon.end(); ++iterME) {
749 
750  delete *iterME;
751 
752  }
753  m_meAnalysisL1ExtraMuon.clear();
754 
755 
756  for (std::vector<L1ExtraMonElement<l1extra::L1EmParticleCollection>*>::iterator
757  iterME = m_meAnalysisL1ExtraIsoEG.begin(); iterME
758  != m_meAnalysisL1ExtraIsoEG.end(); ++iterME) {
759 
760  delete *iterME;
761 
762  }
763  m_meAnalysisL1ExtraIsoEG.clear();
764 
765 
766  for (std::vector<L1ExtraMonElement<l1extra::L1EmParticleCollection>*>::iterator
767  iterME = m_meAnalysisL1ExtraNoIsoEG.begin(); iterME
768  != m_meAnalysisL1ExtraNoIsoEG.end(); ++iterME) {
769 
770  delete *iterME;
771 
772  }
774 
775 
776  for (std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*>::iterator
777  iterME = m_meAnalysisL1ExtraCenJet.begin(); iterME
778  != m_meAnalysisL1ExtraCenJet.end(); ++iterME) {
779 
780  delete *iterME;
781 
782  }
784 
785  for (std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*>::iterator
786  iterME = m_meAnalysisL1ExtraForJet.begin(); iterME
787  != m_meAnalysisL1ExtraForJet.end(); ++iterME) {
788 
789  delete *iterME;
790 
791  }
793 
794  for (std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*>::iterator
795  iterME = m_meAnalysisL1ExtraTauJet.begin(); iterME
796  != m_meAnalysisL1ExtraTauJet.end(); ++iterME) {
797 
798  delete *iterME;
799 
800  }
802 
803 
804  for (std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>::iterator
805  iterME = m_meAnalysisL1ExtraETT.begin(); iterME
806  != m_meAnalysisL1ExtraETT.end(); ++iterME) {
807 
808  delete *iterME;
809 
810  }
811  m_meAnalysisL1ExtraETT.clear();
812 
813  for (std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>::iterator
814  iterME = m_meAnalysisL1ExtraETM.begin(); iterME
815  != m_meAnalysisL1ExtraETM.end(); ++iterME) {
816 
817  delete *iterME;
818 
819  }
820  m_meAnalysisL1ExtraETM.clear();
821 
822  for (std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>::iterator
823  iterME = m_meAnalysisL1ExtraHTT.begin(); iterME
824  != m_meAnalysisL1ExtraHTT.end(); ++iterME) {
825 
826  delete *iterME;
827 
828  }
829  m_meAnalysisL1ExtraHTT.clear();
830 
831  for (std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>::iterator
832  iterME = m_meAnalysisL1ExtraHTM.begin(); iterME
833  != m_meAnalysisL1ExtraHTM.end(); ++iterME) {
834 
835  delete *iterME;
836 
837  }
838  m_meAnalysisL1ExtraHTM.clear();
839 
840 
841  for (std::vector<L1ExtraMonElement<l1extra::L1HFRingsCollection>*>::iterator
842  iterME = m_meAnalysisL1ExtraHfBitCounts.begin(); iterME
843  != m_meAnalysisL1ExtraHfBitCounts.end(); ++iterME) {
844 
845  delete *iterME;
846 
847  }
849 
850  for (std::vector<L1ExtraMonElement<l1extra::L1HFRingsCollection>*>::iterator
851  iterME = m_meAnalysisL1ExtraHfRingEtSums.begin(); iterME
852  != m_meAnalysisL1ExtraHfRingEtSums.end(); ++iterME) {
853 
854  delete *iterME;
855 
856  }
858 
859  LogDebug("L1ExtraDQM") << "\n\n endRun: " << run.id()
860  << "\n Number of events analyzed in this run: " << m_nrEvRun
861  << "\n Total number of events analyzed in this job: " << m_nrEvJob
862  << "\n" << std::endl;
863 
864 }
865 
866 //define this as a plug-in
#define LogDebug(id)
int m_nrBxInEventGmt
number of bunch crosses in event to be monitored
Definition: L1ExtraDQM.h:183
std::vector< L1ExtraMonElement< l1extra::L1EtMissParticleCollection > * > m_meAnalysisL1ExtraHTM
Definition: L1ExtraDQM.h:225
const l1extra::L1MuonParticleCollection * l1ExtraMuon() const
return retrieved L1Extra collections
std::string m_dirName
directory name for L1Extra plots
Definition: L1ExtraDQM.h:180
RunID const & id() const
Definition: RunBase.h:41
Definition: L1GtObject.h:39
const bool validL1ExtraHTM() const
int m_nrEvJob
Definition: L1ExtraDQM.h:192
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:718
std::vector< L1ExtraMonElement< l1extra::L1EtMissParticleCollection > * > m_meAnalysisL1ExtraETM
Definition: L1ExtraDQM.h:219
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
Definition: L1GtObject.h:36
std::vector< L1ExtraMonElement< l1extra::L1JetParticleCollection > * > m_meAnalysisL1ExtraTauJet
Definition: L1ExtraDQM.h:213
std::vector< L1ExtraMonElement< l1extra::L1JetParticleCollection > * > m_meAnalysisL1ExtraForJet
Definition: L1ExtraDQM.h:211
const bool validL1ExtraForJet() const
virtual void endRun(const edm::Run &run, const edm::EventSetup &evSetup)
Definition: L1ExtraDQM.cc:742
void analyzeL1ExtraETT(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:248
void analyzeL1ExtraIsoEG(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:117
virtual ~L1ExtraDQM()
Definition: L1ExtraDQM.cc:84
const bool validL1ExtraHTT() const
void analyzeL1ExtraETM(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:267
const l1extra::L1EmParticleCollection * l1ExtraNoIsoEG() const
const bool validL1ExtraMuon() const
validity for retrieval of L1Extra products (false: product not found)
void analyzeL1ExtraCenJet(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:169
Definition: L1GtObject.h:38
const bool validL1ExtraIsoEG() const
void analyzeL1ExtraForJet(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:196
std::vector< L1ExtraMonElement< l1extra::L1MuonParticleCollection > * > m_meAnalysisL1ExtraMuon
pointers to L1ExtraMonElement for each sub-analysis
Definition: L1ExtraDQM.h:201
std::vector< L1ExtraMonElement< l1extra::L1EtMissParticleCollection > * > m_meAnalysisL1ExtraHTT
Definition: L1ExtraDQM.h:222
const bool validL1ExtraETT() const
std::vector< L1ExtraMonElement< l1extra::L1EmParticleCollection > * > m_meAnalysisL1ExtraIsoEG
Definition: L1ExtraDQM.h:204
int iEvent
Definition: GenABIO.cc:230
void analyzeL1ExtraTauJet(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:222
void analyzeL1ExtraMuon(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:90
std::vector< L1ExtraMonElement< l1extra::L1HFRingsCollection > * > m_meAnalysisL1ExtraHfRingEtSums
Definition: L1ExtraDQM.h:231
std::vector< L1ExtraMonElement< l1extra::L1EmParticleCollection > * > m_meAnalysisL1ExtraNoIsoEG
Definition: L1ExtraDQM.h:206
void analyzeL1ExtraHTM(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:308
const l1extra::L1EmParticleCollection * l1ExtraIsoEG() const
virtual void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
Definition: L1ExtraDQM.cc:382
const bool validL1ExtraHfBitCounts() const
const bool validL1ExtraCenJet() const
const bool validL1ExtraTauJet() const
const l1extra::L1HFRingsCollection * l1ExtraHfRingEtSums() const
std::vector< L1ExtraMonElement< l1extra::L1JetParticleCollection > * > m_meAnalysisL1ExtraCenJet
Definition: L1ExtraDQM.h:209
const l1extra::L1EtMissParticleCollection * l1ExtraHTM() const
const l1extra::L1JetParticleCollection * l1ExtraTauJet() const
const l1extra::L1JetParticleCollection * l1ExtraCenJet() const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
Definition: L1GtObject.h:30
const l1extra::L1EtMissParticleCollection * l1ExtraETM() const
L1ExtraDQM(const edm::ParameterSet &)
Definition: L1ExtraDQM.cc:29
const l1extra::L1JetParticleCollection * l1ExtraForJet() const
void analyzeL1ExtraHTT(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:290
int m_nrBxInEventGct
Definition: L1ExtraDQM.h:184
virtual void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:374
void analyzeL1ExtraHfRingEtSums(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:352
const bool validL1ExtraHfRingEtSums() const
Definition: L1GtObject.h:37
L1RetrieveL1Extra m_retrieveL1Extra
input parameters
Definition: L1ExtraDQM.h:177
std::vector< L1ExtraMonElement< l1extra::L1EtMissParticleCollection > * > m_meAnalysisL1ExtraETT
Definition: L1ExtraDQM.h:216
std::vector< L1ExtraMonElement< l1extra::L1HFRingsCollection > * > m_meAnalysisL1ExtraHfBitCounts
Definition: L1ExtraDQM.h:228
const bool validL1ExtraNoIsoEG() const
void analyzeL1ExtraNoIsoEG(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:143
void analyzeL1ExtraHfBitCounts(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:330
const l1extra::L1EtMissParticleCollection * l1ExtraETT() const
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:378
const l1extra::L1EtMissParticleCollection * l1ExtraHTT() const
const bool validL1ExtraETM() const
int m_nrEvRun
Definition: L1ExtraDQM.h:193
void retrieveL1ExtraObjects(const edm::Event &, const edm::EventSetup &)
Definition: Run.h:41
const l1extra::L1HFRingsCollection * l1ExtraHfBitCounts() const