ATLAS Offline Software
L1CaloL1TopoMon.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <map>
6 #include <utility>
7 #include <set>
8 #include <tuple>
9 #include <algorithm>
10 #include <vector>
11 #include <iomanip>
12 #include <sstream>
13 
14 #include "GaudiKernel/MsgStream.h"
15 #include "GaudiKernel/StatusCode.h"
16 
17 #include "LWHists/LWHist.h"
18 #include "LWHists/TH1F_LW.h"
19 #include "LWHists/TH2F_LW.h"
20 
29 
32 #include "TrigT1Result/CTP_RDO.h"
36 #include "L1TopoRDO/Helpers.h"
37 #include "L1TopoRDO/Header.h"
38 #include "L1TopoRDO/Fibre.h"
39 #include "L1TopoRDO/Status.h"
40 #include "L1TopoRDO/L1TopoTOB.h"
41 #include "L1TopoRDO/BlockTypes.h"
42 #include "L1CaloL1TopoMon.h"
43 
44 // ============================================================================
45 // To be moved to L1TopoRDO Helpers.cxx
46 namespace L1Topo {
47 // ============================================================================
48 const std::string formatVecHex8(const std::vector<uint32_t>& vec)
49 {
50  std::ostringstream s;
51  s << "[ ";
52  for (auto elem : vec) {
53  s << std::hex << std::showbase << std::setfill('0') << std::setw(8)
54  << elem << " " << std::dec << std::noshowbase;
55  }
56  s << "]";
57  return s.str();
58 }
59 // ============================================================================
60 } // end namespace
61 // ============================================================================
62 
63 // ============================================================================
64 namespace LVL1 {
65 // ============================================================================
66 
67 // *********************************************************************
68 // Public Methods
69 // *********************************************************************
70 
71 /*---------------------------------------------------------*/
73  const std::string & name,
74  const IInterface* parent )
76  m_configSvc("TrigConf::TrigConfigSvc/TrigConfigSvc", name),
77  m_errorTool("LVL1::TrigT1CaloMonErrorTool/TrigT1CaloMonErrorTool"),
78  m_histTool("LVL1::TrigT1CaloLWHistogramTool/TrigT1CaloLWHistogramTool"),
79  m_debug(false), m_histBooked(false),m_lumiNo(0),
80  m_h_l1topo_1d_CMXTobs(0),
81  m_h_l1topo_1d_Simulation(0),
82  m_h_l1topo_1d_JetTobs_EnergyLg(0),
83  m_h_l1topo_2d_Tobs_Hitmap_mismatch{},
84  m_h_l1topo_2d_Tobs_Hitmap_match{},
85  m_h_l1topo_2d_Tobs_etaPhi_mismatch{},
86  m_h_l1topo_2d_Tobs_etaPhi_match{},
87  m_h_l1topo_1d_Errors(0),
88  m_h_l1topo_1d_Overflows(0),
89  m_h_l1topo_1d_DAQTobs(0),
90  m_h_l1topo_1d_DAQJetTobs(0),
91  m_h_l1topo_1d_DAQTauTobs(0),
92  m_h_l1topo_1d_DAQEMTobs(0),
93  m_h_l1topo_1d_DAQMuonTobs(0),
94  m_h_l1topo_1d_DAQTriggerBits(0),
95  m_h_l1topo_1d_DAQMismatchTriggerBits(0),
96  m_h_l1topo_1d_DAQOverflowBits(0),
97  m_h_l1topo_1d_ROITobs(0),
98  m_h_l1topo_1d_ErrorsByLumiblock(0),
99  m_h_l1topo_2d_ItemsBC{},
100  m_h_l1topo_2d_ItemsBC_ratio{}
101 
102 
103  /*---------------------------------------------------------*/
104 {
105  // This is how you declare the parameters to Gaudi so that
106  // they can be over-written via the job options file
107 
108  declareProperty( "TrigConfigSvc", m_configSvc, "Trig Config Service");
109  declareProperty( "PathInRootFile",
110  m_PathInRootFile= "LVL1_Interfaces/L1Topo");
111  declareProperty( "CMXJetTobLocation", m_CMXJetTobLocation
113  declareProperty( "CMXCPTobLocation", m_CMXCPTobLocation
115 }
116 
117 /*---------------------------------------------------------*/
119 /*---------------------------------------------------------*/
120 {
121 }
122 
123 /*---------------------------------------------------------*/
125 /*---------------------------------------------------------*/
126 {
127  msg(MSG::INFO) << "Initializing " << name() << endmsg;
129 
131  if (sc.isFailure()) return sc;
132 
133  sc = m_configSvc.retrieve();
134  if ( sc.isFailure() ) {
135  msg(MSG::ERROR) << "Couldn't connect to " << m_configSvc.typeAndName()
136  << endmsg;
137  return sc;
138  } else {
139  msg(MSG::INFO) << "Connected to " << m_configSvc.typeAndName() << endmsg;
140  }
141 
142  sc = m_errorTool.retrieve();
143  if ( sc.isFailure() ) {
144  msg(MSG::ERROR) << "Unable to locate Tool TrigT1CaloMonErrorTool"
145  << endmsg;
146  return sc;
147  }
148 
149  sc = m_histTool.retrieve();
150  if ( sc.isFailure() ) {
151  msg(MSG::ERROR) << "Unable to locate Tool TrigT1CaloLWHistogramTool"
152  << endmsg;
153  return sc;
154  }
155 
157 
158  return StatusCode::SUCCESS;
159 }
160 
161 /*---------------------------------------------------------*/
163 /*---------------------------------------------------------*/
164 {
165 
166 
167  msg(MSG::DEBUG) << "in L1CaloL1TopoMon::bookHistograms" << endmsg;
168 
170  // book histograms that are only made in the online environment...
171  }
172 
174  // book histograms that are only relevant for cosmics data...
175  }
176 
177  if (newRunFlag() || newLumiBlockFlag()) {
178  const EventContext& ctx = Gaudi::Hive::currentContext();
179  m_lumiNo = ctx.eventID().lumi_block();
180  }
181 
182  //if ( newLumiBlockFlag() ) {}
183 
184  if ( newRunFlag() ) {
185 
187  MonGroup L1CaloL1Topo( this, m_PathInRootFile, run, attr, "", "merge" );
188 
189  m_histTool->setMonGroup(&L1CaloL1Topo);
190 
192  m_histTool->book1F("l1topo_1d_Errors",
193  "L1Topo error summary;;Number of Events",
194  ERROR_BIT::NUMBEROFBITS, 0, ERROR_BIT::NUMBEROFBITS);
195 
197  m_histTool->book1F("l1topo_1d_Overflow",
198  "L1Topo overflows;Overflow;Number of Events",1,0,1);
199 
200  for (int i=0; i<ERROR_BIT::NUMBEROFBITS;++i)
202  SetBinLabel(i+1,ERROR_LABELS[i].c_str());
203 
205  m_histTool->book1F("l1topo_1d_ErrorsByLumiblock",
206  "Events with Errors by Lumiblock;"
207  "Lumi Block;Number of Events",2500,0,2500);
208 
210  m_histTool->book1F("l1topo_1d_CMXTobs",
211  "Number of CMX TOBs",
212  MAXTOBS, 0, MAXTOBS);
213 
215  m_histTool->book1F("l1topo_1d_Simulation",
216  "Simulated L1Topo trigger bits", 128, 0, 128);
217 
218  //---- eta phi ----
219 
221  bookJEMRoIEtaVsPhi("l1topo_2d_JetSTobs_etaPhi_mismatch",
222  "CMX-L1Topo mismatched small jet TOBs hit map");
224  bookJEMRoIEtaVsPhi("l1topo_2d_JetSTobs_etaPhi_match",
225  "CMX-L1Topo matched small jet TOBs hit map");
227  bookJEMRoIEtaVsPhi("l1topo_2d_JetLTobs_etaPhi_mismatch",
228  "CMX-L1Topo mismatched large jet TOBs hit map");
230  bookJEMRoIEtaVsPhi("l1topo_2d_JetLTobs_etaPhi_match",
231  "CMX-L1Topo matched large jet TOBs hit map");
233  bookCPMEtaVsPhi("l1topo_2d_TauTobs_etaPhi_mismatch",
234  "CMX-L1Topo mismatched tau TOBs hit map");
236  bookCPMEtaVsPhi("l1topo_2d_TauTobs_etaPhi_match",
237  "CMX-L1Topo matched tau TOBs hit map");
239  bookCPMEtaVsPhi("l1topo_2d_EMTobs_etaPhi_mismatch",
240  "CMX-L1Topo mismatched EM TOBs hit map");
242  bookCPMEtaVsPhi("l1topo_2d_EMTobs_etaPhi_match",
243  "CMX-L1Topo matched EM TOBs hit map");
245  bookCPMEtaVsPhi("l1topo_2d_MuTobs_etaPhi_mismatch",
246  "CMX-L1Topo mismatched muon TOBs hit map");
248  bookCPMEtaVsPhi("l1topo_2d_MuTobs_etaPhi_match",
249  "CMX-L1Topo matched muon TOBs hit map");
250 
251  // ---- hardware coordinates ----
252 
254  bookJEMCrateModuleVsFrameLoc("l1topo_2d_JetSTobs_Hitmap_mismatch",
255  "CMX-L1Topo mismatched small jet TOBs hit map");
257  bookJEMCrateModuleVsFrameLoc("l1topo_2d_JetSTobs_Hitmap_match",
258  "CMX-L1Topo matched small jet TOBs hit map");
260  bookJEMCrateModuleVsFrameLoc("l1topo_2d_JetLTobs_Hitmap_mismatch",
261  "CMX-L1Topo mismatched large jet TOBs hit map");
263  bookJEMCrateModuleVsFrameLoc("l1topo_2d_JetLTobs_Hitmap_match",
264  "CMX-L1Topo matched large jet TOBs hit map");
266  bookCPMCrateModuleVsTobChipLocalCoord("l1topo_2d_TauTobs_Hitmap_mismatch",
267  "CMX-L1Topo mismatched tau TOBs hit map");
269  bookCPMCrateModuleVsTobChipLocalCoord("l1topo_2d_TauTobs_Hitmap_match",
270  "CMX-L1Topo matched tau TOBs hit map");
272  bookCPMCrateModuleVsTobChipLocalCoord("l1topo_2d_EMTobs_Hitmap_mismatch",
273  "CMX-L1Topo mismatched EM TOBs hit map");
275  bookCPMCrateModuleVsTobChipLocalCoord("l1topo_2d_EMTobs_Hitmap_match",
276  "CMX-L1Topo matched EM TOBs hit map");
278  bookCPMCrateModuleVsTobChipLocalCoord("l1topo_2d_MuTobs_Hitmap_mismatch",
279  "CMX-L1Topo mismatched muon TOBs hit map");
281  bookCPMCrateModuleVsTobChipLocalCoord("l1topo_2d_MuTobs_Hitmap_match",
282  "CMX-L1Topo matched muon TOBs hit map");
283 
284  // --------
285 
287  book1F("l1topo_1d_JetTobs_EnergyLg",
288  "L1Topo-Jet TOB Energy Large Window Size", 256, 0., 1024);
290 
292  m_histTool->book1F("l1topo_1d_DAQTobs",
293  "Number of L1Topo DAQ L1Topo TOBs",
294  20, 0, 20);
296  m_histTool->book1F("l1topo_1d_DAQJetTobs",
297  "Number of L1Topo DAQ Jet TOBs",
298  MAXTOBS, 0, MAXTOBS);
300  m_histTool->book1F("l1topo_1d_DAQTauTobs",
301  "Number of L1Topo DAQ Tau TOBs",
302  MAXTOBS, 0, MAXTOBS);
304  m_histTool->book1F("l1topo_1d_DAQEMTobs",
305  "Number of L1Topo DAQ EM TOBs",
306  MAXTOBS, 0, MAXTOBS);
308  m_histTool->book1F("l1topo_1d_DAQMuonTobs",
309  "Number of L1Topo DAQ Muon TOBs",
310  MAXTOBS, 0, MAXTOBS);
312  m_histTool->book1F("l1topo_1d_DAQTriggerBits",
313  "L1Topo DAQ trigger bits",
314  128, 0, 128);
316  m_histTool->book1F("l1topo_1d_DAQMismatchTriggerBits",
317  "L1Topo DAQ-Simulation trigger bits mismatch",
318  128, 0, 128);
320  m_histTool->book1F("l1topo_1d_DAQOverflowBits",
321  "L1Topo DAQ overflow bits",
322  128, 0, 128);
324  m_histTool->book1F("l1topo_1d_ROITobs",
325  "Number of L1Topo ROI L1Topo TOBs",
326  20, 0, 20);
327  for (int i=0; i<4; ++i) {
328  const std::string textFPGA[4]=
329  {"L1Topo_00_U1","L1Topo_00_U2","L1Topo_01_U1","L1Topo_01_U2"};
331  m_histTool->bookTH2F(std::string("l1topo_2d_ItemsBC")+
332  std::to_string(i),
333  std::string("Timing vs "
334  "Algorithm Number ")+textFPGA[i],
335  32, i*32, (i+1)*32, 5, -2.5, 2.5);
337  m_histTool->bookTH2F(std::string("l1topo_2d_ItemsBC_online_ratio")+
338  std::to_string(i),
339  std::string("(online) Timing Ratio vs "
340  "Algorithm Number ")+textFPGA[i],
341  32, i*32, (i+1)*32, 5, -2.5, 2.5);
343  m_histTool->bookTH2F(std::string("l1topo_2d_ItemsBC_ratio")+
344  std::to_string(i),
345  std::string("Timing Ratio vs "
346  "Algorithm Number ")+textFPGA[i],
347  32, i*32, (i+1)*32, 5, -2.5, 2.5);
348  }
349 
350  // Get L1Topo output bit names from the LVL1 menu thresholds
351  std::map<unsigned int, std::string> topoCounterToName;
352  const std::vector<TrigConf::TriggerThreshold*>& thrVec =
353  m_configSvc->thresholdConfig()->
354  getThresholdVector(TrigConf::L1DataDef::TOPO);
355  ATH_MSG_DEBUG("L1Topo bits found in the LVL1 menu = " << thrVec.size());
356  if (thrVec.size()>0) {
357  for (auto thr : thrVec) {
358  if (thr) {
359  ATH_MSG_DEBUG("Looping L1Topo mapping " << thr->mapping());
360  ATH_MSG_DEBUG("Looping L1Topo name " << thr->name());
361  topoCounterToName.emplace(thr->mapping(),thr->name());
362  }
363  else
364  ATH_MSG_DEBUG("Looping L1Topo bit inactive");
365  }
366  ATH_MSG_DEBUG("L1Topo bits configured in the LVL1 menu = "
367  << topoCounterToName.size());
368  for (unsigned int binIndex=0; binIndex<128; ++binIndex){
369  std::string label(std::to_string(binIndex));
370  auto it = topoCounterToName.find(binIndex);
371  if (it != topoCounterToName.end()){
372  const bool USE_ALPHANUM=true;
373  if (USE_ALPHANUM && it->second.length()>2) {
374  label=it->second;
375  for (uint32_t bc=1; bc<=5; ++bc)
377  SetBinContent(binIndex%32+1,bc,0.0001); // bins>0 active bins
378  }
379  }
380  m_h_l1topo_2d_ItemsBC[binIndex/32]->GetXaxis()->
381  SetBinLabel(binIndex%32+1,label.c_str());
382  }
383  }
384 
385  m_histTool->unsetMonGroup();
386  m_histBooked = true;
387  }
388 
389  return StatusCode::SUCCESS;
390 }
391 
392 /*---------------------------------------------------------*/
394 /*---------------------------------------------------------*/
395 {
396 
397  if (m_debug) msg(MSG::DEBUG) << "in L1CaloL1TopoMon::fillHistograms"
398  << endmsg;
399 
400  if (!m_histBooked) {
401  if (m_debug) msg(MSG::DEBUG) << "Histogram(s) not booked" << endmsg;
402  return StatusCode::SUCCESS;
403  }
404 
405  StatusCode sc = StatusCode::SUCCESS;
406 
407  int topo_error=0;
408 
409  typedef std::tuple<int,int,int,int,int,int> TobKey;
410  std::set<TobKey> cmxKeys[TOB_TYPES],topoKeys[TOB_TYPES],
411  keyDiff[TOB_TYPES],keyIntersect[TOB_TYPES];
412 
413  // Validate properly unpacked input from L1Calo
414  if (m_errorTool->corrupt() || m_errorTool->robOrUnpackingError()) {
415  if (m_debug) msg(MSG::DEBUG) << "Corrupt L1Calo event" << endmsg;
417  topo_error|=(1<<CALO_CONV);
418  }
419 
420  const CTP_RDO* ctpRDO = 0;
421  sc = evtStore()->retrieve(ctpRDO,"CTP_RDO");
422  if (sc.isFailure()) {
423  ATH_MSG_WARNING("Could not find CTP_RDO in StoreGate");
424  }
425  else {
427  ctp.setRDO(ctpRDO);
428  const uint16_t l1aPos = ctpRDO->getL1AcceptBunchPosition();
429  const uint32_t bx=ctp.getBunchCrossings().size();
430  const int dbx=bx/2;
431  if (l1aPos >= bx) {
432  ATH_MSG_INFO( "CTP_RDO gave invalid l1aPos." );
433  }
434  else {
435  ATH_MSG_DEBUG( "CTP l1aPos, size : " << l1aPos << ", " << bx );
436  if ( bx>=3 && l1aPos>0) {
437  for (int bc=-dbx; bc<=dbx; ++bc) {
438  const CTP_BC& ctp_bc = ctp.getBunchCrossings().at(l1aPos+bc);
439  std::bitset<512> tip = ctp_bc.getTIP();
440  ATH_MSG_DEBUG( "got CTP TIP bits: " << tip.to_string() );
441  const unsigned int topoTipStart(384);
442  const unsigned int nTopoCTPOutputs(128);
443  for (unsigned int item=0; item<nTopoCTPOutputs;++item) {
444  // Check if algorithms fired
445  if (tip.test(item+topoTipStart)) {
446  m_h_l1topo_2d_ItemsBC[item/32]->Fill(item,bc);
447  ATH_MSG_DEBUG(" Fired (item, bc) =" << item << ", " << bc);
448  }
449  }
450  }
451  }
452  }
453  }
454 
455  // Retrieve CMX CP tobs
456  const xAOD::CMXCPTobContainer* cmxcptob = 0;
457  sc = evtStore()->retrieve(cmxcptob);
458  if (sc.isFailure() || !cmxcptob) {
459  ATH_MSG_DEBUG ("No CMX CP tobs found in TES");
460  // tot_error|=NO_CMX_CP;
461  }
462  else {
463  ATH_MSG_DEBUG( "Found CMXCPTobCollection, looping on TOBs ..." );
464  for (const xAOD::CMXCPTob* t : *cmxcptob) {
465  if (t->energy()) {
466  for (int clone=0;clone<4;++clone) {
467  if (t->cmx()==0)
468  cmxKeys[TAU_TOB].insert(std::make_tuple(t->crate(),t->cpm(),
469  t->chip(),t->location(),
470  t->energy(),clone));
471  else
472  cmxKeys[EM_TOB].insert(std::make_tuple(t->crate(),t->cpm(),
473  t->chip(),t->location(),
474  t->energy(),clone));
475  }
476  }
477  }
478  //m_h_l1topo_1d_CMXCPTobs->Fill(std::min((int)cmxtobs.size(),MAXTOBS-1));
479  }
480 
481  std::vector<const xAOD::CMXJetTob*> cmxtobs;
482  // Retrieve CMX jet tobs
483  const xAOD::CMXJetTobContainer* cmxtob = 0;
484  sc = evtStore()->retrieve(cmxtob);
485  if (sc.isFailure() || !cmxtob) {
486  ATH_MSG_DEBUG ("No CMX tobs found in TES");
488  topo_error|=(1<<NO_CMX);
489  }
490  else {
491  ATH_MSG_DEBUG( "Found CMXJetTobCollection, looping on TOBs ..." );
492  for (const xAOD::CMXJetTob* t : *cmxtob) {
493  if (t->energyLarge()) cmxtobs.push_back(t);
494  for (int clone=0;clone<4;++clone) {
495  if (t->energyLarge())
496  cmxKeys[JETL_TOB].insert(std::make_tuple(t->crate(),t->jem(),
497  t->frame(),t->location(),
498  t->energyLarge(),clone));
499  if (t->energySmall())
500  cmxKeys[JETS_TOB].insert(std::make_tuple(t->crate(),t->jem(),
501  t->frame(),t->location(),
502  t->energySmall(),clone));
503  }
504  }
505  m_h_l1topo_1d_CMXTobs->Fill(std::min((int)cmxtobs.size(),MAXTOBS-1));
506  }
507 
508  // Retrieve L1Topo CTP simulted decision if present
509  if (!evtStore()->contains<LVL1::FrontPanelCTP>(m_topoCTPLoc.key())){
510  ATH_MSG_DEBUG("Could not retrieve LVL1::FrontPanelCTP with key "
511  << m_topoCTPLoc.key());
512  }
513  else {
514  const LVL1::FrontPanelCTP* topoCTP = SG::get(m_topoCTPLoc);
515  if (!topoCTP){
516  ATH_MSG_INFO( "Retrieve of LVL1::FrontPanelCTP failed." );
517  }
518  else {
519  for(unsigned int i=0; i<32; ++i) {
520  uint64_t topores0=topoCTP->cableWord0(1);
521  topores0<<=32;
522  topores0+=topoCTP->cableWord0(0);
523  uint64_t topores1=topoCTP->cableWord1(1);
524  topores1<<=32;
525  topores1+=topoCTP->cableWord1(0);
526  if( (topores0 & (0x1UL << (2*i+0))))
527  m_h_l1topo_1d_Simulation->Fill(i); // cable 0, clock 0
528  if( (topores0 & (0x1UL << (2*i+1))))
529  m_h_l1topo_1d_Simulation->Fill(32 + i); // cable 0, clock 1
530  if( (topores1 & (0x1UL << (2*i+0))))
531  m_h_l1topo_1d_Simulation->Fill(64 + i); // cable 1, clock 0
532  if( (topores1 & (0x1UL << (2*i+1))))
533  m_h_l1topo_1d_Simulation->Fill(96 + i); // cable 1, clock 1
534  }
535  ATH_MSG_DEBUG("Simulated output from L1Topo from StoreGate with key "
536  << m_topoCTPLoc);
537  ATH_MSG_DEBUG("L1Topo word 1 at clock 0 is: 0x"
538  << std::hex << std::setw( 8 ) << std::setfill( '0' )
539  << topoCTP->cableWord0(0));
540  ATH_MSG_DEBUG("L1Topo word 2 at clock 0 is: 0x"
541  << std::hex << std::setw( 8 ) << std::setfill( '0' )
542  << topoCTP->cableWord1(0));
543  ATH_MSG_DEBUG("L1Topo word 1 at clock 1 is: 0x"
544  << std::hex << std::setw( 8 ) << std::setfill( '0' )
545  << topoCTP->cableWord0(1));
546  ATH_MSG_DEBUG("L1Topo word 2 at clock 1 is: 0x"
547  << std::hex << std::setw( 8 ) << std::setfill( '0' )
548  << topoCTP->cableWord1(1));
549  }
550  }
551 
552  // Retrieve the L1Topo RDOs from the DAQ RODs
553  const int NFPGA=4;
554  const L1TopoRDOCollection* rdos = 0;
555  sc = evtStore()->retrieve(rdos);
556  if (sc.isFailure() or 0 == rdos) {
558  topo_error|=(1<<NO_DAQ);
559  ATH_MSG_DEBUG ( "Could not retrieve L1Topo DAQ RDO collection "
560  "from StoreGate" );
561  }
562  else {
563  // initialise collections filled for all blocks
564  std::vector<L1Topo::L1TopoTOB> daqTobs;
565  std::vector<uint32_t> daqJetTobs;
566  std::vector<uint32_t> daqTauTobs;
567  std::vector<uint32_t> daqEMTobs;
568  std::vector<uint32_t> daqMuonTobs;
569  std::vector<uint32_t> vFibreSizes;
570  std::vector<uint32_t> vFibreStatus;
571 
572  auto triggerBits = L1Topo::getDecisionAndOverflowBits(*rdos);
573  ATH_MSG_DEBUG( "Trigger bits from L1Topo RDOs 0b" << triggerBits.first );
574  ATH_MSG_DEBUG( "Overflow bits from L1Topo RDOs 0b" << triggerBits.second );
575 
576  for (const L1TopoRDO* rdo : *rdos) {
577  ATH_MSG_VERBOSE( *rdo );
578  ATH_MSG_DEBUG( "Found DAQ RDO with source ID "
579  << L1Topo::formatHex8(rdo->getSourceID()) );
580  std::vector<L1Topo::Error> errors = rdo->getErrors();
581  if (! errors.empty()){
582  ATH_MSG_WARNING( "Converter errors reported: " << errors );
584  topo_error|=(1<<DAQ_CONV);
585  }
586  const std::vector<uint32_t> cDataWords = rdo->getDataWords();
587 
588  if ( cDataWords.size() == 0 ) {
589  ATH_MSG_DEBUG ( "L1TopoRDO DAQ is empty" );
591  topo_error|=(1<<NO_DAQ);
592  }
593 
594  // initialise header: beware, this can make a valid-looking header
595  // set version 15, BCN -7, which is unlikely:
596  L1Topo::Header header(0xf, 0, 0, 0, 0, 1, 0x7);
597  int i_fpga=-1;
598  for (const uint32_t word : cDataWords){
599  switch (L1Topo::blockType(word)){
601  {
602  header = L1Topo::Header(word);
603  if (header.payload_crc()!=0) {
605  topo_error|=(1<<PAYL_CRC);
606  }
607  i_fpga=(((rdo->getSourceID())>>3)&2)+header.fpga();
608  break;
609  }
611  {
612  auto fibreBlock = L1Topo::Fibre(word);
613  for (auto fsize: fibreBlock.count()){
614  vFibreSizes.push_back(fsize);
615  }
616  for (auto fstatus: fibreBlock.status()){
617  vFibreStatus.push_back(fstatus);
618  }
619  break;
620  }
622  {
623  auto status = L1Topo::Status(word);
624  ATH_MSG_WARNING( "fibre overflow: " << status.overflow()
625  << " fibre crc: " << status.crc() );
626  if (status.overflow()) m_h_l1topo_1d_Overflows->Fill(0.5);
627  if (status.crc()) {
629  topo_error|=(1<<F_CRC);
630  }
631  break;
632  }
634  {
635  if (header.bcn_offset()==0){
636  auto tob = L1Topo::L1TopoTOB(word);
637  ATH_MSG_DEBUG(tob);
638  daqTobs.push_back(tob);
639  auto index = L1Topo::triggerBitIndex(rdo->getSourceID(),tob);
640  for (unsigned int i=0; i<8; ++i){
641  if ((tob.trigger_bits() >>i)&1)
643  if ((tob.overflow_bits()>>i)&1)
645  }
646  }
647  break;
648  }
651  {
652  if (header.bcn_offset()==0) {
653  const int crate = (word >> 28) & 0x1;
654  const int jem = (word >> 24) & 0xF;
655  const int frame = (word >> 21) & 0x7;
656  const int location = (word >> 19) & 0x3;
657  const int energyS = (word >> 10) & 0x1FF;
658  const int energyL = (word & 0x3FF);
659  if (energyL) {
660  topoKeys[JETL_TOB].insert(std::make_tuple(crate,jem,frame,
661  location,energyL,i_fpga));
662  //auto tob = L1Topo::JetTOB(word);
663  int tob = 1; // Fake object until defined
664  daqJetTobs.push_back(tob);
665  m_h_l1topo_1d_JetTobs_EnergyLg->Fill(energyL,1./NFPGA);
666  }
667  if (energyS) {
668  topoKeys[JETS_TOB].insert(std::make_tuple(crate,jem,frame,
669  location,energyS,i_fpga));
670  }
671  }
672  break;
673  }
675  {
676  if (header.bcn_offset()==0) {
677  int tob = 1; // Fake object until defined
678  daqTauTobs.push_back(tob);
679  const int crate = (word >> 26) & 0x3;
680  const int cpm = (word >> 20) & 0xF;
681  const int chip = (word >> 15) & 0xF;
682  const int location = (word >> 13) & 0x3;
683  const int energy = (word & 0xFF);
684  if (energy)
685  topoKeys[TAU_TOB].insert(std::make_tuple(crate,cpm,chip,location,
686  energy,i_fpga));
687  }
688  break;
689  }
691  {
692  if (header.bcn_offset()==0) {
693  int tob = 1; // Fake object until defined
694  daqEMTobs.push_back(tob);
695  const int crate = (word >> 26) & 0x3;
696  const int cpm = (word >> 20) & 0xF;
697  const int chip = (word >> 15) & 0xF;
698  const int location = (word >> 13) & 0x3;
699  const int energy = (word & 0xFF);
700  if (energy)
701  topoKeys[EM_TOB].insert(std::make_tuple(crate,cpm,chip,
702  location,energy,i_fpga));
703  }
704  break;
705  }
707  {
708  if (header.bcn_offset()==0){
709  int tob = 1; // Fake object until defined
710  daqMuonTobs.push_back(tob);
711  }
712  break;
713  }
715  {
716  if (header.bcn_offset()==0){
717  }
718  break;
719  }
720  default:
721  {
722  break;
723  }
724  }
725  } // for word
726  }
727  m_h_l1topo_1d_DAQTobs->Fill(std::min((int)daqTobs.size()/NFPGA,19));
728  m_h_l1topo_1d_DAQJetTobs->Fill(std::min((int)daqJetTobs.size()/NFPGA,
729  MAXTOBS-1));
730  m_h_l1topo_1d_DAQTauTobs->Fill(std::min((int)daqTauTobs.size()/NFPGA,
731  MAXTOBS-1));
732  m_h_l1topo_1d_DAQMuonTobs->Fill(std::min((int)daqMuonTobs.size()/NFPGA,
733  MAXTOBS-1));
734  m_h_l1topo_1d_DAQEMTobs->Fill(std::min((int)daqEMTobs.size()/NFPGA,
735  MAXTOBS-1));
736  }
737 
738  // Retrieve and print the L1Topo RDOs from the ROI RODs
739  std::vector<L1Topo::L1TopoTOB> roiTobs;
740  const ROIB::RoIBResult* roibresult = 0;
741  CHECK (evtStore()->retrieve(roibresult) );
742  const std::vector< ROIB::L1TopoResult > l1TopoResults =
743  roibresult->l1TopoResult();
744  ATH_MSG_DEBUG( "Number of L1Topo ROI RODs found: " << l1TopoResults.size() );
745  for (auto & r : l1TopoResults) {
746  //ATH_MSG_VERBOSE( r.dump() );
747  const auto& rdo = r.rdo();
748  ATH_MSG_DEBUG( "Found ROI RDO with source ID "
749  << L1Topo::formatHex8(rdo.getSourceID()) );
750  auto errors = rdo.getErrors();
751  if (! errors.empty()) {
752  ATH_MSG_WARNING( "Converter errors reported: " << errors );
754  topo_error|=(1<<ROI_CONV);
755  }
756  const std::vector<uint32_t>& cDataWords = rdo.getDataWords();
757  if ( cDataWords.size() == 0 ) {
758  ATH_MSG_DEBUG ( "L1TopoRDO ROI is empty" );
760  topo_error|=(1<<NO_ROI);
761  }
762  for (const uint32_t word : cDataWords) {
763  switch (L1Topo::blockType(word)) {
765  {
766  auto tob = L1Topo::L1TopoTOB(word);
767  ATH_MSG_DEBUG( tob );
768  roiTobs.push_back(tob);
769  //auto index = L1Topo::triggerBitIndex(rdo.getSourceID(),tob);
770  for (unsigned int i = 0; i < 8; ++i) {
771  //m_histTriggerBitsFromROIConv->
772  // Fill(index+i,(tob.trigger_bits() >>i)&1);
773  //m_histOverflowBitsFromROIConv->
774  // Fill(index+i,(tob.overflow_bits()>>i)&1);
775  }
776  // histogram trigger and overflow bits
777  break;
778  }
779  default:
780  {
781  ATH_MSG_WARNING( "unexpected TOB type in ROI: "
782  << L1Topo::formatHex8(word) );
783  break;
784  }
785  }
786  }
787  }
788  m_h_l1topo_1d_ROITobs->Fill(std::min((int)roiTobs.size(),19));
789 
790  for (unsigned int i=1; i<=128;++i) {
793  if (diff>0.1)
795  }
796 
797  // look in both directions for CMX and Topo TOBs (mis)matches
798  for (int t=0; t<TOB_TYPES; ++t) {
799  set_symmetric_difference(cmxKeys[t].begin(),cmxKeys[t].end(),
800  topoKeys[t].begin(),topoKeys[t].end(),
801  inserter(keyDiff[t],keyDiff[t].begin()));
802  if (keyDiff[t].size()>0) {
804  topo_error|=(1<<CMX_MATCH);
805  }
806  for (auto& tob : keyDiff[t]) {
807  int x,y;
808  double eta,phi;
809  if (t==JETS_TOB || t==JETL_TOB) {
810  jem2Coord(std::get<0>(tob),std::get<1>(tob),std::get<2>(tob),std::get<3>(tob),
811  x,y,eta,phi);
812  m_histTool->fillJEMRoIEtaVsPhi(m_h_l1topo_2d_Tobs_etaPhi_mismatch[t],eta,phi);
813  }
814  else {
815  cpm2Coord(std::get<0>(tob),std::get<1>(tob),std::get<2>(tob),std::get<3>(tob),
816  x,y,eta,phi);
817  m_histTool->fillCPMRoIEtaVsPhi(m_h_l1topo_2d_Tobs_etaPhi_mismatch[t],eta,phi);
818  }
820  }
821  set_intersection(cmxKeys[t].begin(),cmxKeys[t].end(),
822  topoKeys[t].begin(),topoKeys[t].end(),
823  inserter(keyIntersect[t],keyIntersect[t].begin()));
824  for (auto& tob : keyIntersect[t]) {
825  int x,y;
826  double eta,phi;
827  if (t==JETS_TOB || t==JETL_TOB) {
828  jem2Coord(std::get<0>(tob),std::get<1>(tob),std::get<2>(tob),std::get<3>(tob),
829  x,y,eta,phi);
830  m_histTool->fillJEMRoIEtaVsPhi(m_h_l1topo_2d_Tobs_etaPhi_match[t],eta,phi);
831  }
832  else {
833  cpm2Coord(std::get<0>(tob),std::get<1>(tob),std::get<2>(tob),std::get<3>(tob),
834  x,y,eta,phi);
835  m_histTool->fillCPMRoIEtaVsPhi(m_h_l1topo_2d_Tobs_etaPhi_match[t],eta,phi);
836  }
838  }
839  }
840 
841  if (topo_error) {
843  }
844 
845  return StatusCode::SUCCESS;
846 }
847 
848 /*---------------------------------------------------------*/
850 /*---------------------------------------------------------*/
851 {
852  ATH_MSG_DEBUG("Enter procHistograms()");
853 
854  //if ( endOfLumiBlockFlag() ) { }
855  //if ( endOfRunFlag() ) { }
856 
857  int eor=(endOfRunFlag() ? 1 : 0);
858  for (int cpu=0; cpu<=3; ++cpu) {
859  for (int item=1; item<=32; ++item) {
860  for (int bc=1; bc<=5; ++bc) {
861  if (m_h_l1topo_2d_ItemsBC[cpu]->GetBinContent(item,bc)==0);
862  else if (bc==3)
864  else {
865  float binval=m_h_l1topo_2d_ItemsBC[cpu]->GetBinContent(item,bc);
866  float centerbin=m_h_l1topo_2d_ItemsBC[cpu]->GetBinContent(item,3);
867  float ratio=(binval<1 || centerbin<1 ? 0 : binval/centerbin);
868  m_h_l1topo_2d_ItemsBC_ratio[cpu][eor]->
869  SetBinContent(item,bc,fmax(0.05,ratio));
870  }
871  }
872  }
873  }
874 
875  return StatusCode::SUCCESS;
876 }
877 
878 // *********************************************************************
879 // Private Methods
880 // *********************************************************************
881 
882 void L1CaloL1TopoMon::jem2Coord(const int crate, const int jem,
883  const int frame, const int location,
884  int &x, int &y, double &eta, double &phi)
885 {
886  x = crate*16 + jem;
887  y = frame*4 + location;
888  const uint32_t roiWord = // formula from JEPSimMon
889  ((((((crate << 4) + jem) << 3) + frame) << 2) + location) << 19;
891  const LVL1::CoordinateRange coord(decoder.coordinate(roiWord));
892  eta = coord.eta();
893  phi = coord.phi();
894 }
895 
896 void L1CaloL1TopoMon::cpm2Coord(const int crate, const int cpm,
897  const int chip, const int location,
898  int &x, int &y, double &eta, double &phi)
899 {
900  x = crate*14 + cpm - 1;
901  y = chip*4 + location;
902  const uint32_t roiWord = // formula from CPSimMon
903  ((((((crate << 4) + cpm) << 4) + chip) << 2)
904  + location) << 18;
906  const LVL1::CoordinateRange coord(decoder.coordinate(roiWord));
907  eta = coord.eta();
908  phi = coord.phi();
909 }
910 
911 }
TH2F_LW::Fill
virtual void Fill(const double &x, const double &y) override
Definition: TH2F_LW.cxx:329
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LVL1::FrontPanelCTP::cableWord1
uint32_t cableWord1(unsigned int clock) const
return the data that it sent on cable 1
Definition: FrontPanelCTP.cxx:62
L1TopoRDO
The class that represents the raw data received from an L1Topo board.
Definition: L1TopoRDO.h:29
LVL1::L1CaloL1TopoMon::bookHistogramsRecurrent
virtual StatusCode bookHistogramsRecurrent()
An inheriting class should either override this function, bookHists() or bookHistograms().
Definition: L1CaloL1TopoMon.cxx:162
beamspotman.r
def r
Definition: beamspotman.py:676
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
CTP_Decoder.h
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_DAQEMTobs
TH1F_LW * m_h_l1topo_1d_DAQEMTobs
Definition: L1CaloL1TopoMon.h:118
TH1F_LW.h
TH2F_LW.h
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_ROITobs
TH1F_LW * m_h_l1topo_1d_ROITobs
Definition: L1CaloL1TopoMon.h:123
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
LVL1::L1CaloL1TopoMon::m_lumiNo
unsigned int m_lumiNo
Current lumiblock.
Definition: L1CaloL1TopoMon.h:101
LVL1::L1CaloL1TopoMon::EM_TOB
@ EM_TOB
Definition: L1CaloL1TopoMon.h:66
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_JetTobs_EnergyLg
TH1F_LW * m_h_l1topo_1d_JetTobs_EnergyLg
Definition: L1CaloL1TopoMon.h:108
header
Definition: hcg.cxx:526
LVL1::L1CaloL1TopoMon::CALO_CONV
@ CALO_CONV
Definition: L1CaloL1TopoMon.h:63
LVL1::L1CaloL1TopoMon::MU_TOB
@ MU_TOB
Definition: L1CaloL1TopoMon.h:66
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
TH1F_LW::Fill
virtual void Fill(const double &x) override
Definition: TH1F_LW.cxx:246
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
L1Topo::L1TopoTOB
Represents the L1Topo TOB word of the L1Topo ROI data, with decode and encoder.
Definition: L1TopoTOB.h:17
L1Topo::getDecisionAndOverflowBits
std::pair< std::bitset< 128 >, std::bitset< 128 > > getDecisionAndOverflowBits(const L1TopoRDOCollection &)
Get the trigger decision and overflow bits from the L1Topo ROI data block 'L1Topo TOB' and order them...
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:169
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_DAQTobs
TH1F_LW * m_h_l1topo_1d_DAQTobs
Definition: L1CaloL1TopoMon.h:115
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
Fibre.h
python.LArCondContChannels.decoder
decoder
def channelSelection(self, channelList, groupType): if groupType == self.SingleGroup: pass elif group...
Definition: LArCondContChannels.py:618
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:74
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
RoIBResult.h
L1Topo::formatVecHex8
const std::string formatVecHex8(const std::vector< uint32_t > &vec)
Helper function to format a vector of 32-bit integers as 8-digit hex numbers for printing.
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:124
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
LVL1::L1CaloL1TopoMon::PAYL_CRC
@ PAYL_CRC
Definition: L1CaloL1TopoMon.h:64
index
Definition: index.py:1
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
LVL1::JEPRoIDecoder
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
Definition: JEPRoIDecoder.h:33
AthenaMonManager::cosmics
@ cosmics
Definition: AthenaMonManager.h:58
LVL1::TrigT1CaloDefs::CMXJetTobLocation
static const std::string CMXJetTobLocation
Definition: TrigT1CaloDefs.h:54
CPRoIDecoder.h
L1Topo::Status
Represents the L1Topo status word of the L1Topo DAQ header, with decoder and encoder.
Definition: Status.h:19
ITrigConfigSvc.h
BlockTypes.h
LVL1::L1CaloL1TopoMon::F_CRC
@ F_CRC
Definition: L1CaloL1TopoMon.h:64
TH1F_LW::SetBinContent
virtual void SetBinContent(unsigned bin, const double &) override
Definition: TH1F_LW.cxx:267
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:423
L1Topo::blockType
L1Topo::BlockTypes blockType(const uint32_t word, uint32_t offset=28, uint32_t size=0x0f)
Function to return the block type of a data word from L1Topo
Definition: BlockTypes.cxx:9
LVL1::L1CaloL1TopoMon::m_histTool
ToolHandle< TrigT1CaloLWHistogramTool > m_histTool
Histogram utilities tool.
Definition: L1CaloL1TopoMon.h:87
L1Topo::BlockTypes::JET2_TOB
@ JET2_TOB
mc.diff
diff
Definition: mc.SFGenPy8_MuMu_DD.py:14
L1Topo::BlockTypes::JET1_TOB
@ JET1_TOB
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
LVL1::TrigT1CaloDefs::CMXCPTobLocation
static const std::string CMXCPTobLocation
Definition: TrigT1CaloDefs.h:57
L1Topo::BlockTypes::MUON_TOB
@ MUON_TOB
LVL1::L1CaloL1TopoMon::m_topoCTPLoc
SG::ReadHandleKey< LVL1::FrontPanelCTP > m_topoCTPLoc
Definition: L1CaloL1TopoMon.h:92
ManagedMonitorToolBase::m_dataType
AthenaMonManager::DataType_t m_dataType
Definition: ManagedMonitorToolBase.h:901
LVL1::L1CaloL1TopoMon::m_h_l1topo_2d_Tobs_Hitmap_mismatch
TH2F_LW * m_h_l1topo_2d_Tobs_Hitmap_mismatch[TOB_TYPES]
Definition: L1CaloL1TopoMon.h:109
xAOD::CMXCPTob_v1
Description of CMXCPTob_v1.
Definition: CMXCPTob_v1.h:27
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
LVL1::L1CaloL1TopoMon::ERROR_LABELS
std::vector< std::string > ERROR_LABELS
Definition: L1CaloL1TopoMon.h:68
ITrigT1CaloMonErrorTool.h
LVL1::L1CaloL1TopoMon::CMX_MATCH
@ CMX_MATCH
Definition: L1CaloL1TopoMon.h:64
TrigT1CaloLWHistogramTool.h
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
LWHist::SetOption
void SetOption(const char *option=" ")
Definition: LWHist.cxx:460
TrigConf::L1DataDef::TOPO
@ TOPO
Definition: L1DataDef.h:36
L1Topo::BlockTypes::FIBRE
@ FIBRE
LVL1::L1CaloL1TopoMon::TOB_TYPES
static const int TOB_TYPES
Definition: L1CaloL1TopoMon.h:80
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
x
#define x
CMXCPTobContainer.h
L1Topo::BlockTypes::ENERGY_TOB
@ ENERGY_TOB
L1Topo::BlockTypes::STATUS
@ STATUS
python.Utilities.clone
clone
Definition: Utilities.py:134
CTP_Decoder
Definition: CTP_Decoder.h:142
LVL1::L1CaloL1TopoMon::ROI_CONV
@ ROI_CONV
Definition: L1CaloL1TopoMon.h:63
LVL1::L1CaloL1TopoMon::~L1CaloL1TopoMon
virtual ~L1CaloL1TopoMon()
Definition: L1CaloL1TopoMon.cxx:118
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_Simulation
TH1F_LW * m_h_l1topo_1d_Simulation
Definition: L1CaloL1TopoMon.h:107
L1Topo::Header
Represents the L1Topo header word of the L1Topo DAQ data, with decoder and encoder.
Definition: L1Topo/L1TopoRDO/L1TopoRDO/Header.h:18
ThresholdConfig.h
LVL1::L1CaloL1TopoMon::JETS_TOB
@ JETS_TOB
Definition: L1CaloL1TopoMon.h:66
CTP_BC::getTIP
const std::bitset< 512 > & getTIP() const
get bitset of TIP words
Definition: CTP_Decoder.h:81
LWHist::GetXaxis
LWHistAxis * GetXaxis()
Definition: LWHist.cxx:309
LVL1::FrontPanelCTP
Front panel input class to the CTP simulation.
Definition: FrontPanelCTP.h:35
Header.h
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_Errors
TH1F_LW * m_h_l1topo_1d_Errors
Definition: L1CaloL1TopoMon.h:113
LVL1::L1CaloL1TopoMon::m_h_l1topo_2d_Tobs_etaPhi_match
TH2F_LW * m_h_l1topo_2d_Tobs_etaPhi_match[TOB_TYPES]
Definition: L1CaloL1TopoMon.h:112
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::L1CaloL1TopoMon::m_PathInRootFile
std::string m_PathInRootFile
Root directory.
Definition: L1CaloL1TopoMon.h:95
ManagedMonitorToolBase::MonGroup
A container of information describing a monitoring object.
Definition: ManagedMonitorToolBase.h:138
LVL1::L1CaloL1TopoMon::m_h_l1topo_2d_Tobs_Hitmap_match
TH2F_LW * m_h_l1topo_2d_Tobs_Hitmap_match[TOB_TYPES]
Definition: L1CaloL1TopoMon.h:110
L1Topo::BlockTypes::EM_TOB
@ EM_TOB
LVL1::L1CaloL1TopoMon::m_errorTool
ToolHandle< ITrigT1CaloMonErrorTool > m_errorTool
Corrupt events tool.
Definition: L1CaloL1TopoMon.h:85
LVL1::L1CaloL1TopoMon::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: L1CaloL1TopoMon.cxx:393
LVL1::L1CaloL1TopoMon::m_h_l1topo_2d_ItemsBC_ratio
TH2F * m_h_l1topo_2d_ItemsBC_ratio[4][2]
Definition: L1CaloL1TopoMon.h:126
LVL1::L1CaloL1TopoMon::jem2Coord
void jem2Coord(const int crate, const int jem, const int frame, const int location, int &x, int &y, double &eta, double &phi)
Definition: L1CaloL1TopoMon.cxx:882
LVL1::CoordinateRange
CoordinateRange class declaration.
Definition: CoordinateRange.h:36
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
L1Topo::BlockTypes::TAU_TOB
@ TAU_TOB
ManagedMonitorToolBase::initialize
virtual StatusCode initialize()
Definition: ManagedMonitorToolBase.cxx:669
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
ROIB::RoIBResult::l1TopoResult
const std::vector< L1TopoResult > & l1TopoResult() const
Gets the L1Topo part of the L1 RDO.
Definition: RoIBResult.cxx:72
LVL1::L1CaloL1TopoMon::DAQ_CONV
@ DAQ_CONV
Definition: L1CaloL1TopoMon.h:63
lumiFormat.i
int i
Definition: lumiFormat.py:92
L1Topo::BlockTypes::L1TOPO_TOB
@ L1TOPO_TOB
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
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
python.sizes.location
string location
Definition: sizes.py:11
AthenaMonManager::online
@ online
Definition: AthenaMonManager.h:49
fitman.bx
bx
Definition: fitman.py:410
LVL1::L1CaloL1TopoMon::L1CaloL1TopoMon
L1CaloL1TopoMon(const std::string &type, const std::string &name, const IInterface *parent)
Definition: L1CaloL1TopoMon.cxx:72
CTP_BC
Definition: CTP_Decoder.h:17
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_ErrorsByLumiblock
TH1F_LW * m_h_l1topo_1d_ErrorsByLumiblock
Definition: L1CaloL1TopoMon.h:124
L1TopoRDOCollection.h
ManagedMonitorToolBase::ATTRIB_UNMANAGED
@ ATTRIB_UNMANAGED
Definition: ManagedMonitorToolBase.h:131
LVL1::L1CaloL1TopoMon::cpm2Coord
void cpm2Coord(const int crate, const int cpm, const int chip, const int location, int &x, int &y, double &eta, double &phi)
Definition: L1CaloL1TopoMon.cxx:896
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_CMXTobs
TH1F_LW * m_h_l1topo_1d_CMXTobs
Histos.
Definition: L1CaloL1TopoMon.h:106
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_DAQTauTobs
TH1F_LW * m_h_l1topo_1d_DAQTauTobs
Definition: L1CaloL1TopoMon.h:117
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
run
Definition: run.py:1
LVL1::FrontPanelCTP::cableWord0
uint32_t cableWord0(unsigned int clock) const
return the data that is sent on cable 0
Definition: FrontPanelCTP.cxx:56
IDPVM::binIndex
unsigned int binIndex(const T &val, const std::vector< T > &partitions)
general utility function to return bin index given a value and the upper endpoints of each bin
Definition: InDetPhysValMonitoringUtilities.h:43
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
LVL1::L1CaloL1TopoMon::m_h_l1topo_2d_ItemsBC
TH2F * m_h_l1topo_2d_ItemsBC[4]
Definition: L1CaloL1TopoMon.h:125
JEPRoIDecoder.h
xAOD::CMXJetTob_v1
Description of CMXJetTob_v1.
Definition: CMXJetTob_v1.h:27
TH2F::GetBinContent
double GetBinContent(int) const
Definition: rootspy.cxx:425
ManagedMonitorToolBase::m_environment
AthenaMonManager::Environment_t m_environment
Definition: ManagedMonitorToolBase.h:902
TrigConf::name
Definition: HLTChainList.h:35
LVL1::L1CaloL1TopoMon::NO_DAQ
@ NO_DAQ
Definition: L1CaloL1TopoMon.h:63
min
#define min(a, b)
Definition: cfImp.cxx:40
TH2F::SetBinContent
void SetBinContent(int, double)
Definition: rootspy.cxx:426
CMXJetTobContainer.h
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
L1TopoRDOCollection
Container of L1TopoRDOs (standard Athena boilerplate)
Definition: L1TopoRDOCollection.h:13
LVL1::L1CaloL1TopoMon::JETL_TOB
@ JETL_TOB
Definition: L1CaloL1TopoMon.h:66
LVL1::L1CaloL1TopoMon::NO_CMX
@ NO_CMX
Definition: L1CaloL1TopoMon.h:63
TH1F_LW::GetBinContent
virtual double GetBinContent(unsigned bin) const override
Definition: TH1F_LW.cxx:265
L1Topo::formatHex8
std::string formatHex8(uint32_t word)
Helper function to format a 32-bit integer as an 8-digit hex number for printing.
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:111
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
item
Definition: ItemListSvc.h:43
TrigT1CaloDefs.h
JetVoronoiDiagramHelpers::coord
double coord
Definition: JetVoronoiDiagramHelpers.h:45
CTP_RDO::getL1AcceptBunchPosition
uint32_t getL1AcceptBunchPosition() const
Definition: CTP_RDO.cxx:94
TriggerTest.ctp
ctp
Retrieve trigger EDM objects.
Definition: TriggerTest.py:14
L1Topo::Fibre
Represents the L1Topo fibre word of the L1Topo DAQ header, with decoder and encoder.
Definition: Fibre.h:22
CTP_RDO.h
LVL1::CPRoIDecoder
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
Definition: CPRoIDecoder.h:37
CTP_RDO
Definition: CTP_RDO.h:20
LVL1::L1CaloL1TopoMon::procHistograms
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
Definition: L1CaloL1TopoMon.cxx:849
y
#define y
python.compareTCTs.ratio
ratio
Definition: compareTCTs.py:295
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_DAQOverflowBits
TH1F_LW * m_h_l1topo_1d_DAQOverflowBits
Definition: L1CaloL1TopoMon.h:122
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_DAQMuonTobs
TH1F_LW * m_h_l1topo_1d_DAQMuonTobs
Definition: L1CaloL1TopoMon.h:119
CoordinateRange.h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ManagedMonitorToolBase::endOfRunFlag
bool endOfRunFlag() const
Definition: ManagedMonitorToolBase.h:859
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_DAQTriggerBits
TH1F_LW * m_h_l1topo_1d_DAQTriggerBits
Definition: L1CaloL1TopoMon.h:120
L1Topo::triggerBitIndex
unsigned int triggerBitIndex(uint32_t moduleId, const L1Topo::L1TopoTOB &)
OUT OF DATE DO NOT USE Helper to calculate the index needed to pack trigger bits into the full 128-bi...
Definition: Trigger/TrigT1/L1Topo/L1TopoRDO/src/Helpers.cxx:137
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Status.h
DEBUG
#define DEBUG
Definition: page_access.h:11
LVL1::L1CaloL1TopoMon::m_configSvc
ServiceHandle< TrigConf::ITrigConfigSvc > m_configSvc
Trigger configuration service.
Definition: L1CaloL1TopoMon.h:83
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
L1CaloL1TopoMon.h
L1Topo::BlockTypes::HEADER
@ HEADER
LVL1::L1CaloL1TopoMon::initialize
virtual StatusCode initialize()
Definition: L1CaloL1TopoMon.cxx:124
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
L1TopoTOB.h
merge.status
status
Definition: merge.py:17
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_DAQMismatchTriggerBits
TH1F_LW * m_h_l1topo_1d_DAQMismatchTriggerBits
Definition: L1CaloL1TopoMon.h:121
makeTOC.header
header
Definition: makeTOC.py:28
LVL1::L1CaloL1TopoMon::NO_ROI
@ NO_ROI
Definition: L1CaloL1TopoMon.h:64
ManagedMonitorToolBase::newLumiBlockFlag
bool newLumiBlockFlag() const
Definition: ManagedMonitorToolBase.h:853
L1Topo
Definition: BlockTypes.h:11
SG::get
const T * get(const ReadHandleKey< T > &key)
Convenience function to retrieve an object given a ReadHandleKey.
set_intersection
Set * set_intersection(Set *set1, Set *set2)
Perform an intersection of two sets.
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
LVL1::L1CaloL1TopoMon::m_debug
bool m_debug
Debug printout flag.
Definition: L1CaloL1TopoMon.h:97
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_DAQJetTobs
TH1F_LW * m_h_l1topo_1d_DAQJetTobs
Definition: L1CaloL1TopoMon.h:116
LWHist.h
Helpers.h
LVL1::L1CaloL1TopoMon::m_h_l1topo_2d_Tobs_etaPhi_mismatch
TH2F_LW * m_h_l1topo_2d_Tobs_etaPhi_mismatch[TOB_TYPES]
Definition: L1CaloL1TopoMon.h:111
LVL1::L1CaloL1TopoMon::MAXTOBS
static const int MAXTOBS
Definition: L1CaloL1TopoMon.h:81
LVL1::L1CaloL1TopoMon::m_h_l1topo_1d_Overflows
TH1F_LW * m_h_l1topo_1d_Overflows
Definition: L1CaloL1TopoMon.h:114
LVL1::L1CaloL1TopoMon::m_histBooked
bool m_histBooked
Histograms booked flag.
Definition: L1CaloL1TopoMon.h:99
LVL1::L1CaloL1TopoMon::TAU_TOB
@ TAU_TOB
Definition: L1CaloL1TopoMon.h:66
ManagedMonitorToolBase::newRunFlag
bool newRunFlag() const
Definition: ManagedMonitorToolBase.h:854