ATLAS Offline Software
RoIBResultToxAOD.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // STL include(s):
6 #include <algorithm>
7 #include <cmath>
8 
9 // Local include(s):
10 #include "RoIBResultToxAOD.h"
11 
12 // Gaudi/Athena include(s):
13 #include "StoreGate/ReadHandle.h"
14 #include "StoreGate/WriteHandle.h"
15 
16 // LVL1 trigger include(s):
25 
26 // Trigger configuration interface includes:
27 #include "TrigConfData/L1Menu.h"
28 
29 // xAOD include(s):
35 
36 namespace {
37 
39  static const double GeV = 1000.0;
40 
41 } // private namespace
42 
44  ISvcLocator* svcLoc )
45  : AthReentrantAlgorithm( name, svcLoc )
46 {}
47 
49 
50  // Print system info.
51  if( m_doCalo == false ) {
52  ATH_MSG_INFO( "Inputs from LVL1 Calo systems switched off" );
53  }
54  if( m_doMuon == false ) {
55  ATH_MSG_INFO( "Inputs from LVL1 Muon systems switched off" );
56  }
57 
58  if( m_doMuon ) {
59  // Get the RPC RecRoI tool
60  ATH_CHECK( m_recRPCRoiTool.retrieve() );
61  ATH_MSG_DEBUG( "Connected to " << m_recRPCRoiTool.typeAndName() );
62 
63  // Get the TGC RecRoI tool
64  ATH_CHECK( m_recTGCRoiTool.retrieve() );
65  ATH_MSG_DEBUG( "Connected to " << m_recTGCRoiTool.typeAndName() );
66  } else {
67  m_recRPCRoiTool.disable();
68  m_recTGCRoiTool.disable();
69  }
70 
71  if( m_doCalo ) {
72  // Get tools
73  ATH_CHECK( m_emTauTool.retrieve() );
74  ATH_MSG_DEBUG( "Got " << m_emTauTool.typeAndName() );
75 
76  ATH_CHECK( m_jetTool.retrieve() );
77  ATH_MSG_DEBUG( "Got " << m_jetTool.typeAndName() );
78  } else {
79  m_emTauTool.disable();
80  m_jetTool.disable();
81  }
82 
83  // Initialise the keys.
85  ATH_CHECK( m_cpmTowerKey.initialize(SG::AllowEmpty) );
87  ATH_CHECK( m_muonRoIKey.initialize(m_doMuon) );
88  ATH_CHECK( m_emtauRoIKey.initialize(m_doCalo) );
89  ATH_CHECK( m_energysumRoIKey.initialize(m_doCalo) );
90  ATH_CHECK( m_jetetRoIKey.initialize(m_doCalo) );
91  ATH_CHECK( m_jetRoIKey.initialize(m_doCalo) );
92 
93  // Return gracefully.
94  return StatusCode::SUCCESS;
95 }
96 
97 StatusCode RoIBResultToxAOD::execute(const EventContext& ctx) const {
98 
99  // Tell the user what's happening.
100  ATH_MSG_DEBUG( "in execute()" );
101 
102  // Access the input object.
103  auto roibResult = SG::makeHandle( m_roibResultKey, ctx );
104  if (!roibResult.isValid()) {
105  ATH_MSG_ERROR("Failed to retrieve " << m_roibResultKey.key());
106  return StatusCode::FAILURE;
107  }
108 
109  // Create the muon RoIs:
110  if( m_doMuon ) {
111  ATH_CHECK( createMuonRoI( *roibResult, ctx ) );
112  }
113 
114  // Create the calo RoIs:
115  if( m_doCalo ) {
116  ATH_CHECK( createEmTauRoI( *roibResult, ctx ) );
117  ATH_CHECK( createJetEnergyRoI( *roibResult, ctx ) );
118  }
119 
120  // Return gracefully.
121  return StatusCode::SUCCESS;
122 }
123 
125  const EventContext& ctx ) const {
126 
127  // Tell the user what's happening.
128  ATH_MSG_DEBUG( "building EmTauRoI" );
129 
131  auto emtau_xaod = std::make_unique< xAOD::EmTauRoIContainer >();
132  auto emtau_aux = std::make_unique< xAOD::EmTauRoIAuxContainer >();
133  emtau_xaod->setStore( emtau_aux.get() );
134 
135  const TrigConf::L1Menu * l1menu = nullptr;
136  std::map< int, std::string > emThresholdNames;
137  std::map< int, std::string > tauThresholdNames;
138 
140  // Digit scale for calorimeter trigger
141  float caloTrigScale = static_cast<float>(l1menu->thrExtraInfo().EM().resolutionMeV());
142  for( const auto& thr : l1menu->thresholds("EM")) {
143  emThresholdNames[ thr->mapping() ] = thr->name();
144  }
145  for( const auto& thr : l1menu->thresholds("TAU")) {
146  tauThresholdNames[ thr->mapping() ] = thr->name();
147  }
148 
149  // Tool to reconstruct EM/tau cluster & isolation sums
150  // - need to form tower map for RoI reconstruction
151  xAOD::CPMTowerMap_t cpmtowers;
152  if( m_emTauTool.isEnabled() && ( ! m_cpmTowerKey.key().empty() ) ) {
153  auto cpmTower = SG::makeHandle( m_cpmTowerKey, ctx );
154  if (cpmTower.isValid()) {
155  m_emTauTool->mapTowers( cpmTower.cptr(), &cpmtowers );
156  } else {
157  ATH_MSG_DEBUG( "No CPMTowerCollection found at " << m_cpmTowerKey.key() );
158  }
159  }
160 
161  // reconstruct ROI
162  ATH_MSG_DEBUG( "EmTau ROI" );
163  for( const ROIB::EMTauResult& emtResult : result.eMTauResult() ) {
164  for( const ROIB::EMTauRoI& emtRoI : emtResult.roIVec() ) {
165 
166  uint32_t roIWord = emtRoI.roIWord();
167  ATH_MSG_DEBUG( "About to create RecEmTauRoI : " << MSG::hex
168  << std::setw( 8 ) << roIWord << MSG::dec );
169 
170  // RecRoI
171  LVL1::RecEmTauRoI recRoI( roIWord, l1menu );
172 
173  // xAOD component
174  // ATLAS standard phi convention differs from L1 hardware convention
175  double roiPhi = recRoI.phi();
176  if( roiPhi > M_PI ) roiPhi -= 2 * M_PI;
177 
178  xAOD::EmTauRoI* roi = new xAOD::EmTauRoI();
179  emtau_xaod->push_back( roi );
180  roi->initialize( roIWord, recRoI.eta(), roiPhi );
181  roi->setEtScale( caloTrigScale );
182  roi->setThrPattern( recRoI.thresholdPattern() );
183 
184  // fired thresholds
185  std::unique_ptr< std::vector< unsigned int > > thrV( recRoI.thresholdsPassed() );
186  for( unsigned int thr : *thrV ) {
187  const float thrValue = recRoI.triggerThreshold( thr ) * GeV;
188  auto thrType = recRoI.thresholdType( thr );
189  auto emNameItr = emThresholdNames.find( thr );
190  auto tauNameItr = tauThresholdNames.find( thr );
191  std::string thrName = "NameNotFound";
192  if( ( thrType == LVL1::TrigT1CaloDefs::EMAlg ) &&
193  ( emNameItr != emThresholdNames.end() ) ) {
194  thrName = emNameItr->second;
195  }
196  else if( ( thrType == LVL1::TrigT1CaloDefs::TauAlg ) &&
197  ( tauNameItr != tauThresholdNames.end() ) ) {
198  thrName = tauNameItr->second;
199  }
200 
201  roi->addThreshold( thrName, thrValue );
202 
203  ATH_MSG_DEBUG( "EmTau Thr : " << thr << ", name = " << thrName
204  << ", value = " << thrValue );
205  }
206 
207  // Cluster ET values, reconstructed from TriggerTowers
208  if( m_emTauTool.isEnabled() ) {
209  LVL1::CPMTobAlgorithm roiSums = m_emTauTool->formSums(l1menu, roIWord, &cpmtowers );
210  roi->setCore( roiSums.CoreET() * caloTrigScale );
211  roi->setEmClus( roiSums.EMClusET() * caloTrigScale );
212  roi->setTauClus( roiSums.TauClusET() * caloTrigScale );
213  roi->setEmIsol( roiSums.EMIsolET() * caloTrigScale );
214  roi->setHadIsol( roiSums.HadIsolET() * caloTrigScale );
215  roi->setHadCore( roiSums.HadCoreET() * caloTrigScale );
216  }
217  }
218  }
219 
220  // Record the results.
221  auto emtauRoI = SG::makeHandle( m_emtauRoIKey, ctx );
222  ATH_CHECK( emtauRoI.record( std::move( emtau_xaod ),
223  std::move( emtau_aux ) ) );
224 
225  // Return gracefully.
226  return StatusCode::SUCCESS;
227 }
228 
231  const EventContext& ctx ) const {
232 
233  ATH_MSG_DEBUG( "building JetEnergyRoI" );
234 
235  // Containers for xAOD
236  auto jet_xaod = std::make_unique< xAOD::JetRoIContainer >();
237  auto jet_aux = std::make_unique< xAOD::JetRoIAuxContainer >();
238  jet_xaod->setStore( jet_aux.get() );
239 
240  auto esum_xaod = std::make_unique< xAOD::EnergySumRoI >();
241  auto esum_aux = std::make_unique< xAOD::EnergySumRoIAuxInfo >();
242  esum_xaod->setStore( esum_aux.get() );
243 
244  auto jetet_xaod = std::make_unique< xAOD::JetEtRoI >();
245  auto jetet_aux = std::make_unique< xAOD::JetEtRoIAuxInfo >();
246  jetet_xaod->setStore( jetet_aux.get() );
247 
248  const TrigConf::L1Menu * l1menu = nullptr;
250 
251  // Digit scale for calorimeter trigger
252  float caloTrigScale = static_cast<float>(l1menu->thrExtraInfo().JET().resolutionMeV());
253  ATH_MSG_DEBUG( "caloTrigScale = " << caloTrigScale );
254 
255  // Fill maps of threshold names
256  std::map<int, std::string> jetNames;
257  std::map<int, std::string> jfNames;
258  std::map<int, std::string> jbNames;
259  std::map<int, std::string> xeNames;
260  std::map<int, std::string> teNames;
261  std::map<int, std::string> xsNames;
262  std::map<int, std::string> jeNames;
263  for( const auto& thr : l1menu->thresholds("JET")) {
264  jetNames[ thr->mapping() ] = thr->name();
265  }
266  for( const auto& thr : l1menu->thresholds("XE")) {
267  xeNames[ thr->mapping() ] = thr->name();
268  }
269  for( const auto& thr : l1menu->thresholds("TE")) {
270  teNames[ thr->mapping() ] = thr->name();
271  }
272  for( const auto& thr : l1menu->thresholds("XS")) {
273  xsNames[ thr->mapping() ] = thr->name();
274  }
275 
276  // Tool to reconstruct Jet cluster ET sums
277  // - form input map ready for analysis
278  std::map< int, LVL1::JetInput* > jetInputs;
279  if( m_jetTool.isEnabled() && ( ! m_jetElementKey.key().empty() ) ) {
280  auto jetElement = SG::makeHandle( m_jetElementKey, ctx );
281  if (jetElement.isValid()) {
282  m_jetTool->mapJetInputs( jetElement.cptr(), &jetInputs );
283  } else {
284  ATH_MSG_DEBUG( "No JetElementContainer found at " << m_jetElementKey.key() );
285  }
286  }
287  std::vector< std::unique_ptr< LVL1::JetInput > > jetInputsHolder;
288  for( auto pair : jetInputs ) {
289  jetInputsHolder.emplace_back( pair.second );
290  }
291 
292  // reconstruct ROI
293  for( const ROIB::JetEnergyResult& jeteResult : result.jetEnergyResult() ) {
294  auto itJET = jeteResult.roIVec().begin();
295  auto endJET = jeteResult.roIVec().end();
296  for( ; itJET != endJET; ++itJET ) {
297 
298  const uint32_t roIWord = itJET->roIWord();
299 
300  ATH_MSG_DEBUG( "Jet RoI, RoIWord = " << MSG::hex << std::setw( 8 )
301  << roIWord << MSG::dec );
302 
303  // RoI type
305  const int roiType = conv.roiType( roIWord );
306 
307  // Jet ROI
308  if( roiType == LVL1::TrigT1CaloDefs::JetRoIWordType ) {
309  // RecRoI
310  LVL1::RecJetRoI recRoI( roIWord, l1menu );
311 
312  // xAOD component
313  // Convert to ATLAS phi convention
314  double roiPhi = recRoI.phi();
315  if( roiPhi > M_PI ) roiPhi -= 2 * M_PI;
316 
317  xAOD::JetRoI* roi = new xAOD::JetRoI();
318  jet_xaod->push_back( roi );
319  roi->initialize( roIWord, recRoI.eta(), roiPhi );
320  roi->setEtScale( caloTrigScale );
321  roi->setThrPattern( recRoI.thresholdPattern() );
322 
323  // fired Jet thresholds
324  for( unsigned int thr : recRoI.thresholdsPassed() ) {
325 
326  const double thrValue = recRoI.triggerThreshold( thr ) * GeV;
327  auto jetNameItr = jetNames.find( thr );
328  auto jfNameItr = jfNames.find( thr );
329  auto jbNameItr = jbNames.find( thr );
330  std::string thrName = "NameNotFound";
331  if( ! recRoI.isForwardJet() ) {
332  if( jetNameItr != jetNames.end() ) {
333  thrName = jetNameItr->second;
334  }
335  }
336  else if( recRoI.eta() > 0 ) {
337  if( jfNameItr != jfNames.end() ) {
338  thrName = jfNameItr->second;
339  }
340  }
341  else {
342  if( jbNameItr != jbNames.end() ) {
343  thrName = jbNameItr->second;
344  }
345  }
346 
347  roi->addThreshold( thrName, thrValue );
348 
349  ATH_MSG_DEBUG( "Jet Thr : " << thrName
350  << ", value = " << thrValue );
351  }
352 
353  // Jet Cluster ET sums
354  if( m_jetTool.isEnabled() ) {
355  LVL1::JEMJetAlgorithm roiSums = m_jetTool->formSums( roIWord, &jetInputs );
356  roi->setEt4x4( roiSums.ET4x4() * caloTrigScale );
357  roi->setEt6x6( roiSums.ET6x6() * caloTrigScale );
358  roi->setEt8x8( roiSums.ET8x8() * caloTrigScale );
359  }
360 
361  }
362  // Jet ET ROI
363  else if( roiType == LVL1::TrigT1CaloDefs::JetEtRoIWordType ) {
364 
365  // xAOD component
366  jetet_xaod->setRoIWord( roIWord );
367 
368  // fired Jet ET thresholds
369  for( unsigned int i = 0;
371  if( ( roIWord >> i ) & 0x1 ) {
372  std::string thrName = "NameNotFound";
373  if (jeNames.find(i) != jeNames.end()) thrName = jeNames[i];
374  jetet_xaod->addThreshold( thrName );
375  ATH_MSG_DEBUG( "JetEt Thr : " << thrName );
376  }
377  }
378 
379  }
380  // EnergySum ROI
381  else if ( roiType == LVL1::TrigT1CaloDefs::EnergyRoIWordType0 ) {
382 
383  // Extract information and fill EnergySumRoI
384  const uint32_t roiWord0 = roIWord;
385  ATH_MSG_DEBUG( "ET RoIWord 0 : " << MSG::hex << std::setw( 8 )
386  << roiWord0 << MSG::dec );
387  ++itJET;
388  const uint32_t roiWord1 = itJET->roIWord();
389  ATH_MSG_DEBUG( "ET RoIWord 1 : " << MSG::hex << std::setw( 8 )
390  << roiWord1 << MSG::dec );
391  ++itJET;
392  const uint32_t roiWord2 = itJET->roIWord();
393  ATH_MSG_DEBUG( "ET RoIWord 2 : " << MSG::hex << std::setw( 8 )
394  << roiWord2 << MSG::dec );
395 
396  // RecRoI
397  LVL1::RecEnergyRoI recRoI( roiWord0, roiWord1, roiWord2, l1menu );
398 
399  // xAOD component
400  esum_xaod->initialize( roiWord0, roiWord1, roiWord2,
401  recRoI.energyX() * caloTrigScale,
402  recRoI.energyY() * caloTrigScale,
403  recRoI.energyT() * caloTrigScale );
404 
405  // fired summed ET thresholds
406  for( unsigned int thr : recRoI.etMissThresholdsPassed() ) {
407  auto xeNameItr = xeNames.find( thr - 1 );
408  const std::string thrName = ( xeNameItr != xeNames.end() ?
409  xeNameItr->second :
410  "NameNotFound" );
411  esum_xaod->addThreshold( thrName );
412  ATH_MSG_DEBUG( "ETmiss threshold : " << thrName );
413  }
414 
415  // fired missing ET thresholds
416  for( unsigned int thr : recRoI.sumEtThresholdsPassed() ) {
417  auto teNameItr = teNames.find( thr - 1 );
418  const std::string thrName = ( teNameItr != teNames.end() ?
419  teNameItr->second :
420  "NameNotFound" );
421  esum_xaod->addThreshold( thrName );
422  ATH_MSG_DEBUG( "SumET threshold : " << thrName );
423  }
424 
425  // fired missing ET significance thresholds
426  for( unsigned int thr : recRoI.mEtSigThresholdsPassed() ) {
427  auto xsNameItr = xsNames.find( thr - 1 );
428  const std::string thrName = ( xsNameItr != xsNames.end() ?
429  xsNameItr->second :
430  "NameNotFound" );
431  esum_xaod->addThreshold( thrName );
432  ATH_MSG_DEBUG( "METSig threshold : " << thrName );
433  }
434  }
435  }
436  }
437 
439  auto jetRoI = SG::makeHandle( m_jetRoIKey, ctx );
440  ATH_CHECK( jetRoI.record( std::move( jet_xaod ), std::move( jet_aux ) ) );
441 
442  auto jetetRoI = SG::makeHandle( m_jetetRoIKey, ctx );
443  ATH_CHECK( jetetRoI.record( std::move( jetet_xaod ),
444  std::move( jetet_aux ) ) );
445 
446  auto energysumRoI = SG::makeHandle( m_energysumRoIKey, ctx );
447  ATH_CHECK( energysumRoI.record( std::move( esum_xaod ),
448  std::move( esum_aux ) ) );
449 
450  // Return gracefully.
451  return StatusCode::SUCCESS;
452 }
453 
455  const EventContext& ctx ) const {
456 
457  ATH_MSG_DEBUG( "in buildMuonRoI()" );
458 
459  const TrigConf::L1Menu * l1menu = nullptr;
461 
462  // Create the xAOD container.
463  auto mu_xaod = std::make_unique< xAOD::MuonRoIContainer >();
464  auto mu_aux = std::make_unique< xAOD::MuonRoIAuxContainer >();
465  mu_xaod->setStore( mu_aux.get() );
466 
467 
468  std::vector< TrigConf::TriggerThreshold* > muonThresholds;
469  std::map< int, std::string > thresholdNames;
470  for( const auto& thr : l1menu->thresholds("MU")) {
471  thresholdNames[ thr->mapping() ] = thr->name();
472  }
473 
474  // get Muon ROI
475  const std::vector< ROIB::MuCTPIRoI >& muonRoIV =
476  result.muCTPIResult().roIVec();
477 
478  // reconstruct ROI
479  ATH_MSG_DEBUG( "Muon ROI" );
480  for( const ROIB::MuCTPIRoI& roi : muonRoIV ) {
481 
482  uint32_t roIWord = roi.roIWord();
483 
484  ATH_MSG_DEBUG( MSG::hex << std::setw( 8 ) << roIWord );
485 
486  // RecRoI
487  LVL1::RecMuonRoI recRoI( roIWord, m_recRPCRoiTool.get(), m_recTGCRoiTool.get(), l1menu );
488 
489  const double thrValue = recRoI.getThresholdValue() * GeV;
490  const int index = recRoI.getThresholdNumber() - 1;
491  auto thrNameItr = thresholdNames.find( index );
492  const std::string thrName = ( thrNameItr != thresholdNames.end() ?
493  thrNameItr->second :
494  "NameNotFound" );
495 
496  xAOD::MuonRoI* xaod_roi = new xAOD::MuonRoI();
497  mu_xaod->push_back( xaod_roi );
498  xaod_roi->initialize( roIWord, recRoI.eta(), recRoI.phi(), thrName,
499  thrValue );
500 
501  ATH_MSG_DEBUG( "Muon Thr : " << thrName << ", value = " << thrValue );
502  }
503 
504  // Record the muon RoIs.
505  auto muonRoI = SG::makeHandle( m_muonRoIKey, ctx );
506  ATH_CHECK( muonRoI.record( std::move( mu_xaod ), std::move( mu_aux ) ) );
507 
508  // Return gracefully.
509  return StatusCode::SUCCESS;
510 }
xAOD::MuonRoI_v1::initialize
void initialize(uint32_t roiword, float eta, float phi, const std::string &thrname, float thrvalue)
Initialise the object with all its properties.
Definition: MuonRoI_v1.cxx:33
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::JetRoI_v2::setThrPattern
void setThrPattern(uint32_t value)
Set the threshold pattern.
RoIBResultToxAOD::m_recTGCRoiTool
ToolHandle< LVL1::ITrigT1MuonRecRoiTool > m_recTGCRoiTool
The TGC RoI reconstruction service.
Definition: RoIBResultToxAOD.h:80
LVL1::RecJetRoI::triggerThreshold
unsigned int triggerThreshold(unsigned int thresh) const
returns the value of the trigger threshold for the threshold passed.
Definition: RecJetRoI.cxx:379
RoIBResultToxAOD::createJetEnergyRoI
StatusCode createJetEnergyRoI(const ROIB::RoIBResult &roib, const EventContext &ctx) const
Create the JetEnergy RoI object.
Definition: RoIBResultToxAOD.cxx:230
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
RecEmTauRoI.h
LVL1::CPMTobAlgorithm::CoreET
int CoreET()
Additional information for reconstruction & performance studies.
Definition: CPMTobAlgorithm.cxx:380
get_generator_info.result
result
Definition: get_generator_info.py:21
LVL1::TrigT1CaloDefs::JetEtRoIWordType
@ JetEtRoIWordType
Definition: TrigT1CaloDefs.h:168
RoIBResultToxAOD::m_jetElementKey
SG::ReadHandleKey< xAOD::JetElementContainer > m_jetElementKey
Read key for the xAOD::JetElementContainer object.
Definition: RoIBResultToxAOD.h:113
LVL1::RecJetRoI::thresholdPattern
unsigned int thresholdPattern() const
returns bitmask of passed thresholds
Definition: RecJetRoI.cxx:315
HLTSeedingRoIToolDefs::roiPhi
constexpr float roiPhi(const AnyRoIPointer &roi)
Definition: HLTSeedingRoIToolDefs.h:167
RecEnergyRoI.h
LVL1::RecJetRoI
This class defines the reconstructed em/tau hadron ROI.
Definition: RecJetRoI.h:39
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LVL1::JEMJetAlgorithm::ET6x6
int ET6x6()
Returns 6x6 TT cluster ET.
Definition: JEMJetAlgorithm.cxx:261
ROIB::EMTauResult
Definition: EMTauResult.h:25
ROIB::RoIBResult
Class holding the LVL1 RoIB result build by the RoIBuilder.
Definition: RoIBResult.h:47
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
index
Definition: index.py:1
LVL1::RecEnergyRoI::energyX
int energyX() const
returns the (signed) Ex energy projection.
Definition: RecEnergyRoI.cxx:292
MuonRoIAuxContainer.h
LVL1::JEPRoIDecoder
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
Definition: JEPRoIDecoder.h:33
LVL1::RecEnergyRoI::energyT
int energyT() const
returns the total ET.
Definition: RecEnergyRoI.cxx:310
RoIBResultToxAOD::m_cpmTowerKey
SG::ReadHandleKey< xAOD::CPMTowerContainer > m_cpmTowerKey
Read key for the xAOD::CPMTowerContainer object.
Definition: RoIBResultToxAOD.h:109
LVL1::RecJetRoI::thresholdsPassed
std::vector< unsigned int > thresholdsPassed() const
returns a vector of thresholds passed.
Definition: RecJetRoI.cxx:352
JetInput.h
M_PI
#define M_PI
Definition: ActiveFraction.h:11
LVL1::CPMTobAlgorithm::EMClusET
int EMClusET()
Returns EM cluster ET, limited to 8 bits.
Definition: CPMTobAlgorithm.cxx:385
LVL1::CPMTobAlgorithm
This is an internal class, used in the EM/Tau trigger.
Definition: CPMTobAlgorithm.h:43
LVL1::JEMJetAlgorithm::ET4x4
int ET4x4()
Returns 4x4 TT cluster ET.
Definition: JEMJetAlgorithm.cxx:256
RecMuonRoI.h
ROIB::MuCTPIRoI
Class for storing the 32-bit muon RoI word.
Definition: MuCTPIRoI.h:39
JetEtRoIAuxInfo.h
EnergySumRoIAuxInfo.h
LVL1::CPMTobAlgorithm::TauClusET
int TauClusET()
Returns Tau cluster ET, limited to 8 bits.
Definition: CPMTobAlgorithm.cxx:390
TrigConf::L1Menu
L1 menu configuration.
Definition: L1Menu.h:28
JetRoIAuxContainer.h
RoIBResultToxAOD::createMuonRoI
StatusCode createMuonRoI(const ROIB::RoIBResult &roib, const EventContext &ctx) const
Create the Muon RoI objects.
Definition: RoIBResultToxAOD.cxx:454
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
xAOD::JetRoI_v2::initialize
void initialize(uint32_t roiword, float eta, float phi)
Initialise the object with its most important properties.
Definition: JetRoI_v2.cxx:19
xAOD::EmTauRoI_v2::initialize
void initialize(uint32_t roiword, float eta, float phi)
Initialise the object with its most important properties.
Definition: EmTauRoI_v2.cxx:22
xAOD::EmTauRoI_v2::addThreshold
void addThreshold(const std::string &name, float value)
Add a new threshold that was passed by the RoI.
Definition: EmTauRoI_v2.cxx:99
LVL1::TrigT1CaloDefs::numOfJetEtSumThresholds
static const unsigned int numOfJetEtSumThresholds
Definition: TrigT1CaloDefs.h:130
LVL1::RecMuonRoI::eta
virtual double eta() const
returns eta coord of ROI
Definition: RecMuonRoI.h:117
RoIBResultToxAOD::m_doCalo
Gaudi::Property< bool > m_doCalo
Definition: RoIBResultToxAOD.h:148
LVL1::TrigT1CaloDefs::EMAlg
@ EMAlg
Definition: TrigT1CaloDefs.h:208
ROIB::JetEnergyResult
Definition: JetEnergyResult.h:24
LVL1::RecMuonRoI::getThresholdNumber
unsigned int getThresholdNumber() const
returns the Threshold Number (1 to 6) associated with this RecRoI
Definition: RecMuonRoI.h:120
LVL1::RecEnergyRoI
This class defines the reconstructed EnergySum ROI.
Definition: RecEnergyRoI.h:37
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
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
RoIBResultToxAOD::m_jetTool
ToolHandle< LVL1::IL1JEMJetTools > m_jetTool
Tool for calculation of Jet cluster sums per RoI.
Definition: RoIBResultToxAOD.h:94
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:269
LVL1::RecEnergyRoI::mEtSigThresholdsPassed
std::vector< unsigned int > mEtSigThresholdsPassed() const
returns a vector of thresholds passed.
Definition: RecEnergyRoI.cxx:228
LVL1::CPMTobAlgorithm::HadCoreET
int HadCoreET()
Returns Had core ET (inner isolation sum)
Definition: CPMTobAlgorithm.cxx:420
RoIBResultToxAOD::execute
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
Definition: RoIBResultToxAOD.cxx:97
xAOD::EmTauRoI_v2::setEmIsol
void setEmIsol(float value)
Set the EM calorimeter isolation (outer ring of EM towers)
LVL1::TrigT1CaloDefs::EnergyRoIWordType0
@ EnergyRoIWordType0
Definition: TrigT1CaloDefs.h:169
WriteHandle.h
Handle class for recording to StoreGate.
xAOD::EmTauRoI
EmTauRoI_v2 EmTauRoI
Definition: EmTauRoI.h:16
RoIBResultToxAOD::createEmTauRoI
StatusCode createEmTauRoI(const ROIB::RoIBResult &roib, const EventContext &ctx) const
Create the EmTau RoI objects.
Definition: RoIBResultToxAOD.cxx:124
xAOD::EmTauRoI_v2::setEmClus
void setEmClus(float value)
Set the deposited ET from the "EM cluster".
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
LVL1::RecMuonRoI
This class defines the reconstructed Muon ROI.
Definition: RecMuonRoI.h:60
LVL1::RecMuonRoI::getThresholdValue
unsigned int getThresholdValue() const
returns the Threshold Value (in GeV) associated with this RecRoI
Definition: RecMuonRoI.h:123
LVL1::JEMJetAlgorithm
This is an internal class, used in the jet trigger.
Definition: JEMJetAlgorithm.h:45
lumiFormat.i
int i
Definition: lumiFormat.py:92
LVL1::RecEnergyRoI::etMissThresholdsPassed
std::vector< unsigned int > etMissThresholdsPassed() const
returns a vector of thresholds passed.
Definition: RecEnergyRoI.cxx:214
xAOD::EmTauRoI_v2
Class describing a LVL1 em/tau region of interest.
Definition: EmTauRoI_v2.h:35
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
xAOD::JetRoI
JetRoI_v2 JetRoI
Definition: JetRoI.h:16
RoIBResultToxAOD::m_doMuon
Gaudi::Property< bool > m_doMuon
Use inputs from the Muon system.
Definition: RoIBResultToxAOD.h:151
LVL1::RecEmTauRoI::triggerThreshold
unsigned int triggerThreshold(unsigned int thresh) const
returns the value of the trigger threshold for the threshold passed.
Definition: RecEmTauRoI.cxx:419
LVL1::RecEnergyRoI::sumEtThresholdsPassed
std::vector< unsigned int > sumEtThresholdsPassed() const
returns a vector of thresholds passed.
Definition: RecEnergyRoI.cxx:221
xAOD::JetRoI_v2::setEt8x8
void setEt8x8(float value)
Set the energy deposited in a 0.8x0.8 area around the RoI.
LVL1::TrigT1CaloDefs::TauAlg
@ TauAlg
Definition: TrigT1CaloDefs.h:209
xAOD::MuonRoI_v1
Class describing a LVL1 muon region of interest.
Definition: MuonRoI_v1.h:33
xAOD::CPMTowerMap_t
std::map< int, const CPMTower * > CPMTowerMap_t
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CPMTower.h:18
LVL1::CPMTobAlgorithm::HadIsolET
int HadIsolET()
Returns Had isolation ET.
Definition: CPMTobAlgorithm.cxx:410
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::RecEmTauRoI
This class defines the reconstructed em/tau hadron ROI.
Definition: RecEmTauRoI.h:44
xAOD::EmTauRoI_v2::setHadIsol
void setHadIsol(float value)
Set the hadron calorimeter isolation (outer ring of had towers)
xAOD::EmTauRoI_v2::setTauClus
void setTauClus(float value)
Set the deposited ET from the "tau cluster".
RoIBResultToxAOD::m_roibResultKey
SG::ReadHandleKey< ROIB::RoIBResult > m_roibResultKey
Read key for the ROIB::RoIBResult object.
Definition: RoIBResultToxAOD.h:104
xAOD::EmTauRoI_v2::setHadCore
void setHadCore(float value)
Set the ET deposited in the inner hadronic isolation region.
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
xAOD::EmTauRoI_v2::setThrPattern
void setThrPattern(uint32_t value)
Set the threshold pattern.
RoIBResultToxAOD::m_jetetRoIKey
SG::WriteHandleKey< xAOD::JetEtRoI > m_jetetRoIKey
Write key for the xAOD::JetEtRoI object.
Definition: RoIBResultToxAOD.h:135
JEPRoIDecoder.h
RoIBResultToxAOD::m_emTauTool
ToolHandle< LVL1::IL1CPMTools > m_emTauTool
Tool for calculation of EmTau trigger sums per RoI.
Definition: RoIBResultToxAOD.h:90
RoIBResultToxAOD::m_emtauRoIKey
SG::WriteHandleKey< xAOD::EmTauRoIContainer > m_emtauRoIKey
Write key for the xAOD::EmTauRoIContainer object.
Definition: RoIBResultToxAOD.h:127
LVL1::RecEmTauRoI::thresholdsPassed
std::vector< unsigned int > * thresholdsPassed() const
returns a vector of thresholds passed.
Definition: RecEmTauRoI.cxx:397
LVL1::RecEmTauRoI::phi
virtual double phi() const
returns phi coord of ROI
Definition: RecEmTauRoI.cxx:333
LVL1::RecMuonRoI::phi
virtual double phi() const
returns phi coord of ROI
Definition: RecMuonRoI.h:114
LVL1::RecJetRoI::isForwardJet
bool isForwardJet() const
returns true if the RoI is a forward jet RoI.
Definition: RecJetRoI.cxx:413
xAOD::MuonRoI
MuonRoI_v1 MuonRoI
Definition: MuonRoI.h:15
RoIBResultToxAOD::m_energysumRoIKey
SG::WriteHandleKey< xAOD::EnergySumRoI > m_energysumRoIKey
Write key for the xAOD::EnergySumRoI object.
Definition: RoIBResultToxAOD.h:131
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
RoIBResultToxAOD::initialize
virtual StatusCode initialize() override
Function initialising the algorithm.
Definition: RoIBResultToxAOD.cxx:48
LVL1::JEMJetAlgorithm::ET8x8
int ET8x8()
Returns 8x8 TT cluster ET.
Definition: JEMJetAlgorithm.cxx:266
xAOD::JetRoI_v2::setEtScale
void setEtScale(float value)
Set the ET scale for RoI digits.
LVL1::RecEmTauRoI::thresholdType
TrigT1CaloDefs::ClusterAlgorithm thresholdType(unsigned int thresh) const
returns the type of the threshold, which is either EMAlg or TauAlg.
Definition: RecEmTauRoI.cxx:515
RoIBResultToxAOD::m_muonRoIKey
SG::WriteHandleKey< xAOD::MuonRoIContainer > m_muonRoIKey
Write key for the xAOD::MuonRoIContainer object.
Definition: RoIBResultToxAOD.h:123
xAOD::JetRoI_v2
Class describing a LVL1 jet region of interest.
Definition: JetRoI_v2.h:35
CPMTobAlgorithm.h
RoIBResultToxAOD::m_jetRoIKey
SG::WriteHandleKey< xAOD::JetRoIContainer > m_jetRoIKey
Write key for the xAOD::JetRoIContainer object.
Definition: RoIBResultToxAOD.h:139
RoIBResultToxAOD.h
ROIB::EMTauRoI
Definition: EMTauRoI.h:20
LVL1::RecEnergyRoI::energyY
int energyY() const
returns the (signed) Ey energy projection.
Definition: RecEnergyRoI.cxx:301
LVL1::TrigT1CaloDefs::JetRoIWordType
@ JetRoIWordType
Definition: TrigT1CaloDefs.h:167
xAOD::JetRoI_v2::setEt6x6
void setEt6x6(float value)
Set the energy deposited in a 0.6x0.6 area around the RoI.
xAOD::EmTauRoI_v2::setEtScale
void setEtScale(float v)
Set the ET scale.
LVL1::CPMTobAlgorithm::EMIsolET
int EMIsolET()
Returns EM isolation ET.
Definition: CPMTobAlgorithm.cxx:405
RoIBResultToxAOD::m_recRPCRoiTool
ToolHandle< LVL1::ITrigT1MuonRecRoiTool > m_recRPCRoiTool
The RPC RoI reconstruction tool.
Definition: RoIBResultToxAOD.h:78
JEMJetAlgorithm.h
EmTauRoIAuxContainer.h
python.XMLReader.l1menu
l1menu
Definition: XMLReader.py:73
xAOD::JetRoI_v2::addThreshold
void addThreshold(const std::string &name, float value)
Add a new threshold that was passed by the RoI.
Definition: JetRoI_v2.cxx:72
xAOD::JetRoI_v2::setEt4x4
void setEt4x4(float value)
Set the energy deposited in a 0.4x0.4 area around the RoI.
LVL1::RecJetRoI::eta
virtual double eta() const
returns eta coord of ROI
Definition: RecJetRoI.cxx:253
ReadHandle.h
Handle class for reading from StoreGate.
L1Menu.h
xAOD::EmTauRoI_v2::setCore
void setCore(float value)
Set the ET of the RoI Core cluster (2x2 towers, EM+Had)
LVL1::RecEmTauRoI::eta
virtual double eta() const
returns eta coord of ROI
Definition: RecEmTauRoI.cxx:343
LVL1::RecEmTauRoI::thresholdPattern
unsigned int thresholdPattern() const
returns bitmask of passed thresholds
Definition: RecEmTauRoI.cxx:374
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
xAOD::thrValue
thrValue
Definition: MuonRoI_v1.cxx:54
xAOD::roiWord1
roiWord1
Definition: EnergySumRoI_v1.cxx:49
RecJetRoI.h
pdg_comparison.conv
conv
Definition: pdg_comparison.py:321
RoIBResultToxAOD::RoIBResultToxAOD
RoIBResultToxAOD(const std::string &name, ISvcLocator *svcLoc)
Algorithm constructor.
Definition: RoIBResultToxAOD.cxx:43
LVL1::RecJetRoI::phi
virtual double phi() const
returns phi coord of ROI
Definition: RecJetRoI.cxx:243