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

The eFEXSysSim class defines the structure of the eFEX system Its purpose is: More...

#include <eFEXSysSim.h>

Inheritance diagram for LVL1::eFEXSysSim:
Collaboration diagram for LVL1::eFEXSysSim:

Public Member Functions

 eFEXSysSim (const std::string &type, const std::string &name, const IInterface *parent)
 Constructors. More...
 
eFEXSysSim && operator= (const eFEXSysSim &)=delete
 Destructor. More...
 
virtual StatusCode initialize () override
 standard Athena-Algorithm method More...
 
virtual StatusCode finalize () override
 standard Athena-Algorithm method More...
 
virtual StatusCode execute (eFEXOutputCollection *inputOutputCollection) override
 
virtual void init () override
 
virtual void cleanup () override
 
virtual int calcTowerID (int eta, int phi, int mod) const override
 
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 ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode StoreTauTOBs (std::map< int, std::vector< std::unique_ptr< eFEXtauTOB >> > &allTauTobObjects, SG::WriteHandleKey< xAOD::eFexTauRoIContainer > &eFexTauxTOBOutKey, SG::WriteHandleKey< xAOD::eFexTauRoIContainer > &eFexTauOutKey)
 
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...
 

Static Private Member Functions

template<class TOBObjectClass >
static bool TOBetSort (const TOBObjectClass &i, const TOBObjectClass &j, bool isTau)
 Internal data. More...
 

Private Attributes

std::unique_ptr< xAOD::eFexEMRoIContainerm_eContainer
 
std::unique_ptr< xAOD::eFexEMRoIAuxContainerm_eAuxContainer
 
std::unique_ptr< xAOD::eFexEMRoIContainerm_xeContainer
 
std::unique_ptr< xAOD::eFexEMRoIAuxContainerm_xeAuxContainer
 
std::vector< eFEXSim * > m_eFEXCollection
 
ToolHandle< IeFEXSimm_eFEXSimTool {this, "eFEXSimTool", "LVL1::eFEXSim", "Tool that creates the eFEX Simulation"}
 
ToolHandle< IeFEXFillEDMm_eFEXFillEDMTool {this, "eFEXFillEDMTool", "LVL1::eFEXFillEDM", "Tool to fille eFEX EDMs"}
 
SG::ReadHandleKey< LVL1::eTowerContainerm_eTowerContainerSGKey {this, "MyETowers", "eTowerContainer", "Input container for eTowers"}
 
SG::ReadHandleKey< TrigConf::L1Menum_l1MenuKey {this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu","Name of the L1Menu object to read configuration from"}
 
SG::WriteHandleKey< xAOD::eFexEMRoIContainerm_eFexOutKey {this,"Key_eFexEMOutputContainer","L1_eEMRoI","Output eFexEM TOB container"}
 
SG::WriteHandleKey< xAOD::eFexEMRoIContainerm_eFexEMxTOBOutKey {this,"Key_eFexEMxTOBOutputContainer","L1_eEMxRoI","Output eFexEM xTOB container"}
 
SG::WriteHandleKey< xAOD::eFexTauRoIContainerm_eFexTauActiveOutKey {this,"Key_eFexTauOutputContainer","L1_eTauRoI","Output eFexTau active (BDT/heuristic) algorithm TOB container"}
 
SG::WriteHandleKey< xAOD::eFexTauRoIContainerm_eFexTauActivexTOBOutKey {this,"Key_eFexTauxTOBOutputContainer","L1_eTauxRoI","Output eFexTau active (BDT/heuristic) algorithm xTOB container"}
 
SG::WriteHandleKey< xAOD::eFexTauRoIContainerm_eFexTauAltOutKey {this,"Key_eFexAltTauOutputContainer","","Output eFexTau alternative (BDT/heuristic) algorithm TOB container"}
 
SG::WriteHandleKey< xAOD::eFexTauRoIContainerm_eFexTauAltxTOBOutKey {this,"Key_eFexAltTauxTOBOutputContainer","","Output eFexTau alternative (BDT/heuristic) algorithm xTOB container"}
 
ToolHandle< IeFEXFPGATowerIdProviderm_eFEXFPGATowerIdProviderTool {this, "eFEXFPGATowerIdProviderTool", "LVL1::eFEXFPGATowerIdProvider", "Tool that provides tower-FPGA mapping"}
 
ToolHandle< IeFEXFPGAm_eFEXFPGATool {this, "eFEXFPGATool", "LVL1::eFEXFPGA", "Tool that simulates the FPGA hardware"}
 
std::map< int, std::vector< std::unique_ptr< eFEXegTOB > > > m_allEmTobObjects
 
std::map< int, std::vector< std::unique_ptr< eFEXtauTOB > > > m_allTauHeuristicTobObjects
 
std::map< int, std::vector< std::unique_ptr< eFEXtauTOB > > > m_allTauBDTTobObjects
 
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

The eFEXSysSim class defines the structure of the eFEX system Its purpose is:

Definition at line 42 of file eFEXSysSim.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ eFEXSysSim()

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

Constructors.

Definition at line 37 of file eFEXSysSim.cxx.

37  :
39  {
40  declareInterface<IeFEXSysSim>(this);
41 
42  }

Member Function Documentation

◆ calcTowerID()

int LVL1::eFEXSysSim::calcTowerID ( int  eta,
int  phi,
int  mod 
) const
overridevirtual

Implements LVL1::IeFEXSysSim.

Definition at line 94 of file eFEXSysSim.cxx.

94  {
95 
96  return ((64*eta) + phi + mod);
97  }

◆ cleanup()

void LVL1::eFEXSysSim::cleanup ( )
overridevirtual

Implements LVL1::IeFEXSysSim.

Definition at line 88 of file eFEXSysSim.cxx.

88  {
89 
90  m_eFEXCollection.clear();
91  }

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

◆ execute()

StatusCode LVL1::eFEXSysSim::execute ( eFEXOutputCollection inputOutputCollection)
overridevirtual

Implements LVL1::IeFEXSysSim.

Definition at line 99 of file eFEXSysSim.cxx.

99  {
100 
102  if(!this_eTowerContainer.isValid()){
103  ATH_MSG_FATAL("Could not retrieve eTowerContainer " << m_eTowerContainerSGKey.key());
104  return StatusCode::FAILURE;
105  }
106 
107  // remove TOBs of the previous events from the map
108  m_allEmTobObjects.clear();
110  m_allTauBDTTobObjects.clear();
111 
112  // do mapping with preloaded csv file if it is available
113  if (m_eFEXFPGATowerIdProviderTool->ifhaveinputfile()) {
114  int tmp_eTowersIDs_subset_eFEX[10][18];
115  for (int i_efex{ 0 }; i_efex < 24; i_efex++) {
116  ATH_CHECK(m_eFEXFPGATowerIdProviderTool->getRankedTowerIDineFEX(i_efex, tmp_eTowersIDs_subset_eFEX));
117  m_eFEXSimTool->init(i_efex);
118  ATH_CHECK(m_eFEXSimTool->NewExecute(tmp_eTowersIDs_subset_eFEX, inputOutputCollection));
119  // Get TOBs from this eFEX
120  m_allEmTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXegTOB>> >::value_type(i_efex, m_eFEXSimTool->getEmTOBs() ));
121  m_allTauHeuristicTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXtauTOB>> >::value_type(i_efex, m_eFEXSimTool->getTauHeuristicTOBs() ));
122  m_allTauBDTTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXtauTOB>> >::value_type(i_efex, m_eFEXSimTool->getTauBDTTOBs() ));
123  m_eFEXSimTool->reset();
124  }
125  } else {
126  // We need to split the towers into 3 blocks in eta and 8 blocks in phi.
127 
128  // boundaries in eta: -2.5, -0.8, 0.8, 2.5
129  // REAL boundaries in eta (overlaps must occur for sliding window algorithms!): -2.5, -0.7, -0.9, 0.9, 0.7, 2.5
130  // Written explicitly:
131  // -2.5 -> -0.7
132  // -0.9 -> 0.9
133  // 0.7 -> 2.5
134 
135  // boundaries in phi: 0.2, 1.0, 1.8, 2.6, 3.4, 4.2, 5.0, 5.8
136  // Written explicitly with REAL boundaries in phi (overlaps must occur for sliding window algorithms!)
137  // 0.1 -> 1.1
138  // 0.9 -> 1.9
139  // 1.7 -> 2.7
140  // 2.5 -> 3.5
141  // 3.3 -> 4.3
142  // 4.1 -> 5.1
143  // 4.9 -> 5.9
144  // 5.7 -> 0.3
145 
146  // C-SIDE NEGATIVE EFEXs
147  // DO THE LEFT-MOST (NEGATIVE ETA) EFEXs FIRST
148  int fexcounter = 0;
149  // Example values for eFEX 0
150  //id_modifier + phi + (64 * eta)
151  int emecEta = 24; int emecPhi = 1; int emecMod = 500000;
152  int initialEMEC = calcTowerID(emecEta,emecPhi,emecMod); //501537;
153  int transEta = 14; int transPhi = 1; int transMod = 300000;
154  int initialTRANS = calcTowerID(transEta,transPhi,transMod); //300897;
155  int embEta = 13; int embPhi = 1; int embMod = 100000;
156  int initialEMB = calcTowerID(embEta,embPhi,embMod); //100833;
157  int eFEXa = 0;
158 
159  for (int thisEFEX=eFEXa; thisEFEX<=21; thisEFEX+=3){
160 
161  if(fexcounter > 0){ initialEMEC += 8; initialTRANS += 8; initialEMB += 8; } // TODO // SOMEHOW REMOVE HARD-CODING?
162 
163  // decide which subset of towers (and therefore supercells) should go to the eFEX
164  std::map<int,eTower> tmp_eTowersColl_subset;
165 
166  // let's try doing this with an array initially just containing tower IDs.
167  int tmp_eTowersIDs_subset [10][18];
168 
169  int rows = sizeof tmp_eTowersIDs_subset / sizeof tmp_eTowersIDs_subset[0];
170  int cols = sizeof tmp_eTowersIDs_subset[0] / sizeof tmp_eTowersIDs_subset[0][0];
171 
172  // set the EMEC part
173  for(int thisCol=0; thisCol<10; thisCol++){
174  for(int thisRow=0; thisRow<rows; thisRow++){
175 
176  int towerid = initialEMEC - (thisCol * 64) + thisRow;
177 
178  if( (thisEFEX == 21) && (thisRow >= 7)){ towerid -= 64; };
179 
180  tmp_eTowersIDs_subset[thisRow][thisCol] = towerid;
181  tmp_eTowersColl_subset.insert( std::map<int, eTower>::value_type(towerid, *(this_eTowerContainer->findTower(towerid))));
182 
183  }
184  }
185 
186  // set the TRANS part
187  for(int thisRow = 0; thisRow < rows; thisRow++){
188 
189  int towerid = initialTRANS + thisRow;
190 
191  if( (thisEFEX == 21) && (thisRow >= 7)){ towerid -= 64; };
192 
193  tmp_eTowersIDs_subset[thisRow][10] = towerid;
194  tmp_eTowersColl_subset.insert( std::map<int, eTower>::value_type(towerid, *(this_eTowerContainer->findTower(towerid))));
195 
196  }
197 
198  // set the EMB part
199  for(int thisCol = 11; thisCol < cols; thisCol++){
200  for(int thisRow=0; thisRow<rows; thisRow++){
201 
202  int towerid = initialEMB - ( (thisCol-11) * 64) + thisRow;
203 
204  if( (thisEFEX == 21) && (thisRow >= 7)){ towerid -= 64; };
205 
206  tmp_eTowersIDs_subset[thisRow][thisCol] = towerid;
207  tmp_eTowersColl_subset.insert( std::map<int, eTower>::value_type(towerid, *(this_eTowerContainer->findTower(towerid))));
208 
209  }
210  }
211 
212 
213  if(false){
214  ATH_MSG_DEBUG("CONTENTS OF eFEX " << thisEFEX << " :");
215  for (int thisRow=rows-1; thisRow>=0; thisRow--){
216  for (int thisCol=0; thisCol<cols; thisCol++){
217  int tmptowerid = tmp_eTowersIDs_subset[thisRow][thisCol];
218  const float tmptowereta = this_eTowerContainer->findTower(tmptowerid)->eta();
219  const float tmptowerphi = this_eTowerContainer->findTower(tmptowerid)->phi();
220  if(thisCol != cols-1){ ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowerphi << "][" << tmptowereta << "]) "); }
221  else { ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) |"); }
222  }
223  }
224  }
225 
226 
227  m_eFEXSimTool->init(thisEFEX);
228  ATH_CHECK(m_eFEXSimTool->NewExecute(tmp_eTowersIDs_subset, inputOutputCollection));
229  m_allEmTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXegTOB>> >::value_type(thisEFEX, (m_eFEXSimTool->getEmTOBs() ) ));
230  m_allTauHeuristicTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXtauTOB>> >::value_type(thisEFEX, (m_eFEXSimTool->getTauHeuristicTOBs() ) ));
231  m_allTauBDTTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXtauTOB>> >::value_type(thisEFEX, (m_eFEXSimTool->getTauBDTTOBs() ) ));
232  m_eFEXSimTool->reset();
233 
234  fexcounter++;
235  }
236 
237  // CENTRAL EFEXs
238  // DO THE CENTRAL EFEXs SECOND
239  fexcounter = 0;
240  int embnegEta = 8; int embnegPhi = 1; int embnegMod = 100000;
241  int initialEMB_neg = calcTowerID(embnegEta,embnegPhi,embnegMod); //100513;
242  int embposEta = 0; int embposPhi = 1; int embposMod = 200000;
243  int initialEMB_pos = calcTowerID(embposEta,embposPhi,embposMod); //200001;
244  int eFEXb = 1;
245 
246  for (int thisEFEX=eFEXb; thisEFEX<=22; thisEFEX+=3){
247 
248  if(fexcounter > 0){ initialEMB_neg += 8; initialEMB_pos += 8; }
249 
250  // decide which subset of towers (and therefore supercells) should go to the eFEX
251  std::map<int,eTower> tmp_eTowersColl_subset;
252 
253  // doing this with an array initially just containing tower IDs.
254  int tmp_eTowersIDs_subset [10][18];
255 
256  int rows = sizeof tmp_eTowersIDs_subset / sizeof tmp_eTowersIDs_subset[0];
257  int cols = sizeof tmp_eTowersIDs_subset[0] / sizeof tmp_eTowersIDs_subset[0][0];
258 
259  // set the EMB part
260  for(int thisCol = 0; thisCol < cols; thisCol++){
261  for(int thisRow=0; thisRow<rows; thisRow++){
262  int towerid = -1;
263 
264  int tmp_initEMB = initialEMB_neg;
265 
266  if(thisCol < 9){
267  towerid = tmp_initEMB - ( (thisCol) * 64) + thisRow;
268  }
269  else{
270  tmp_initEMB = initialEMB_pos;
271  towerid = tmp_initEMB + ( (thisCol-9) * 64) + thisRow;
272  }
273 
274  if( (thisEFEX == 22) && (thisRow >= 7)){ towerid -= 64; };
275 
276  tmp_eTowersIDs_subset[thisRow][thisCol] = towerid;
277 
278  tmp_eTowersColl_subset.insert( std::map<int, eTower>::value_type(towerid, *(this_eTowerContainer->findTower(towerid))));
279  }
280  }
281 
282 
283  if(false){
284  ATH_MSG_DEBUG("CONTENTS OF eFEX " << thisEFEX << " :");
285  for (int thisRow=rows-1; thisRow>=0; thisRow--){
286  for (int thisCol=0; thisCol<cols; thisCol++){
287  int tmptowerid = tmp_eTowersIDs_subset[thisRow][thisCol];
288  const float tmptowereta = this_eTowerContainer->findTower(tmptowerid)->eta();
289  const float tmptowerphi = this_eTowerContainer->findTower(tmptowerid)->phi();
290  if(thisCol != cols-1){ ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) "); }
291  else { ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) |"); }
292  }
293  }
294  }
295 
296  //tool use instead
297  m_eFEXSimTool->init(thisEFEX);
298  ATH_CHECK(m_eFEXSimTool->NewExecute(tmp_eTowersIDs_subset, inputOutputCollection));
299  m_allEmTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXegTOB>> >::value_type(thisEFEX, (m_eFEXSimTool->getEmTOBs() ) ));
300  m_allTauHeuristicTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXtauTOB>> >::value_type(thisEFEX, (m_eFEXSimTool->getTauHeuristicTOBs() ) ));
301  m_allTauBDTTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXtauTOB>> >::value_type(thisEFEX, (m_eFEXSimTool->getTauBDTTOBs() ) ));
302  m_eFEXSimTool->reset();
303 
304  fexcounter++;
305  }
306 
307  // POSITIVE EFEXs
308  // LET'S DO THE RIGHT-MOST (POSTITIVE ETA) EFEXs THIRD
309  fexcounter = 0;
310  // Example values for eFEX 0
311  emecEta = 15; emecPhi = 1; emecMod = 600000;
312  initialEMEC = calcTowerID(emecEta,emecPhi,emecMod); //600961;
313  transEta = 14; transPhi = 1; transMod = 400000;
314  initialTRANS = calcTowerID(transEta,transPhi,transMod); //400897;
315  embEta = 7; embPhi = 1; embMod = 200000;
316  initialEMB = calcTowerID(embEta,embPhi,embMod); //200449;
317  int eFEXc = 2;
318 
319  for (int thisEFEX=eFEXc; thisEFEX<=23; thisEFEX+=3){
320 
321  if(fexcounter > 0){ initialEMEC += 8; initialTRANS += 8; initialEMB += 8; }
322 
323  // decide which subset of towers (and therefore supercells) should go to the eFEX
324  std::map<int,eTower> tmp_eTowersColl_subset;
325 
326  // doing this with an array initially just containing tower IDs.
327  int tmp_eTowersIDs_subset [10][18];
328 
329  int rows = sizeof tmp_eTowersIDs_subset / sizeof tmp_eTowersIDs_subset[0];
330  int cols = sizeof tmp_eTowersIDs_subset[0] / sizeof tmp_eTowersIDs_subset[0][0];
331 
332  // set the EMB part
333  for(int thisCol = 0; thisCol < 7; thisCol++){
334  for(int thisRow=0; thisRow<rows; thisRow++){
335  int towerid = initialEMB + ( (thisCol) * 64) + thisRow;
336 
337  if( (thisEFEX == 23) && (thisRow >= 7)){ towerid -= 64; };
338 
339  tmp_eTowersIDs_subset[thisRow][thisCol] = towerid;
340  tmp_eTowersColl_subset.insert( std::map<int, eTower>::value_type(towerid, *(this_eTowerContainer->findTower(towerid))));
341  }
342  }
343  // set the TRANS part
344  for(int thisRow = 0; thisRow < rows; thisRow++){
345  int towerid = initialTRANS + thisRow;
346 
347  if( (thisEFEX == 23) && (thisRow >= 7)){ towerid -= 64; };
348 
349  tmp_eTowersIDs_subset[thisRow][7] = towerid;
350  tmp_eTowersColl_subset.insert( std::map<int, eTower>::value_type(towerid, *(this_eTowerContainer->findTower(towerid))));
351  }
352  // set the EMEC part
353  for(int thisCol=8; thisCol<cols; thisCol++){
354  for(int thisRow=0; thisRow<rows; thisRow++){
355  int towerid = initialEMEC + ( (thisCol-8) * 64) + thisRow;
356 
357  if( (thisEFEX == 23) && (thisRow >= 7)){ towerid -= 64; };
358 
359  tmp_eTowersIDs_subset[thisRow][thisCol] = towerid;
360  tmp_eTowersColl_subset.insert( std::map<int, eTower>::value_type(towerid, *(this_eTowerContainer->findTower(towerid))));
361  }
362  }
363 
364  // Debug printout
365  if(false){
366  ATH_MSG_DEBUG("CONTENTS OF eFEX " << thisEFEX << " :");
367  for (int thisRow=rows-1; thisRow>=0; thisRow--){
368  for (int thisCol=0; thisCol<cols; thisCol++){
369  int tmptowerid = tmp_eTowersIDs_subset[thisRow][thisCol];
370  const float tmptowereta = this_eTowerContainer->findTower(tmptowerid)->eta();
371  const float tmptowerphi = this_eTowerContainer->findTower(tmptowerid)->phi();
372  if(thisCol != cols-1){ ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) "); }
373  else { ATH_MSG_DEBUG("| " << tmptowerid << "([" << tmptowereta << "][" << tmptowerphi << "]) |"); }
374  }
375  }
376  }
377 
378  //tool use instead
379  m_eFEXSimTool->init(thisEFEX);
380  ATH_CHECK(m_eFEXSimTool->NewExecute(tmp_eTowersIDs_subset, inputOutputCollection));
381  m_allEmTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXegTOB>> >::value_type(thisEFEX, (m_eFEXSimTool->getEmTOBs() ) ));
382  m_allTauHeuristicTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXtauTOB>> >::value_type(thisEFEX, (m_eFEXSimTool->getTauHeuristicTOBs() ) ));
383  m_allTauBDTTobObjects.insert( std::map<int, std::vector<std::unique_ptr<eFEXtauTOB>> >::value_type(thisEFEX, (m_eFEXSimTool->getTauBDTTOBs() ) ));
384  m_eFEXSimTool->reset();
385 
386  fexcounter++;
387  }
388 
389  }//close the non-csv loop over eFEXes
390 
391  // EM TOBs and xTOBs
392 
393  // TOB Containers
394  m_eContainer = std::make_unique<xAOD::eFexEMRoIContainer> ();
395  m_eAuxContainer = std::make_unique<xAOD::eFexEMRoIAuxContainer> ();
396  m_eContainer->setStore(m_eAuxContainer.get());
397 
398  // xTOB Containers
399  m_xeContainer = std::make_unique<xAOD::eFexEMRoIContainer> ();
400  m_xeAuxContainer = std::make_unique<xAOD::eFexEMRoIAuxContainer> ();
401  m_xeContainer->setStore(m_xeAuxContainer.get());
402 
403  // iterate over all Em Tobs and fill xTOB EDM with them
404  for( auto const& [efex, tobObjects] : m_allEmTobObjects ){
405  for(auto &tobObject : tobObjects){
406  m_eFEXFillEDMTool->fillEmEDM(m_xeContainer, efex, tobObject, true);
407  }
408  }
409 
410  // Form list of TOBs, sorted and truncated from each eFEX
411  // Vector to store sorted TOBs from all eFEXes
412  // Note that this step means moving TOBs from the all objects vector, which is why we do it last
413  std::vector<std::unique_ptr<eFEXegTOB>> emTOBs;
414  // Loop through eFEXes and sort TOBs from each
415  auto iter = m_allEmTobObjects.begin();
416  while (iter != m_allEmTobObjects.end()) {
417  std::vector<std::unique_ptr<eFEXegTOB>> tobsSort = std::move(iter->second);
418  // sort tobs by their et (last 12 bits of the 32 bit tob word)
419  std::sort (tobsSort.begin(), tobsSort.end(), std::bind(TOBetSort<std::unique_ptr<eFEXegTOB>>, std::placeholders::_1, std::placeholders::_2, false));
420  // Truncate at 6 TOBs per eFEX
421  if (tobsSort.size() > 6) tobsSort.resize(6);
422  // Append to system TOB list
423  for (unsigned int t = 0; t < tobsSort.size(); ++t) emTOBs.push_back(std::move(tobsSort[t]));
424  // Next eFEX
425  ++iter;
426  }
427 
428  // iterate over sorted eFEX EM TOBs and fill TOB EDM with them
429  for(auto &tobObject : emTOBs){
430  int efex = tobObject->geteFEXID();
431  m_eFEXFillEDMTool->fillEmEDM(m_eContainer, efex, tobObject);
432  }
433 
434  // Match xTOBs to TOBs and set isTOB flags if matched
436 
437  // Record EDMs in StoreGate
438  SG::WriteHandle<xAOD::eFexEMRoIContainer> outputeFexEMxTOBHandle(m_eFexEMxTOBOutKey/*, ctx*/);
439  ATH_MSG_DEBUG(" write: " << outputeFexEMxTOBHandle.key() << " = " << "..." );
440  ATH_CHECK(outputeFexEMxTOBHandle.record(std::move(m_xeContainer),std::move(m_xeAuxContainer)));
441 
442  SG::WriteHandle<xAOD::eFexEMRoIContainer> outputeFexHandle(m_eFexOutKey/*, ctx*/);
443  ATH_MSG_DEBUG(" write: " << outputeFexHandle.key() << " = " << "..." );
444  ATH_CHECK(outputeFexHandle.record(std::move(m_eContainer),std::move(m_eAuxContainer)));
445 
447  ATH_CHECK(l1Menu.isValid());
448 
449  auto & thr_eTAU = l1Menu->thrExtraInfo().eTAU();
450  int activeAlgo = thr_eTAU.algoVersion() == 0 ? xAOD::eFexTauRoI_v1::Heuristic : xAOD::eFexTauRoI_v1::BDT;
451  bool omitAltTauContainer = m_eFexTauAltxTOBOutKey.empty() || m_eFexTauAltOutKey.empty();
452 
453  // Repeat for Tau TOBs and xTOBs
454  if (activeAlgo == xAOD::eFexTauRoI_v1::Heuristic) {
456  if (!omitAltTauContainer) {
458  }
459  } else if (activeAlgo == xAOD::eFexTauRoI_v1::BDT) {
461  if (!omitAltTauContainer) {
463  }
464  }
465 
466  //Send TOBs to bytestream?
467  // ToDo
468  // To implement
469  // {--Implement--}
470 
471  return StatusCode::SUCCESS;
472 
473  }

◆ 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

◆ finalize()

StatusCode LVL1::eFEXSysSim::finalize ( )
overridevirtual

standard Athena-Algorithm method

Definition at line 78 of file eFEXSysSim.cxx.

79  {
80  return StatusCode::SUCCESS;
81  }

◆ init()

void LVL1::eFEXSysSim::init ( )
overridevirtual

Implements LVL1::IeFEXSysSim.

Definition at line 84 of file eFEXSysSim.cxx.

84  {
85 
86  }

◆ initialize()

StatusCode LVL1::eFEXSysSim::initialize ( )
overridevirtual

standard Athena-Algorithm method

Destructor.

Definition at line 52 of file eFEXSysSim.cxx.

53  {
54 
56 
57  ATH_CHECK( m_eFEXSimTool.retrieve() );
58 
59  ATH_CHECK( m_eFexOutKey.initialize() );
60  ATH_CHECK( m_eFexEMxTOBOutKey.initialize() );
61 
62  ATH_CHECK( m_eFexTauActiveOutKey.initialize() );
63  ATH_CHECK( m_eFexTauActivexTOBOutKey.initialize() );
66 
68 
69  ATH_CHECK( m_eFEXFPGATool.retrieve() );
70 
72 
73  return StatusCode::SUCCESS;
74  }

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

Definition at line 43 of file IeFEXSysSim.h.

44  {
45  return IID_IeFEXSysSim;
46  }

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

◆ operator=()

eFEXSysSim&& LVL1::eFEXSysSim::operator= ( const eFEXSysSim )
delete

Destructor.

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

◆ StoreTauTOBs()

StatusCode LVL1::eFEXSysSim::StoreTauTOBs ( std::map< int, std::vector< std::unique_ptr< eFEXtauTOB >> > &  allTauTobObjects,
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > &  eFexTauxTOBOutKey,
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > &  eFexTauOutKey 
)
private

Definition at line 475 of file eFEXSysSim.cxx.

478  {
479  std::unique_ptr< xAOD::eFexTauRoIContainer > tauContainer;
480  std::unique_ptr< xAOD::eFexTauRoIAuxContainer > tauAuxContainer;
481  std::unique_ptr< xAOD::eFexTauRoIContainer > xtauContainer;
482  std::unique_ptr< xAOD::eFexTauRoIAuxContainer > xtauAuxContainer;
483 
484  tauContainer = std::make_unique<xAOD::eFexTauRoIContainer> ();
485  tauAuxContainer = std::make_unique<xAOD::eFexTauRoIAuxContainer> ();
486  tauContainer->setStore(tauAuxContainer.get());
487 
488  xtauContainer = std::make_unique<xAOD::eFexTauRoIContainer> ();
489  xtauAuxContainer = std::make_unique<xAOD::eFexTauRoIAuxContainer> ();
490  xtauContainer->setStore(xtauAuxContainer.get());
491 
492  // iterate over all tau TOBs and fill xTOB EDM with them
493  for( auto const& [efex, tobObjects] : allTauTobObjects ){
494  for( auto &tobObject: tobObjects ){
495  m_eFEXFillEDMTool->fillTauEDM(xtauContainer, efex, tobObject, true);
496  }
497  }
498 
499  // Form list of TOBs, sorted and truncated from each eFEX
500  // Vector to store sorted TOBs from all eFEXes
501  // Note that this step means moving TOBs from the all objects vector, which is why we do it last
502  std::vector<std::unique_ptr<eFEXtauTOB>> tauTOBs;
503  // Loop through eFEXes and sort TOBs from each
504  auto iterTau = allTauTobObjects.begin();
505  while (iterTau != allTauTobObjects.end()) {
506  std::vector<std::unique_ptr<eFEXtauTOB>> tobsSort = std::move(iterTau->second);
507  // sort tobs by their et (last 12 bits of the 32 bit tob word)
508  std::sort (tobsSort.begin(), tobsSort.end(), std::bind(TOBetSort<std::unique_ptr<eFEXtauTOB>>, std::placeholders::_1, std::placeholders::_2, true));
509  // Truncate at 6 TOBs per eFEX
510  if (tobsSort.size() > 6) tobsSort.resize(6);
511  // Append to system TOB list
512  for (unsigned int t = 0; t < tobsSort.size(); ++t) tauTOBs.push_back(std::move(tobsSort[t]));
513  // Next eFEX
514  ++iterTau;
515  }
516 
517  // iterate over sorted eFEX Tau TOBs and fill TOB EDM with them
518  for(auto &tobObject : tauTOBs){
519  int efex = tobObject->geteFEXID();
520  m_eFEXFillEDMTool->fillTauEDM(tauContainer, efex, tobObject);
521  }
522 
523  // Match xTOBs and TOBs and set isTOB flags if matched
524  matchTOBs(tauContainer, xtauContainer);
525 
526  // Record containers in StoreGate
527  SG::WriteHandle<xAOD::eFexTauRoIContainer> outputeFexTauxTOBHandle(eFexTauxTOBOutKey/*, ctx*/);
528  ATH_MSG_DEBUG(" write: " << outputeFexTauxTOBHandle.key() << " = " << "..." );
529  ATH_CHECK(outputeFexTauxTOBHandle.record(std::move(xtauContainer), std::move(xtauAuxContainer)));
530 
531  SG::WriteHandle<xAOD::eFexTauRoIContainer> outputeFexTauHandle(eFexTauOutKey/*, ctx*/);
532  ATH_MSG_DEBUG(" write: " << outputeFexTauHandle.key() << " = " << "..." );
533  ATH_CHECK(outputeFexTauHandle.record(std::move(tauContainer), std::move(tauAuxContainer)));
534 
535  return StatusCode::SUCCESS;
536 
537  }

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

◆ TOBetSort()

template<class TOBObjectClass >
static bool LVL1::eFEXSysSim::TOBetSort ( const TOBObjectClass &  i,
const TOBObjectClass &  j,
bool  isTau 
)
inlinestaticprivate

Internal data.

Definition at line 68 of file eFEXSysSim.h.

68  {
69  auto et_i = (i->getTobword() >> 0 ) & 0xfff;
70  auto et_j = (j->getTobword() >> 0 ) & 0xfff;
71  if(et_i > et_j) return true;
72  if(et_i==et_j) {
73  // resolve ties with procNumber (2,1,3,0 for em, 2,1,0,3 for tau), then phi, then eta
74  auto procOrder = (isTau) ? std::map<unsigned int,unsigned int>{{2,3},{1,2},{0,1},{3,0}} :
75  std::map<unsigned int,unsigned int>{{2,3},{1,2},{3,1},{0,0}};
76  auto proc_i = procOrder.at((i->getTobword()) >> 30);
77  auto proc_j = procOrder.at((j->getTobword()) >> 30);
78  if(proc_i > proc_j) return true;
79  if (proc_i == proc_j) {
80  auto phi_i = (i->getTobword()) & 0x07000000;
81  auto phi_j = (j->getTobword()) & 0x07000000;
82  if(phi_i > phi_j) return true;
83  if(phi_i == phi_j) {
84  auto eta_i = (i->getTobword()) & 0x38000000;
85  auto eta_j = (j->getTobword()) & 0x38000000;
86  if(eta_i > eta_j) return true;
87  }
88 
89  }
90  }
91  return false;
92  }

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

std::map<int, std::vector<std::unique_ptr<eFEXegTOB> > > LVL1::eFEXSysSim::m_allEmTobObjects
private

Definition at line 125 of file eFEXSysSim.h.

◆ m_allTauBDTTobObjects

std::map<int, std::vector<std::unique_ptr<eFEXtauTOB> > > LVL1::eFEXSysSim::m_allTauBDTTobObjects
private

Definition at line 128 of file eFEXSysSim.h.

◆ m_allTauHeuristicTobObjects

std::map<int, std::vector<std::unique_ptr<eFEXtauTOB> > > LVL1::eFEXSysSim::m_allTauHeuristicTobObjects
private

Definition at line 127 of file eFEXSysSim.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_eAuxContainer

std::unique_ptr< xAOD::eFexEMRoIAuxContainer > LVL1::eFEXSysSim::m_eAuxContainer
private

Definition at line 101 of file eFEXSysSim.h.

◆ m_eContainer

std::unique_ptr< xAOD::eFexEMRoIContainer > LVL1::eFEXSysSim::m_eContainer
private

Definition at line 100 of file eFEXSysSim.h.

◆ m_eFEXCollection

std::vector<eFEXSim*> LVL1::eFEXSysSim::m_eFEXCollection
private

Definition at line 105 of file eFEXSysSim.h.

◆ m_eFexEMxTOBOutKey

SG::WriteHandleKey< xAOD::eFexEMRoIContainer > LVL1::eFEXSysSim::m_eFexEMxTOBOutKey {this,"Key_eFexEMxTOBOutputContainer","L1_eEMxRoI","Output eFexEM xTOB container"}
private

Definition at line 115 of file eFEXSysSim.h.

◆ m_eFEXFillEDMTool

ToolHandle<IeFEXFillEDM> LVL1::eFEXSysSim::m_eFEXFillEDMTool {this, "eFEXFillEDMTool", "LVL1::eFEXFillEDM", "Tool to fille eFEX EDMs"}
private

Definition at line 109 of file eFEXSysSim.h.

◆ m_eFEXFPGATool

ToolHandle<IeFEXFPGA> LVL1::eFEXSysSim::m_eFEXFPGATool {this, "eFEXFPGATool", "LVL1::eFEXFPGA", "Tool that simulates the FPGA hardware"}
private

Definition at line 121 of file eFEXSysSim.h.

◆ m_eFEXFPGATowerIdProviderTool

ToolHandle<IeFEXFPGATowerIdProvider> LVL1::eFEXSysSim::m_eFEXFPGATowerIdProviderTool {this, "eFEXFPGATowerIdProviderTool", "LVL1::eFEXFPGATowerIdProvider", "Tool that provides tower-FPGA mapping"}
private

Definition at line 120 of file eFEXSysSim.h.

◆ m_eFexOutKey

SG::WriteHandleKey< xAOD::eFexEMRoIContainer > LVL1::eFEXSysSim::m_eFexOutKey {this,"Key_eFexEMOutputContainer","L1_eEMRoI","Output eFexEM TOB container"}
private

Definition at line 114 of file eFEXSysSim.h.

◆ m_eFEXSimTool

ToolHandle<IeFEXSim> LVL1::eFEXSysSim::m_eFEXSimTool {this, "eFEXSimTool", "LVL1::eFEXSim", "Tool that creates the eFEX Simulation"}
private

Definition at line 107 of file eFEXSysSim.h.

◆ m_eFexTauActiveOutKey

SG::WriteHandleKey< xAOD::eFexTauRoIContainer > LVL1::eFEXSysSim::m_eFexTauActiveOutKey {this,"Key_eFexTauOutputContainer","L1_eTauRoI","Output eFexTau active (BDT/heuristic) algorithm TOB container"}
private

Definition at line 116 of file eFEXSysSim.h.

◆ m_eFexTauActivexTOBOutKey

SG::WriteHandleKey< xAOD::eFexTauRoIContainer > LVL1::eFEXSysSim::m_eFexTauActivexTOBOutKey {this,"Key_eFexTauxTOBOutputContainer","L1_eTauxRoI","Output eFexTau active (BDT/heuristic) algorithm xTOB container"}
private

Definition at line 117 of file eFEXSysSim.h.

◆ m_eFexTauAltOutKey

SG::WriteHandleKey< xAOD::eFexTauRoIContainer > LVL1::eFEXSysSim::m_eFexTauAltOutKey {this,"Key_eFexAltTauOutputContainer","","Output eFexTau alternative (BDT/heuristic) algorithm TOB container"}
private

Definition at line 118 of file eFEXSysSim.h.

◆ m_eFexTauAltxTOBOutKey

SG::WriteHandleKey< xAOD::eFexTauRoIContainer > LVL1::eFEXSysSim::m_eFexTauAltxTOBOutKey {this,"Key_eFexAltTauxTOBOutputContainer","","Output eFexTau alternative (BDT/heuristic) algorithm xTOB container"}
private

Definition at line 119 of file eFEXSysSim.h.

◆ m_eTowerContainerSGKey

SG::ReadHandleKey<LVL1::eTowerContainer> LVL1::eFEXSysSim::m_eTowerContainerSGKey {this, "MyETowers", "eTowerContainer", "Input container for eTowers"}
private

Definition at line 111 of file eFEXSysSim.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::eFEXSysSim::m_l1MenuKey {this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu","Name of the L1Menu object to read configuration from"}
private

Definition at line 112 of file eFEXSysSim.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.

◆ m_xeAuxContainer

std::unique_ptr< xAOD::eFexEMRoIAuxContainer > LVL1::eFEXSysSim::m_xeAuxContainer
private

Definition at line 103 of file eFEXSysSim.h.

◆ m_xeContainer

std::unique_ptr< xAOD::eFexEMRoIContainer > LVL1::eFEXSysSim::m_xeContainer
private

Definition at line 102 of file eFEXSysSim.h.


The documentation for this class was generated from the following files:
LVL1::eFEXSysSim::m_eFEXCollection
std::vector< eFEXSim * > m_eFEXCollection
Definition: eFEXSysSim.h:105
LVL1::eFEXSysSim::m_eFexTauActiveOutKey
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > m_eFexTauActiveOutKey
Definition: eFEXSysSim.h:116
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
xAOD::eFexTauRoI_v1::BDT
@ BDT
This object is generated by the BDT algorithm.
Definition: eFexTauRoI_v1.h:48
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
LVL1::eFEXSysSim::m_eFexTauActivexTOBOutKey
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > m_eFexTauActivexTOBOutKey
Definition: eFEXSysSim.h:117
LVL1::eFEXSysSim::StoreTauTOBs
StatusCode StoreTauTOBs(std::map< int, std::vector< std::unique_ptr< eFEXtauTOB >> > &allTauTobObjects, SG::WriteHandleKey< xAOD::eFexTauRoIContainer > &eFexTauxTOBOutKey, SG::WriteHandleKey< xAOD::eFexTauRoIContainer > &eFexTauOutKey)
Definition: eFEXSysSim.cxx:475
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
LVL1::eFEXSysSim::m_eFEXSimTool
ToolHandle< IeFEXSim > m_eFEXSimTool
Definition: eFEXSysSim.h:107
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
LVL1::eFEXSysSim::m_eContainer
std::unique_ptr< xAOD::eFexEMRoIContainer > m_eContainer
Definition: eFEXSysSim.h:100
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LVL1::eFEXSysSim::m_eTowerContainerSGKey
SG::ReadHandleKey< LVL1::eTowerContainer > m_eTowerContainerSGKey
Definition: eFEXSysSim.h:111
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
LVL1::matchTOBs
void matchTOBs(T &TOBs, T &xTOBs)
Definition: eFEXTOBxTOBMatching.h:18
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
beamspotnt.cols
list cols
Definition: bin/beamspotnt.py:1114
LVL1::eFEXSysSim::m_eFexTauAltxTOBOutKey
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > m_eFexTauAltxTOBOutKey
Definition: eFEXSysSim.h:119
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
maskDeadModules.mod
mod
Definition: maskDeadModules.py:36
LVL1::eFEXSysSim::m_allTauHeuristicTobObjects
std::map< int, std::vector< std::unique_ptr< eFEXtauTOB > > > m_allTauHeuristicTobObjects
Definition: eFEXSysSim.h:127
lumiFormat.i
int i
Definition: lumiFormat.py:92
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
LVL1::eFEXSysSim::m_eFexEMxTOBOutKey
SG::WriteHandleKey< xAOD::eFexEMRoIContainer > m_eFexEMxTOBOutKey
Definition: eFEXSysSim.h:115
test_pyathena.parent
parent
Definition: test_pyathena.py:15
LVL1::eFEXSysSim::calcTowerID
virtual int calcTowerID(int eta, int phi, int mod) const override
Definition: eFEXSysSim.cxx:94
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::eFexTauRoI_v1::Heuristic
@ Heuristic
This object is generated by the heuristic algorithm.
Definition: eFexTauRoI_v1.h:47
beamspotnt.rows
list rows
Definition: bin/beamspotnt.py:1112
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
LVL1::eFEXSysSim::m_eFEXFPGATowerIdProviderTool
ToolHandle< IeFEXFPGATowerIdProvider > m_eFEXFPGATowerIdProviderTool
Definition: eFEXSysSim.h:120
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
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
LVL1::eFEXSysSim::m_l1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_l1MenuKey
Definition: eFEXSysSim.h:112
isTau
bool isTau(const T &p)
Definition: AtlasPID.h:148
LVL1::eFEXSysSim::m_eFexOutKey
SG::WriteHandleKey< xAOD::eFexEMRoIContainer > m_eFexOutKey
Definition: eFEXSysSim.h:114
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
LVL1::eFEXSysSim::m_allEmTobObjects
std::map< int, std::vector< std::unique_ptr< eFEXegTOB > > > m_allEmTobObjects
Definition: eFEXSysSim.h:125
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
a
TList * a
Definition: liststreamerinfos.cxx:10
h
LVL1::eFEXSysSim::m_eFexTauAltOutKey
SG::WriteHandleKey< xAOD::eFexTauRoIContainer > m_eFexTauAltOutKey
Definition: eFEXSysSim.h:118
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
LVL1::eFEXSysSim::m_eAuxContainer
std::unique_ptr< xAOD::eFexEMRoIAuxContainer > m_eAuxContainer
Definition: eFEXSysSim.h:101
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LVL1::eFEXSysSim::m_eFEXFPGATool
ToolHandle< IeFEXFPGA > m_eFEXFPGATool
Definition: eFEXSysSim.h:121
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
LVL1::eFEXSysSim::m_xeContainer
std::unique_ptr< xAOD::eFexEMRoIContainer > m_xeContainer
Definition: eFEXSysSim.h:102
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LVL1::eFEXSysSim::TOBetSort
static bool TOBetSort(const TOBObjectClass &i, const TOBObjectClass &j, bool isTau)
Internal data.
Definition: eFEXSysSim.h:68
value_type
Definition: EDM_MasterSearch.h:11
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
LVL1::eFEXSysSim::m_eFEXFillEDMTool
ToolHandle< IeFEXFillEDM > m_eFEXFillEDMTool
Definition: eFEXSysSim.h:109
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::eFEXSysSim::m_allTauBDTTobObjects
std::map< int, std::vector< std::unique_ptr< eFEXtauTOB > > > m_allTauBDTTobObjects
Definition: eFEXSysSim.h:128
LVL1::eFEXSysSim::m_xeAuxContainer
std::unique_ptr< xAOD::eFexEMRoIAuxContainer > m_xeAuxContainer
Definition: eFEXSysSim.h:103
fitman.k
k
Definition: fitman.py:528