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

#include <jFexEmulatedTowers.h>

Inheritance diagram for LVL1::jFexEmulatedTowers:
Collaboration diagram for LVL1::jFexEmulatedTowers:

Public Member Functions

 jFexEmulatedTowers (const std::string &name, ISvcLocator *svc)
 
virtual StatusCode initialize () override
 Function initialising the algorithm. More...
 
virtual StatusCode execute (const EventContext &) const override
 Function executing the algorithm. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual bool isClonable () const override
 Specify if the algorithm is clonable. More...
 
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
 
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
virtual bool filterPassed (const EventContext &ctx) const
 
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 
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 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, V, H > &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
 

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 ReadFibersfromFile (const std::string &)
 
StatusCode ReadSCfromFile (const std::string &)
 
StatusCode ReadTilefromFile (const std::string &)
 
bool isBadSCellID (const std::string &) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &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

constexpr static unsigned int mapIndex (unsigned int jfex, unsigned int fpga, unsigned int channel, unsigned int tower)
 

Private Attributes

SG::ReadHandleKey< CaloCellContainerm_SCellKey {this, "SCell", "SCell", "SCell container"}
 
SG::ReadHandleKey< xAOD::TriggerTowerContainerm_triggerTowerKey {this, "xODTriggerTowers", "xAODTriggerTowers", "xAODTriggerTowers container"}
 
SG::WriteHandleKey< xAOD::jFexTowerContainerm_jTowersWriteKey {this,"jTowersWriteKey" ,"L1_jFexEmulatedTowers", "Write jFexEDM Trigger Tower container"}
 
Gaudi::Property< std::string > m_FiberMapping {this, "jFexTowerMapping", PathResolver::find_calib_file("L1CaloFEXByteStream/2023-08-01/jFexTowerMap.txt"), "Text file to convert from hardware fiber to eta-phi location"}
 
Gaudi::Property< bool > m_apply_masking {this, "SCellMasking", true, "Applies masking. Only use for data"}
 
Gaudi::Property< bool > m_isDATA {this, "isDATA" , true, "Tells the algorithm if it is data. Used for xAOD::TriggerTower WARNING due to the 0 supresion"}
 
Gaudi::Property< bool > m_doThinning {this, "DoThinning" , true, "Remove overlapped towers. Only FPGA Core region is saved"}
 
Gaudi::Property< std::string > m_jFEX2Scellmapping {this, "jFEX2SCmapping" , PathResolver::find_calib_file("L1CaloFEXByteStream/2022-10-19/jfex_SCID.txt") , "Text file to convert from simulation ID to SuperCell Identifier"}
 
Gaudi::Property< std::string > m_jFEX2Tilemapping {this, "jFEX2Tilemapping", PathResolver::find_calib_file("L1CaloFEXByteStream/2022-10-19/jfex_TileID.txt"), "Text file to convert from simulation ID to Tile Identifier"}
 
std::unordered_map< uint32_t, std::vector< uint64_t > > m_map_TTower2SCellsEM
 
std::unordered_map< uint32_t, std::vector< uint64_t > > m_map_TTower2SCellsHAD
 
std::unordered_map< uint32_t, std::tuple< uint32_t, float, float > > m_map_TTower2Tile
 
std::unordered_map< unsigned int, std::array< float, 6 > > m_Firm2Tower_map
 
SG::ReadHandleKey< CaloCellContainerm_CaloCellKey {this, "CaloCell", "", "Calo Cell container, supply AllCalo to activate"}
 {map index, {IDsimulation,eta,phi,source,iEta,iPhi}} More...
 
ToolHandle< ICaloSuperCellIDToolm_scellIdTool {this, "CaloSuperCellIDTool", "", "Offline / SuperCell ID mapping tool"}
 
const CaloCell_IDm_caloCellIdHelper {}
 
SG::ReadDecorHandleKey< xAOD::TriggerTowerContainerm_readTileOfflineDecorKey { this, "TileOfflineETKey", m_triggerTowerKey, "", "decoration of offline energy from Tile Towers" }
 
SG::WriteDecorHandleKey< xAOD::jFexTowerContainerm_caloCellSumETdecorKey {this, "CaloCellSumEtdecorKey", m_jTowersWriteKey, "", "Offline Calo Cell Et information of the jTower in MeV"}
 
SG::WriteDecorHandleKey< xAOD::jFexTowerContainerm_jtowerEtMeVdecorKey { this, "jtowerEtMeVdecorKey", m_jTowersWriteKey, "jtowerEtMeV", "jFex Tower Et in MeV"}
 
SG::WriteDecorHandleKey< xAOD::jFexTowerContainerm_jtowerEtTimingMeVdecorKey { this, "jtowerEtTimingMeVdecorKey", m_jTowersWriteKey, "jtowerEtTimingMeV", "jFex Tower Et, after timing cut, in MeV"}
 
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. 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

Definition at line 37 of file jFexEmulatedTowers.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ jFexEmulatedTowers()

LVL1::jFexEmulatedTowers::jFexEmulatedTowers ( const std::string &  name,
ISvcLocator *  svc 
)

Definition at line 31 of file jFexEmulatedTowers.cxx.

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64 {
65  return 0;
66 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > &  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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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::jFexEmulatedTowers::execute ( const EventContext &  ctx) const
overridevirtual

Function executing the algorithm.

Definition at line 76 of file jFexEmulatedTowers.cxx.

76  {
77 
78  //Reading the Scell container
79  SG::ReadHandle<CaloCellContainer> ScellContainer(m_SCellKey, ctx);
80  if(!ScellContainer.isValid()) {
81  ATH_MSG_ERROR("Could not retrieve collection " << ScellContainer.key() );
82  return StatusCode::FAILURE;
83  }
84 
85  //Reading the TriggerTower container
87  if(!triggerTowerContainer.isValid()) {
88  ATH_MSG_ERROR("Could not retrieve collection " << triggerTowerContainer.key() );
89  return StatusCode::FAILURE;
90  }
91 
92  // Reading the offline Calo cell container
93  const CaloCellContainer* caloCells = nullptr;
94  if (!m_CaloCellKey.empty()) {
95  SG::ReadHandle<CaloCellContainer> caloCellContainer(m_CaloCellKey, ctx);
96  if(!caloCellContainer.isValid()) {
97  ATH_MSG_ERROR("Could not retrieve collection " << caloCellContainer.key() );
98  return StatusCode::FAILURE;
99  }
100  caloCells = caloCellContainer.cptr();
101  }
102 
103  //WriteHandle for jFEX EDMs
104  //---jTower EDM
106  ATH_CHECK(jTowersContainer.record(std::make_unique<xAOD::jFexTowerContainer>(), std::make_unique<xAOD::jFexTowerAuxContainer>()));
107  ATH_MSG_DEBUG("Recorded jFexEmulatedTower container with key " << jTowersContainer.key());
108 
109  if(ScellContainer->empty() || triggerTowerContainer->empty() ){
110  ATH_MSG_WARNING("Cannot fill jTowers here, at least one container is empty. ScellContainer.size="<<ScellContainer->size() << " or triggerTowerContainer.size=" << triggerTowerContainer->size() );
111  return StatusCode::SUCCESS;
112  }
113 
114  // building Scell ID pointers
115  std::unordered_map< uint64_t, const CaloCell*> map_ScellID2ptr;
116 
117  for(const CaloCell* scell : *ScellContainer){
118  const uint64_t ID = scell->ID().get_compact();
119  map_ScellID2ptr[ID] = scell;
120  }
121 
122  // building Tile ID pointers
123  std::unordered_map< uint32_t, const xAOD::TriggerTower*> map_TileID2ptr;
124 
125  for(const xAOD::TriggerTower* tower : *triggerTowerContainer){
126 
127  // keeping just tile information
128  if(std::abs(tower->eta())>1.5 || tower->sampling()!=1) continue;
129 
130  map_TileID2ptr[tower->coolId()]=tower;
131  }
132 
133 
134  for( const auto& [key, element] : m_Firm2Tower_map){
135 
136  unsigned int jfex = (key >> 16) & 0xf;
137  unsigned int fpga = (key >> 12) & 0xf;
138  unsigned int channel = (key >> 4 ) & 0xff;
139  unsigned int tower = (key >> 0 ) & 0xf;
140 
141  const auto [f_IDSimulation, eta, phi, f_source, f_iEta, f_iPhi] = element;
142 
143  //elements that need to be casted
144  unsigned int IDSimulation = static_cast<int>(f_IDSimulation);
145  unsigned int source = static_cast<int>(f_source);
146  unsigned int iEta = static_cast<int>(f_iEta);
147  unsigned int iPhi = static_cast<int>(f_iPhi);
148 
149 
150  uint16_t Total_Et_encoded = 0;
151  uint16_t Total_Et_Timing_encoded = 0;
152  char jTower_sat = 0;
153 
154  float caloCellSumET(0); // Readout Et for Tower
155  int Total_Et_decoded(0);
156  int Total_Et_Timing_decoded(0);
157  if( source != 1 ){
158 
159  const std::unordered_map< uint32_t, std::vector<uint64_t> > * ptr_TTower2Cells;
160 
161  //HAD layer for HEC, FCAL2 and FCAL3
162  if(source == 3 or source > 4){
163  ptr_TTower2Cells = &m_map_TTower2SCellsHAD;
164  }
165  else{
166  ptr_TTower2Cells = &m_map_TTower2SCellsEM;
167  }
168 
169  //check that the jFEX Tower ID exists in the map
170  auto it_TTower2SCells = (*ptr_TTower2Cells).find(IDSimulation);
171  if(it_TTower2SCells == (*ptr_TTower2Cells).end()) {
172  ATH_MSG_ERROR("jFEX ID: "<<IDSimulation<< " not found on map m_map_TTower2SCellsEM/HAD");
173  return StatusCode::FAILURE;
174  }
175 
176  int Total_Et = 0;
177  int Total_Timing_Et = 0;
178  float Total_Et_float = 0;
179  bool invalid = m_apply_masking&&m_isDATA; // the isDATA is because there is no concept of invalid supercell in MC (the provenance bit is actually used for BCID in MC), so can never have an invalid jTower.
180  bool masked = m_apply_masking;
181  for (auto const& SCellID : it_TTower2SCells->second ) {
182  //check that the SCell Identifier exists in the map
183  auto it_ScellID2ptr = map_ScellID2ptr.find(SCellID);
184  if(it_ScellID2ptr == map_ScellID2ptr.end()) {
185  if(m_isDATA) ATH_MSG_DEBUG("Scell ID: 0x"<<std::hex<< (SCellID >> 32) <<std::dec<< " not found in the CaloCell Container, skipping");
186  // this is equivalent to treat the scell as a masked input, since masking takes precedence over invalidity
187  continue;
188  }
189 
190  const CaloCell* myCell = it_ScellID2ptr->second;
191  int val = std::round(myCell->energy()/(12.5*std::cosh(myCell->eta()))); // 12.5 is b.c. energy is in units of 12.5MeV per count
192  bool isMasked = m_apply_masking ? ((myCell)->provenance()&0x80) : false;
193  bool isInvalid = (m_apply_masking&&m_isDATA) ? ((myCell)->provenance()&0x40) : false;
194  bool isSaturated = (m_isDATA) ? myCell->quality() : false; // saturation algorithm not implemented in MC yet
195  bool passTiming = ( (myCell)->provenance() & 0x200 );
196 
197  invalid &= isInvalid;
198  masked &= isMasked;
199  if (!isMasked) {
200  jTower_sat |= isSaturated;
201  }
202 
203  if( isMasked ) {
204  //if masked then Et = 0
205  val = 0;
206  //countMasked++;
207  } else if( isInvalid ) {
208  val = 0;
209  }
210 
211  Total_Et += val;
212  if(val!=0) Total_Et_float += myCell->et();
213 
214  // tau timing cut
215  Total_Timing_Et += (passTiming) ? val : 0;
216 
217  // Readout path energy sum
218  if ( !m_CaloCellKey.empty() ) {
219  const std::vector<Identifier> caloCellIds = m_scellIdTool->superCellToOfflineID(myCell->ID());
220  float caloCellEt(0.); // offline Et for the SCell
221  //use findCell function of CaloCellContainer, which takes an identifier hash
222  for(auto& caloCellId : caloCellIds) {
223  const CaloCell* caloCell = caloCells->findCell(m_caloCellIdHelper->calo_cell_hash(caloCellId));
224  if(!caloCell) { ATH_MSG_WARNING("Could not find cell"); continue; }
225  caloCellEt += caloCell->e()*caloCell->sinTh();
226  }
227  caloCellSumET += caloCellEt;
228  }
229 
230  } // SCell loop
231 
232  // now must convert Total_Et int value into fex value: multi-level encoding
233  if(masked) {
234  Total_Et_encoded = 0; // no data
235  Total_Et_Timing_encoded = 0;
236  } else if(invalid) {
237  Total_Et_encoded = 4095; // invalid
238  Total_Et_Timing_encoded = 4095;
239  } else {
240  Total_Et_encoded = jFEXCompression::Compress( Total_Et*12.5);
241  Total_Et_Timing_encoded = jFEXCompression::Compress( Total_Timing_Et*12.5);
242  }
243 
244  // leaving this commented while outstanding questions above about treatment of supercells
245  // using floating point for MC until determine correct procedure for MC values re invalid/masking
246  if(!m_isDATA) Total_Et_encoded = jFEXCompression::Compress( Total_Et_float, masked );
247 
248  //
249  Total_Et_decoded = jFEXCompression::Expand( Total_Et_encoded );
250  Total_Et_Timing_decoded = jFEXCompression::Expand( Total_Et_Timing_encoded );
251  }
252  else{
253 
254  //check that the jFEX Tower ID exists in the map
255  auto it_TTower2Tile = m_map_TTower2Tile.find(IDSimulation);
256  if(it_TTower2Tile == m_map_TTower2Tile.end()) {
257  ATH_MSG_ERROR("ID: "<<IDSimulation<< " not found on map m_map_TTower2Tile");
258  return StatusCode::FAILURE;
259  }
260 
261  uint32_t TileID = std::get<0>( it_TTower2Tile->second );
262 
263  //check that the Tile Identifier exists in the map
264  auto it_TileID2ptr = map_TileID2ptr.find(TileID);
265  if(it_TileID2ptr == map_TileID2ptr.end()) {
266  if(m_isDATA) ATH_MSG_WARNING("Tile cool ID: "<<TileID<< " not found in the xAOD::TriggerTower, skipping");
267  continue;
268  }
269  else{
270  Total_Et_encoded = (it_TileID2ptr->second)->cpET();
271 
272  //
273  Total_Et_decoded = Total_Et_encoded * 500;
274  Total_Et_Timing_decoded = Total_Et_encoded * 500;
275 
276  // get the offline reconstructed energy from xAODTriggerTower decoration
277  if ( !m_CaloCellKey.empty() ) {
279  if ( cellEtByLayer_handle.isAvailable() ) {
280  std::vector<float> cellEtByLayer = cellEtByLayer_handle(*it_TileID2ptr->second);
281  // Stored in GeV, see TrigT1CaloCalibTools/src/L1CaloCells2TriggerTowers.cxx
282  caloCellSumET = 1000.0 * std::accumulate(cellEtByLayer.begin(), cellEtByLayer.end(), 0.0);
283  }
284  }
285  }
286  } // end of Tile
287  std::vector<uint16_t> vtower_ET;
288  vtower_ET.clear();
289  vtower_ET.push_back(Total_Et_encoded);
290 
291  std::vector<char> vtower_SAT;
292  vtower_SAT.clear();
293 
294  //Needs to be updated with Saturation flag from LAr CaloCell container, not ready yet!
295  vtower_SAT.push_back(jTower_sat);
296 
297  jTowersContainer->push_back( std::make_unique<xAOD::jFexTower>() );
298  jTowersContainer->back()->initialize(eta, phi, iEta, iPhi, IDSimulation, source, vtower_ET, jfex, fpga, channel, tower, vtower_SAT );
299 
300  if( m_doThinning && !jTowersContainer->back()->isCore() ){
301  jTowersContainer->pop_back();
302  } else {
303  // decorate with offline energy
304  if (!m_caloCellSumETdecorKey.empty()) {
306  (jTowerCaloCellSumEt) (*jTowersContainer->back()) = caloCellSumET;
307  }
308  // decorate tower energies in MeV without/with timing cut
309  if (!m_jtowerEtMeVdecorKey.empty()) {
311  (jTowerEtMeV) (*jTowersContainer->back()) = Total_Et_decoded;
312  }
313  if (!m_jtowerEtTimingMeVdecorKey.empty()) {
315  (jTowerEtTimingMeV) (*jTowersContainer->back()) = Total_Et_Timing_decoded;
316  }
317  }
318  } // firmware tower map
319 
320  // Return gracefully
321  return StatusCode::SUCCESS;
322 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90 {
91  // If we didn't find any symlinks to add, just return the collection
92  // from the base class. Otherwise, return the extended collection.
93  if (!m_extendedExtraObjects.empty()) {
95  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96  {
97  return execState( ctx ).filterPassed();
98  }

◆ initialize()

StatusCode LVL1::jFexEmulatedTowers::initialize ( )
overridevirtual

Function initialising the algorithm.

Definition at line 33 of file jFexEmulatedTowers.cxx.

33  {
34 
35  ATH_MSG_INFO( "Initializing L1CaloFEXAlgos/jFexEmulatedTowers algorithm with name: "<< name());
36  ATH_MSG_INFO( "Writting into SG key: "<< m_jTowersWriteKey);
37  ATH_MSG_INFO( "SCell masking: "<< m_apply_masking);
38  ATH_MSG_INFO( "Thinnig towers: "<< m_doThinning);
39 
41  ATH_CHECK( m_triggerTowerKey.initialize() );
42  ATH_CHECK( m_jTowersWriteKey.initialize() );
43 
44 
45  //Reading from CVMFS Fiber mapping
47 
48  //Reading from CVMFS Trigger Tower and their corresponding SCell ID
51 
52  // offline energy decoration setup
53  // SCell to Cell mapping
54  if (!m_CaloCellKey.empty()) {
55  ATH_CHECK( m_scellIdTool.retrieve() );
56  ATH_CHECK( detStore()->retrieve (m_caloCellIdHelper, "CaloCell_ID") );
57  }
58 
59  // Calo cell container
61 
62  // read Tile Tower decoration
64 
65  // Readout path cell sum Et decoration
67 
68  // tower energy decorations
71 
72 
73  return StatusCode::SUCCESS;
74 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isBadSCellID()

bool LVL1::jFexEmulatedTowers::isBadSCellID ( const std::string &  ID) const
private

Definition at line 443 of file jFexEmulatedTowers.cxx.

443  {
444 
445  // does it start with "0x"?, if so then is a GOOD SCell ID!
446  if (ID.find("0x") == std::string::npos) {
447  ATH_MSG_ERROR("Invalid SuperCell ID " << ID << ". Expecting hexadecimal number on the mapping file");
448  return true;
449  }
450  return false;
451 }

◆ isClonable()

bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ mapIndex()

constexpr unsigned int LVL1::jFexEmulatedTowers::mapIndex ( unsigned int  jfex,
unsigned int  fpga,
unsigned int  channel,
unsigned int  tower 
)
staticconstexprprivate

Definition at line 374 of file jFexEmulatedTowers.cxx.

374  {
375  // values from hardware: jfex=[0,5] 4 bits, fpga=[0,3] 4 bits, channel=[0,59] 8 bits, tower=[0,15] 4 bits
376  return (jfex << 16) | (fpga << 12) | (channel << 4) | tower;
377 }

◆ msg() [1/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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.

◆ ReadFibersfromFile()

StatusCode LVL1::jFexEmulatedTowers::ReadFibersfromFile ( const std::string &  fileName)
private

Definition at line 325 of file jFexEmulatedTowers.cxx.

325  {
326 
327 
328 
329  //openning file with ifstream
330  std::ifstream file(fileName);
331 
332  if ( !file.is_open() ){
333  ATH_MSG_ERROR("Could not open file:" << fileName);
334  return StatusCode::FAILURE;
335  }
336 
337  std::string line;
338  //loading the mapping information
339  while ( std::getline (file, line) ) {
340 
341  //removing the header of the file (it is just information!)
342  if(line[0] == '#') continue;
343 
344  //Splitting line in different substrings
345  std::stringstream oneLine(line);
346 
347  //reading elements
348  std::vector<float> elements;
349  std::string element;
350  while(std::getline(oneLine, element, ' '))
351  {
352  elements.push_back(std::stof(element));
353  }
354 
355  // It should have 10 elements
356  // ordered as: jfex fpga channel towerNr source globalEtaIndex globalPhiIndex IDSimulation eta phi
357  if(elements.size() != 10){
358  ATH_MSG_ERROR("Unexpected number of elemennts (10 expected) in file: "<< fileName);
359  return StatusCode::FAILURE;
360  }
361  // building array of <IDSimulation, eta, phi, source, iEta, iPhi>
362  std::array<float,6> aux_arr{ {elements.at(7),elements.at(8),elements.at(9),elements.at(4),elements.at(5),elements.at(6)} };
363 
364  //filling the map with the hash given by mapIndex()
365  m_Firm2Tower_map[ mapIndex(elements.at(0),elements.at(1),elements.at(2),elements.at(3)) ] = aux_arr;
366 
367  }
368  file.close();
369 
370  return StatusCode::SUCCESS;
371 }

◆ ReadSCfromFile()

StatusCode LVL1::jFexEmulatedTowers::ReadSCfromFile ( const std::string &  fileName)
private

Definition at line 379 of file jFexEmulatedTowers.cxx.

379  {
380 
381 
382 
383  //openning file with ifstream
384  std::ifstream file(fileName);
385 
386  if ( !file.is_open() ){
387  ATH_MSG_ERROR("Could not open file:" << fileName);
388  return StatusCode::FAILURE;
389  }
390 
391  std::string line;
392  //loading the mapping information into an unordered_map <Fex Tower ID, vector of SCell IDs>
393  while ( std::getline (file, line) ) {
394  std::vector<uint64_t> SCellvectorEM;
395  SCellvectorEM.clear();
396  std::vector<uint64_t> SCellvectorHAD;
397  SCellvectorHAD.clear();
398 
399  //removing the header of the file (it is just information!)
400  if(line[0] == '#') continue;
401 
402  //Splitting line in different substrings
403  std::stringstream oneSCellID(line);
404 
405  //reading elements
406  std::string substr = "";
407  int TTID = 0;
408  int elem = 0;
409 
410  while(std::getline(oneSCellID, substr, ' '))
411  {
412  ++elem;
413  if(elem == 1){
414  TTID = std::stoi(substr);
415  }
416  else{
417  //Check if it looks like a SCell Identifier
418  if(isBadSCellID(substr)){
419  return StatusCode::FAILURE;
420  }
421 
422  // converts hex number to unsigned long long int
423  uint64_t scid_uint64 = std::strtoull(substr.c_str(), nullptr, 0);
424 
425  //empty slots are filled with 0xffffffffffffffff
426  if(scid_uint64 == 0xffffffffffffffff) continue;
427 
428  //from element from 2 to 13 are EM SCells, element 14 is a HAD SCell
429  if(elem<14) SCellvectorEM.push_back(scid_uint64);
430  else SCellvectorHAD.push_back(scid_uint64);
431  }
432  }
433 
434  m_map_TTower2SCellsEM[TTID] = std::move(SCellvectorEM);
435  m_map_TTower2SCellsHAD[TTID] = std::move(SCellvectorHAD);
436 
437  }
438  file.close();
439 
440  return StatusCode::SUCCESS;
441 }

◆ ReadTilefromFile()

StatusCode LVL1::jFexEmulatedTowers::ReadTilefromFile ( const std::string &  fileName)
private

Definition at line 456 of file jFexEmulatedTowers.cxx.

456  {
457 
458  //openning file with ifstream
459  std::ifstream file(fileName);
460 
461  if ( !file.is_open() ){
462  ATH_MSG_ERROR("Could not open file:" << fileName);
463  return StatusCode::FAILURE;
464  }
465 
466  std::string line;
467  //loading the mapping information into an unordered_map <Fex Tower ID, vector of SCell IDs>
468  while ( std::getline (file, line) ) {
469 
470  //removing the header of the file (it is just information!)
471  if(line[0] == '#') continue;
472 
473  //Splitting line in different substrings
474  std::stringstream oneLine(line);
475 
476  std::vector<std::string> elements;
477  std::string element = "";
478 
479  while(std::getline(oneLine, element, ' ')){
480  elements.push_back(element);
481  }
482 
483  if(elements.size() != 4){
484  ATH_MSG_ERROR("Invalid number of element in " << line << ". Expecting 4 elements {jFexID, TileID, eta, phi}");
485  return StatusCode::FAILURE;
486  }
487 
488  uint32_t jFexID = std::stoi( elements.at(0) );
489  uint32_t TileID = std::stoi( elements.at(1) );
490  float eta = std::stof( elements.at(2) );
491  float phi = std::stof( elements.at(3) );
492 
493  m_map_TTower2Tile[jFexID] = {TileID,eta,phi};
494 
495  }
496  file.close();
497 
498  return StatusCode::SUCCESS;
499 }

◆ 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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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  }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext &  ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77 {
78  return BaseAlg::sysExecute (ctx);
79 }

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in InputMakerBase, and HypoBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107  {
109 
110  if (sc.isFailure()) {
111  return sc;
112  }
113 
114  ServiceHandle<ICondSvc> cs("CondSvc",name());
115  for (auto h : outputHandles()) {
116  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117  // do this inside the loop so we don't create the CondSvc until needed
118  if ( cs.retrieve().isFailure() ) {
119  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120  return StatusCode::SUCCESS;
121  }
122  if (cs->regHandle(this,*h).isFailure()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

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

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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_apply_masking

Gaudi::Property<bool> LVL1::jFexEmulatedTowers::m_apply_masking {this, "SCellMasking", true, "Applies masking. Only use for data"}
private

Definition at line 61 of file jFexEmulatedTowers.h.

◆ m_caloCellIdHelper

const CaloCell_ID* LVL1::jFexEmulatedTowers::m_caloCellIdHelper {}
private

Definition at line 90 of file jFexEmulatedTowers.h.

◆ m_CaloCellKey

SG::ReadHandleKey<CaloCellContainer> LVL1::jFexEmulatedTowers::m_CaloCellKey {this, "CaloCell", "", "Calo Cell container, supply AllCalo to activate"}
private

{map index, {IDsimulation,eta,phi,source,iEta,iPhi}}

Definition at line 86 of file jFexEmulatedTowers.h.

◆ m_caloCellSumETdecorKey

SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> LVL1::jFexEmulatedTowers::m_caloCellSumETdecorKey {this, "CaloCellSumEtdecorKey", m_jTowersWriteKey, "", "Offline Calo Cell Et information of the jTower in MeV"}
private

Definition at line 96 of file jFexEmulatedTowers.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doThinning

Gaudi::Property<bool> LVL1::jFexEmulatedTowers::m_doThinning {this, "DoThinning" , true, "Remove overlapped towers. Only FPGA Core region is saved"}
private

Definition at line 63 of file jFexEmulatedTowers.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_FiberMapping

Gaudi::Property<std::string> LVL1::jFexEmulatedTowers::m_FiberMapping {this, "jFexTowerMapping", PathResolver::find_calib_file("L1CaloFEXByteStream/2023-08-01/jFexTowerMap.txt"), "Text file to convert from hardware fiber to eta-phi location"}
private

Definition at line 58 of file jFexEmulatedTowers.h.

◆ m_Firm2Tower_map

std::unordered_map<unsigned int, std::array<float,6> > LVL1::jFexEmulatedTowers::m_Firm2Tower_map
private

Definition at line 82 of file jFexEmulatedTowers.h.

◆ m_isDATA

Gaudi::Property<bool> LVL1::jFexEmulatedTowers::m_isDATA {this, "isDATA" , true, "Tells the algorithm if it is data. Used for xAOD::TriggerTower WARNING due to the 0 supresion"}
private

Definition at line 62 of file jFexEmulatedTowers.h.

◆ m_jFEX2Scellmapping

Gaudi::Property<std::string> LVL1::jFexEmulatedTowers::m_jFEX2Scellmapping {this, "jFEX2SCmapping" , PathResolver::find_calib_file("L1CaloFEXByteStream/2022-10-19/jfex_SCID.txt") , "Text file to convert from simulation ID to SuperCell Identifier"}
private

Definition at line 66 of file jFexEmulatedTowers.h.

◆ m_jFEX2Tilemapping

Gaudi::Property<std::string> LVL1::jFexEmulatedTowers::m_jFEX2Tilemapping {this, "jFEX2Tilemapping", PathResolver::find_calib_file("L1CaloFEXByteStream/2022-10-19/jfex_TileID.txt"), "Text file to convert from simulation ID to Tile Identifier"}
private

Definition at line 67 of file jFexEmulatedTowers.h.

◆ m_jtowerEtMeVdecorKey

SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> LVL1::jFexEmulatedTowers::m_jtowerEtMeVdecorKey { this, "jtowerEtMeVdecorKey", m_jTowersWriteKey, "jtowerEtMeV", "jFex Tower Et in MeV"}
private

Definition at line 97 of file jFexEmulatedTowers.h.

◆ m_jtowerEtTimingMeVdecorKey

SG::WriteDecorHandleKey<xAOD::jFexTowerContainer> LVL1::jFexEmulatedTowers::m_jtowerEtTimingMeVdecorKey { this, "jtowerEtTimingMeVdecorKey", m_jTowersWriteKey, "jtowerEtTimingMeV", "jFex Tower Et, after timing cut, in MeV"}
private

Definition at line 98 of file jFexEmulatedTowers.h.

◆ m_jTowersWriteKey

SG::WriteHandleKey< xAOD::jFexTowerContainer > LVL1::jFexEmulatedTowers::m_jTowersWriteKey {this,"jTowersWriteKey" ,"L1_jFexEmulatedTowers", "Write jFexEDM Trigger Tower container"}
private

Definition at line 55 of file jFexEmulatedTowers.h.

◆ m_map_TTower2SCellsEM

std::unordered_map< uint32_t, std::vector<uint64_t> > LVL1::jFexEmulatedTowers::m_map_TTower2SCellsEM
private

Definition at line 76 of file jFexEmulatedTowers.h.

◆ m_map_TTower2SCellsHAD

std::unordered_map< uint32_t, std::vector<uint64_t> > LVL1::jFexEmulatedTowers::m_map_TTower2SCellsHAD
private

Definition at line 77 of file jFexEmulatedTowers.h.

◆ m_map_TTower2Tile

std::unordered_map< uint32_t, std::tuple<uint32_t,float,float> > LVL1::jFexEmulatedTowers::m_map_TTower2Tile
private

Definition at line 78 of file jFexEmulatedTowers.h.

◆ m_readTileOfflineDecorKey

SG::ReadDecorHandleKey<xAOD::TriggerTowerContainer> LVL1::jFexEmulatedTowers::m_readTileOfflineDecorKey { this, "TileOfflineETKey", m_triggerTowerKey, "", "decoration of offline energy from Tile Towers" }
private

Definition at line 93 of file jFexEmulatedTowers.h.

◆ m_scellIdTool

ToolHandle<ICaloSuperCellIDTool> LVL1::jFexEmulatedTowers::m_scellIdTool {this, "CaloSuperCellIDTool", "", "Offline / SuperCell ID mapping tool"}
private

Definition at line 88 of file jFexEmulatedTowers.h.

◆ m_SCellKey

SG::ReadHandleKey<CaloCellContainer> LVL1::jFexEmulatedTowers::m_SCellKey {this, "SCell", "SCell", "SCell container"}
private

Definition at line 49 of file jFexEmulatedTowers.h.

◆ m_triggerTowerKey

SG::ReadHandleKey<xAOD::TriggerTowerContainer> LVL1::jFexEmulatedTowers::m_triggerTowerKey {this, "xODTriggerTowers", "xAODTriggerTowers", "xAODTriggerTowers container"}
private

Definition at line 52 of file jFexEmulatedTowers.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
LVL1::jFexEmulatedTowers::m_readTileOfflineDecorKey
SG::ReadDecorHandleKey< xAOD::TriggerTowerContainer > m_readTileOfflineDecorKey
Definition: jFexEmulatedTowers.h:93
CaloCell_Base_ID::calo_cell_hash
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
runITkAlign.accumulate
accumulate
Update flags based on parser line args.
Definition: runITkAlign.py:62
MuonGM::round
float round(const float toRound, const unsigned int decimals)
Definition: Mdt.cxx:27
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
python.getProblemFolderFromLogs.elem
elem
Definition: getProblemFolderFromLogs.py:90
CaloCell::e
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition: CaloCell.h:333
LVL1::jFexEmulatedTowers::m_jFEX2Scellmapping
Gaudi::Property< std::string > m_jFEX2Scellmapping
Definition: jFexEmulatedTowers.h:66
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
LVL1::jFexEmulatedTowers::ReadTilefromFile
StatusCode ReadTilefromFile(const std::string &)
Definition: jFexEmulatedTowers.cxx:456
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
dq_defect_bulk_create_defects.line
line
Definition: dq_defect_bulk_create_defects.py:27
LVL1::jFexEmulatedTowers::isBadSCellID
bool isBadSCellID(const std::string &) const
Definition: jFexEmulatedTowers.cxx:443
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
CaloCell::energy
double energy() const
get energy (data member)
Definition: CaloCell.h:327
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:74
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
LVL1::jFEXCompression::Expand
static int Expand(unsigned int code)
Uncompress data.
Definition: jFEXCompression.cxx:58
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
LVL1::jFexEmulatedTowers::m_scellIdTool
ToolHandle< ICaloSuperCellIDTool > m_scellIdTool
Definition: jFexEmulatedTowers.h:88
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::ReadDecorHandle
Handle class for reading a decoration on an object.
Definition: StoreGate/StoreGate/ReadDecorHandle.h:94
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:93
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
TileID
Helper class for TileCal offline identifiers.
Definition: TileID.h:67
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
LVL1::jFEXCompression::Compress
static unsigned int Compress(float floatEt, bool empty=false)
Compress data.
Definition: jFEXCompression.cxx:25
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition: StoreGate/StoreGate/WriteDecorHandle.h:100
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
LVL1::jFexEmulatedTowers::m_caloCellIdHelper
const CaloCell_ID * m_caloCellIdHelper
Definition: jFexEmulatedTowers.h:90
xAOD::TriggerTower_v2
Description of TriggerTower_v2.
Definition: TriggerTower_v2.h:49
file
TFile * file
Definition: tile_monitor.h:29
CaloCell::et
virtual double et() const override final
get et
Definition: CaloCell.h:423
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::jFexEmulatedTowers::m_Firm2Tower_map
std::unordered_map< unsigned int, std::array< float, 6 > > m_Firm2Tower_map
Definition: jFexEmulatedTowers.h:82
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
LVL1::jFexEmulatedTowers::m_CaloCellKey
SG::ReadHandleKey< CaloCellContainer > m_CaloCellKey
{map index, {IDsimulation,eta,phi,source,iEta,iPhi}}
Definition: jFexEmulatedTowers.h:86
CaloCell::quality
uint16_t quality() const
get quality (data member)
Definition: CaloCell.h:348
LVL1::jFexEmulatedTowers::m_jTowersWriteKey
SG::WriteHandleKey< xAOD::jFexTowerContainer > m_jTowersWriteKey
Definition: jFexEmulatedTowers.h:55
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
CaloCellContainer::findCell
const CaloCell * findCell(const IdentifierHash theHash) const
fast find method given identifier hash.
Definition: CaloCellContainer.cxx:345
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
LVL1::jFexEmulatedTowers::m_map_TTower2SCellsHAD
std::unordered_map< uint32_t, std::vector< uint64_t > > m_map_TTower2SCellsHAD
Definition: jFexEmulatedTowers.h:77
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
LVL1::jFexEmulatedTowers::m_map_TTower2SCellsEM
std::unordered_map< uint32_t, std::vector< uint64_t > > m_map_TTower2SCellsEM
Definition: jFexEmulatedTowers.h:76
CaloCell::ID
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition: CaloCell.h:295
LVL1::jFexEmulatedTowers::m_triggerTowerKey
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerKey
Definition: jFexEmulatedTowers.h:52
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
LVL1::jFexEmulatedTowers::m_SCellKey
SG::ReadHandleKey< CaloCellContainer > m_SCellKey
Definition: jFexEmulatedTowers.h:49
Trk::iPhi
@ iPhi
Definition: ParamDefs.h:47
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:73
LVL1::jFexEmulatedTowers::m_jFEX2Tilemapping
Gaudi::Property< std::string > m_jFEX2Tilemapping
Definition: jFexEmulatedTowers.h:67
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
LVL1::jFexEmulatedTowers::ReadSCfromFile
StatusCode ReadSCfromFile(const std::string &)
Definition: jFexEmulatedTowers.cxx:379
LVL1::jFexEmulatedTowers::m_apply_masking
Gaudi::Property< bool > m_apply_masking
Definition: jFexEmulatedTowers.h:61
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
copySelective.source
string source
Definition: copySelective.py:31
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
LVL1::jFexEmulatedTowers::m_isDATA
Gaudi::Property< bool > m_isDATA
Definition: jFexEmulatedTowers.h:62
LVL1::jFexEmulatedTowers::ReadFibersfromFile
StatusCode ReadFibersfromFile(const std::string &)
Definition: jFexEmulatedTowers.cxx:325
LVL1::jFexEmulatedTowers::m_jtowerEtMeVdecorKey
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_jtowerEtMeVdecorKey
Definition: jFexEmulatedTowers.h:97
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
jobOptions.fileName
fileName
Definition: jobOptions.SuperChic_ALP2.py:39
LVL1::jFexEmulatedTowers::m_map_TTower2Tile
std::unordered_map< uint32_t, std::tuple< uint32_t, float, float > > m_map_TTower2Tile
Definition: jFexEmulatedTowers.h:78
LVL1::jFexEmulatedTowers::m_FiberMapping
Gaudi::Property< std::string > m_FiberMapping
Definition: jFexEmulatedTowers.h:58
LVL1::jFexEmulatedTowers::m_caloCellSumETdecorKey
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_caloCellSumETdecorKey
Definition: jFexEmulatedTowers.h:96
LVL1::jFexEmulatedTowers::m_jtowerEtTimingMeVdecorKey
SG::WriteDecorHandleKey< xAOD::jFexTowerContainer > m_jtowerEtTimingMeVdecorKey
Definition: jFexEmulatedTowers.h:98
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
xAOD::iEta
setScale setgFexType iEta
Definition: gFexJetRoI_v1.cxx:77
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:27
LVL1::jFexEmulatedTowers::m_doThinning
Gaudi::Property< bool > m_doThinning
Definition: jFexEmulatedTowers.h:63
CaloCell::sinTh
virtual double sinTh() const override final
get sin(theta) (through CaloDetDescrElement)
Definition: CaloCell.h:389
CaloCell::eta
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Definition: CaloCell.h:382
fitman.k
k
Definition: fitman.py:528
LVL1::jFexEmulatedTowers::mapIndex
constexpr static unsigned int mapIndex(unsigned int jfex, unsigned int fpga, unsigned int channel, unsigned int tower)
Definition: jFexEmulatedTowers.cxx:374
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37