ATLAS Offline Software
L1CaloLevel2Mon.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // ********************************************************************
6 //
7 // NAME: L1CaloLevel2Mon.cxx
8 // PACKAGE: TrigT1CaloMonitoring
9 //
10 // AUTHOR: Johanna Fleckner (Johanna.Fleckner@uni-mainz.de)
11 //
12 // DESCRIPTION: Monitoring of transmission L1Calo --> Level2
13 //
14 // ********************************************************************
15 
16 #include "GaudiKernel/MsgStream.h"
17 #include "GaudiKernel/StatusCode.h"
18 
19 #include "LWHists/LWHist.h"
20 #include "LWHists/TH1F_LW.h"
21 #include "LWHists/TH2F_LW.h"
22 #include "LWHists/TH2I_LW.h"
23 
27 #include "TrigT1CaloEvent/JEMRoI.h"
28 #include "TrigT1CaloEvent/CMMRoI.h"
29 #include "TrigT1CaloEvent/CPMRoI.h"
30 
35 #include "TrigT1Result/EMTauRoI.h"
36 
38 
39 #include "L1CaloLevel2Mon.h"
40 // ============================================================================
41 namespace LVL1 {
42 // ============================================================================
43 // *********************************************************************
44 // Public Methods
45 // *********************************************************************
46 
47 /*---------------------------------------------------------*/
49  const std::string & name, const IInterface* parent )
51  m_errorTool("LVL1::TrigT1CaloMonErrorToolV1/TrigT1CaloMonErrorToolV1"),
52  m_histTool("LVL1::TrigT1CaloLWHistogramToolV1/TrigT1CaloLWHistogramToolV1"),
53  m_histBooked(false),
54  m_h_l2_1d_L1NeL2Summary(0),
55  m_h_l2_1d_L1EqL2Summary(0),
56  m_h_l2_2d_JEMRoIErrors(0),
57  m_h_l2_2d_CPMRoIErrorsEM(0),
58  m_h_l2_2d_CPMRoIErrorsEMTau(0),
59  m_h_l2_2d_MismatchEvents(0)
60 /*---------------------------------------------------------*/
61 {
62  // This is how you declare the parameters to Gaudi so that
63  // they can be over-written via the job options file
64 
65  declareProperty( "JEMRoILocation",
67  declareProperty( "CMMRoILocation",
69  declareProperty( "CPMRoILocation",
71  declareProperty( "RoIBResultLocation",
72  m_L2_RoIBResultLocation = "RoIBResult");
73 
74  declareProperty( "PathInRootFile",
75  m_PathInRootFile = "LVL1_Interfaces/Level2");
76 }
77 
78 
79 /*---------------------------------------------------------*/
81 /*---------------------------------------------------------*/
82 {
83 }
84 
85 /*---------------------------------------------------------*/
87 /*---------------------------------------------------------*/
88 {
89  msg(MSG::INFO) << "Initializing " << name() << endmsg;
90 
92  if (sc.isFailure()) return sc;
93 
94  sc = m_errorTool.retrieve();
95  if( sc.isFailure() ) {
96  msg(MSG::ERROR) << "Unable to locate Tool TrigT1CaloMonErrorTool"
97  << endmsg;
98  return sc;
99  }
100 
101  sc = m_histTool.retrieve();
102  if( sc.isFailure() ) {
103  msg(MSG::ERROR) << "Unable to locate Tool TrigT1CaloLWHistogramTool"
104  << endmsg;
105  return sc;
106  }
107 
108  return StatusCode::SUCCESS;
109 }
110 
111 /*---------------------------------------------------------*/
113 /*---------------------------------------------------------*/
114 {
115  msg(MSG::DEBUG) << "in L1CaloLevel2Mon::bookHistograms" << endmsg;
116 
118  // book histograms that are only made in the online environment...
119  }
120 
122  // book histograms that are only relevant for cosmics data...
123  }
124 
125  //if( newLumiBlockFlag() ) { }
126 
127  if( newRunFlag() ) {
128 
130  MonGroup L1CaloLevel2( this, m_PathInRootFile, run, attr );
131  MonGroup L1CaloLevel2Events( this, m_PathInRootFile, run, attr,
132  "", "eventSample" );
133 
134  //--------------- transmission checks L1Calo <-> Level2 ------------------
135 
136  m_histTool->setMonGroup(&L1CaloLevel2);
137 
138  m_h_l2_1d_L1NeL2Summary = m_histTool->book1F("l2_1d_L1NeL2Summary",
139  "Transmission Errors between L1Calo and Level2",
142  m_h_l2_1d_L1EqL2Summary = m_histTool->book1F("l2_1d_L1EqL2Summary",
143  "Transmission Matches between L1Calo and Level2",
146 
147  m_h_l2_2d_JEMRoIErrors = m_histTool->bookJEMModuleVsCrate(
148  "l2_2d_JEMRoIErrors", "Transmission Errors between JEMs and Level2");
149  m_h_l2_2d_CPMRoIErrorsEM = m_histTool->bookCPMModuleVsCrate(
150  "l2_2d_CPMRoIErrorsEM", "Transmission Errors between CPMs and Level2 EM");
151  m_h_l2_2d_CPMRoIErrorsEMTau = m_histTool->bookCPMModuleVsCrate(
152  "l2_2d_CPMRoIErrorsEMTau",
153  "Transmission Errors between CPMs and Level2 EMTau");
154 
155  m_histTool->setMonGroup(&L1CaloLevel2Events);
156 
157  m_h_l2_2d_MismatchEvents = m_histTool->bookEventNumbers(
158  "l2_2d_MismatchEvents",
159  "Transmission Errors between L1Calo and Level2 Event Numbers",
162 
163  m_histTool->unsetMonGroup();
164  m_histBooked = true;
165 
166  }
167 
168  return StatusCode::SUCCESS;
169 }
170 
171 
172 /*---------------------------------------------------------*/
174 /*---------------------------------------------------------*/
175 {
176  const bool debug = msgLvl(MSG::DEBUG);
177  if (debug) msg(MSG::DEBUG) << "in L1CaloLevel2Mon::fillHistograms" << endmsg;
178 
179  if (!m_histBooked) {
180  if (debug) msg(MSG::DEBUG) << "Histogram(s) not booked" << endmsg;
181  return StatusCode::SUCCESS;
182  }
183 
184  // Skip events believed to be corrupt or with ROB errors
185 
186  if (m_errorTool->corrupt() || m_errorTool->robOrUnpackingError()) {
187  if (debug) msg(MSG::DEBUG) << "Skipping corrupt event" << endmsg;
188  return StatusCode::SUCCESS;
189  }
190 
191  // Get RoIB RDO object back from SG:
192  const ROIB::RoIBResult* roib_rdo = 0;
193  StatusCode sc = evtStore()->retrieve(roib_rdo, m_L2_RoIBResultLocation);
194  if ( sc.isFailure() || !roib_rdo ) {
195  msg(MSG::WARNING) << "ERROR retrieving RoIB RDO from store!" << endmsg;
196  return sc;
197  }
198 
199  //--------------------------------------------------------------------------
200  //------------------------ JetRoI ------------------------------------------
201  //--------------------------------------------------------------------------
202 
203  //------------ retrieve JEMRoIs from Storegate -------------------
204  const JemRoiCollection* L1Calo_JEMRoI = 0;
205  sc = evtStore()->retrieve(L1Calo_JEMRoI, m_L1Calo_JEMRoILocation);
206  if (sc == StatusCode::FAILURE || !L1Calo_JEMRoI) {
207  msg(MSG::INFO) << "No JEMRoI found in TES at " << m_L1Calo_JEMRoILocation
208  << endmsg;
209  return StatusCode::SUCCESS;
210  }
211 
212  //------------- Get L2 RoIs from RoIBResult ----------------------
213  JemRoiCollection* L2_JEMRoI = new JemRoiCollection();
214  int L2_JetEtHits = 0;
215  int L2_SumEtHits = 0;
216  int L2_MissingEtHits = 0;
217  int L2_MissingEtSigHits = 0;
218  int L2_Ex = 0;
219  int L2_Ey = 0;
220  int L2_Et = 0;
221 
222  const JetEnergyResultCollection& jerColl(roib_rdo->jetEnergyResult());
223  JetEnergyResultCollection::const_iterator it1 = jerColl.begin();
224  JetEnergyResultCollection::const_iterator it1End = jerColl.end();
225  for (; it1 != it1End; ++it1) {
226  const JetEnergyRoICollection& roiColl(it1->roIVec());
227  JetEnergyRoICollection::const_iterator it2 = roiColl.begin();
228  JetEnergyRoICollection::const_iterator it2End = roiColl.end();
229  for (; it2 != it2End; ++it2) {
230  const unsigned int roIType = it2->roIType();
231  //------ Fill Level-2 JEMRoIs in Vector ----------
232  if (roIType == LVL1::TrigT1CaloDefs::JetRoIWordType) {
233  LVL1::JEMRoI* roi = new LVL1::JEMRoI(it2->roIWord());
234  L2_JEMRoI->push_back(roi);
235  if (debug) {
236  const int nthresh = (roi->forward()) ? 4 : 8;
237  msg(MSG::DEBUG) << "L2: JEP crate " << roi->crate()
238  << " module " << roi->jem()
239  << " frame " << roi->frame()
240  << " location " << roi->location()
241  << " RoI "
242  << m_histTool->thresholdString(roi->hits(), nthresh)
243  << endmsg;
244  }
245  } else if (roIType == LVL1::TrigT1CaloDefs::JetEtRoIWordType) {
246  L2_JetEtHits = it2->jetEt();
247  //--------- retrieve CMM Energies -----------
248  } else if (roIType == LVL1::TrigT1CaloDefs::EnergyRoIWordType0) {
249  L2_Ex = it2->energyX();
250  L2_MissingEtSigHits = (it2->roIWord() >> 16) & 0xff;
251  } else if (roIType == LVL1::TrigT1CaloDefs::EnergyRoIWordType1) {
252  L2_Ey = it2->energyY();
253  L2_SumEtHits = (it2->roIWord() >> 16) & 0xff;
254  } else if (roIType == LVL1::TrigT1CaloDefs::EnergyRoIWordType2) {
255  L2_Et = it2->energySum();
256  std::vector<unsigned int> hits(it2->etMissThresholds());
257  const int size = hits.size();
258  L2_MissingEtHits = 0;
259  for (int bit = 0; bit < size; ++bit) {
260  L2_MissingEtHits |= (hits[bit] << bit);
261  }
262  }
263  }
264  }
265 
266  //------------------ Step over all cells and compare -----------------------
267  JemRoiCollection::const_iterator it_L1Calo_JEMRoI;
268  JemRoiCollection::const_iterator it_L1Calo_JEMRoIEnd = L1Calo_JEMRoI->end();
270  JemRoiCollection::const_iterator it_L2_JEMRoIEnd = L2_JEMRoI->end();
271 
272  if (debug) {
273  it_L1Calo_JEMRoI = L1Calo_JEMRoI->begin();
274  for (; it_L1Calo_JEMRoI != it_L1Calo_JEMRoIEnd; ++it_L1Calo_JEMRoI) {
275  const int nthresh = ((*it_L1Calo_JEMRoI)->forward()) ? 4 : 8;
276  msg(MSG::DEBUG) << "L1Calo: JEP crate " << (*it_L1Calo_JEMRoI)->crate()
277  << " module " << (*it_L1Calo_JEMRoI)->jem()
278  << " frame " << (*it_L1Calo_JEMRoI)->frame()
279  << " location " << (*it_L1Calo_JEMRoI)->location()
280  << " RoI "
281  << m_histTool->thresholdString(
282  (*it_L1Calo_JEMRoI)->hits(), nthresh)
283  << endmsg;
284  }
285  }
286 
287  // L1s different from or not in L2
288 
289  std::vector<int> foundL2(L2_JEMRoI->size());
290  std::vector<int>::iterator it_L2_found;
291  it_L1Calo_JEMRoI = L1Calo_JEMRoI->begin();
292  for (; it_L1Calo_JEMRoI != it_L1Calo_JEMRoIEnd; ++it_L1Calo_JEMRoI) {
293  const int crate = (*it_L1Calo_JEMRoI)->crate();
294  const int jem = (*it_L1Calo_JEMRoI)->jem();
295  const int frame = (*it_L1Calo_JEMRoI)->frame();
296  const int location = (*it_L1Calo_JEMRoI)->location();
297  const int hits = (*it_L1Calo_JEMRoI)->hits();
298  const int nthresh = ((*it_L1Calo_JEMRoI)->forward()) ? 4 : 8;
299 
300  int hitsL2 = 0;
301  it_L2_JEMRoI = L2_JEMRoI->begin();
302  it_L2_found = foundL2.begin();
303  for (; it_L2_JEMRoI != it_L2_JEMRoIEnd; ++it_L2_JEMRoI, ++it_L2_found) {
304  if ((*it_L2_found) == 0) {
305  if ((crate == (*it_L2_JEMRoI)->crate()) &&
306  (jem == (*it_L2_JEMRoI)->jem()) &&
307  (frame == (*it_L2_JEMRoI)->frame()) &&
308  (location == (*it_L2_JEMRoI)->location())) {
309  hitsL2 = (*it_L2_JEMRoI)->hits();
310  (*it_L2_found) = 1;
311  break;
312  }
313  }
314  }
315 
316  if (hits != hitsL2) {
317  if (debug) {
318  msg(MSG::DEBUG) << "JEP crate " << crate << " module " << jem
319  << " frame " << frame << " location " << location
320  << " L1Calo: RoI "
321  << m_histTool->thresholdString(hits, nthresh)
322  << " L2: RoI "
323  << m_histTool->thresholdString(hitsL2, nthresh)
324  << endmsg;
325  }
327  m_h_l2_2d_JEMRoIErrors->Fill(jem, crate);
328  m_histTool->fillEventNumber(m_h_l2_2d_MismatchEvents, JetType);
330  }
331 
332  // L2s not in L1
333 
334  it_L2_JEMRoI = L2_JEMRoI->begin();
335  it_L2_found = foundL2.begin();
336  for (; it_L2_JEMRoI != it_L2_JEMRoIEnd; ++it_L2_JEMRoI, ++it_L2_found) {
337  if (((*it_L2_found) == 0) && (*it_L2_JEMRoI)->hits()) {
338  if (debug) {
339  const int hitsL1 = 0;
340  const int nthresh = ((*it_L2_JEMRoI)->forward()) ? 4 : 8;
341  msg(MSG::DEBUG) << "JEP crate " << (*it_L2_JEMRoI)->crate()
342  << " module " << (*it_L2_JEMRoI)->jem()
343  << " frame " << (*it_L2_JEMRoI)->frame()
344  << " location " << (*it_L2_JEMRoI)->location()
345  << " L1Calo: RoI "
346  << m_histTool->thresholdString(hitsL1, nthresh)
347  << " L2: RoI "
348  << m_histTool->thresholdString(
349  (*it_L2_JEMRoI)->hits(), nthresh)
350  << endmsg;
351  }
353  m_h_l2_2d_JEMRoIErrors->Fill((*it_L2_JEMRoI)->jem(),
354  (*it_L2_JEMRoI)->crate());
355  m_histTool->fillEventNumber(m_h_l2_2d_MismatchEvents, JetType);
356  }
357  }
358  delete L2_JEMRoI;
359 
360  // retrieve CMMRoI information from Storegate
361  const LVL1::CMMRoI* L1Calo_CR = 0;
362  sc = evtStore()->retrieve (L1Calo_CR, m_L1Calo_CMMRoILocation);
363  if (sc == StatusCode::FAILURE || !L1Calo_CR) {
364  msg(MSG::INFO) << "No L1Calo CMM RoI found in TES at "
366  return StatusCode::SUCCESS;
367  }
368 
369  int L1Calo_JetEtHits = L1Calo_CR->jetEtHits();
370  int L1Calo_SumEtHits = L1Calo_CR->sumEtHits();
371  int L1Calo_MissingEtHits = L1Calo_CR->missingEtHits();
372  int L1Calo_MissingEtSigHits = L1Calo_CR->missingEtSigHits();
373  // include overflow bit in ex, ey, et
374  int L1Calo_Ex = (L1Calo_CR->ex() | ((L1Calo_CR->exError() & 0x1) << 15));
375  int L1Calo_Ey = (L1Calo_CR->ey() | ((L1Calo_CR->eyError() & 0x1) << 15));
376  int L1Calo_Et = (L1Calo_CR->et() | ((L1Calo_CR->etError() & 0x1) << 15));
377 
378  if (L1Calo_JetEtHits != L2_JetEtHits) {
380  m_histTool->fillEventNumber(m_h_l2_2d_MismatchEvents, JetEtType);
381  } else if (L1Calo_JetEtHits) m_h_l2_1d_L1EqL2Summary->Fill(JetEtType);
382 
383  if (L1Calo_SumEtHits != L2_SumEtHits) {
385  m_histTool->fillEventNumber(m_h_l2_2d_MismatchEvents, SumEtType);
386  } else if (L1Calo_SumEtHits) m_h_l2_1d_L1EqL2Summary->Fill(SumEtType);
387 
388  if (L1Calo_MissingEtHits != L2_MissingEtHits) {
391  } else if (L1Calo_MissingEtHits) {
393  }
394 
395  if (L1Calo_MissingEtSigHits != L2_MissingEtSigHits) {
398  } else if (L1Calo_MissingEtSigHits) {
400  }
401 
402  if ((L1Calo_Ex != L2_Ex) || (L1Calo_Ey != L2_Ey) || (L1Calo_Et != L2_Et)) {
405  } else if (L1Calo_Ex || L1Calo_Ey || L1Calo_Et) {
407  }
408 
409  //--------------------------------------------------------------------------
410  //------------------------ CP RoI ------------------------------------------
411  //--------------------------------------------------------------------------
412 
413  //------------ retrieve CPMRoIs from Storegate -------------------
414  const CpmRoiCollection* L1Calo_CPMRoI = 0;
415  sc = evtStore()->retrieve(L1Calo_CPMRoI, m_L1Calo_CPMRoILocation);
416  if (sc == StatusCode::FAILURE || !L1Calo_CPMRoI) {
417  msg(MSG::INFO) << "No CPMRoI found in TES at " << m_L1Calo_CPMRoILocation
418  << endmsg;
419  return StatusCode::SUCCESS;
420  }
421 
422  //------------- Get L2 RoIs from RoIBResult ----------------------
423  CpmRoiCollection* L2_CPMRoI = new CpmRoiCollection();
424  const int nthresh = 16;
425 
426  const EMTauResultCollection& etrColl(roib_rdo->eMTauResult());
427  EMTauResultCollection::const_iterator et1 = etrColl.begin();
428  EMTauResultCollection::const_iterator et1End = etrColl.end();
429  for (; et1 != et1End; ++et1) {
430  const EMTauRoICollection& roiColl(et1->roIVec());
431  EMTauRoICollection::const_iterator et2 = roiColl.begin();
432  EMTauRoICollection::const_iterator et2End = roiColl.end();
433  for (; et2 != et2End; ++et2) {
434  //------ Fill Level-2 CPMRoIs in Vector ----------
435  if (et2->roIType() == LVL1::TrigT1CaloDefs::CpRoIWordType) {
436  LVL1::CPMRoI* roi = new LVL1::CPMRoI(et2->roIWord());
437  L2_CPMRoI->push_back(roi);
438  if (debug) {
439  msg(MSG::DEBUG) << "L2: CP crate " << roi->crate()
440  << " module " << roi->cpm()
441  << " chip " << roi->chip()
442  << " location " << roi->location()
443  << " RoI "
444  << m_histTool->thresholdString(roi->hits(), nthresh)
445  << endmsg;
446  }
447  }
448  }
449  }
450 
451  //------------------ Step over all cells and compare -----------------------
452  CpmRoiCollection::const_iterator it_L1Calo_CPMRoI;
453  CpmRoiCollection::const_iterator it_L1Calo_CPMRoIEnd = L1Calo_CPMRoI->end();
455  CpmRoiCollection::const_iterator it_L2_CPMRoIEnd = L2_CPMRoI->end();
456 
457  if (debug) {
458  it_L1Calo_CPMRoI = L1Calo_CPMRoI->begin();
459  for (; it_L1Calo_CPMRoI != it_L1Calo_CPMRoIEnd; ++it_L1Calo_CPMRoI) {
460  msg(MSG::DEBUG) << "L1Calo: CP crate " << (*it_L1Calo_CPMRoI)->crate()
461  << " module " << (*it_L1Calo_CPMRoI)->cpm()
462  << " chip " << (*it_L1Calo_CPMRoI)->chip()
463  << " location " << (*it_L1Calo_CPMRoI)->location()
464  << " RoI "
465  << m_histTool->thresholdString(
466  (*it_L1Calo_CPMRoI)->hits(), nthresh)
467  << endmsg;
468  }
469  }
470 
471  // L1s different from or not in L2
472 
473  foundL2.clear();
474  foundL2.resize(L2_CPMRoI->size());
475  it_L1Calo_CPMRoI = L1Calo_CPMRoI->begin();
476  for (; it_L1Calo_CPMRoI != it_L1Calo_CPMRoIEnd; ++it_L1Calo_CPMRoI) {
477  const int crate = (*it_L1Calo_CPMRoI)->crate();
478  const int cpm = (*it_L1Calo_CPMRoI)->cpm();
479  const int chip = (*it_L1Calo_CPMRoI)->chip();
480  const int location = (*it_L1Calo_CPMRoI)->location();
481  const int hits = (*it_L1Calo_CPMRoI)->hits();
482  const int hitsEm = hits & 0xff;
483  const int hitsTau = (hits >> 8) & 0xff;
484 
485  int hitsL2 = 0;
486  it_L2_CPMRoI = L2_CPMRoI->begin();
487  it_L2_found = foundL2.begin();
488  for (; it_L2_CPMRoI != it_L2_CPMRoIEnd; ++it_L2_CPMRoI, ++it_L2_found) {
489  if ((*it_L2_found) == 0) {
490  if ((crate == (*it_L2_CPMRoI)->crate()) &&
491  (cpm == (*it_L2_CPMRoI)->cpm()) &&
492  (chip == (*it_L2_CPMRoI)->chip()) &&
493  (location == (*it_L2_CPMRoI)->location())) {
494  hitsL2 = (*it_L2_CPMRoI)->hits();
495  (*it_L2_found) = 1;
496  break;
497  }
498  }
499  }
500 
501  if (hits != hitsL2) {
502  if (debug) {
503  msg(MSG::DEBUG) << "CP crate " << crate << " module " << cpm
504  << " chip " << chip << " location " << location
505  << " L1Calo: RoI "
506  << m_histTool->thresholdString(hits, nthresh)
507  << " L2: RoI "
508  << m_histTool->thresholdString(hitsL2, nthresh)
509  << endmsg;
510  }
511  const int hitsEmL2 = hitsL2 & 0xff;
512  const int hitsTauL2 = (hitsL2 >> 8) & 0xff;
513  if (hitsEm != hitsEmL2) {
515  m_h_l2_2d_CPMRoIErrorsEM->Fill(cpm, crate);
516  m_histTool->fillEventNumber(m_h_l2_2d_MismatchEvents, EMType);
517  }
518  if (hitsTau != hitsTauL2) {
520  m_h_l2_2d_CPMRoIErrorsEMTau->Fill(cpm, crate);
521  m_histTool->fillEventNumber(m_h_l2_2d_MismatchEvents, EMTauType);
522  }
523  } else {
524  if (hitsEm) m_h_l2_1d_L1EqL2Summary->Fill(EMType);
525  if (hitsTau) m_h_l2_1d_L1EqL2Summary->Fill(EMTauType);
526  }
527  }
528 
529  // L2s not in L1
530 
531  it_L2_CPMRoI = L2_CPMRoI->begin();
532  it_L2_found = foundL2.begin();
533  for (; it_L2_CPMRoI != it_L2_CPMRoIEnd; ++it_L2_CPMRoI, ++it_L2_found) {
534  if (((*it_L2_found) == 0) && (*it_L2_CPMRoI)->hits()) {
535  const int crate = (*it_L2_CPMRoI)->crate();
536  const int cpm = (*it_L2_CPMRoI)->cpm();
537  const int hits = (*it_L2_CPMRoI)->hits();
538  const int hitsEm = hits & 0xff;
539  const int hitsTau = (hits >> 8) & 0xff;
540  if (debug) {
541  const int hitsL1 = 0;
542  msg(MSG::DEBUG) << "CP crate " << crate
543  << " module " << cpm
544  << " chip " << (*it_L1Calo_CPMRoI)->chip()
545  << " location " << (*it_L1Calo_CPMRoI)->location()
546  << " L1Calo: RoI "
547  << m_histTool->thresholdString(hitsL1, nthresh)
548  << " L2: RoI "
549  << m_histTool->thresholdString(hits, nthresh)
550  << endmsg;
551  }
552  if (hitsEm) {
554  m_h_l2_2d_CPMRoIErrorsEM->Fill(cpm, crate);
555  m_histTool->fillEventNumber(m_h_l2_2d_MismatchEvents, EMType);
556  }
557  if (hitsTau) {
559  m_h_l2_2d_CPMRoIErrorsEMTau->Fill(cpm, crate);
560  m_histTool->fillEventNumber(m_h_l2_2d_MismatchEvents, EMTauType);
561  }
562  }
563  }
564  delete L2_CPMRoI;
565 
566  return StatusCode::SUCCESS;
567 }
568 
569 /*---------------------------------------------------------*/
571 /*---------------------------------------------------------*/
572 {
573  //if( endOfLumiBlockFlag() ) { }
574 
575  //if( endOfRunFlag ) { }
576 
577  return StatusCode::SUCCESS;
578 }
579 
581 {
582  LWHist::LWHistAxis* axis = (xAxis) ? hist->GetXaxis() : hist->GetYaxis();
583  axis->SetBinLabel(1+EMType, "EMHits");
584  axis->SetBinLabel(1+EMTauType, "EMTauHits");
585  axis->SetBinLabel(1+JetType, "JetHits");
586  axis->SetBinLabel(1+JetEtType, "JetEtHits");
587  axis->SetBinLabel(1+EnergyType, "E_{x},E_{y},E_{t}");
588  axis->SetBinLabel(1+MissingEtType, "MissingEtHits");
589  axis->SetBinLabel(1+SumEtType, "SumEtHits");
590  axis->SetBinLabel(1+MissingEtSigType, "MissEtSigHits");
591 }
592 // ============================================================================
593 } // end namespace
594 // ============================================================================
TH2F_LW::Fill
virtual void Fill(const double &x, const double &y) override
Definition: TH2F_LW.cxx:329
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
LWHist
Definition: LWHist.h:26
LVL1::L1CaloLevel2Mon::NumberOfRoiTypes
@ NumberOfRoiTypes
Definition: L1CaloLevel2Mon.h:136
LVL1::TrigT1CaloDefs::JEMRoILocation
static const std::string JEMRoILocation
Definition: TrigT1CaloDefs.h:62
TH1F_LW.h
TH2F_LW.h
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
LVL1::CPMRoI::location
int location() const
Return location (RoI local coords) (0-7)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:96
CMMRoI.h
LVL1::CPMRoI::chip
int chip() const
Return CP chip number (0-7)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:91
LVL1::TrigT1CaloDefs::JetEtRoIWordType
@ JetEtRoIWordType
Definition: TrigT1CaloDefs.h:168
TH1F_LW::Fill
virtual void Fill(const double &x) override
Definition: TH1F_LW.cxx:246
ROIB::RoIBResult
Class holding the LVL1 RoIB result build by the RoIBuilder.
Definition: RoIBResult.h:47
ManagedMonitorToolBase::MgmtAttr_t
MgmtAttr_t
An enumeration describing how the class handles the histogram.
Definition: ManagedMonitorToolBase.h:131
TrigT1CaloLWHistogramToolV1.h
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:74
RoIBResult.h
ROIB::RoIBResult::jetEnergyResult
const std::vector< JetEnergyResult > & jetEnergyResult() const
Gets the jet/energy part of the L1 RDO.
Definition: RoIBResult.cxx:64
JetEnergyResult.h
JetEnergyRoI.h
LVL1::CMMRoI::exError
int exError() const
Return Ex error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:170
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1::CMMRoI::sumEtHits
int sumEtHits() const
Return Sum-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:120
plotmaker.hist
hist
Definition: plotmaker.py:148
AthenaMonManager::cosmics
@ cosmics
Definition: AthenaMonManager.h:58
LVL1::L1CaloLevel2Mon::EMTauRoICollection
std::vector< ROIB::EMTauRoI > EMTauRoICollection
Definition: L1CaloLevel2Mon.h:141
LVL1::L1CaloLevel2Mon::m_h_l2_2d_MismatchEvents
TH2I_LW * m_h_l2_2d_MismatchEvents
Transmission Errors between L1Calo and Level2 Event Numbers.
Definition: L1CaloLevel2Mon.h:175
yodamerge_tmp.axis
list axis
Definition: yodamerge_tmp.py:241
LVL1::L1CaloLevel2Mon::m_histBooked
bool m_histBooked
Histograms booked flag.
Definition: L1CaloLevel2Mon.h:166
ROIB::RoIBResult::eMTauResult
const std::vector< EMTauResult > & eMTauResult() const
Gets the egamma part of the L1 RDO.
Definition: RoIBResult.cxx:68
LVL1::L1CaloLevel2Mon::MissingEtType
@ MissingEtType
Definition: L1CaloLevel2Mon.h:135
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
LVL1::JEMRoI::location
int location() const
Return location (RoI local coords) (0-3)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:102
ManagedMonitorToolBase::m_dataType
AthenaMonManager::DataType_t m_dataType
Definition: ManagedMonitorToolBase.h:901
LVL1::L1CaloLevel2Mon::EMTauType
@ EMTauType
Definition: L1CaloLevel2Mon.h:134
LVL1::JEMRoI::forward
int forward() const
Return forward jet flag (0/1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:107
LVL1::L1CaloLevel2Mon::m_L1Calo_CMMRoILocation
std::string m_L1Calo_CMMRoILocation
CMMRoI StoreGate key.
Definition: L1CaloLevel2Mon.h:157
ITrigT1CaloMonErrorTool.h
LVL1::L1CaloLevel2Mon::bookHistogramsRecurrent
virtual StatusCode bookHistogramsRecurrent()
An inheriting class should either override this function, bookHists() or bookHistograms().
Definition: L1CaloLevel2Mon.cxx:112
LVL1::CPMRoI::hits
int hits() const
Return hit thresholds map.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:101
LVL1::L1CaloLevel2Mon::~L1CaloLevel2Mon
virtual ~L1CaloLevel2Mon()
Definition: L1CaloLevel2Mon.cxx:80
LVL1::CMMRoI::etError
int etError() const
Return Et error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:180
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::L1CaloLevel2Mon::JemRoiCollection
DataVector< LVL1::JEMRoI > JemRoiCollection
Definition: L1CaloLevel2Mon.h:139
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LVL1::L1CaloLevel2Mon::m_h_l2_2d_CPMRoIErrorsEM
TH2F_LW * m_h_l2_2d_CPMRoIErrorsEM
Transmission Errors between CPMs and Level2 EM.
Definition: L1CaloLevel2Mon.h:173
LVL1::TrigT1CaloDefs::EnergyRoIWordType1
@ EnergyRoIWordType1
Definition: TrigT1CaloDefs.h:170
LVL1::L1CaloLevel2Mon::procHistograms
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
Definition: L1CaloLevel2Mon.cxx:570
LVL1::TrigT1CaloDefs::EnergyRoIWordType2
@ EnergyRoIWordType2
Definition: TrigT1CaloDefs.h:171
LVL1::CMMRoI::ex
int ex() const
Return Ex.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:135
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
LVL1::L1CaloLevel2Mon::EnergyType
@ EnergyType
Definition: L1CaloLevel2Mon.h:134
LVL1::TrigT1CaloDefs::EnergyRoIWordType0
@ EnergyRoIWordType0
Definition: TrigT1CaloDefs.h:169
ManagedMonitorToolBase::MonGroup
A container of information describing a monitoring object.
Definition: ManagedMonitorToolBase.h:138
L1CaloLevel2Mon.h
LVL1::CPMRoI::cpm
int cpm() const
Return CPM number (1-14)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:86
LVL1::L1CaloLevel2Mon::JetEtType
@ JetEtType
Definition: L1CaloLevel2Mon.h:134
ManagedMonitorToolBase::initialize
virtual StatusCode initialize()
Definition: ManagedMonitorToolBase.cxx:669
LVL1::JEMRoI::hits
int hits() const
Return Jet hit map (8 bits Main or 4 bits Forward)
Definition: JEMRoI.cxx:64
DetDescrDictionaryDict::it1
std::vector< HWIdentifier >::iterator it1
Definition: DetDescrDictionaryDict.h:17
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
python.sizes.location
string location
Definition: sizes.py:11
AthenaMonManager::online
@ online
Definition: AthenaMonManager.h:49
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
LVL1::CMMRoI::jetEtHits
int jetEtHits() const
Return Jet-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:115
TH2I_LW.h
LVL1::L1CaloLevel2Mon::JetType
@ JetType
Definition: L1CaloLevel2Mon.h:134
ManagedMonitorToolBase::ATTRIB_UNMANAGED
@ ATTRIB_UNMANAGED
Definition: ManagedMonitorToolBase.h:131
LVL1::CPMRoI
CPM RoI data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:20
LVL1::L1CaloLevel2Mon::L1CaloLevel2Mon
L1CaloLevel2Mon(const std::string &type, const std::string &name, const IInterface *parent)
Definition: L1CaloLevel2Mon.cxx:48
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::L1CaloLevel2Mon::m_histTool
ToolHandle< TrigT1CaloLWHistogramToolV1 > m_histTool
Histogramming utilities.
Definition: L1CaloLevel2Mon.h:151
LVL1::CMMRoI::ey
int ey() const
Return Ey.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:140
AthenaMonManager.h
run
Definition: run.py:1
LVL1::L1CaloLevel2Mon::EMType
@ EMType
Definition: L1CaloLevel2Mon.h:134
LVL1::L1CaloLevel2Mon::m_L2_RoIBResultLocation
std::string m_L2_RoIBResultLocation
RoIBResult StoreGate key.
Definition: L1CaloLevel2Mon.h:161
LVL1::L1CaloLevel2Mon::setLabels
void setLabels(LWHist *hist, bool xAxis=true)
Set histogram bin labels for summary plots.
Definition: L1CaloLevel2Mon.cxx:580
EMTauRoI.h
LVL1::CMMRoI::et
int et() const
Return Et.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:145
DataVector< LVL1::JEMRoI >
ManagedMonitorToolBase::m_environment
AthenaMonManager::Environment_t m_environment
Definition: ManagedMonitorToolBase.h:902
TrigConf::name
Definition: HLTChainList.h:35
LWHist::LWHistAxis
Definition: LWHist.h:109
LVL1::CMMRoI::missingEtHits
int missingEtHits() const
Return Missing-ET hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:125
CPMRoI.h
LVL1::L1CaloLevel2Mon::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: L1CaloLevel2Mon.cxx:173
LVL1::L1CaloLevel2Mon::initialize
virtual StatusCode initialize()
Definition: L1CaloLevel2Mon.cxx:86
LVL1::L1CaloLevel2Mon::m_L1Calo_CPMRoILocation
std::string m_L1Calo_CPMRoILocation
CPMRoI collection StoreGate key.
Definition: L1CaloLevel2Mon.h:159
LVL1::JEMRoI::crate
int crate() const
Return crate number (0-1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:87
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LVL1::L1CaloLevel2Mon::CpmRoiCollection
DataVector< LVL1::CPMRoI > CpmRoiCollection
Definition: L1CaloLevel2Mon.h:138
debug
const bool debug
Definition: MakeUncertaintyPlots.cxx:53
LVL1::TrigT1CaloDefs::CPMRoILocation
static const std::string CPMRoILocation
Definition: TrigT1CaloDefs.h:60
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
LVL1::L1CaloLevel2Mon::m_errorTool
ToolHandle< ITrigT1CaloMonErrorTool > m_errorTool
Corrupt events tool.
Definition: L1CaloLevel2Mon.h:149
JEMRoI.h
TrigT1CaloDefs.h
LVL1::L1CaloLevel2Mon::EMTauResultCollection
std::vector< ROIB::EMTauResult > EMTauResultCollection
Definition: L1CaloLevel2Mon.h:140
LVL1::CMMRoI::eyError
int eyError() const
Return Ey error flags (bit 0 Overflow, bit 1 Parity)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:175
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
LVL1::L1CaloLevel2Mon::m_h_l2_2d_CPMRoIErrorsEMTau
TH2F_LW * m_h_l2_2d_CPMRoIErrorsEMTau
Transmission Errors between CPMs and Level2 EMTau.
Definition: L1CaloLevel2Mon.h:174
LVL1::TrigT1CaloDefs::JetRoIWordType
@ JetRoIWordType
Definition: TrigT1CaloDefs.h:167
LVL1::L1CaloLevel2Mon::m_h_l2_1d_L1EqL2Summary
TH1F_LW * m_h_l2_1d_L1EqL2Summary
Transmission Matches between L1Calo and Level2.
Definition: L1CaloLevel2Mon.h:171
LVL1::L1CaloLevel2Mon::SumEtType
@ SumEtType
Definition: L1CaloLevel2Mon.h:135
LVL1::TrigT1CaloDefs::CMMRoILocation
static const std::string CMMRoILocation
Definition: TrigT1CaloDefs.h:53
LVL1::L1CaloLevel2Mon::JetEnergyResultCollection
std::vector< ROIB::JetEnergyResult > JetEnergyResultCollection
Definition: L1CaloLevel2Mon.h:142
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
LVL1::JEMRoI::jem
int jem() const
Return JEM number (0-15)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:92
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
LVL1::L1CaloLevel2Mon::m_L1Calo_JEMRoILocation
std::string m_L1Calo_JEMRoILocation
JEMRoI collection StoreGate key.
Definition: L1CaloLevel2Mon.h:155
LVL1::L1CaloLevel2Mon::m_h_l2_1d_L1NeL2Summary
TH1F_LW * m_h_l2_1d_L1NeL2Summary
Histos.
Definition: L1CaloLevel2Mon.h:170
LVL1::JEMRoI
JEM RoI data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:19
LVL1::L1CaloLevel2Mon::m_h_l2_2d_JEMRoIErrors
TH2F_LW * m_h_l2_2d_JEMRoIErrors
Transmission Errors between JEMs and Level2.
Definition: L1CaloLevel2Mon.h:172
LVL1::L1CaloLevel2Mon::m_PathInRootFile
std::string m_PathInRootFile
Root histogram directory.
Definition: L1CaloLevel2Mon.h:164
LVL1::CMMRoI::missingEtSigHits
int missingEtSigHits() const
Return Missing-ET-Sig hits.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:130
EMTauResult.h
LVL1::CPMRoI::crate
int crate() const
Return crate number (0-1)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CPMRoI.h:81
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
LWHist.h
LVL1::TrigT1CaloDefs::CpRoIWordType
@ CpRoIWordType
Definition: TrigT1CaloDefs.h:166
LVL1::L1CaloLevel2Mon::MissingEtSigType
@ MissingEtSigType
Definition: L1CaloLevel2Mon.h:135
xAOD::CPMRoI
CPMRoI_v1 CPMRoI
Define the latest version of the CPMRoI class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CPMRoI.h:14
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
LVL1::JEMRoI::frame
int frame() const
Return RoI frame number (0-7)
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JEMRoI.h:97
LVL1::CMMRoI
CMM RoI data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMMRoI.h:21
LVL1::L1CaloLevel2Mon::JetEnergyRoICollection
std::vector< ROIB::JetEnergyRoI > JetEnergyRoICollection
Definition: L1CaloLevel2Mon.h:143
xAOD::JEMRoI
JEMRoI_v1 JEMRoI
Define the latest version of the JEMRoI class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/JEMRoI.h:14
ManagedMonitorToolBase::newRunFlag
bool newRunFlag() const
Definition: ManagedMonitorToolBase.h:854