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