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::L1CPCMXTools Class Reference

#include <L1CPCMXTools.h>

Inheritance diagram for LVL1::L1CPCMXTools:
Collaboration diagram for LVL1::L1CPCMXTools:

Public Member Functions

 L1CPCMXTools (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor. More...
 
virtual StatusCode initialize ()
 standard Athena-Algorithm method More...
 
virtual void formCMXCPTob (const xAOD::CPMTobRoIContainer *cpmRoiVec, xAOD::CMXCPTobContainer *cmxTobVec) const
 form CMX-CP TOBs from RoIs - single slice More...
 
virtual void formCMXCPTob (const std::vector< const xAOD::CPMTobRoIContainer * > &cpmRoiColls, xAOD::CMXCPTobContainer *cmxTobVec, uint8_t peak) const
 form CMX-CP TOBs from RoIs - multiple slices More...
 
virtual void formCMXCPHits (const TrigConf::L1Menu *l1menu, const xAOD::CMXCPTobContainer *cmxTobVec, xAOD::CMXCPHitsContainer *cmxHitsVec) const
 form complete CMX-CP hits from CMX-CP TOBs More...
 
virtual void formCMXCPHitsCrate (const TrigConf::L1Menu *l1menu, const xAOD::CMXCPTobContainer *cmxTobVec, xAOD::CMXCPHitsContainer *cmxHitsCrate) const
 form partial CMX-CP hits (crate) from CMX-CP TOBs More...
 
virtual void formCMXCPHitsSystem (const xAOD::CMXCPHitsContainer *cmxHitsCrate, xAOD::CMXCPHitsContainer *cmxHitsSys) const
 form partial CMX-CP hits (system) from crate CMX-CP hits More...
 
virtual void formCMXCPHitsTopo (const xAOD::CMXCPTobContainer *cmxTobVec, xAOD::CMXCPHitsContainer *cmxHitsTopo) const
 form partial CMX-CP hits (topo) from CMX-CP 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

typedef std::vector< uint32_t > HitsVector
 
typedef std::vector< uint32_t > ErrorVector
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

std::pair< uint32_t, uint32_t > roiWord (const EmTauROI *roi) const
 Temporary for testing until CPAlgorithm and EmTauROI are updated. More...
 
int isolationEm (unsigned int clusterEnergy, unsigned int emIsol, unsigned int hadIsol, unsigned int hadVeto) const
 
int isolationTau (unsigned int clusterEnergy, unsigned int emIsol, unsigned int hadIsol) const
 
void unpackEmIsol (int energy, int isol, unsigned int &emIsol, unsigned int &hadIsol, unsigned int &hadVeto) const
 
void unpackTauIsol (int energy, int isol, unsigned int &emIsol, unsigned int &hadIsol) const
 
void getHits (const TrigConf::L1Menu *l1menu, const xAOD::CMXCPTob *tob, HitsVector &hits0, HitsVector &hits1) const
 
void addOverflow (ErrorVector &hitErr, const ErrorVector &tobErr) const
 
void addCMXCPHits (HitsVector &vec1, const HitsVector &vec2) const
 Add hits from second vector to first. More...
 
unsigned int addHits (unsigned int hitMult, unsigned int hitVec, int multBits, int vecBits) const
 Increment CPM/CMX hit word. More...
 
void mergeCMXCPHits (xAOD::CMXCPHitsContainer *cmxHitsVec1, xAOD::CMXCPHitsContainer *cmxHitsVec2) const
 Merge CMX-CP hits vectors. More...
 
void saveCMXCPHits (xAOD::CMXCPHitsContainer *cmxHitsVec, const HitsVector &hits0, const HitsVector &hits1, const ErrorVector &err0, const ErrorVector &err1, uint8_t crate, uint8_t cmx, uint8_t source, uint8_t peak) const
 Save non-zero CMX-CP 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

int m_crates
 Number of CP crates. More...
 
int m_modules
 Number of CPMs per crate. More...
 
int m_maxTobs
 Maximum number of TOBs per CPM. More...
 
int m_sysCrate
 System crate. More...
 
bool m_debug
 Debug printout 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 CMX-CP TOBs and hits from RoIs. Used for offline monitoring and trigger reconstruction.

Useage: L1CPCMXTools->formCMXCPTob() // form CMX-CP TOBs from RoIs L1CPCMXTools->formCMXCPHits() // form CMX-CP hits from TOBs

Author
Peter Faulkner

Definition at line 36 of file L1CPCMXTools.h.

Member Typedef Documentation

◆ ErrorVector

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

Definition at line 68 of file L1CPCMXTools.h.

◆ HitsVector

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

Definition at line 67 of file L1CPCMXTools.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ L1CPCMXTools()

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

Constructor.

Definition at line 30 of file L1CPCMXTools.cxx.

33  m_crates(4),
34  m_modules(14), m_maxTobs(5), m_sysCrate(3), m_debug(false) {
35  declareInterface<IL1CPCMXTools>(this);
36 
37 }

Member Function Documentation

◆ addCMXCPHits()

void LVL1::L1CPCMXTools::addCMXCPHits ( HitsVector vec1,
const HitsVector vec2 
) const
private

Add hits from second vector to first.

Definition at line 490 of file L1CPCMXTools.cxx.

491  {
492  int size1 = vec1.size();
493  int size2 = vec2.size();
494  if (size1 < size2)
495  vec1.resize(size2);
496  HitsVector::iterator pos1 = vec1.begin();
497  HitsVector::iterator pose1 = vec1.end();
498  HitsVector::const_iterator pos2 = vec2.begin();
499  HitsVector::const_iterator pose2 = vec2.end();
500  for (; pos1 != pose1 && pos2 != pose2; ++pos1, ++pos2) {
501  *pos1 = addHits(*pos1, *pos2, 24, 24);
502  }
503 }

◆ addHits()

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

Increment CPM/CMX hit word.

Definition at line 507 of file L1CPCMXTools.cxx.

508  {
509  if (m_debug)
510  msg() << MSG::DEBUG << "addHits: Original hitMult = " << std::hex << hitMult
511  << ". Add hitWord = " << hitVec << std::dec << endmsg;
512 
513  // Results transmitted in 2 words, each reporting half of the CP thresholds
514  int nthresh = TrigT1CaloDefs::numOfCPThresholds / 2;
515 
516  int nbitsOut = multBits / nthresh;
517  int nbitsIn = vecBits / nthresh;
518 
519  if (m_debug)
520  msg() << MSG::DEBUG << " Bits per threshold = " << nbitsOut << endmsg;
521 
522  int max = (1 << nbitsOut) - 1;
523  unsigned int multMask = max;
524  unsigned int hitMask = (1 << nbitsIn) - 1;
525  unsigned int shift = 0;
526 
527  unsigned int hits = 0;
528 
529  for (int i = 0; i < nthresh; i++) {
530  int mult = (hitMult & multMask) + (hitVec & hitMask);
531  mult = ((mult <= max) ? mult : max);
532  hits += (mult << shift);
533 
534  hitMult >>= nbitsOut;
535  hitVec >>= nbitsIn;
536  shift += nbitsOut;
537  }
538 
539  if (m_debug)
540  msg() << MSG::DEBUG << "addHits returning hitMult = " << std::hex << hits
541  << std::dec << endmsg;
542 
543  return hits;
544 }

◆ addOverflow()

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

Definition at line 359 of file L1CPCMXTools.cxx.

360  {
361  const int timeslices = tobErr.size();
362  hitErr.resize(timeslices);
363  for (int slice = 0; slice < timeslices; ++slice) {
364  int error = tobErr[slice];
365  if (error) {
367  int overflow = err.get(LVL1::DataError::Overflow);
368  LVL1::DataError err2;
369  err2.set(LVL1::DataError::Overflow, overflow);
370  hitErr[slice] |= err2.error();
371  }
372  }
373 }

◆ 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

◆ formCMXCPHits()

void LVL1::L1CPCMXTools::formCMXCPHits ( const TrigConf::L1Menu l1menu,
const xAOD::CMXCPTobContainer cmxTobVec,
xAOD::CMXCPHitsContainer cmxHitsVec 
) const
virtual

form complete CMX-CP hits from CMX-CP TOBs

Implements LVL1::IL1CPCMXTools.

Definition at line 218 of file L1CPCMXTools.cxx.

220  {
223  // @@vkousk
224  // temporarily comment out cmxHitsTopo, see Jira ticket: ATLLONECAL-13
225  // xAOD::CMXCPHitsContainer* cmxHitsTopo = new xAOD::CMXCPHitsContainer;
226  formCMXCPHitsCrate(l1menu, cmxTobVec, cmxHitsCrate);
227  formCMXCPHitsSystem(cmxHitsCrate, cmxHitsSys);
228  // formCMXCPHitsTopo(cmxTobVec, cmxHitsTopo);
229  mergeCMXCPHits(cmxHitsVec, cmxHitsCrate);
230  mergeCMXCPHits(cmxHitsVec, cmxHitsSys);
231  // mergeCMXCPHits(cmxHitsVec, cmxHitsTopo);
232  delete cmxHitsCrate;
233  delete cmxHitsSys;
234  // delete cmxHitsTopo;
235 }

◆ formCMXCPHitsCrate()

void LVL1::L1CPCMXTools::formCMXCPHitsCrate ( const TrigConf::L1Menu l1menu,
const xAOD::CMXCPTobContainer cmxTobVec,
xAOD::CMXCPHitsContainer cmxHitsCrate 
) const
virtual

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

Implements LVL1::IL1CPCMXTools.

Definition at line 239 of file L1CPCMXTools.cxx.

242  {
243  uint8_t peakm = 0;
244  std::vector<HitsVector> hitVec(4 * m_crates);
245  std::vector<ErrorVector> errVec(4 *
246  m_crates); // Need overflow for neutral format
247  HitsVector hit0;
248  HitsVector hit1;
251  xAOD::CMXCPTobContainer::const_iterator pose = cmxTobVec->end();
252  for (; pos != pose; ++pos) {
253  const xAOD::CMXCPTob *tob = *pos;
254  uint8_t crate = tob->crate();
255  uint8_t cmx = tob->cmx();
256  const int index = (crate * 2 + cmx) * 2;
257  const std::vector<uint32_t> &error(tob->errorVec());
258  hit0.clear();
259  hit1.clear();
260  getHits(l1menu, tob, hit0, hit1);
261 
262  addCMXCPHits(hitVec[index], hit0);
263  addCMXCPHits(hitVec[index + 1], hit1);
264  addOverflow(errVec[index], error);
265  addOverflow(errVec[index + 1], error);
266  uint8_t peak = tob->peak();
267  if (peak > peakm)
268  peakm = peak;
269  }
270  // Save non-zero crate totals
271  for (uint8_t crate = 0; crate < m_crates; ++crate) {
272  for (uint8_t cmx = 0; cmx < 2; ++cmx) {
273  const int index = (crate * 2 + cmx) * 2;
274  saveCMXCPHits(cmxHitsCrate, hitVec[index], hitVec[index + 1],
275  errVec[index], errVec[index + 1], crate, cmx,
276  xAOD::CMXCPHits::LOCAL, peakm);
277  if (crate != m_sysCrate) { // REMOTE totals
278  uint8_t source = crate;
279  saveCMXCPHits(cmxHitsCrate, hitVec[index], hitVec[index + 1],
280  errVec[index], errVec[index + 1], m_sysCrate, cmx, source,
281  peakm);
282  }
283  }
284  }
285 }

◆ formCMXCPHitsSystem()

void LVL1::L1CPCMXTools::formCMXCPHitsSystem ( const xAOD::CMXCPHitsContainer cmxHitsCrate,
xAOD::CMXCPHitsContainer cmxHitsSys 
) const
virtual

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

Implements LVL1::IL1CPCMXTools.

Definition at line 377 of file L1CPCMXTools.cxx.

379  {
380  uint8_t peakm = 0;
381  std::vector<HitsVector> systemHit0(2);
382  std::vector<HitsVector> systemHit1(2);
383  std::vector<ErrorVector> systemErr0(2);
384  std::vector<ErrorVector> systemErr1(2);
386  DataVector<xAOD::CMXCPHits>::const_iterator pose = cmxHitsCrate->end();
387  for (; pos != pose; ++pos) {
388  const xAOD::CMXCPHits *hits = *pos;
389  if (hits->crate() != m_sysCrate)
390  continue;
391  uint8_t source = hits->sourceComponent();
392  if (source != xAOD::CMXCPHits::LOCAL &&
393  source != xAOD::CMXCPHits::REMOTE_0 &&
394  source != xAOD::CMXCPHits::REMOTE_1 &&
395  source != xAOD::CMXCPHits::REMOTE_2)
396  continue;
397  const uint8_t peak = hits->peak();
398  if (peak > peakm)
399  peakm = peak;
400  HitsVector hits0(hits->hitsVec0());
401  HitsVector hits1(hits->hitsVec1());
402  ErrorVector err0(hits->errorVec0());
403  ErrorVector err1(hits->errorVec1());
404  uint8_t cmx = hits->cmx();
405  addCMXCPHits(systemHit0[cmx], hits0);
406  addCMXCPHits(systemHit1[cmx], hits1);
407  addOverflow(systemErr0[cmx], err0);
408  addOverflow(systemErr1[cmx], err1);
409  }
410  // Save non-zero system totals
411  for (uint8_t cmx = 0; cmx < 2; ++cmx) {
412  saveCMXCPHits(cmxHitsSys, systemHit0[cmx], systemHit1[cmx], systemErr0[cmx],
413  systemErr1[cmx], m_sysCrate, cmx, xAOD::CMXCPHits::TOTAL,
414  peakm);
415  }
416 }

◆ formCMXCPHitsTopo()

void LVL1::L1CPCMXTools::formCMXCPHitsTopo ( const xAOD::CMXCPTobContainer cmxTobVec,
xAOD::CMXCPHitsContainer cmxHitsTopo 
) const
virtual

form partial CMX-CP hits (topo) from CMX-CP TOBs

Implements LVL1::IL1CPCMXTools.

Definition at line 421 of file L1CPCMXTools.cxx.

423  {
424  uint8_t peakm = 0;
425  int timeslices = 0;
426  std::vector<HitsVector> hitVec(8 * m_crates);
428  xAOD::CMXCPTobContainer::const_iterator pose = cmxTobVec->end();
429  for (; pos != pose; ++pos) {
430  const xAOD::CMXCPTob *tob = *pos;
431  uint8_t crate = tob->crate();
432  uint8_t cmx = tob->cmx();
433  const uint8_t cpm = tob->cpm();
434  const uint8_t chip = tob->chip() >> 1;
435  const uint8_t loc = ((tob->chip() & 0x1) << 2) | tob->location();
436  const int index = (crate * 2 + cmx) * 4;
437  const std::vector<uint8_t> &energy(tob->energyVec());
438  const std::vector<uint8_t> &isolation(tob->isolationVec());
439  const std::vector<uint32_t> &error(tob->errorVec());
440  timeslices = energy.size();
441  HitsVector &checksum(hitVec[index]);
442  HitsVector &map(hitVec[index + 1]);
443  HitsVector &countsLow(hitVec[index + 2]);
444  HitsVector &countsHigh(hitVec[index + 3]);
445  checksum.resize(timeslices);
446  map.resize(timeslices);
447  countsLow.resize(timeslices);
448  countsHigh.resize(timeslices);
449  for (int slice = 0; slice < timeslices; ++slice) {
450  if (energy[slice] == 0)
451  continue;
452  // checksum
454  int overflow = err.get(LVL1::DataError::Overflow);
455  checksum[slice] +=
456  cpm + chip + loc + energy[slice] + isolation[slice] + overflow;
457  checksum[slice] &= 0xff;
458  // occupancy map
459  map[slice] |= (1 << (cpm - 1));
460  // occupancy counts
461  if (cpm <= 7) {
462  countsLow[slice] += (1 << (3 * (cpm - 1))); // can't saturate
463  } else {
464  countsHigh[slice] += (1 << (3 * (cpm - 8)));
465  }
466  }
467  uint8_t peak = tob->peak();
468  if (peak > peakm)
469  peakm = peak;
470  }
471  // Save non-zero crate totals
472  HitsVector dummy(timeslices);
473  std::vector<uint32_t> dummyE(timeslices);
474  for (uint8_t crate = 0; crate < m_crates; ++crate) {
475  for (uint8_t cmx = 0; cmx < 2; ++cmx) {
476  const int index = (crate * 2 + cmx) * 4;
477  saveCMXCPHits(cmxHitsTopo, hitVec[index], dummy, dummyE, dummyE, crate,
478  cmx, xAOD::CMXCPHits::TOPO_CHECKSUM, peakm);
479  saveCMXCPHits(cmxHitsTopo, hitVec[index + 1], dummy, dummyE, dummyE,
480  crate, cmx, xAOD::CMXCPHits::TOPO_OCCUPANCY_MAP, peakm);
481  saveCMXCPHits(cmxHitsTopo, hitVec[index + 2], hitVec[index + 3], dummyE,
482  dummyE, crate, cmx, xAOD::CMXCPHits::TOPO_OCCUPANCY_COUNTS,
483  peakm);
484  }
485  }
486 }

◆ formCMXCPTob() [1/2]

void LVL1::L1CPCMXTools::formCMXCPTob ( const std::vector< const xAOD::CPMTobRoIContainer * > &  cpmRoiColls,
xAOD::CMXCPTobContainer cmxTobVec,
uint8_t  peak 
) const
virtual

form CMX-CP TOBs from RoIs - multiple slices

Implements LVL1::IL1CPCMXTools.

Definition at line 130 of file L1CPCMXTools.cxx.

132  {
133  std::map<uint32_t, const xAOD::CPMTobRoI *> cpmRoiMap;
134  std::map<int, xAOD::CMXCPTob *> cmxTobMap;
136  int timeslices = cpmRoiColls.size();
137  for (int slice = 0; slice < timeslices; ++slice) {
138  const xAOD::CPMTobRoIContainer *cpmRoiVec = cpmRoiColls[slice];
139  cpmRoiMap.clear();
140  std::vector<unsigned int> presenceMaps(2 * m_crates * m_modules);
141  std::vector<int> tobCount(2 * m_crates * m_modules);
144  for (; it != itE; ++it) { // get sorted list
145  const xAOD::CPMTobRoI *roi = *it;
146  const int type = roi->type();
147  const int crate = roi->crate();
148  const int cpm = roi->cpm();
149  const int index = ((type * m_crates) + crate) * m_modules + cpm - 1;
150  const int presenceBit =
151  (roi->chip() << 1) |
152  ((roi->location() >> 2) &
153  0x1); // <<== CHECK THIS SHIFT LOOKS OK @@vkousk
154  presenceMaps[index] |= (1 << presenceBit);
155  tobCount[index]++;
156  uint32_t key = roi->roiWord();
157  cpmRoiMap.insert(std::make_pair(key, roi));
158  }
159  std::map<uint32_t, const xAOD::CPMTobRoI *>::const_iterator mit =
160  cpmRoiMap.begin();
161  std::map<uint32_t, const xAOD::CPMTobRoI *>::const_iterator mitE =
162  cpmRoiMap.end();
163  for (; mit != mitE; ++mit) {
164  const xAOD::CPMTobRoI *roi = mit->second;
165  const int type = roi->type();
166  const int crate = roi->crate();
167  const int cmx = 1 - type; // <<== CHECK
168  const int cpm = roi->cpm();
169  const int chip = (roi->chip() << 1) | ((roi->location() >> 2) & 0x1);
170  const int loc = roi->location() & 0x3;
171  const int index = ((type * m_crates) + crate) * m_modules + cpm - 1;
172  const int energy = roi->energy();
173  const int isolation = roi->isolation();
174  const unsigned int presence = presenceMaps[index];
175  int error = 0;
176  if (tobCount[index] > m_maxTobs) { // overflow
177  int count = 0;
178  for (int bit = 0; bit <= chip; ++bit)
179  count += (presence >> bit) & 0x1;
180  if (count > m_maxTobs)
181  continue;
184  error = err.error();
185  }
186  const int key =
187  (((((((crate << 1) | cmx) << 4) | cpm) << 4) | chip) << 2) | loc;
188  xAOD::CMXCPTob *tob = 0;
189  std::map<int, xAOD::CMXCPTob *>::iterator xit = cmxTobMap.find(key);
190  if (xit == cmxTobMap.end()) {
191  tob = new xAOD::CMXCPTob();
192  tob->makePrivateStore(); // make temp store
193  tob->initialize(crate, cmx, cpm, chip, loc);
194  std::vector<uint8_t> vecI(timeslices);
195  std::vector<uint32_t> vecU32(timeslices);
196  std::vector<uint16_t> vecU(timeslices);
197  tob->addTob(vecI, vecI, vecU32, vecU);
198  tob->setPeak(peak);
199  cmxTobMap.insert(std::make_pair(key, tob));
200  cmxTobVec->push_back(tob);
201  } else
202  tob = xit->second;
203  std::vector<uint8_t> energyVec(tob->energyVec());
204  std::vector<uint8_t> isolationVec(tob->isolationVec());
205  std::vector<uint32_t> errorVec(tob->errorVec());
206  std::vector<uint16_t> presenceMapVec(tob->presenceMapVec());
207  energyVec[slice] = energy;
208  isolationVec[slice] = isolation;
209  errorVec[slice] = error;
210  presenceMapVec[slice] = presence;
211  tob->addTob(energyVec, isolationVec, errorVec, presenceMapVec);
212  }
213  }
214 }

◆ formCMXCPTob() [2/2]

void LVL1::L1CPCMXTools::formCMXCPTob ( const xAOD::CPMTobRoIContainer cpmRoiVec,
xAOD::CMXCPTobContainer cmxTobVec 
) const
virtual

form CMX-CP TOBs from RoIs - single slice

Implements LVL1::IL1CPCMXTools.

Definition at line 122 of file L1CPCMXTools.cxx.

123  {
124  std::vector<const xAOD::CPMTobRoIContainer *> cpmRoiColls(1, cpmRoiVec);
125  formCMXCPTob(cpmRoiColls, cmxTobVec, 0);
126 }

◆ getHits()

void LVL1::L1CPCMXTools::getHits ( const TrigConf::L1Menu l1menu,
const xAOD::CMXCPTob tob,
HitsVector hits0,
HitsVector hits1 
) const
private

Definition at line 287 of file L1CPCMXTools.cxx.

288  {
289  using namespace TrigConf;
290  const std::vector<uint8_t> &energy(tob->energyVec());
291  const std::vector<uint8_t> &isolation(tob->isolationVec());
292 
293  int cmx = tob->cmx();
294  int crate = tob->crate();
295  int cpm = tob->cpm();
296  int chip = (tob->chip() >> 1) & 0x7;
297  int loc = tob->location() | ((tob->chip() & 1) << 2);
298  auto err = LVL1::DataError(tob->error());
299 
300  const int type = 1 - cmx;
301  const int timeslices = energy.size();
302  hit0.resize(timeslices);
303  hit1.resize(timeslices);
304 
305  // Get thresholds from menu
306  L1DataDef def;
307  const std::string thrType = (type == 0) ? def.emType() : def.tauType();
308 
309  // Get EM and TAU trigger thresholds
310  std::vector<std::shared_ptr<TrigConf::L1Threshold>> allThresholds = l1menu->thresholds();
311  std::vector<std::shared_ptr<TrigConf::L1Threshold>> thresholds;
312  thresholds.reserve(16);
313 
314  for ( const auto& thresh : allThresholds ) {
315  if (thresh->type() == thrType) {
316  thresholds.push_back(thresh);
317  }
318  }
319 
320  if (thresholds.size() > 16) {
321  ATH_MSG_ERROR("Wrong number of thresholds " << thresholds.size());
322  return;
323  }
324 
325  for (int slice = 0; slice < timeslices; ++slice) {
326  if (energy[slice] == 0)
327  continue;
328 
329  if (err.get(LVL1::DataError::Overflow)) {
330  hit0[slice] = 0xffffff;
331  hit1[slice] = 0xffffff;
332  continue;
333  }
334  /* Form an RoI word from the information present
335  Simplest way without duplication is to create a CPMTobRoI */
336  int et = energy[slice];
337  int isol = isolation[slice];
338  std::unique_ptr<LVL1::CPMTobRoI> roi(
339  new CPMTobRoI(crate, cpm, chip, loc, type, et, isol));
340 
341  /* Now get the hit information using RecEmTauroI */
342  RecEmTauRoI recRoI(roi->roiWord(), &(*l1menu));
343  auto mask = recRoI.thresholdPattern();
344  for (const auto& threshold : thresholds) {
345  auto numThresh = threshold->mapping();
346  if (!recRoI.isValidThreshold(numThresh) ||
347  (((1 << numThresh) & mask) == 0)) {
348  continue;
349  }
350  if (numThresh < 8) {
351  hit0[slice] |= (1 << (numThresh * 3));
352  } else {
353  hit1[slice] |= (1 << ((numThresh - 8) * 3));
354  }
355  }
356  }
357 }

◆ initialize()

StatusCode LVL1::L1CPCMXTools::initialize ( )
virtual

standard Athena-Algorithm method

Initialisation.

Definition at line 41 of file L1CPCMXTools.cxx.

41  {
43 
44  return StatusCode::SUCCESS;
45 }

◆ 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::IL1CPCMXTools::interfaceID ( )
inlinestaticinherited

Definition at line 55 of file IL1CPCMXTools.h.

56  {
57  return IID_IL1CPCMXTools;
58  }

◆ isolationEm()

int LVL1::L1CPCMXTools::isolationEm ( unsigned int  clusterEnergy,
unsigned int  emIsol,
unsigned int  hadIsol,
unsigned int  hadVeto 
) const
private

Definition at line 88 of file L1CPCMXTools.cxx.

90  {
91  int isol = 0;
92  if (hadVeto > 1)
93  isol = 1;
94  return isol;
95 }

◆ isolationTau()

int LVL1::L1CPCMXTools::isolationTau ( unsigned int  clusterEnergy,
unsigned int  emIsol,
unsigned int  hadIsol 
) const
private

Definition at line 97 of file L1CPCMXTools.cxx.

99  {
100  int isol = 0;
101  if (emIsol > 4)
102  isol = 1;
103  return isol;
104 }

◆ mergeCMXCPHits()

void LVL1::L1CPCMXTools::mergeCMXCPHits ( xAOD::CMXCPHitsContainer cmxHitsVec1,
xAOD::CMXCPHitsContainer cmxHitsVec2 
) const
private

Merge CMX-CP hits vectors.

Definition at line 548 of file L1CPCMXTools.cxx.

549  {
550  int size = cmxHitsVec2->size();
551  for (int index = 0; index < size; ++index) {
552  xAOD::CMXCPHits *hitsIn = 0;
553  xAOD::CMXCPHits *hitsOut = 0;
554  cmxHitsVec2->swapElement(index, hitsIn, hitsOut);
555  cmxHitsVec1->push_back(hitsOut);
556  }
557  cmxHitsVec2->clear();
558 }

◆ 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  }

◆ roiWord()

std::pair< uint32_t, uint32_t > LVL1::L1CPCMXTools::roiWord ( const EmTauROI roi) const
private

Temporary for testing until CPAlgorithm and EmTauROI are updated.

Definition at line 49 of file L1CPCMXTools.cxx.

49  {
50  const uint32_t oldRoi = roi->roiWord();
51  CPRoIDecoder decoder;
52  const int crate = decoder.crate(oldRoi);
53  const int module = decoder.module(oldRoi);
54  const int chip = decoder.chip(oldRoi);
55  const int coord = decoder.localcoord(oldRoi);
56  bool em = false;
57  bool tau = false;
58  for (unsigned int thresh = 1; thresh <= TrigT1CaloDefs::numOfCPThresholds;
59  ++thresh) {
60  if (roi->thresholdPassed(thresh)) {
61  if (roi->thresholdType(thresh) == TrigT1CaloDefs::EMAlg)
62  em = true;
63  else
64  tau = true;
65  }
66  }
67  uint32_t emRoi = 0;
68  uint32_t tauRoi = 0;
69  if (em) {
70  int isolation =
71  isolationEm(roi->clusterEnergy(), roi->emRingIsolationEnergy(),
72  roi->hadRingIsolationEnergy(), roi->hadCoreEnergy());
73  const CPMTobRoI newRoi(crate, module, chip, coord, 0, roi->clusterEnergy(),
74  isolation);
75  emRoi = newRoi.roiWord();
76  }
77  if (tau) {
78  int isolation =
79  isolationTau(roi->tauClusterEnergy(), roi->emRingIsolationEnergy(),
80  roi->hadRingIsolationEnergy());
81  const CPMTobRoI newRoi(crate, module, chip, coord, 1,
82  roi->tauClusterEnergy(), isolation);
83  tauRoi = newRoi.roiWord();
84  }
85  return std::make_pair(emRoi, tauRoi);
86 }

◆ saveCMXCPHits()

void LVL1::L1CPCMXTools::saveCMXCPHits ( xAOD::CMXCPHitsContainer cmxHitsVec,
const HitsVector hits0,
const HitsVector hits1,
const ErrorVector err0,
const ErrorVector err1,
uint8_t  crate,
uint8_t  cmx,
uint8_t  source,
uint8_t  peak 
) const
private

Save non-zero CMX-CP hits.

Definition at line 562 of file L1CPCMXTools.cxx.

565  {
566  if (std::accumulate(hits0.begin(), hits0.end(), 0) ||
567  std::accumulate(hits1.begin(), hits1.end(), 0)) {
568  xAOD::CMXCPHits *cmxCpHits = new xAOD::CMXCPHits();
569  cmxCpHits->makePrivateStore();
570  cmxCpHits->initialize(crate, cmx, source, hits0, hits1, err0, err1, peak);
571  cmxHitsVec->push_back(cmxCpHits);
572  }
573 }

◆ 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.

◆ unpackEmIsol()

void LVL1::L1CPCMXTools::unpackEmIsol ( int  energy,
int  isol,
unsigned int &  emIsol,
unsigned int &  hadIsol,
unsigned int &  hadVeto 
) const
private

Definition at line 106 of file L1CPCMXTools.cxx.

108  {
109  emIsol = 0;
110  hadIsol = 0;
111  hadVeto = (isol == 1) ? 2 : 0;
112 }

◆ unpackTauIsol()

void LVL1::L1CPCMXTools::unpackTauIsol ( int  energy,
int  isol,
unsigned int &  emIsol,
unsigned int &  hadIsol 
) const
private

Definition at line 114 of file L1CPCMXTools.cxx.

115  {
116  emIsol = (isol == 1) ? 5 : 0;
117  hadIsol = 0;
118 }

◆ 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::L1CPCMXTools::m_crates
private

Number of CP crates.

Definition at line 103 of file L1CPCMXTools.h.

◆ m_debug

bool LVL1::L1CPCMXTools::m_debug
private

Debug printout flag.

Definition at line 111 of file L1CPCMXTools.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_maxTobs

int LVL1::L1CPCMXTools::m_maxTobs
private

Maximum number of TOBs per CPM.

Definition at line 107 of file L1CPCMXTools.h.

◆ m_modules

int LVL1::L1CPCMXTools::m_modules
private

Number of CPMs per crate.

Definition at line 105 of file L1CPCMXTools.h.

◆ m_sysCrate

int LVL1::L1CPCMXTools::m_sysCrate
private

System crate.

Definition at line 109 of file L1CPCMXTools.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::CPMTobRoI_v1::isolation
int isolation() const
Return isolation.
Definition: CPMTobRoI_v1.cxx:74
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
D3PDMakerTestInstan::vec2
std::vector< D3PDTest::MyVec2 > vec2
Definition: D3PDMakerTestDict.h:14
et
Extra patterns decribing particle interation process.
xAOD::hadIsol
setThrPattern hadIsol
Definition: EmTauRoI_v2.cxx:68
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::CMXCPTob_v1::crate
uint8_t crate() const
get crate
LVL1::DataError
Error data.
Definition: DataError.h:27
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
xAOD::CMXCPHits_v1::REMOTE_2
@ REMOTE_2
Definition: CMXCPHits_v1.h:29
max
#define max(a, b)
Definition: cfImp.cxx:41
xAOD::CMXCPTob_v1::addTob
void addTob(const std::vector< uint8_t > &energyVec, const std::vector< uint8_t > &isolationVec, const std::vector< uint32_t > &errorVec, const std::vector< uint16_t > &presenceMapVec)
add data to existing object
Definition: CMXCPTob_v1.cxx:53
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
python.LArCondContChannels.decoder
decoder
def channelSelection(self, channelList, groupType): if groupType == self.SingleGroup: pass elif group...
Definition: LArCondContChannels.py:618
physval_make_web_display.thresh
thresh
Definition: physval_make_web_display.py:35
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::L1CPCMXTools::m_debug
bool m_debug
Debug printout flag.
Definition: L1CPCMXTools.h:111
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
skel.it
it
Definition: skel.GENtoEVGEN.py:423
xAOD::CMXCPTob
CMXCPTob_v1 CMXCPTob
Define the latest version of the CMXCPTob class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CMXCPTob.h:17
LVL1::L1CPCMXTools::ErrorVector
std::vector< uint32_t > ErrorVector
Definition: L1CPCMXTools.h:68
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
xAOD::CPMTobRoI_v1::crate
int crate() const
Return crate number (0-1)
Definition: CPMTobRoI_v1.cxx:38
xAOD::CMXCPTob_v1
Description of CMXCPTob_v1.
Definition: CMXCPTob_v1.h:27
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
xAOD::CMXCPTob_v1::setPeak
void setPeak(uint8_t)
set peak
LVL1::TrigT1CaloDefs::EMAlg
@ EMAlg
Definition: TrigT1CaloDefs.h:208
DataVector::swapElement
void swapElement(size_type index, value_type newElem, reference oldElem)
Swap one element out of the container.
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
LVL1::L1CPCMXTools::addCMXCPHits
void addCMXCPHits(HitsVector &vec1, const HitsVector &vec2) const
Add hits from second vector to first.
Definition: L1CPCMXTools.cxx:490
TruthTest.itE
itE
Definition: TruthTest.py:25
xAOD::CMXCPHits_v1::TOPO_OCCUPANCY_MAP
@ TOPO_OCCUPANCY_MAP
Definition: CMXCPHits_v1.h:30
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
xAOD::CMXCPHits
CMXCPHits_v1 CMXCPHits
Define the latest version of the CMMCPHits class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CMXCPHits.h:17
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
LVL1::L1CPCMXTools::m_crates
int m_crates
Number of CP crates.
Definition: L1CPCMXTools.h:103
xAOD::CMXCPTob_v1::errorVec
const std::vector< uint32_t > & errorVec() const
get errorVec
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
python.PyAthena.module
module
Definition: PyAthena.py:134
LVL1::L1CPCMXTools::mergeCMXCPHits
void mergeCMXCPHits(xAOD::CMXCPHitsContainer *cmxHitsVec1, xAOD::CMXCPHitsContainer *cmxHitsVec2) const
Merge CMX-CP hits vectors.
Definition: L1CPCMXTools.cxx:548
xAOD::CMXCPHits_v1::initialize
virtual void initialize(const uint8_t crate, const uint8_t cmx, const uint8_t source)
initialize
Definition: CMXCPHits_v1.cxx:21
TrigConf::L1DataDef
Definition: L1DataDef.h:27
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
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
LVL1::L1CPCMXTools::addHits
unsigned int addHits(unsigned int hitMult, unsigned int hitVec, int multBits, int vecBits) const
Increment CPM/CMX hit word.
Definition: L1CPCMXTools.cxx:507
xAOD::CPMTobRoI_v1::cpm
int cpm() const
Return CPM number (1-14)
Definition: CPMTobRoI_v1.cxx:44
lumiFormat.i
int i
Definition: lumiFormat.py:92
LVL1::L1CPCMXTools::getHits
void getHits(const TrigConf::L1Menu *l1menu, const xAOD::CMXCPTob *tob, HitsVector &hits0, HitsVector &hits1) const
Definition: L1CPCMXTools.cxx:287
xAOD::CMXCPHits_v1::TOTAL
@ TOTAL
Definition: CMXCPHits_v1.h:29
xAOD::CMXCPTob_v1::initialize
virtual void initialize(const uint8_t crate, const uint8_t cmx, const uint8_t cpm, const uint8_t chip, const uint8_t loc)
initialize
Definition: CMXCPTob_v1.cxx:21
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
xAOD::CMXCPTob_v1::error
uint32_t error() const
get errorVec at peak bunch crossing
Definition: CMXCPTob_v1.cxx:92
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
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::L1CPCMXTools::addOverflow
void addOverflow(ErrorVector &hitErr, const ErrorVector &tobErr) const
Definition: L1CPCMXTools.cxx:359
python.xAODType.dummy
dummy
Definition: xAODType.py:4
xAOD::CPMTobRoI_v1::type
int type() const
Return type em/tau (0/1)
Definition: CPMTobRoI_v1.cxx:62
xAOD::CMXCPTob_v1::isolationVec
const std::vector< uint8_t > & isolationVec() const
get isolationVec
xAOD::CPMTobRoI_v1::roiWord
uint32_t roiWord() const
get roiWord
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::CMXCPTob_v1::presenceMapVec
const std::vector< uint16_t > & presenceMapVec() const
get presenceMapVec
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
DataVector::clear
void clear()
Erase all the elements in the collection.
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
LVL1::L1CPCMXTools::isolationEm
int isolationEm(unsigned int clusterEnergy, unsigned int emIsol, unsigned int hadIsol, unsigned int hadVeto) const
Definition: L1CPCMXTools.cxx:88
TrigConf::name
Definition: HLTChainList.h:35
LVL1::L1CPCMXTools::formCMXCPHitsCrate
virtual void formCMXCPHitsCrate(const TrigConf::L1Menu *l1menu, const xAOD::CMXCPTobContainer *cmxTobVec, xAOD::CMXCPHitsContainer *cmxHitsCrate) const
form partial CMX-CP hits (crate) from CMX-CP TOBs
Definition: L1CPCMXTools.cxx:239
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::CMXCPHits_v1::LOCAL
@ LOCAL
Definition: CMXCPHits_v1.h:29
LVL1::L1CPCMXTools::m_sysCrate
int m_sysCrate
System crate.
Definition: L1CPCMXTools.h:109
xAOD::CMXCPHitsContainer
CMXCPHitsContainer_v1 CMXCPHitsContainer
Define the latest version of the CMXCPHits class.
Definition: CMXCPHitsContainer.h:18
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
xAOD::CMXCPTob_v1::cmx
uint8_t cmx() const
get cmx
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
threshold
Definition: chainparser.cxx:74
LVL1::L1CPCMXTools::formCMXCPTob
virtual void formCMXCPTob(const xAOD::CPMTobRoIContainer *cpmRoiVec, xAOD::CMXCPTobContainer *cmxTobVec) const
form CMX-CP TOBs from RoIs - single slice
Definition: L1CPCMXTools.cxx:122
LVL1::L1CPCMXTools::saveCMXCPHits
void saveCMXCPHits(xAOD::CMXCPHitsContainer *cmxHitsVec, const HitsVector &hits0, const HitsVector &hits1, const ErrorVector &err0, const ErrorVector &err1, uint8_t crate, uint8_t cmx, uint8_t source, uint8_t peak) const
Save non-zero CMX-CP hits.
Definition: L1CPCMXTools.cxx:562
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
xAOD::CMXCPHits_v1::REMOTE_0
@ REMOTE_0
Definition: CMXCPHits_v1.h:29
xAOD::CMXCPHits_v1::REMOTE_1
@ REMOTE_1
Definition: CMXCPHits_v1.h:29
JetVoronoiDiagramHelpers::coord
double coord
Definition: JetVoronoiDiagramHelpers.h:45
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
xAOD::CMXCPHits_v1::TOPO_OCCUPANCY_COUNTS
@ TOPO_OCCUPANCY_COUNTS
Definition: CMXCPHits_v1.h:30
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DeMoScan.index
string index
Definition: DeMoScan.py:362
a
TList * a
Definition: liststreamerinfos.cxx:10
h
LVL1::TrigT1CaloDefs::numOfCPThresholds
static const unsigned int numOfCPThresholds
Definition: TrigT1CaloDefs.h:124
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
LVL1::L1CPCMXTools::HitsVector
std::vector< uint32_t > HitsVector
Definition: L1CPCMXTools.h:67
python.XMLReader.l1menu
l1menu
Definition: XMLReader.py:73
xAOD::CMXCPTob_v1::energyVec
const std::vector< uint8_t > & energyVec() const
get energyVec
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
LVL1::L1CPCMXTools::isolationTau
int isolationTau(unsigned int clusterEnergy, unsigned int emIsol, unsigned int hadIsol) const
Definition: L1CPCMXTools.cxx:97
xAOD::CPMTobRoI_v1::chip
int chip() const
Return CP chip number (0-7)
Definition: CPMTobRoI_v1.cxx:50
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
LVL1::L1CPCMXTools::formCMXCPHitsSystem
virtual void formCMXCPHitsSystem(const xAOD::CMXCPHitsContainer *cmxHitsCrate, xAOD::CMXCPHitsContainer *cmxHitsSys) const
form partial CMX-CP hits (system) from crate CMX-CP hits
Definition: L1CPCMXTools.cxx:377
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
get_generator_info.error
error
Definition: get_generator_info.py:40
xAOD::CPMTobRoI_v1::energy
int energy() const
Return energy.
Definition: CPMTobRoI_v1.cxx:68
xAOD::CMXCPHits_v1
Description of CMXCPHits_v1.
Definition: CMXCPHits_v1.h:27
error
Definition: IImpactPoint3dEstimator.h:70
LVL1::L1CPCMXTools::m_modules
int m_modules
Number of CPMs per crate.
Definition: L1CPCMXTools.h:105
xAOD::CPMTobRoI_v1::location
int location() const
Return location (RoI local coords) (0-7)
Definition: CPMTobRoI_v1.cxx:56
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::L1CPCMXTools::m_maxTobs
int m_maxTobs
Maximum number of TOBs per CPM.
Definition: L1CPCMXTools.h:107
xAOD::CPMTobRoI
CPMTobRoI_v1 CPMTobRoI
Define the latest version of the CPMTobRoI class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CPMTobRoI.h:17
xAOD::CMXCPTob_v1::peak
uint8_t peak() const
get peak
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
xAOD::CMXCPTob_v1::cpm
uint8_t cpm() const
get cpm
xAOD::CPMTobRoI_v1
Description of CPMTobRoI_v1.
Definition: CPMTobRoI_v1.h:24
fitman.k
k
Definition: fitman.py:528
xAOD::CMXCPTob_v1::location
uint8_t location() const
get location
xAOD::CMXCPTob_v1::chip
uint8_t chip() const
get chip
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
xAOD::CMXCPHits_v1::TOPO_CHECKSUM
@ TOPO_CHECKSUM
Definition: CMXCPHits_v1.h:30