ATLAS Offline Software
L1JetCMXTools.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 #include <algorithm>
5 #include <map>
6 #include <numeric>
7 #include <sstream>
8 
9 #include "GaudiKernel/MsgStream.h"
14 #include "TrigConfL1Data/Menu.h"
18 
22 #include "TrigT1CaloEvent/JetROI.h"
23 #include "L1JetCMXTools.h"
29 
30 namespace LVL1 {
31 
34 L1JetCMXTools::L1JetCMXTools(const std::string &type, const std::string &name,
35  const IInterface *parent)
37  m_crates(2),
38  m_modules(16), m_maxTobs(4), m_sysCrate(1), m_debug(false) {
39  declareInterface<IL1JetCMXTools>(this);
40 }
41 
45 
50 
52 
53  return StatusCode::SUCCESS;
54 }
55 
59  xAOD::CMXJetTobContainer *cmxTobVec) const {
60  std::vector<const xAOD::JEMTobRoIContainer *> jemRoiColls(1, jemRoiVec);
61  formCMXJetTob(jemRoiColls, cmxTobVec, 0);
62 }
63 
65  const std::vector<const xAOD::JEMTobRoIContainer *> &jemRoiColls,
66  xAOD::CMXJetTobContainer *cmxTobVec, int peak) const {
67  std::map<uint32_t, const xAOD::JEMTobRoI *> jemRoiMap;
68  std::map<int, xAOD::CMXJetTob *> cmxTobMap;
70  int timeslices = jemRoiColls.size();
71  for (int slice = 0; slice < timeslices; ++slice) {
72  const xAOD::JEMTobRoIContainer *jemRoiVec = jemRoiColls[slice];
73  jemRoiMap.clear();
74  std::vector<unsigned int> presenceMaps(m_crates * m_modules);
75  std::vector<int> tobCount(m_crates * m_modules);
78  for (; it != itE; ++it) { // get sorted list
79  const xAOD::JEMTobRoI *roi = *it;
80  const int crate = roi->crate();
81  const int jem = roi->jem();
82  const int index = crate * m_modules + jem;
83  const int presenceBit = roi->frame(); // <<== CHECK
84  presenceMaps[index] |= (1 << presenceBit);
85  tobCount[index]++;
86  uint32_t key = roi->roiWord();
87  jemRoiMap.insert(std::make_pair(key, roi));
88  }
89  std::map<uint32_t, const xAOD::JEMTobRoI *>::const_iterator mit =
90  jemRoiMap.begin();
91  std::map<uint32_t, const xAOD::JEMTobRoI *>::const_iterator mitE =
92  jemRoiMap.end();
93  for (; mit != mitE; ++mit) {
94  const xAOD::JEMTobRoI *roi = mit->second;
95  const int crate = roi->crate();
96  const int jem = roi->jem();
97  const int frame = roi->frame();
98  const int loc = roi->location();
99  const int index = crate * m_modules + jem;
100  const int energyLg = roi->energyLarge();
101  const int energySm = roi->energySmall();
102  const unsigned int presence = presenceMaps[index];
103  int error = 0;
104  if (tobCount[index] > m_maxTobs) { // overflow
105  int count = 0;
106  for (int bit = 0; bit <= frame; ++bit)
107  count += (presence >> bit) & 0x1;
108  if (count > m_maxTobs)
109  continue;
112  error = err.error();
113  }
114  const int key = (((((crate << 4) | jem) << 3) | frame) << 2) | loc;
115  xAOD::CMXJetTob *tob = 0;
116  std::map<int, xAOD::CMXJetTob *>::iterator xit = cmxTobMap.find(key);
117  if (xit == cmxTobMap.end()) {
118  tob = new xAOD::CMXJetTob;
119  tob->makePrivateStore();
120  tob->initialize(crate, jem, frame, loc);
121  if (timeslices > 0) { // TODO(amazurov): need to check >1 or >0
122  std::vector<uint16_t> vecU16(timeslices);
123  std::vector<uint32_t> vecU32(timeslices);
124  tob->addTob(vecU16, vecU16, vecU32, vecU16);
125  tob->setPeak(peak);
126  }
127  cmxTobMap.insert(std::make_pair(key, tob));
128  cmxTobVec->push_back(tob);
129  } else
130  tob = xit->second;
131  std::vector<uint16_t> energyLgVec(tob->energyLargeVec());
132  std::vector<uint16_t> energySmVec(tob->energySmallVec());
133  std::vector<uint32_t> errorVec(tob->errorVec());
134  std::vector<uint16_t> presenceMapVec(tob->presenceMapVec());
135  energyLgVec[slice] = energyLg;
136  energySmVec[slice] = energySm;
137  errorVec[slice] = error;
138  presenceMapVec[slice] = presence;
139  tob->addTob(energyLgVec, energySmVec, errorVec, presenceMapVec);
140  }
141  }
142 }
143 
145  const xAOD::CMXJetTobContainer *cmxTobVec,
146  xAOD::CMXJetHitsContainer *cmxHitsVec) const {
150 
151  formCMXJetHitsCrate(cmxTobVec, cmxHitsCrate);
152  formCMXJetHitsSystem(cmxHitsCrate, cmxHitsSys);
153  formCMXJetHitsTopo(cmxTobVec, cmxHitsTopo);
154 
155  mergeCMXJetHits(cmxHitsVec, cmxHitsCrate);
156  mergeCMXJetHits(cmxHitsVec, cmxHitsSys);
157  mergeCMXJetHits(cmxHitsVec, cmxHitsTopo);
158 
159  delete cmxHitsCrate;
160  delete cmxHitsSys;
161  delete cmxHitsTopo;
162 }
163 
165  const xAOD::CMXJetTobContainer *cmxTobVec,
166  xAOD::CMXJetHitsContainer *cmxHitsCrate) const {
167  int peakm = 0;
168  std::vector<HitsVector> hitVecM(2 * m_crates);
169  std::vector<HitsVector> hitVecF(2 * m_crates);
170  std::vector<ErrorVector> errVecM(2 * m_crates); // Need overflow
171  std::vector<ErrorVector> errVecF(2 * m_crates);
172  HitsVector hit10, hit20;
173  HitsVector hit11, hit21;
175  xAOD::CMXJetTobContainer::const_iterator pose = cmxTobVec->end();
176  for (; pos != pose; ++pos) {
177  const xAOD::CMXJetTob *tob = *pos;
178  const int index = 2 * tob->crate();
179  const std::vector<uint32_t> error(tob->errorVec());
180  hit10.clear();
181  hit11.clear();
182  hit20.clear();
183  hit21.clear();
184  getHits(tob, hit10, hit11, hit20, hit21);
185 
186  addCMXJetHits(hitVecM[index], hit10, MAIN_HITS);
187  addCMXJetHits(hitVecM[index + 1], hit11, MAIN_HITS);
188  addCMXJetHits(hitVecF[index], hit20, FORWARD_HITS);
189  addCMXJetHits(hitVecF[index + 1], hit21, FORWARD_HITS);
190 
191  addOverflow(errVecF[index], error);
192  addOverflow(errVecF[index + 1], error);
193  addOverflow(errVecM[index], error);
194  addOverflow(errVecM[index + 1], error);
195  const int peak = tob->peak();
196  if (peak > peakm)
197  peakm = peak;
198  }
199  // Save non-zero crate totals
200  for (int crate = 0; crate < m_crates; ++crate) {
201  const int index = crate * 2;
202  saveCMXJetHits(cmxHitsCrate, hitVecM[index], hitVecM[index + 1],
203  errVecM[index], errVecM[index + 1], crate,
205  saveCMXJetHits(cmxHitsCrate, hitVecF[index], hitVecF[index + 1],
206  errVecF[index], errVecF[index + 1], crate,
208  if (crate != m_sysCrate) { // REMOTE totals
209  saveCMXJetHits(cmxHitsCrate, hitVecM[index], hitVecM[index + 1],
210  errVecM[index], errVecM[index + 1], m_sysCrate,
212  saveCMXJetHits(cmxHitsCrate, hitVecF[index], hitVecF[index + 1],
213  errVecF[index], errVecF[index + 1], m_sysCrate,
215  }
216  }
217 }
218 
220  const xAOD::CMXJetHitsContainer *cmxHitsCrate,
221  xAOD::CMXJetHitsContainer *cmxHitsSys) const {
222  int peakm = 0;
223  HitsVector systemMain0(1);
224  HitsVector systemMain1(1);
225  HitsVector systemFwd0(1);
226  HitsVector systemFwd1(1);
227  ErrorVector errVec(1);
229  xAOD::CMXJetHitsContainer::const_iterator pose = cmxHitsCrate->end();
230  for (; pos != pose; ++pos) {
231  const xAOD::CMXJetHits *hits = *pos;
232  if (hits->crate() != m_sysCrate)
233  continue;
234  int source = hits->sourceComponent();
235  if (source != xAOD::CMXJetHits::LOCAL_MAIN &&
237  source != xAOD::CMXJetHits::REMOTE_MAIN &&
239  continue;
240  int peak = hits->peak();
241  if (peak > peakm)
242  peakm = peak;
243  HitsVector hitsVec0(hits->hitsVec0());
244  HitsVector hitsVec1(hits->hitsVec1());
245  if (source == xAOD::CMXJetHits::LOCAL_MAIN ||
246  source == xAOD::CMXJetHits::REMOTE_MAIN) {
247  addCMXJetHits(systemMain0, hitsVec0, MAIN_HITS);
248  addCMXJetHits(systemMain1, hitsVec1, MAIN_HITS);
249  } else {
250  addCMXJetHits(systemFwd0, hitsVec0, FORWARD_HITS);
251  addCMXJetHits(systemFwd1, hitsVec1, FORWARD_HITS);
252  }
253  ErrorVector error(hits->errorVec0()); // all have same error so redundant?
254  addOverflow(errVec, error);
255  }
256  // Save non-zero system totals
257  saveCMXJetHits(cmxHitsSys, systemMain0, systemMain1, errVec, errVec,
259  saveCMXJetHits(cmxHitsSys, systemFwd0, systemFwd1, errVec, errVec, m_sysCrate,
261 }
262 
264  const xAOD::CMXJetTobContainer *cmxTobVec,
265  xAOD::CMXJetHitsContainer *cmxHitsTopo) const {
266  int peakm = 0;
267  int timeslices = 0;
268  std::vector<HitsVector> hitVec(4 * m_crates);
270  xAOD::CMXJetTobContainer::const_iterator pose = cmxTobVec->end();
271  for (; pos != pose; ++pos) {
272  const xAOD::CMXJetTob *tob = *pos;
273  const int crate = tob->crate();
274  const int jem = tob->jem();
275  const int frame = tob->frame();
276  const int loc = tob->location();
277  const int index = crate * 4;
278  const std::vector<int> energyLg(tob->energyLargeVec().begin(),
279  tob->energyLargeVec().end());
280  const std::vector<int> energySm(tob->energySmallVec().begin(),
281  tob->energySmallVec().end());
282  // const std::vector<int>& error(tob->errorVec());
283  timeslices = energyLg.size();
284  HitsVector &checksum(hitVec[index]);
285  HitsVector &map(hitVec[index + 1]);
286  HitsVector &countsLow(hitVec[index + 2]);
287  HitsVector &countsHigh(hitVec[index + 3]);
288  checksum.resize(timeslices);
289  map.resize(timeslices);
290  countsLow.resize(timeslices);
291  countsHigh.resize(timeslices);
292  for (int slice = 0; slice < timeslices; ++slice) {
293  if (energyLg[slice] == 0 && energySm[slice] == 0)
294  continue;
295  // checksum
296  // LVL1::DataError err(error[slice]);
297  // const int overflow = err.get(LVL1::DataError::Overflow);
298  const int overflow = 0; // don't include overflow as not in slink data
299  checksum[slice] +=
300  jem + frame + loc + energyLg[slice] + energySm[slice] + overflow;
301  checksum[slice] &= 0xffff;
302  // occupancy map
303  map[slice] |= (1 << jem);
304  // occupancy counts
305  if (jem < 8) {
306  countsLow[slice] += (1 << (3 * jem)); // can't saturate
307  } else {
308  countsHigh[slice] += (1 << (3 * (jem - 8)));
309  }
310  }
311  const int peak = tob->peak();
312  if (peak > peakm)
313  peakm = peak;
314  }
315  // Save non-zero crate totals
316  HitsVector dummy(timeslices);
317  ErrorVector dummyE(timeslices);
318  for (int crate = 0; crate < m_crates; ++crate) {
319  const int index = crate * 4;
320  saveCMXJetHits(cmxHitsTopo, hitVec[index], dummy, dummyE, dummyE, crate,
322  saveCMXJetHits(cmxHitsTopo, hitVec[index + 1], dummy, dummyE, dummyE, crate,
324  saveCMXJetHits(cmxHitsTopo, hitVec[index + 2], hitVec[index + 3], dummyE,
326  peakm);
327  }
328 }
329 
331  HitsVector &hit11, HitsVector &hit20,
332  HitsVector &hit21) const {
333  using namespace TrigConf;
334  const std::vector<uint16_t> &energyLg(tob->energyLargeVec());
335  const std::vector<uint16_t> &energySm(tob->energySmallVec());
336  const int timeslices = energyLg.size();
337  auto err = LVL1::DataError(tob->error());
338 
339  hit10.assign(timeslices, 0);
340  hit11.assign(timeslices, 0);
341  hit20.assign(timeslices, 0);
342  hit21.assign(timeslices, 0);
343 
344  for (int slice = 0; slice < timeslices; ++slice) {
345  if (err.get(LVL1::DataError::Overflow)) {
346  hit10[slice] = 0x7fff;
347  hit11[slice] = 0x7fff;
348  hit20[slice] = 0xffff;
349  hit21[slice] = 0x3fff;
350  continue;
351  }
352 
353  if (energyLg[slice] == 0 && energySm[slice] == 0)
354  continue;
355 
356  xAOD::JEMTobRoI tobRoi;
357  tobRoi.makePrivateStore();
358  tobRoi.initialize(tob->crate(), tob->jem(), tob->frame(), tob->location(),
359  energyLg[slice], energySm[slice]);
360 
361  auto l1Menu = SG::makeHandle( m_L1MenuKey );
362  LVL1::RecJetRoI roi(tobRoi.roiWord(), &(*l1Menu));
363 
364  unsigned int numThresholdsHalf = 5;
365  unsigned int numBitsPerCounter = 3;
366 
367  for (unsigned int i = 0; i < numThresholdsHalf * 2; ++i) {
368  if (roi.passedThreshold(i)) {
369  HitsVector &hit = i < numThresholdsHalf ? hit10 : hit11;
370  unsigned int ibit = i < numThresholdsHalf ? i : i - numThresholdsHalf;
371  hit[slice] |= (1 << (ibit * numBitsPerCounter));
372  }
373  }
374 
375  numThresholdsHalf = 8;
376  numBitsPerCounter = 2;
377 
378  for (unsigned int i = 0; i < numThresholdsHalf * 2; ++i) {
379  if (roi.passedThreshold(10 + i)) {
380  HitsVector &hit = i < numThresholdsHalf ? hit20 : hit21;
381  unsigned int ibit = i < numThresholdsHalf ? i : i - numThresholdsHalf;
382  hit[slice] |= (1 << (ibit * numBitsPerCounter));
383  }
384  }
385 
386  } // end slice for-loop
387 }
388 
392  const ErrorVector &tobErr) const {
393  const int timeslices = tobErr.size();
394  hitErr.resize(timeslices);
395  for (int slice = 0; slice < timeslices; ++slice) {
396  int error = tobErr[slice];
397  if (error) {
399  int overflow = err.get(LVL1::DataError::Overflow);
400  LVL1::DataError err2;
401  err2.set(LVL1::DataError::Overflow, overflow);
402  hitErr[slice] |= err2.error();
403  }
404  }
405 }
406 
410  HitsType type) const {
411  int size1 = vec1.size();
412  int size2 = vec2.size();
413  if (size1 < size2)
414  vec1.resize(size2);
415  HitsVector::iterator pos1 = vec1.begin();
416  HitsVector::iterator pose1 = vec1.end();
417  HitsVector::const_iterator pos2 = vec2.begin();
418  HitsVector::const_iterator pose2 = vec2.end();
419  for (; pos1 != pose1 && pos2 != pose2; ++pos1, ++pos2) {
420  if (type == MAIN_HITS)
421  *pos1 = addHits(*pos1, *pos2, 15, 15, 5);
422  else
423  *pos1 = addHits(*pos1, *pos2, 16, 16, 8);
424  }
425 }
426 
429 unsigned int L1JetCMXTools::addHits(unsigned int hitMult, unsigned int hitVec,
430  int multBits, int vecBits,
431  int nthresh) const {
432  if (m_debug)
433  msg(MSG::DEBUG) << "addHits: Original hitMult = " << std::hex << hitMult
434  << ". Add hitWord = " << hitVec << std::dec << endmsg;
435 
436  int nbitsOut = multBits / nthresh;
437  int nbitsIn = vecBits / nthresh;
438 
439  if (m_debug)
440  msg(MSG::DEBUG) << " Bits per threshold = " << nbitsOut << endmsg;
441 
442  int max = (1 << nbitsOut) - 1;
443  unsigned int multMask = max;
444  unsigned int hitMask = (1 << nbitsIn) - 1;
445  unsigned int shift = 0;
446 
447  unsigned int hits = 0;
448 
449  for (int i = 0; i < nthresh; i++) {
450  int mult = (hitMult & multMask) + (hitVec & hitMask);
451  mult = ((mult <= max) ? mult : max);
452  hits += (mult << shift);
453 
454  hitMult >>= nbitsOut;
455  hitVec >>= nbitsIn;
456  shift += nbitsOut;
457  }
458 
459  if (m_debug)
460  msg(MSG::DEBUG) << "addHits returning hitMult = " << std::hex << hits
461  << std::dec << endmsg;
462 
463  return hits;
464 }
465 
469  xAOD::CMXJetHitsContainer *cmxHitsVec1,
470  xAOD::CMXJetHitsContainer *cmxHitsVec2) const {
471  int size = cmxHitsVec2->size();
472  for (int index = 0; index < size; ++index) {
473  xAOD::CMXJetHits *hitsIn = 0;
474  xAOD::CMXJetHits *hitsOut = 0;
475  cmxHitsVec2->swapElement(index, hitsIn, hitsOut);
476  cmxHitsVec1->push_back(hitsOut);
477  }
478  cmxHitsVec2->clear();
479 }
480 
484  const HitsVector &hits0,
485  const HitsVector &hits1,
486  const ErrorVector &err0,
487  const ErrorVector &err1, int crate,
488  int source, int peak) const {
489  if (std::accumulate(hits0.begin(), hits0.end(), 0) ||
490  std::accumulate(hits1.begin(), hits1.end(), 0)) {
492  item->makePrivateStore();
493  item->initialize(crate, source, hits0, hits1, err0, err1, peak);
494  cmxHitsVec->push_back(item);
495  }
496 }
497 
498 } // end of namespace
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::JEMTobRoI_v1::energyLarge
int energyLarge() const
Return energy large window size.
Definition: JEMTobRoI_v1.cxx:61
xAOD::CMXJetHits_v1::TOPO_CHECKSUM
@ TOPO_CHECKSUM
Definition: CMXJetHits_v1.h:39
xAOD::CMXJetHits_v1::TOPO_OCCUPANCY_MAP
@ TOPO_OCCUPANCY_MAP
Definition: CMXJetHits_v1.h:40
LVL1::L1JetCMXTools::formCMXJetHitsTopo
virtual void formCMXJetHitsTopo(const xAOD::CMXJetTobContainer *cmxTobVec, xAOD::CMXJetHitsContainer *cmxHitsTopo) const
form partial CMX-Jet hits (topo) from system CMX-Jet TOBs
Definition: L1JetCMXTools.cxx:263
CTPConfig.h
xAOD::CMXJetTob_v1::energyLargeVec
const std::vector< uint16_t > & energyLargeVec() const
get energyLargeVec
D3PDMakerTestInstan::vec2
std::vector< D3PDTest::MyVec2 > vec2
Definition: D3PDMakerTestDict.h:14
xAOD::CMXJetHits_v1
Description of CMXJetHits_v1.
Definition: CMXJetHits_v1.h:30
xAOD::CMXJetHits_v1::REMOTE_MAIN
@ REMOTE_MAIN
Definition: CMXJetHits_v1.h:33
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::CMXJetTob_v1::addTob
void addTob(const std::vector< uint16_t > &energyLargeVec, const std::vector< uint16_t > &energySmallVec, const std::vector< uint32_t > &errorVec, const std::vector< uint16_t > &presenceMapVec)
add data to existing object
Definition: CMXJetTob_v1.cxx:50
LVL1::DataError
Error data.
Definition: DataError.h:27
max
#define max(a, b)
Definition: cfImp.cxx:41
LVL1::RecJetRoI
This class defines the reconstructed em/tau hadron ROI.
Definition: RecJetRoI.h:39
xAOD::CMXJetTob_v1::peak
uint8_t peak() const
get peak
LVL1::L1JetCMXTools::m_modules
int m_modules
Number of JEM modules per crate.
Definition: L1JetCMXTools.h:105
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
index
Definition: index.py:1
LVL1::L1JetCMXTools::initialize
virtual StatusCode initialize()
standard Athena-Algorithm method
Definition: L1JetCMXTools.cxx:48
LVL1::L1JetCMXTools::m_L1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
Definition: L1JetCMXTools.h:101
LVL1::L1JetCMXTools::addCMXJetHits
void addCMXJetHits(HitsVector &vec1, const HitsVector &vec2, HitsType type) const
Add hits from second vector to first.
Definition: L1JetCMXTools.cxx:409
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
xAOD::CMXJetTob_v1::jem
uint8_t jem() const
get jem
skel.it
it
Definition: skel.GENtoEVGEN.py:423
xAOD::CMXJetTob_v1::crate
uint8_t crate() const
get crate
xAOD::JEMTobRoI_v1::jem
int jem() const
Return JEM number (0-15)
Definition: JEMTobRoI_v1.cxx:43
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
Menu.h
LVL1::CMXJetHits::TOTAL_FORWARD
@ TOTAL_FORWARD
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:33
CMXJetTob.h
LVL1::CMXJetHits::TOTAL_MAIN
@ TOTAL_MAIN
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:30
LVL1::L1JetCMXTools::getHits
void getHits(const xAOD::CMXJetTob *tob, HitsVector &hit10, HitsVector &hit11, HitsVector &hit20, HitsVector &hit21) const
Get hit map.
Definition: L1JetCMXTools.cxx:330
LVL1::L1JetCMXTools::m_debug
bool m_debug
Debug flag.
Definition: L1JetCMXTools.h:111
DataVector::swapElement
void swapElement(size_type index, value_type newElem, reference oldElem)
Swap one element out of the container.
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::L1JetCMXTools::HitsType
HitsType
Definition: L1JetCMXTools.h:74
xAOD::CMXJetTob_v1::energySmallVec
const std::vector< uint16_t > & energySmallVec() const
get energySmallVec
JetROI.h
xAOD::JEMTobRoI_v1::energySmall
int energySmall() const
Return energy small window size.
Definition: JEMTobRoI_v1.cxx:67
LVL1::L1JetCMXTools::mergeCMXJetHits
void mergeCMXJetHits(xAOD::CMXJetHitsContainer *cmxHitsVec1, xAOD::CMXJetHitsContainer *cmxHitsVec2) const
Merge CMX-Jet hits vectors.
Definition: L1JetCMXTools.cxx:468
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
xAOD::CMXJetHitsContainer
CMXJetHitsContainer_v1 CMXJetHitsContainer
Define the latest version of the CMXJetHits class.
Definition: CMXJetHitsContainer.h:18
TruthTest.itE
itE
Definition: TruthTest.py:25
ThresholdConfig.h
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:269
xAOD::JEMTobRoI_v1::frame
int frame() const
Return RoI frame number (0-7)
Definition: JEMTobRoI_v1.cxx:49
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
xAOD::CMXJetTob
CMXJetTob_v1 CMXJetTob
Define the latest version of the CMXJetTob class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CMXJetTob.h:17
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
LVL1::L1JetCMXTools::MAIN_HITS
@ MAIN_HITS
Definition: L1JetCMXTools.h:74
LVL1::L1JetCMXTools::HitsVector
std::vector< uint32_t > HitsVector
Definition: L1JetCMXTools.h:76
xAOD::CMXJetHits_v1::TOPO_OCCUPANCY_COUNTS
@ TOPO_OCCUPANCY_COUNTS
Definition: CMXJetHits_v1.h:41
L1JetCMXTools.h
LVL1::DataError::Overflow
@ Overflow
Definition: DataError.h:31
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:193
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
lumiFormat.i
int i
Definition: lumiFormat.py:92
LVL1::L1JetCMXTools::addHits
unsigned int addHits(unsigned int hitMult, unsigned int hitVec, int multBits, int vecBits, int nthresh) const
Increment JEM/CMX hit word.
Definition: L1JetCMXTools.cxx:429
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
CaloInfo.h
LVL1::DataError::set
void set(ErrorBit bit, int value=1)
Set an error bit or data.
Definition: DataError.cxx:28
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
CMXJetHits.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::L1JetCMXTools::formCMXJetHits
virtual void formCMXJetHits(const xAOD::CMXJetTobContainer *cmxTobVec, xAOD::CMXJetHitsContainer *cmxHitsVec) const
form complete CMX-Jet hits from CMX-Jet TOBs
Definition: L1JetCMXTools.cxx:144
xAOD::CMXJetHits_v1::LOCAL_MAIN
@ LOCAL_MAIN
Definition: CMXJetHits_v1.h:34
LVL1::L1JetCMXTools::m_crates
int m_crates
Number of crates.
Definition: L1JetCMXTools.h:103
JEMTobRoI.h
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
JetThresholdValue.h
TriggerThreshold.h
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
TriggerThresholdValue.h
LVL1::L1JetCMXTools::~L1JetCMXTools
virtual ~L1JetCMXTools()
default destructor
Definition: L1JetCMXTools.cxx:44
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
JEPRoIDecoder.h
xAOD::CMXJetTob_v1
Description of CMXJetTob_v1.
Definition: CMXJetTob_v1.h:27
DataVector::clear
void clear()
Erase all the elements in the collection.
DataError.h
TrigConf::name
Definition: HLTChainList.h:35
LVL1::DataError::error
int error() const
Return the full error word.
Definition: DataError.h:78
xAOD::CMXJetHits_v1::REMOTE_FORWARD
@ REMOTE_FORWARD
Definition: CMXJetHits_v1.h:36
xAOD::CMXJetTob_v1::frame
uint8_t frame() const
get frame
LVL1::RecJetRoI::passedThreshold
bool passedThreshold(unsigned int thresholdNumber) const
returns TRUE if threshold number threshold_number has been passed by this ROI.
Definition: RecJetRoI.cxx:320
xAOD::JEMTobRoI_v1::location
int location() const
Return location (RoI local coords) (0-3)
Definition: JEMTobRoI_v1.cxx:55
xAOD::CMXJetTob_v1::error
uint32_t error() const
get errorVec at peak bunch crossing
Definition: CMXJetTob_v1.cxx:88
LVL1::L1JetCMXTools::ErrorVector
std::vector< uint32_t > ErrorVector
Definition: L1JetCMXTools.h:77
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:172
item
Definition: ItemListSvc.h:43
TrigT1CaloDefs.h
xAOD::CMXJetTob_v1::initialize
virtual void initialize(const uint8_t crate, const uint8_t jem, const uint8_t frame, const uint8_t loc)
initialize
Definition: CMXJetTob_v1.cxx:21
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LVL1::L1JetCMXTools::addOverflow
void addOverflow(ErrorVector &hitErr, const ErrorVector &tobErr) const
Add overflow bit.
Definition: L1JetCMXTools.cxx:391
L1DataDef.h
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
xAOD::JEMTobRoI_v1::roiWord
uint32_t roiWord() const
get roiWord
DeMoScan.index
string index
Definition: DeMoScan.py:362
LVL1::L1JetCMXTools::L1JetCMXTools
L1JetCMXTools(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: L1JetCMXTools.cxx:34
xAOD::JEMTobRoI_v1
Description of JEMTobRoI_v1.
Definition: JEMTobRoI_v1.h:25
xAOD::CMXJetTob_v1::presenceMapVec
const std::vector< uint16_t > & presenceMapVec() const
get presenceMapVec
CoordinateRange.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
xAOD::CMXJetTob_v1::location
uint8_t location() const
get location
xAOD::JEMTobRoI_v1::initialize
virtual void initialize(const int crate, const int jem, const int frame, const int location, const int energyLarge, const int energySmall)
Definition: JEMTobRoI_v1.cxx:23
LVL1::L1JetCMXTools::saveCMXJetHits
void saveCMXJetHits(xAOD::CMXJetHitsContainer *cmxHitsVec, const HitsVector &hits0, const HitsVector &hits1, const ErrorVector &err0, const ErrorVector &err1, int crate, int source, int peak) const
Save non-zero CMX-Jet hits.
Definition: L1JetCMXTools.cxx:483
xAOD::CMXJetTob_v1::errorVec
const std::vector< uint32_t > & errorVec() const
get errorVec
LVL1::L1JetCMXTools::FORWARD_HITS
@ FORWARD_HITS
Definition: L1JetCMXTools.h:74
LVL1::L1JetCMXTools::m_sysCrate
int m_sysCrate
System crate number.
Definition: L1JetCMXTools.h:109
AthAlgTool
Definition: AthAlgTool.h:26
get_generator_info.error
error
Definition: get_generator_info.py:40
LVL1::L1JetCMXTools::formCMXJetTob
virtual void formCMXJetTob(const xAOD::JEMTobRoIContainer *jemRoiVec, xAOD::CMXJetTobContainer *cmxTobVec) const
form CMX-Jet TOBs from RoIs - single slice
Definition: L1JetCMXTools.cxx:58
error
Definition: IImpactPoint3dEstimator.h:70
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
LVL1::L1JetCMXTools::formCMXJetHitsSystem
virtual void formCMXJetHitsSystem(const xAOD::CMXJetHitsContainer *cmxHitsCrate, xAOD::CMXJetHitsContainer *cmxHitsSys) const
form partial CMX-Jet hits (system) from crate CMX-Jet hits
Definition: L1JetCMXTools.cxx:219
xAOD::JEMTobRoI_v1::crate
int crate() const
Return crate number (0-1)
Definition: JEMTobRoI_v1.cxx:37
xAOD::CMXJetHits
CMXJetHits_v1 CMXJetHits
Define the latest version of the CMXJetHits class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CMXJetHits.h:20
RecJetRoI.h
xAOD::CMXJetTob_v1::setPeak
void setPeak(uint8_t)
set peak
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
xAOD::CMXJetHits_v1::LOCAL_FORWARD
@ LOCAL_FORWARD
Definition: CMXJetHits_v1.h:37
LVL1::L1JetCMXTools::m_maxTobs
int m_maxTobs
Maximum number of TOBs per module to CMXs.
Definition: L1JetCMXTools.h:107
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
LVL1::L1JetCMXTools::formCMXJetHitsCrate
virtual void formCMXJetHitsCrate(const xAOD::CMXJetTobContainer *cmxTobVec, xAOD::CMXJetHitsContainer *cmxHitsCrate) const
form partial CMX-Jet hits (crate) from CMX-Jet TOBs
Definition: L1JetCMXTools.cxx:164