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