ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LVL1::L1JetCMXTools Class Reference

#include <L1JetCMXTools.h>

Inheritance diagram for LVL1::L1JetCMXTools:
Collaboration diagram for LVL1::L1JetCMXTools:

Public Member Functions

 L1JetCMXTools (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor. More...
 
virtual ~L1JetCMXTools ()
 default destructor More...
 
virtual StatusCode initialize ()
 standard Athena-Algorithm method More...
 
virtual void formCMXJetTob (const xAOD::JEMTobRoIContainer *jemRoiVec, xAOD::CMXJetTobContainer *cmxTobVec) const
 form CMX-Jet TOBs from RoIs - single slice More...
 
virtual void formCMXJetTob (const std::vector< const xAOD::JEMTobRoIContainer * > &jemRoiColls, xAOD::CMXJetTobContainer *cmxTobVec, int peak) const
 form CMX-Jet TOBs from RoIs - multiple slices More...
 
virtual void formCMXJetHits (const xAOD::CMXJetTobContainer *cmxTobVec, xAOD::CMXJetHitsContainer *cmxHitsVec) const
 form complete CMX-Jet hits from CMX-Jet TOBs More...
 
virtual void formCMXJetHitsCrate (const xAOD::CMXJetTobContainer *cmxTobVec, xAOD::CMXJetHitsContainer *cmxHitsCrate) const
 form partial CMX-Jet hits (crate) from CMX-Jet TOBs More...
 
virtual void formCMXJetHitsSystem (const xAOD::CMXJetHitsContainer *cmxHitsCrate, xAOD::CMXJetHitsContainer *cmxHitsSys) const
 form partial CMX-Jet hits (system) from crate CMX-Jet hits More...
 
virtual void formCMXJetHitsTopo (const xAOD::CMXJetTobContainer *cmxTobVec, xAOD::CMXJetHitsContainer *cmxHitsTopo) const
 form partial CMX-Jet hits (topo) from system CMX-Jet TOBs More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

enum  HitsType { MAIN_HITS, FORWARD_HITS }
 
typedef std::vector< uint32_t > HitsVector
 
typedef std::vector< uint32_t > ErrorVector
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void getHits (const xAOD::CMXJetTob *tob, HitsVector &hit10, HitsVector &hit11, HitsVector &hit20, HitsVector &hit21) const
 Get hit map. More...
 
void addOverflow (ErrorVector &hitErr, const ErrorVector &tobErr) const
 Add overflow bit. More...
 
void addCMXJetHits (HitsVector &vec1, const HitsVector &vec2, HitsType type) const
 Add hits from second vector to first. More...
 
unsigned int addHits (unsigned int hitMult, unsigned int hitVec, int multBits, int vecBits, int nthresh) const
 Increment JEM/CMX hit word. More...
 
void mergeCMXJetHits (xAOD::CMXJetHitsContainer *cmxHitsVec1, xAOD::CMXJetHitsContainer *cmxHitsVec2) const
 Merge CMX-Jet hits vectors. More...
 
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. More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

SG::ReadHandleKey< TrigConf::L1Menum_L1MenuKey { this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" }
 
int m_crates
 Number of crates. More...
 
int m_modules
 Number of JEM modules per crate. More...
 
int m_maxTobs
 Maximum number of TOBs per module to CMXs. More...
 
int m_sysCrate
 System crate number. More...
 
bool m_debug
 Debug flag. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

This is a tool to reconstruct the L1 JEM and CMX-Jet hits from RoIs. Used for offline monitoring and trigger reconstruction.

Useage: L1JetCMXTools->formJEMTobRoI() // convert to JEMTobRoI from other RoI classes L1JetCMXTools->formCMXJetTob() // form CMX-Jet TOBs from JEMTobRoIs L1JetCMXTools->formCMXJetHits() // form CMX-Jet hits from CMXJetTobs

@author  Peter Faulkner

Definition at line 36 of file L1JetCMXTools.h.

Member Typedef Documentation

◆ ErrorVector

typedef std::vector<uint32_t> LVL1::L1JetCMXTools::ErrorVector
private

Definition at line 77 of file L1JetCMXTools.h.

◆ HitsVector

typedef std::vector<uint32_t> LVL1::L1JetCMXTools::HitsVector
private

Definition at line 76 of file L1JetCMXTools.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ HitsType

Enumerator
MAIN_HITS 
FORWARD_HITS 

Definition at line 74 of file L1JetCMXTools.h.

Constructor & Destructor Documentation

◆ L1JetCMXTools()

LVL1::L1JetCMXTools::L1JetCMXTools ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Constructor.

Definition at line 34 of file L1JetCMXTools.cxx.

37  m_crates(2),
38  m_modules(16), m_maxTobs(4), m_sysCrate(1), m_debug(false) {
39  declareInterface<IL1JetCMXTools>(this);
40 }

◆ ~L1JetCMXTools()

LVL1::L1JetCMXTools::~L1JetCMXTools ( )
virtual

default destructor

Destructor.

Definition at line 44 of file L1JetCMXTools.cxx.

44 {}

Member Function Documentation

◆ addCMXJetHits()

void LVL1::L1JetCMXTools::addCMXJetHits ( HitsVector vec1,
const HitsVector vec2,
HitsType  type 
) const
private

Add hits from second vector to first.

Definition at line 409 of file L1JetCMXTools.cxx.

410  {
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 }

◆ addHits()

unsigned int LVL1::L1JetCMXTools::addHits ( unsigned int  hitMult,
unsigned int  hitVec,
int  multBits,
int  vecBits,
int  nthresh 
) const
private

Increment JEM/CMX hit word.

Definition at line 429 of file L1JetCMXTools.cxx.

431  {
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 }

◆ addOverflow()

void LVL1::L1JetCMXTools::addOverflow ( ErrorVector hitErr,
const ErrorVector tobErr 
) const
private

Add overflow bit.

Definition at line 391 of file L1JetCMXTools.cxx.

392  {
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 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ formCMXJetHits()

void LVL1::L1JetCMXTools::formCMXJetHits ( const xAOD::CMXJetTobContainer cmxTobVec,
xAOD::CMXJetHitsContainer cmxHitsVec 
) const
virtual

form complete CMX-Jet hits from CMX-Jet TOBs

Implements LVL1::IL1JetCMXTools.

Definition at line 144 of file L1JetCMXTools.cxx.

146  {
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 }

◆ formCMXJetHitsCrate()

void LVL1::L1JetCMXTools::formCMXJetHitsCrate ( const xAOD::CMXJetTobContainer cmxTobVec,
xAOD::CMXJetHitsContainer cmxHitsCrate 
) const
virtual

form partial CMX-Jet hits (crate) from CMX-Jet TOBs

Implements LVL1::IL1JetCMXTools.

Definition at line 164 of file L1JetCMXTools.cxx.

166  {
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 }

◆ formCMXJetHitsSystem()

void LVL1::L1JetCMXTools::formCMXJetHitsSystem ( const xAOD::CMXJetHitsContainer cmxHitsCrate,
xAOD::CMXJetHitsContainer cmxHitsSys 
) const
virtual

form partial CMX-Jet hits (system) from crate CMX-Jet hits

Implements LVL1::IL1JetCMXTools.

Definition at line 219 of file L1JetCMXTools.cxx.

221  {
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();
239  continue;
240  int peak = hits->peak();
241  if (peak > peakm)
242  peakm = peak;
243  HitsVector hitsVec0(hits->hitsVec0());
244  HitsVector hitsVec1(hits->hitsVec1());
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 }

◆ formCMXJetHitsTopo()

void LVL1::L1JetCMXTools::formCMXJetHitsTopo ( const xAOD::CMXJetTobContainer cmxTobVec,
xAOD::CMXJetHitsContainer cmxHitsTopo 
) const
virtual

form partial CMX-Jet hits (topo) from system CMX-Jet TOBs

Implements LVL1::IL1JetCMXTools.

Definition at line 263 of file L1JetCMXTools.cxx.

265  {
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 }

◆ formCMXJetTob() [1/2]

void LVL1::L1JetCMXTools::formCMXJetTob ( const std::vector< const xAOD::JEMTobRoIContainer * > &  jemRoiColls,
xAOD::CMXJetTobContainer cmxTobVec,
int  peak 
) const
virtual

form CMX-Jet TOBs from RoIs - multiple slices

Implements LVL1::IL1JetCMXTools.

Definition at line 64 of file L1JetCMXTools.cxx.

66  {
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 }

◆ formCMXJetTob() [2/2]

void LVL1::L1JetCMXTools::formCMXJetTob ( const xAOD::JEMTobRoIContainer jemRoiVec,
xAOD::CMXJetTobContainer cmxTobVec 
) const
virtual

form CMX-Jet TOBs from RoIs - single slice

Implements LVL1::IL1JetCMXTools.

Definition at line 58 of file L1JetCMXTools.cxx.

59  {
60  std::vector<const xAOD::JEMTobRoIContainer *> jemRoiColls(1, jemRoiVec);
61  formCMXJetTob(jemRoiColls, cmxTobVec, 0);
62 }

◆ getHits()

void LVL1::L1JetCMXTools::getHits ( const xAOD::CMXJetTob tob,
HitsVector hit10,
HitsVector hit11,
HitsVector hit20,
HitsVector hit21 
) const
private

Get hit map.

Definition at line 330 of file L1JetCMXTools.cxx.

332  {
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 }

◆ initialize()

StatusCode LVL1::L1JetCMXTools::initialize ( )
virtual

standard Athena-Algorithm method

Initialisation.

Definition at line 48 of file L1JetCMXTools.cxx.

48  {
50 
52 
53  return StatusCode::SUCCESS;
54 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & LVL1::IL1JetCMXTools::interfaceID ( )
inlinestaticinherited

Definition at line 55 of file IL1JetCMXTools.h.

56  {
57  return IID_IL1JetCMXTools;
58  }

◆ mergeCMXJetHits()

void LVL1::L1JetCMXTools::mergeCMXJetHits ( xAOD::CMXJetHitsContainer cmxHitsVec1,
xAOD::CMXJetHitsContainer cmxHitsVec2 
) const
private

Merge CMX-Jet hits vectors.

Definition at line 468 of file L1JetCMXTools.cxx.

470  {
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 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ saveCMXJetHits()

void LVL1::L1JetCMXTools::saveCMXJetHits ( xAOD::CMXJetHitsContainer cmxHitsVec,
const HitsVector hits0,
const HitsVector hits1,
const ErrorVector err0,
const ErrorVector err1,
int  crate,
int  source,
int  peak 
) const
private

Save non-zero CMX-Jet hits.

Definition at line 483 of file L1JetCMXTools.cxx.

488  {
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 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_crates

int LVL1::L1JetCMXTools::m_crates
private

Number of crates.

Definition at line 103 of file L1JetCMXTools.h.

◆ m_debug

bool LVL1::L1JetCMXTools::m_debug
private

Debug flag.

Definition at line 111 of file L1JetCMXTools.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_L1MenuKey

SG::ReadHandleKey<TrigConf::L1Menu> LVL1::L1JetCMXTools::m_L1MenuKey { this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" }
private

Definition at line 101 of file L1JetCMXTools.h.

◆ m_maxTobs

int LVL1::L1JetCMXTools::m_maxTobs
private

Maximum number of TOBs per module to CMXs.

Definition at line 107 of file L1JetCMXTools.h.

◆ m_modules

int LVL1::L1JetCMXTools::m_modules
private

Number of JEM modules per crate.

Definition at line 105 of file L1JetCMXTools.h.

◆ m_sysCrate

int LVL1::L1JetCMXTools::m_sysCrate
private

System crate number.

Definition at line 109 of file L1JetCMXTools.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
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
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
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
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
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
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:396
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
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
LVL1::CMXJetHits::TOTAL_FORWARD
@ TOTAL_FORWARD
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/CMXJetHits.h:33
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
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.
xAOD::CMXJetTob_v1::energySmallVec
const std::vector< uint16_t > & energySmallVec() const
get energySmallVec
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
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
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
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
LVL1::L1JetCMXTools::MAIN_HITS
@ MAIN_HITS
Definition: L1JetCMXTools.h:74
LVL1::L1JetCMXTools::HitsVector
std::vector< uint32_t > HitsVector
Definition: L1JetCMXTools.h:76
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::CMXJetHits_v1::TOPO_OCCUPANCY_COUNTS
@ TOPO_OCCUPANCY_COUNTS
Definition: CMXJetHits_v1.h:41
LVL1::DataError::Overflow
@ Overflow
Definition: DataError.h:31
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
lumiFormat.i
int i
Definition: lumiFormat.py:85
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
LVL1::DataError::set
void set(ErrorBit bit, int value=1)
Set an error bit or data.
Definition: DataError.cxx:28
test_pyathena.parent
parent
Definition: test_pyathena.py:15
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
python.xAODType.dummy
dummy
Definition: xAODType.py:4
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
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
xAOD::CMXJetTob_v1
Description of CMXJetTob_v1.
Definition: CMXJetTob_v1.h:27
DataVector::clear
void clear()
Erase all the elements in the collection.
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
TrigConf::name
Definition: HLTChainList.h:35
LVL1::DataError::error
int error() const
Return the full error word.
Definition: DataError.h:78
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
xAOD::CMXJetHits_v1::REMOTE_FORWARD
@ REMOTE_FORWARD
Definition: CMXJetHits_v1.h:36
xAOD::CMXJetTob_v1::frame
uint8_t frame() const
get frame
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
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
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
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:364
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
a
TList * a
Definition: liststreamerinfos.cxx:10
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
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
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
copySelective.source
string source
Definition: copySelective.py:32
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
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
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.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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
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.
fitman.k
k
Definition: fitman.py:528
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