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  L1ExtraIsoTauJetSource(paramSet.getParameter<edm::InputTag>("L1ExtraIsoTauJetSource_")),
33  m_dirName(paramSet.getParameter<std::string>("DirName")),
34  m_stage1_layer2_(paramSet.getParameter<bool>("stage1_layer2_")),
35  //
36  m_nrBxInEventGmt(paramSet.getParameter<int>("NrBxInEventGmt")),
37  m_nrBxInEventGct(paramSet.getParameter<int>("NrBxInEventGct")),
38  //
39  m_resetModule(true), m_currentRun(-99),
40  //
41  m_nrEvJob(0),
42  m_nrEvRun(0)
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  if (m_stage1_layer2_ == true){
68  m_tagL1ExtraIsoTauJetTok = consumes<l1extra::L1JetParticleCollection>(paramSet.getParameter<edm::InputTag>("L1ExtraIsoTauJetSource_"));
69  }
70  //
77  if (m_stage1_layer2_ ==true){
79  }
86 
87 }
88 
89 // destructor
91 
92  // empty
93 
94 }
95 
97  const edm::EventSetup& evSetup) {
98 
99  bool bookEta = true;
100  bool bookPhi = true;
101 
102  bool isL1Coll = true;
103 
104  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGmt; ++iBxInEvent) {
105 
106  int bxInEvent = iBxInEvent + (m_nrBxInEventGmt + 1) / 2
107  - m_nrBxInEventGmt;
108 
109  (m_meAnalysisL1ExtraMuon.at(iBxInEvent))->fillNrObjects(
111  m_retrieveL1Extra.validL1ExtraMuon(), isL1Coll, bxInEvent);
112  (m_meAnalysisL1ExtraMuon.at(iBxInEvent))->fillPtPhiEta(
114  m_retrieveL1Extra.validL1ExtraMuon(), bookPhi, bookEta,
115  isL1Coll, bxInEvent);
116 
117  }
118 
119 }
120 
122  const edm::EventSetup& evSetup) {
123 
124  bool bookEta = true;
125  bool bookPhi = true;
126 
127  bool isL1Coll = true;
128 
129  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
130 
131  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
132  - m_nrBxInEventGct;
133 
134  (m_meAnalysisL1ExtraIsoEG.at(iBxInEvent))->fillNrObjects(
136  m_retrieveL1Extra.validL1ExtraIsoEG(), isL1Coll, bxInEvent);
137  (m_meAnalysisL1ExtraIsoEG.at(iBxInEvent))->fillPtPhiEta(
139  m_retrieveL1Extra.validL1ExtraIsoEG(), bookPhi, bookEta,
140  isL1Coll, bxInEvent);
141  }
142 
143 }
144 
146  const edm::EventSetup& evSetup) {
147 
148  bool bookEta = true;
149  bool bookPhi = true;
150 
151  bool isL1Coll = true;
152 
153  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
154 
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  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
180  - m_nrBxInEventGct;
181 
182  (m_meAnalysisL1ExtraCenJet.at(iBxInEvent))->fillNrObjects(
184  m_retrieveL1Extra.validL1ExtraCenJet(), isL1Coll, bxInEvent);
185  (m_meAnalysisL1ExtraCenJet.at(iBxInEvent))->fillEtPhiEta(
187  m_retrieveL1Extra.validL1ExtraCenJet(), bookPhi, bookEta,
188  isL1Coll, bxInEvent);
189  }
190 
191 }
192 
193 
195  const edm::EventSetup& evSetup) {
196 
197  bool bookPhi = true;
198  bool bookEta = true;
199 
200  bool isL1Coll = true;
201 
202  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
203 
204  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
205  - m_nrBxInEventGct;
206 
207  (m_meAnalysisL1ExtraForJet.at(iBxInEvent))->fillNrObjects(
209  m_retrieveL1Extra.validL1ExtraForJet(), isL1Coll, bxInEvent);
210  (m_meAnalysisL1ExtraForJet.at(iBxInEvent))->fillEtPhiEta(
212  m_retrieveL1Extra.validL1ExtraForJet(), bookPhi, bookEta,
213  isL1Coll, bxInEvent);
214  }
215 
216 }
217 
219  const edm::EventSetup& evSetup) {
220 
221  bool bookPhi = true;
222  bool bookEta = true;
223 
224  bool isL1Coll = true;
225 
226  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
227 
228  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
229  - m_nrBxInEventGct;
230 
231  (m_meAnalysisL1ExtraTauJet.at(iBxInEvent))->fillNrObjects(
233  m_retrieveL1Extra.validL1ExtraTauJet(), isL1Coll, bxInEvent);
234  (m_meAnalysisL1ExtraTauJet.at(iBxInEvent))->fillEtPhiEta(
236  m_retrieveL1Extra.validL1ExtraTauJet(), bookPhi, bookEta,
237  isL1Coll, bxInEvent);
238  }
239 
240 }
241 
243 
244  bool bookPhi = true;
245  bool bookEta = true;
246 
247  bool isL1Coll = true;
248 
249  bool m_validL1ExtraIsoTauJet;
250 
252  iEvent.getByToken(m_tagL1ExtraIsoTauJetTok, collL1ExtraIsoTauJet);
253 
254  const l1extra::L1JetParticleCollection* m_l1ExtraIsoTauJet;
255 
256  if (collL1ExtraIsoTauJet.isValid()) {
257  m_validL1ExtraIsoTauJet = true;
258  m_l1ExtraIsoTauJet = collL1ExtraIsoTauJet.product();
259  } else {
260  LogDebug("L1RetrieveL1Extra")
261  << "\n l1extra::L1JetParticleCollection with input tag \n "
262  << "m_tagL1ExtraIsoTauJet" << "\n not found in the event.\n"
263  << "\n Return pointer 0 and false validity tag."
264  << std::endl;
265 
266  m_validL1ExtraIsoTauJet = false;
267  m_l1ExtraIsoTauJet = 0;
268  }
269 
270  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
271  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
272  (m_meAnalysisL1ExtraIsoTauJet.at(iBxInEvent))->fillNrObjects(m_l1ExtraIsoTauJet,m_validL1ExtraIsoTauJet, isL1Coll, bxInEvent);
273  (m_meAnalysisL1ExtraIsoTauJet.at(iBxInEvent))->fillEtPhiEta(m_l1ExtraIsoTauJet,m_validL1ExtraIsoTauJet, bookPhi, bookEta,isL1Coll, bxInEvent);
274  }
275 }
276 
278  const edm::EventSetup& evSetup) {
279 
280  bool isL1Coll = true;
281 
282  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
283 
284  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
285  - m_nrBxInEventGct;
286 
287  (m_meAnalysisL1ExtraETT.at(iBxInEvent))->fillEtTotal(m_retrieveL1Extra.l1ExtraETT(),
288  m_retrieveL1Extra.validL1ExtraETT(), isL1Coll, bxInEvent);
289 
290  }
291 
292 }
293 
295  const edm::EventSetup& evSetup) {
296 
297  bool bookPhi = true;
298  bool bookEta = false;
299 
300  bool isL1Coll = true;
301 
302  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
303 
304  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
305  - m_nrBxInEventGct;
306 
307  (m_meAnalysisL1ExtraETM.at(iBxInEvent))->fillEtPhiEta(m_retrieveL1Extra.l1ExtraETM(),
308  m_retrieveL1Extra.validL1ExtraETM(), bookPhi, bookEta,
309  isL1Coll, bxInEvent);
310 
311  }
312 
313 }
314 
316  const edm::EventSetup& evSetup) {
317 
318  bool isL1Coll = true;
319 
320  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
321 
322  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
323  - m_nrBxInEventGct;
324 
325  (m_meAnalysisL1ExtraHTT.at(iBxInEvent))->fillEtTotal(m_retrieveL1Extra.l1ExtraHTT(),
326  m_retrieveL1Extra.validL1ExtraHTT(), isL1Coll, bxInEvent);
327 
328  }
329 }
330 
332  const edm::EventSetup& evSetup) {
333 
334  bool bookPhi = true;
335  bool bookEta = false;
336 
337  bool isL1Coll = true;
338 
339  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
340 
341  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
342  - m_nrBxInEventGct;
343 
344  (m_meAnalysisL1ExtraHTM.at(iBxInEvent))->fillEtPhiEta(m_retrieveL1Extra.l1ExtraHTM(),
345  m_retrieveL1Extra.validL1ExtraHTM(), bookPhi, bookEta,
346  isL1Coll, bxInEvent);
347  }
348 
349 }
350 
352  const edm::EventSetup& evSetup) {
353 
354  bool isL1Coll = true;
355 
356  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
357 
358  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
359  - m_nrBxInEventGct;
360 
361  for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
362  (m_meAnalysisL1ExtraHfBitCounts.at(iBxInEvent))->fillHfBitCounts(
365  isL1Coll, bxInEvent);
366  }
367  }
368 
369 }
370 
372  const edm::EventSetup& evSetup) {
373 
374  bool isL1Coll = true;
375 
376  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
377 
378  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
379  - m_nrBxInEventGct;
380 
381  for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
382  (m_meAnalysisL1ExtraHfRingEtSums.at(iBxInEvent))->fillHfRingEtSums(
385  isL1Coll, bxInEvent);
386  }
387  }
388 }
389 
390 
391 void L1ExtraDQM::dqmBeginRun(edm::Run const& iRun, edm::EventSetup const& evSetup){
392 
393 }
394 
396 
397 }
398 
400 
401  m_nrEvRun = 0;
402 
403  std::vector<L1GtObject> l1Obj;
404  //const edm::EventSetup& evSetup;
405 
406  // define standard sets of histograms
407 
408  //
409  l1Obj.clear();
410  l1Obj.push_back(Mu);
411  int nrMonElements = 5;
412 
413  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGmt; ++iBxInEvent) {
414 
416 
417  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
418  int bxInEventHex = (bxInEvent+ 16) % 16;
419 
420  std::stringstream ss;
421  std::string bxInEventHexString;
422  ss << std::uppercase << std::hex << bxInEventHex;
423  ss >> bxInEventHexString;
424 
425  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
426 
427  (m_meAnalysisL1ExtraMuon.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_Mu", l1Obj);
428 
429  }
430 
431  //
432  l1Obj.clear();
433  l1Obj.push_back(IsoEG);
434  nrMonElements = 4;
435 
436  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
437 
439 
440  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
441  int bxInEventHex = (bxInEvent+ 16) % 16;
442 
443  std::stringstream ss;
444  std::string bxInEventHexString;
445  ss << std::uppercase << std::hex << bxInEventHex;
446  ss >> bxInEventHexString;
447 
448  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
449 
450  (m_meAnalysisL1ExtraIsoEG.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_IsoEG", l1Obj);
451  }
452 
453  //
454  l1Obj.clear();
455  l1Obj.push_back(NoIsoEG);
456  nrMonElements = 4;
457 
458  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
459 
461 
462  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - 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  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
472  //}
473 
474  (m_meAnalysisL1ExtraNoIsoEG.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_NoIsoEG", l1Obj);
475  }
476 
477  //
478  l1Obj.clear();
479  l1Obj.push_back(CenJet);
480  nrMonElements = 4;
481 
482  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
483 
485 
486  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
487  int bxInEventHex = (bxInEvent+ 16) % 16;
488 
489  std::stringstream ss;
490  std::string bxInEventHexString;
491  ss << std::uppercase << std::hex << bxInEventHex;
492  ss >> bxInEventHexString;
493 
494  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
495 
496  (m_meAnalysisL1ExtraCenJet.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_CenJet", l1Obj);
497  }
498 
499  //
500  l1Obj.clear();
501  l1Obj.push_back(ForJet);
502 
503  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
504 
506 
507  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
508  int bxInEventHex = (bxInEvent+ 16) % 16;
509 
510  std::stringstream ss;
511  std::string bxInEventHexString;
512  ss << std::uppercase << std::hex << bxInEventHex;
513  ss >> bxInEventHexString;
514 
515  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
516 
517  (m_meAnalysisL1ExtraForJet.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_ForJet", l1Obj);
518  }
519 
520  //
521  l1Obj.clear();
522  l1Obj.push_back(TauJet);
523 
524  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
525 
527 
528  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
529  int bxInEventHex = (bxInEvent+ 16) % 16;
530 
531  std::stringstream ss;
532  std::string bxInEventHexString;
533  ss << std::uppercase << std::hex << bxInEventHex;
534  ss >> bxInEventHexString;
535 
536  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
537 
538  (m_meAnalysisL1ExtraTauJet.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_TauJet", l1Obj);
539  }
540 
541  if (m_stage1_layer2_ == true) {
542 
543  l1Obj.clear();
544  l1Obj.push_back(TauJet);
545  nrMonElements = 4;
546 
547  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
548 
550 
551  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
552  int bxInEventHex = (bxInEvent+ 16) % 16;
553 
554  std::stringstream ss;
555  std::string bxInEventHexString;
556  ss << std::uppercase << std::hex << bxInEventHex;
557  ss >> bxInEventHexString;
558 
559  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
560 
561  (m_meAnalysisL1ExtraIsoTauJet.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_IsoTauJet", l1Obj);
562  }
563  }
564 
565  //
566  l1Obj.clear();
567  l1Obj.push_back(ETT);
568  nrMonElements = 1;
569 
570  bool bookPhi = false;
571  bool bookEta = false;
572 
573  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
574 
576 
577  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
578  int bxInEventHex = (bxInEvent+ 16) % 16;
579 
580  std::stringstream ss;
581  std::string bxInEventHexString;
582  ss << std::uppercase << std::hex << bxInEventHex;
583  ss >> bxInEventHexString;
584 
585  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
586 
587  (m_meAnalysisL1ExtraETT.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_ETT", l1Obj, bookPhi, bookEta);
588  }
589 
590  //
591  l1Obj.clear();
592  l1Obj.push_back(ETM);
593  nrMonElements = 2;
594 
595  bookPhi = true;
596  bookEta = false;
597 
598  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
600  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
601  int bxInEventHex = (bxInEvent+ 16) % 16;
602 
603  std::stringstream ss;
604  std::string bxInEventHexString;
605  ss << std::uppercase << std::hex << bxInEventHex;
606  ss >> bxInEventHexString;
607 
608  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
609 
610  (m_meAnalysisL1ExtraETM.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_ETM", l1Obj, bookPhi, bookEta);
611  }
612 
613  //
614  l1Obj.clear();
615  l1Obj.push_back(HTT);
616  nrMonElements = 1;
617 
618  bookPhi = false;
619  bookEta = false;
620 
621  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
622 
624  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
625  int bxInEventHex = (bxInEvent+ 16) % 16;
626 
627  std::stringstream ss;
628  std::string bxInEventHexString;
629  ss << std::uppercase << std::hex << bxInEventHex;
630  ss >> bxInEventHexString;
631 
632  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
633 
634  (m_meAnalysisL1ExtraHTT.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_HTT", l1Obj, bookPhi, bookEta);
635  }
636 
637  //
638  l1Obj.clear();
639  l1Obj.push_back(HTM);
640  nrMonElements = 2;
641 
642  bookPhi = true;
643  bookEta = false;
644 
645  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
646 
648  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
649  int bxInEventHex = (bxInEvent+ 16) % 16;
650 
651  std::stringstream ss;
652  std::string bxInEventHexString;
653  ss << std::uppercase << std::hex << bxInEventHex;
654  ss >> bxInEventHexString;
655 
656  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
657 
658  if (m_stage1_layer2_ == false){
659  (m_meAnalysisL1ExtraHTM.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_HTM", l1Obj, bookPhi, bookEta);
660  } else {
661  (m_meAnalysisL1ExtraHTM.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_HTMHTT", l1Obj, bookPhi, bookEta);
662  }
663  }
664 
665  //
666  l1Obj.clear();
667  l1Obj.push_back(HfBitCounts);
668  nrMonElements = 1;
669 
670  bookPhi = false;
671  bookEta = false;
672 
673  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
674 
677  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2 - m_nrBxInEventGct;
678  int bxInEventHex = (bxInEvent+ 16) % 16;
679 
680  std::stringstream ss;
681  std::string bxInEventHexString;
682  ss << std::uppercase << std::hex << bxInEventHex;
683  ss >> bxInEventHexString;
684 
685  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
686 
687  (m_meAnalysisL1ExtraHfBitCounts.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_HfBitCounts", l1Obj, bookPhi, bookEta);
688  }
689 
690  //
691  l1Obj.clear();
692  l1Obj.push_back(HfRingEtSums);
693  nrMonElements = 1;
694 
695  bookPhi = false;
696  bookEta = false;
697 
698  for (int iBxInEvent = 0; iBxInEvent < m_nrBxInEventGct; ++iBxInEvent) {
699 
702  evSetup, nrMonElements));
703  int bxInEvent = iBxInEvent + (m_nrBxInEventGct + 1) / 2
704  - m_nrBxInEventGct;
705  int bxInEventHex = (bxInEvent+ 16) % 16;
706 
707  std::stringstream ss;
708  std::string bxInEventHexString;
709  ss << std::uppercase << std::hex << bxInEventHex;
710  ss >> bxInEventHexString;
711 
712  ibooker.setCurrentFolder(m_dirName + "/BxInEvent_" + bxInEventHexString);
713 
714  if (m_stage1_layer2_ == false) {
715  (m_meAnalysisL1ExtraHfRingEtSums.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_HfRingEtSums", l1Obj, bookPhi, bookEta);
716  }
717  if (m_stage1_layer2_ == true) {
718  (m_meAnalysisL1ExtraHfRingEtSums.at(iBxInEvent))->bookhistograms(evSetup, ibooker, "L1_IsoTau_replace_Hf", l1Obj, bookPhi, bookEta);
719  }
720  }
721 
722 }
723 
724 
725 //
726 void L1ExtraDQM::analyze(const edm::Event& iEvent, const edm::EventSetup& evSetup) {
727 
728  ++m_nrEvJob;
729  ++m_nrEvRun;
730  //
731  m_retrieveL1Extra.retrieveL1ExtraObjects(iEvent, evSetup);
732  //
733  analyzeL1ExtraMuon(iEvent, evSetup);
734  analyzeL1ExtraIsoEG(iEvent, evSetup);
735  analyzeL1ExtraNoIsoEG(iEvent, evSetup);
736  analyzeL1ExtraCenJet(iEvent, evSetup);
737  analyzeL1ExtraForJet(iEvent, evSetup);
738  analyzeL1ExtraTauJet(iEvent, evSetup);
739  analyzeL1ExtraETT(iEvent, evSetup);
740  analyzeL1ExtraETM(iEvent, evSetup);
741  analyzeL1ExtraHTT(iEvent, evSetup);
742  analyzeL1ExtraHTM(iEvent, evSetup);
743  analyzeL1ExtraHfBitCounts(iEvent, evSetup);
744  analyzeL1ExtraHfRingEtSums(iEvent, evSetup);
745 
746  if (m_stage1_layer2_ == true){
747  analyzeL1ExtraIsoTauJet(iEvent, evSetup);
748  }
749 }
750 
751 
752 void L1ExtraDQM::endRun(const edm::Run& run, const edm::EventSetup& evSetup) {
753 
754  // delete if event setup has changed only FIXME
755 
756  for (std::vector<L1ExtraMonElement<l1extra::L1MuonParticleCollection>*>::iterator
757  iterME = m_meAnalysisL1ExtraMuon.begin(); iterME
758  != m_meAnalysisL1ExtraMuon.end(); ++iterME) {
759 
760  delete *iterME;
761 
762  }
763  m_meAnalysisL1ExtraMuon.clear();
764 
765 
766  for (std::vector<L1ExtraMonElement<l1extra::L1EmParticleCollection>*>::iterator
767  iterME = m_meAnalysisL1ExtraIsoEG.begin(); iterME
768  != m_meAnalysisL1ExtraIsoEG.end(); ++iterME) {
769 
770  delete *iterME;
771 
772  }
773  m_meAnalysisL1ExtraIsoEG.clear();
774 
775 
776  for (std::vector<L1ExtraMonElement<l1extra::L1EmParticleCollection>*>::iterator
777  iterME = m_meAnalysisL1ExtraNoIsoEG.begin(); iterME
778  != m_meAnalysisL1ExtraNoIsoEG.end(); ++iterME) {
779 
780  delete *iterME;
781 
782  }
784 
785 
786  for (std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*>::iterator
787  iterME = m_meAnalysisL1ExtraCenJet.begin(); iterME
788  != m_meAnalysisL1ExtraCenJet.end(); ++iterME) {
789 
790  delete *iterME;
791 
792  }
794 
795  for (std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*>::iterator
796  iterME = m_meAnalysisL1ExtraForJet.begin(); iterME
797  != m_meAnalysisL1ExtraForJet.end(); ++iterME) {
798 
799  delete *iterME;
800 
801  }
803 
804  for (std::vector<L1ExtraMonElement<l1extra::L1JetParticleCollection>*>::iterator
805  iterME = m_meAnalysisL1ExtraTauJet.begin(); iterME
806  != m_meAnalysisL1ExtraTauJet.end(); ++iterME) {
807 
808  delete *iterME;
809 
810  }
812 
813 
814  for (std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>::iterator
815  iterME = m_meAnalysisL1ExtraETT.begin(); iterME
816  != m_meAnalysisL1ExtraETT.end(); ++iterME) {
817 
818  delete *iterME;
819 
820  }
821  m_meAnalysisL1ExtraETT.clear();
822 
823  for (std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>::iterator
824  iterME = m_meAnalysisL1ExtraETM.begin(); iterME
825  != m_meAnalysisL1ExtraETM.end(); ++iterME) {
826 
827  delete *iterME;
828 
829  }
830  m_meAnalysisL1ExtraETM.clear();
831 
832  for (std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>::iterator
833  iterME = m_meAnalysisL1ExtraHTT.begin(); iterME
834  != m_meAnalysisL1ExtraHTT.end(); ++iterME) {
835 
836  delete *iterME;
837 
838  }
839  m_meAnalysisL1ExtraHTT.clear();
840 
841  for (std::vector<L1ExtraMonElement<l1extra::L1EtMissParticleCollection>*>::iterator
842  iterME = m_meAnalysisL1ExtraHTM.begin(); iterME
843  != m_meAnalysisL1ExtraHTM.end(); ++iterME) {
844 
845  delete *iterME;
846 
847  }
848  m_meAnalysisL1ExtraHTM.clear();
849 
850 
851  for (std::vector<L1ExtraMonElement<l1extra::L1HFRingsCollection>*>::iterator
852  iterME = m_meAnalysisL1ExtraHfBitCounts.begin(); iterME
853  != m_meAnalysisL1ExtraHfBitCounts.end(); ++iterME) {
854 
855  delete *iterME;
856 
857  }
859 
860  for (std::vector<L1ExtraMonElement<l1extra::L1HFRingsCollection>*>::iterator
861  iterME = m_meAnalysisL1ExtraHfRingEtSums.begin(); iterME
862  != m_meAnalysisL1ExtraHfRingEtSums.end(); ++iterME) {
863 
864  delete *iterME;
865 
866  }
868 
869  LogDebug("L1ExtraDQM") << "\n\n endRun: " << run.id()
870  << "\n Number of events analyzed in this run: " << m_nrEvRun
871  << "\n Total number of events analyzed in this job: " << m_nrEvJob
872  << "\n" << std::endl;
873 
874 }
875 
876 // constructor L1ExtraMonElement
877 template<class CollectionType>
879  m_indexNrObjects(-1),
880  m_indexPt(-1),
881  m_indexEt(-1),
882  m_indexPhi(-1),
883  m_indexEta(-1),
884  m_indexEtTotal(-1),
885  m_indexCharge(-1),
886  m_indexHfBitCounts(-1),
887  m_indexHfRingEtSums(-1) {
888 
889  m_monElement.reserve(nrElements);
890 
891 }
892 
893 // destructor L1ExtraMonElement
894 template<class CollectionType>
896 
897  //empty
898 
899 }
900 
901 
902 template<class CollectionType>
904  const edm::EventSetup& evSetup, DQMStore::IBooker &ibooker,
905  const std::string& l1ExtraObject,
906  const std::vector<L1GtObject>& l1GtObj, const bool bookPhi,
907  const bool bookEta) {
908 
909  // FIXME
910  L1GtObject gtObj = l1GtObj.at(0);
911 
912  //
913  std::string histName;
914  std::string histTitle;
915  std::string xAxisTitle;
916  std::string yAxisTitle;
917 
918  std::string quantity = "";
919 
920  int indexHistogram = -1;
921 
922  if (gtObj == HfBitCounts) {
923 
924  L1GetHistLimits l1GetHistLimits(evSetup);
925  const L1GetHistLimits::L1HistLimits& histLimits = l1GetHistLimits.l1HistLimits(gtObj, quantity);
926 
927  const int histNrBins = histLimits.nrBins;
928  const double histMinValue = histLimits.lowerBinValue;
929  const double histMaxValue = histLimits.upperBinValue;
930 
931  indexHistogram++;
932  m_indexHfBitCounts = indexHistogram;
933 
934  for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
935 
936  histName = l1ExtraObject + "_Count_" + boost::lexical_cast<std::string>(iCount);
937  histTitle = l1ExtraObject + ": count " + boost::lexical_cast<std::string>(iCount);
938  xAxisTitle = l1ExtraObject;
939  yAxisTitle = "Entries";
940 
941  m_monElement.push_back(ibooker.book1D(histName, histTitle, histNrBins, histMinValue, histMaxValue));
942  m_monElement[m_indexHfBitCounts + iCount]->setAxisTitle(xAxisTitle, 1);
943  m_monElement[m_indexHfBitCounts + iCount]->setAxisTitle(yAxisTitle, 2);
944 
945  }
946 
947  return;
948 
949  }
950 
951  // number of objects per event
952  if ((gtObj == Mu) || (gtObj == IsoEG) || (gtObj == NoIsoEG) || (gtObj == CenJet) || (gtObj == ForJet) || (gtObj == TauJet)) {
953 
954  quantity = "NrObjects";
955 
956  L1GetHistLimits l1GetHistLimits(evSetup);
957  const L1GetHistLimits::L1HistLimits& histLimits = l1GetHistLimits.l1HistLimits(gtObj, quantity);
958 
959  const int histNrBins = histLimits.nrBins;
960  const double histMinValue = histLimits.lowerBinValue;
961  const double histMaxValue = histLimits.upperBinValue;
962 
963  histName = l1ExtraObject + "_NrObjectsPerEvent";
964  histTitle = l1ExtraObject + ": number of objects per event";
965  xAxisTitle = "Nr_" + l1ExtraObject;
966  yAxisTitle = "Entries";
967 
968  m_monElement.push_back(ibooker.book1D(histName, histTitle, histNrBins, histMinValue, histMaxValue));
969  indexHistogram++;
970 
971  m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
972  m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
973  m_indexNrObjects = indexHistogram;
974 
975  }
976 
977  // transverse momentum (energy) PT (ET) [GeV]
978 
979 
980  quantity = "ET";
981  std::string quantityLongName = " transverse energy ";
982 
983  if (gtObj == Mu) {
984  quantity = "PT";
985  quantityLongName = " transverse momentum ";
986  }
987 
988  L1GetHistLimits l1GetHistLimits(evSetup);
989  const L1GetHistLimits::L1HistLimits& histLimits = l1GetHistLimits.l1HistLimits(gtObj, quantity);
990 
991  const int histNrBinsET = histLimits.nrBins;
992  const double histMinValueET = histLimits.lowerBinValue;
993  const double histMaxValueET = histLimits.upperBinValue;
994  const std::vector<float>& binThresholdsET = histLimits.binThresholds;
995 
996  float* binThresholdsETf;
997  size_t sizeBinThresholdsET = binThresholdsET.size();
998  binThresholdsETf = new float[sizeBinThresholdsET];
999  copy(binThresholdsET.begin(), binThresholdsET.end(), binThresholdsETf);
1000 
1001  LogDebug("L1ExtraDQM") << "\n PT/ET histogram for " << l1ExtraObject
1002  << "\n histNrBinsET = " << histNrBinsET << "\n histMinValueET = "
1003  << histMinValueET << "\n histMaxValueET = " << histMaxValueET
1004  << "\n Last bin value represents the upper limit of the histogram"
1005  << std::endl;
1006  for (size_t iBin = 0; iBin < sizeBinThresholdsET; ++iBin) {
1007  LogTrace("L1ExtraDQM") << "Bin " << iBin << ": " << quantity << " = "
1008  << binThresholdsETf[iBin] << " GeV" << std::endl;
1009 
1010  }
1011 
1012  histName = l1ExtraObject + "_" + quantity;
1013  histTitle = l1ExtraObject + ":" + quantityLongName + quantity + " [GeV]";
1014  xAxisTitle = l1ExtraObject + "_" + quantity + " [GeV]";
1015  yAxisTitle = "Entries";
1016 
1017  if (gtObj == HfRingEtSums) {
1018 
1019  indexHistogram++;
1020  m_indexHfRingEtSums = indexHistogram;
1021 
1022  for (int iCount = 0; iCount < l1extra::L1HFRings::kNumRings; ++iCount) {
1023 
1024  histName = l1ExtraObject + "_Count_" + boost::lexical_cast<std::string>(iCount);
1025  histTitle = l1ExtraObject + ": count " + boost::lexical_cast<std::string>(iCount);
1026  xAxisTitle = l1ExtraObject;
1027  yAxisTitle = "Entries";
1028 
1029  m_monElement.push_back(ibooker.book1D(histName, histTitle, histNrBinsET, binThresholdsETf));
1030 
1031  m_monElement[m_indexHfRingEtSums + iCount]->setAxisTitle(xAxisTitle, 1);
1032  m_monElement[m_indexHfRingEtSums + iCount]->setAxisTitle(yAxisTitle, 2);
1033 
1034  }
1035 
1036  } else {
1037 
1038  m_monElement.push_back(ibooker.book1D(histName, histTitle, histNrBinsET, binThresholdsETf));
1039  indexHistogram++;
1040 
1041  m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
1042  m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
1043  m_indexPt = indexHistogram;
1044  m_indexEt = indexHistogram;
1045  m_indexEtTotal = indexHistogram;
1046  }
1047 
1048 
1049  delete[] binThresholdsETf;
1050 
1051  //
1052 
1053  if (bookPhi) {
1054 
1055  quantity = "phi";
1056 
1057  // get limits and binning from L1Extra
1058  L1GetHistLimits l1GetHistLimits(evSetup);
1059  const L1GetHistLimits::L1HistLimits& histLimits = l1GetHistLimits.l1HistLimits(gtObj, quantity);
1060 
1061  const int histNrBinsPhi = histLimits.nrBins;
1062  const double histMinValuePhi = histLimits.lowerBinValue;
1063  const double histMaxValuePhi = histLimits.upperBinValue;
1064  const std::vector<float>& binThresholdsPhi = histLimits.binThresholds;
1065 
1066  float* binThresholdsPhif;
1067  size_t sizeBinThresholdsPhi = binThresholdsPhi.size();
1068  binThresholdsPhif = new float[sizeBinThresholdsPhi];
1069  copy(binThresholdsPhi.begin(), binThresholdsPhi.end(), binThresholdsPhif);
1070 
1071  LogDebug("L1ExtraDQM") << "\n phi histogram for " << l1ExtraObject
1072  << "\n histNrBinsPhi = " << histNrBinsPhi
1073  << "\n histMinValuePhi = " << histMinValuePhi
1074  << "\n histMaxValuePhi = " << histMaxValuePhi
1075  << "\n Last bin value represents the upper limit of the histogram"
1076  << std::endl;
1077  for (size_t iBin = 0; iBin < sizeBinThresholdsPhi; ++iBin) {
1078  LogTrace("L1ExtraDQM") << "Bin " << iBin << ": phi = " << binThresholdsPhif[iBin] << " deg" << std::endl;
1079 
1080  }
1081 
1082  histName = l1ExtraObject + "_phi";
1083  histTitle = l1ExtraObject + ": phi distribution ";
1084  xAxisTitle = l1ExtraObject + "_phi [deg]";
1085  yAxisTitle = "Entries";
1086 
1087  m_monElement.push_back(ibooker.book1D(histName, histTitle, histNrBinsPhi, histMinValuePhi, histMaxValuePhi));
1088  indexHistogram++;
1089 
1090  m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
1091  m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
1092  m_indexPhi = indexHistogram;
1093 
1094  delete[] binThresholdsPhif;
1095  }
1096 
1097  //
1098 
1099 
1100  if (bookEta) {
1101 
1102  quantity = "eta";
1103 
1104  // get limits and binning from L1Extra
1105  L1GetHistLimits l1GetHistLimits(evSetup);
1106  const L1GetHistLimits::L1HistLimits& histLimits = l1GetHistLimits.l1HistLimits(gtObj, quantity);
1107 
1108  const int histNrBinsEta = histLimits.nrBins;
1109  const double histMinValueEta = histLimits.lowerBinValue;
1110  const double histMaxValueEta = histLimits.upperBinValue;
1111  const std::vector<float>& binThresholdsEta = histLimits.binThresholds;
1112 
1113  //
1114  float* binThresholdsEtaf;
1115  size_t sizeBinThresholdsEta = binThresholdsEta.size();
1116  binThresholdsEtaf = new float[sizeBinThresholdsEta];
1117  copy(binThresholdsEta.begin(), binThresholdsEta.end(), binThresholdsEtaf);
1118 
1119  LogDebug("L1ExtraDQM") << "\n eta histogram for " << l1ExtraObject
1120  << "\n histNrBinsEta = " << histNrBinsEta
1121  << "\n histMinValueEta = " << histMinValueEta
1122  << "\n histMaxValueEta = " << histMaxValueEta
1123  << "\n Last bin value represents the upper limit of the histogram"
1124  << std::endl;
1125  for (size_t iBin = 0; iBin < sizeBinThresholdsEta; ++iBin) {
1126  LogTrace("L1ExtraDQM") << "Bin " << iBin << ": eta = " << binThresholdsEtaf[iBin] << std::endl;
1127 
1128  }
1129 
1130  histName = l1ExtraObject + "_eta";
1131  histTitle = l1ExtraObject + ": eta distribution ";
1132  xAxisTitle = l1ExtraObject + "_eta";
1133  yAxisTitle = "Entries";
1134 
1135  m_monElement.push_back(ibooker.book1D(histName, histTitle, histNrBinsEta, binThresholdsEtaf));
1136  indexHistogram++;
1137 
1138  m_monElement[indexHistogram]->setAxisTitle(xAxisTitle, 1);
1139  m_monElement[indexHistogram]->setAxisTitle(yAxisTitle, 2);
1140  m_indexEta = indexHistogram;
1141 
1142  delete[] binThresholdsEtaf;
1143 
1144  }
1145 
1146 }
1147 
1148 template<class CollectionType>
1150  const CollectionType* collType, const bool validColl,
1151  const bool isL1Coll, const int bxInEvent) {
1152 
1153  if (validColl && isL1Coll) {
1154  size_t collSize = 0;
1155  for (CIterColl iterColl = collType->begin(); iterColl
1156  != collType->end(); ++iterColl) {
1157 
1158  if (iterColl->bx() == bxInEvent) {
1159  collSize++;
1160  }
1161  }
1162  m_monElement[m_indexNrObjects]->Fill(collSize);
1163  } else {
1164  size_t collSize = collType->size();
1165  m_monElement[m_indexNrObjects]->Fill(collSize);
1166  }
1167 }
1168 
1169 template<class CollectionType>
1171  const CollectionType* collType, const bool validColl,
1172  const bool bookPhi, const bool bookEta, const bool isL1Coll, const int bxInEvent) {
1173 
1174  if (validColl) {
1175  for (CIterColl iterColl = collType->begin(); iterColl
1176  != collType->end(); ++iterColl) {
1177 
1178  if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1179  continue;
1180  }
1181 
1182  m_monElement[m_indexPt]->Fill(iterColl->pt());
1183 
1184  if (bookPhi) {
1185  // add a very small quantity to get off the bin edge
1186  m_monElement[m_indexPhi]->Fill(rad2deg(iterColl->phi()) + 1.e-6);
1187  }
1188 
1189  if (bookEta) {
1190  m_monElement[m_indexEta]->Fill(iterColl->eta());
1191  }
1192 
1193  }
1194  }
1195 }
1196 
1197 template<class CollectionType>
1199  const CollectionType* collType, const bool validColl,
1200  const bool bookPhi, const bool bookEta, const bool isL1Coll, const int bxInEvent) {
1201 
1202  if (validColl) {
1203  for (CIterColl iterColl = collType->begin(); iterColl
1204  != collType->end(); ++iterColl) {
1205 
1206  if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1207  continue;
1208  }
1209 
1210  m_monElement[m_indexEt]->Fill(iterColl->et());
1211 
1212  if (bookPhi) {
1213  // add a very small quantity to get off the bin edge
1214  m_monElement[m_indexPhi]->Fill(rad2deg(iterColl->phi()) + 1.e-6);
1215  }
1216 
1217  if (bookEta) {
1218  m_monElement[m_indexEta]->Fill(iterColl->eta());
1219  }
1220 
1221  }
1222  }
1223 }
1224 
1225 template<class CollectionType>
1227  const CollectionType* collType, const bool validColl, const bool isL1Coll, const int bxInEvent) {
1228 
1229  if (validColl) {
1230  for (CIterColl iterColl = collType->begin(); iterColl
1231  != collType->end(); ++iterColl) {
1232 
1233  if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1234  continue;
1235  }
1236 
1237  m_monElement[m_indexEtTotal]->Fill(iterColl->etTotal());
1238  }
1239  }
1240 
1241 }
1242 
1243 template<class CollectionType>
1245  const CollectionType* collType, const bool validColl, const bool isL1Coll, const int bxInEvent) {
1246 
1247  if (validColl) {
1248  for (CIterColl iterColl = collType->begin(); iterColl
1249  != collType->end(); ++iterColl) {
1250 
1251  if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1252  continue;
1253  }
1254 
1255  m_monElement[m_indexCharge]->Fill(iterColl->charge());
1256  }
1257  }
1258 
1259 }
1260 
1261 template<class CollectionType>
1263  const CollectionType* collType, const bool validColl,
1264  const int countIndex, const bool isL1Coll, const int bxInEvent) {
1265 
1266  if (validColl) {
1267  for (CIterColl iterColl = collType->begin(); iterColl
1268  != collType->end(); ++iterColl) {
1269 
1270  if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1271  continue;
1272  }
1273 
1274  m_monElement[m_indexHfBitCounts + countIndex]->Fill(
1275  iterColl->hfBitCount(
1276  (l1extra::L1HFRings::HFRingLabels) countIndex));
1277  }
1278  }
1279 
1280 }
1281 
1282 template<class CollectionType>
1284  const CollectionType* collType, const bool validColl,
1285  const int countIndex, const bool isL1Coll, const int bxInEvent) {
1286 
1287  if (validColl) {
1288  for (CIterColl iterColl = collType->begin(); iterColl
1289  != collType->end(); ++iterColl) {
1290 
1291  if (isL1Coll && (iterColl->bx() != bxInEvent)) {
1292  continue;
1293  }
1294 
1295  m_monElement[m_indexHfRingEtSums + countIndex]->Fill(
1296  iterColl->hfEtSum(
1297  (l1extra::L1HFRings::HFRingLabels) countIndex));
1298  }
1299  }
1300 
1301 }
1302 
1303 //define this as a plug-in
1305 
1306 
1307 
#define LogDebug(id)
int m_nrBxInEventGmt
number of bunch crosses in event to be monitored
Definition: L1ExtraDQM.h:187
std::vector< L1ExtraMonElement< l1extra::L1EtMissParticleCollection > * > m_meAnalysisL1ExtraHTM
Definition: L1ExtraDQM.h:232
T getParameter(std::string const &) const
const l1extra::L1MuonParticleCollection * l1ExtraMuon() const
return retrieved L1Extra collections
std::string m_dirName
directory name for L1Extra plots
Definition: L1ExtraDQM.h:183
edm::EDGetTokenT< l1extra::L1JetParticleCollection > m_tagL1ExtraIsoTauJetTok
Definition: L1ExtraDQM.h:202
RunID const & id() const
Definition: RunBase.h:41
void fillNrObjects(const CollectionType *collType, const bool validColl, const bool isL1Coll, const int bxInEvent)
number of objects
Definition: L1ExtraDQM.cc:1149
Definition: L1GtObject.h:39
const bool validL1ExtraHTM() const
int m_nrEvJob
Definition: L1ExtraDQM.h:196
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:726
std::vector< L1ExtraMonElement< l1extra::L1EtMissParticleCollection > * > m_meAnalysisL1ExtraETM
Definition: L1ExtraDQM.h:226
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
void fillHfRingEtSums(const CollectionType *collType, const bool validColl, const int countIndex, const bool isL1Coll, const int bxInEvent)
fill energy sums in HFRings collections
Definition: L1ExtraDQM.cc:1283
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
Definition: L1GtObject.h:36
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
std::vector< L1JetParticle > L1JetParticleCollection
virtual void endRun(const edm::Run &run, const edm::EventSetup &evSetup)
Definition: L1ExtraDQM.cc:752
void analyzeL1ExtraETT(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:277
void analyzeL1ExtraIsoEG(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:121
virtual ~L1ExtraDQM()
Definition: L1ExtraDQM.cc:90
const bool validL1ExtraHTT() const
void analyzeL1ExtraETM(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:294
CollectionType::const_iterator CIterColl
Definition: L1ExtraDQM.h:99
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:194
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:229
const bool validL1ExtraETT() const
std::vector< L1ExtraMonElement< l1extra::L1EmParticleCollection > * > m_meAnalysisL1ExtraIsoEG
Definition: L1ExtraDQM.h:209
int iEvent
Definition: GenABIO.cc:230
void analyzeL1ExtraTauJet(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:218
void analyzeL1ExtraIsoTauJet(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:242
void analyzeL1ExtraMuon(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:96
std::vector< L1ExtraMonElement< l1extra::L1HFRingsCollection > * > m_meAnalysisL1ExtraHfRingEtSums
Definition: L1ExtraDQM.h:238
bool m_stage1_layer2_
Definition: L1ExtraDQM.h:184
std::vector< L1ExtraMonElement< l1extra::L1EmParticleCollection > * > m_meAnalysisL1ExtraNoIsoEG
Definition: L1ExtraDQM.h:211
void analyzeL1ExtraHTM(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:331
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void bookhistograms(const edm::EventSetup &evSetup, DQMStore::IBooker &ibooker, const std::string &l1ExtraObject, const std::vector< L1GtObject > &l1GtObj, const bool bookPhi=true, const bool bookEta=true)
Definition: L1ExtraDQM.cc:903
const l1extra::L1EmParticleCollection * l1ExtraIsoEG() const
virtual void bookHistograms(DQMStore::IBooker &ibooker, edm::Run const &, edm::EventSetup const &) override
Definition: L1ExtraDQM.cc:399
const bool validL1ExtraHfBitCounts() const
L1ExtraMonElement(const edm::EventSetup &, const int)
Definition: L1ExtraDQM.cc:878
const bool validL1ExtraCenJet() const
const bool validL1ExtraTauJet() const
bool isValid() const
Definition: HandleBase.h:75
std::vector< L1ExtraMonElement< l1extra::L1JetParticleCollection > * > m_meAnalysisL1ExtraIsoTauJet
Definition: L1ExtraDQM.h:220
#define LogTrace(id)
void fillPtPhiEta(const CollectionType *collType, const bool validColl, const bool bookPhi, const bool bookEta, const bool isL1Coll, const int bxInEvent)
PT, eta, phi.
Definition: L1ExtraDQM.cc:1170
const l1extra::L1HFRingsCollection * l1ExtraHfRingEtSums() const
std::vector< L1ExtraMonElement< l1extra::L1JetParticleCollection > * > m_meAnalysisL1ExtraCenJet
Definition: L1ExtraDQM.h:214
const l1extra::L1EtMissParticleCollection * l1ExtraHTM() const
std::vector< float > binThresholds
void fillHfBitCounts(const CollectionType *collType, const bool validColl, const int countIndex, const bool isL1Coll, const int bxInEvent)
fill bit counts in HFRings collections
Definition: L1ExtraDQM.cc:1262
const l1extra::L1JetParticleCollection * l1ExtraTauJet() const
const double rad2deg(const double &)
convert phi from rad (-pi, pi] to deg (0, 360)
const l1extra::L1JetParticleCollection * l1ExtraCenJet() const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
Definition: L1GtObject.h:30
T const * product() const
Definition: Handle.h:81
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:315
int m_nrBxInEventGct
Definition: L1ExtraDQM.h:188
virtual void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:391
void analyzeL1ExtraHfRingEtSums(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:371
const bool validL1ExtraHfRingEtSums() const
Definition: L1GtObject.h:37
L1RetrieveL1Extra m_retrieveL1Extra
input parameters
Definition: L1ExtraDQM.h:180
std::vector< L1ExtraMonElement< l1extra::L1EtMissParticleCollection > * > m_meAnalysisL1ExtraETT
Definition: L1ExtraDQM.h:223
std::vector< L1ExtraMonElement< l1extra::L1HFRingsCollection > * > m_meAnalysisL1ExtraHfBitCounts
Definition: L1ExtraDQM.h:235
const bool validL1ExtraNoIsoEG() const
void analyzeL1ExtraNoIsoEG(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:145
void analyzeL1ExtraHfBitCounts(const edm::Event &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:351
void fillCharge(const CollectionType *collType, const bool validColl, const bool isL1Coll, const int bxInEvent)
fill charge
Definition: L1ExtraDQM.cc:1244
void fillEtPhiEta(const CollectionType *collType, const bool validColl, const bool bookPhi, const bool bookEta, const bool isL1Coll, const int bxInEvent)
ET, eta, phi.
Definition: L1ExtraDQM.cc:1198
const l1extra::L1EtMissParticleCollection * l1ExtraETT() const
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &)
Definition: L1ExtraDQM.cc:395
const l1extra::L1EtMissParticleCollection * l1ExtraHTT() const
const bool validL1ExtraETM() const
int m_nrEvRun
Definition: L1ExtraDQM.h:197
std::vector< MonitorElement * > m_monElement
Definition: L1ExtraDQM.h:140
void retrieveL1ExtraObjects(const edm::Event &, const edm::EventSetup &)
Definition: Run.h:41
const l1extra::L1HFRingsCollection * l1ExtraHfBitCounts() const
const L1HistLimits & l1HistLimits(const L1GtObject &l1GtObject, const std::string &quantity)
void fillEtTotal(const CollectionType *collType, const bool validColl, const bool isL1Coll, const int bxInEvent)
fill ET total in energy sums
Definition: L1ExtraDQM.cc:1226