ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1CaloFEX
L1CaloFEXAlgos
src
eFexTOBSuperCellDecorator.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
//***************************************************************************
6
// eFexTOBSuperCellDecorator - description
7
// -------------------
8
// This algorithm decorates the eFEX TOBs with the SuperCells Energies - suitable info for ML
9
//
10
// begin : 26 09 2023
11
// email : panagiotis.bellos@cern.ch
12
//***************************************************************************/
13
#include "
eFexTOBSuperCellDecorator.h
"
14
#include "
L1CaloFEXSim/eFEXegTOB.h
"
15
16
namespace
LVL1
{
17
18
eFexTOBSuperCellDecorator::eFexTOBSuperCellDecorator
(
const
std::string&
name
, ISvcLocator* svc) :
AthReentrantAlgorithm
(
name
, svc){}
19
20
StatusCode
eFexTOBSuperCellDecorator::initialize
() {
21
ATH_MSG_INFO
(
"L1CaloFEXTools/eFexTOBSuperCellDecorator::initialize()"
);
22
23
// initialise read and decorator write handles
24
ATH_CHECK
(
m_eFEXegEDMContainerKey
.initialize() );
25
ATH_CHECK
(
m_eFEXtauEDMContainerKey
.initialize() );
26
27
ATH_CHECK
(
m_SCEtVec_ele
.initialize() );
28
ATH_CHECK
(
m_SCEtVec_tau
.initialize() );
29
30
// Retrieve the TOB ET sum tool
31
ATH_CHECK
(
m_eFEXTOBEtTool
.retrieve() );
32
33
return
StatusCode::SUCCESS;
34
}
35
36
StatusCode
eFexTOBSuperCellDecorator::execute
(
const
EventContext& ctx)
const
{
37
38
// read the TOB containers
39
SG::ReadHandle<xAOD::eFexEMRoIContainer>
eFEXegEDMContainerObj{
m_eFEXegEDMContainerKey
, ctx};
40
if
(!eFEXegEDMContainerObj.
isValid
()) {
41
ATH_MSG_ERROR
(
"Failed to retrieve EDM collection: "
<<
m_eFEXegEDMContainerKey
);
42
return
StatusCode::SUCCESS;
43
}
44
const
xAOD::eFexEMRoIContainer
* emEDMConstPtr = eFEXegEDMContainerObj.
cptr
();
45
46
SG::ReadHandle<xAOD::eFexTauRoIContainer>
eFEXtauEDMContainerObj{
m_eFEXtauEDMContainerKey
, ctx};
47
if
(!eFEXtauEDMContainerObj.
isValid
()) {
48
ATH_MSG_ERROR
(
"Failed to retrieve tau EDM collection: "
<<
m_eFEXtauEDMContainerKey
);
49
return
StatusCode::SUCCESS;
50
}
51
const
xAOD::eFexTauRoIContainer
* tauEDMConstPtr = eFEXtauEDMContainerObj.
cptr
();
52
53
//Setup EM Decorator Handlers
54
SG::WriteDecorHandle<xAOD::eFexEMRoIContainer, std::vector<unsigned int>
> SCEt_e (
m_SCEtVec_ele
, ctx);
55
56
SG::WriteDecorHandle<xAOD::eFexTauRoIContainer, std::vector<unsigned int>
> SCEt_t (
m_SCEtVec_tau
, ctx);
57
58
std::vector<unsigned int > ClusterCellETs;
//
59
61
for
(
const
xAOD::eFexEMRoI
* emRoI : *emEDMConstPtr ){
62
63
float
eta
= emRoI->eta();
64
float
phi
= emRoI->phi();
65
66
ATH_CHECK
(
m_eFEXTOBEtTool
->getTOBCellEnergies(
eta
,
phi
, ClusterCellETs));
67
68
SCEt_e (*emRoI) = ClusterCellETs;
69
ClusterCellETs.clear();
70
}
71
72
//looping over Tau TOB to decorate them
73
for
(
const
xAOD::eFexTauRoI
* tauRoI : *tauEDMConstPtr ){
74
75
float
eta
= tauRoI->eta();
76
float
phi
= tauRoI->phi();
77
78
ATH_CHECK
(
m_eFEXTOBEtTool
->getTOBCellEnergies(
eta
,
phi
, ClusterCellETs));
79
80
SCEt_t (*tauRoI) = ClusterCellETs;
81
ClusterCellETs.clear();
82
}
83
84
// Return gracefully
85
return
StatusCode::SUCCESS;
86
}
87
}
eta
Scalar eta() const
pseudorapidity method
Definition
AmgMatrixBasePlugin.h:83
phi
Scalar phi() const
phi method
Definition
AmgMatrixBasePlugin.h:67
ATH_CHECK
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition
AthCheckMacros.h:40
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition
AthMsgStreamMacros.h:31
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
LVL1::eFexTOBSuperCellDecorator::m_eFEXTOBEtTool
ToolHandle< eFEXTOBEtTool > m_eFEXTOBEtTool
Definition
eFexTOBSuperCellDecorator.h:47
LVL1::eFexTOBSuperCellDecorator::eFexTOBSuperCellDecorator
eFexTOBSuperCellDecorator(const std::string &name, ISvcLocator *svc)
Definition
eFexTOBSuperCellDecorator.cxx:18
LVL1::eFexTOBSuperCellDecorator::m_eFEXtauEDMContainerKey
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_eFEXtauEDMContainerKey
Definition
eFexTOBSuperCellDecorator.h:40
LVL1::eFexTOBSuperCellDecorator::m_eFEXegEDMContainerKey
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eFEXegEDMContainerKey
Definition
eFexTOBSuperCellDecorator.h:39
LVL1::eFexTOBSuperCellDecorator::execute
virtual StatusCode execute(const EventContext &ctx) const
Definition
eFexTOBSuperCellDecorator.cxx:36
LVL1::eFexTOBSuperCellDecorator::initialize
virtual StatusCode initialize()
Definition
eFexTOBSuperCellDecorator.cxx:20
LVL1::eFexTOBSuperCellDecorator::m_SCEtVec_ele
SG::WriteDecorHandleKey< xAOD::eFexEMRoIContainer > m_SCEtVec_ele
Definition
eFexTOBSuperCellDecorator.h:43
LVL1::eFexTOBSuperCellDecorator::m_SCEtVec_tau
SG::WriteDecorHandleKey< xAOD::eFexTauRoIContainer > m_SCEtVec_tau
Definition
eFexTOBSuperCellDecorator.h:44
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
SG::WriteDecorHandle
Handle class for adding a decoration to an object.
Definition
StoreGate/StoreGate/WriteDecorHandle.h:100
eFEXegTOB.h
eFexTOBSuperCellDecorator.h
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition
IZdcDataAccess.h:13
xAOD::eFexEMRoIContainer
eFexEMRoIContainer_v1 eFexEMRoIContainer
Definition
eFexEMRoIContainer.h:16
xAOD::eFexEMRoI
eFexEMRoI_v1 eFexEMRoI
Define the latest version of the eFexEMRoI class.
Definition
eFexEMRoI.h:17
xAOD::eFexTauRoIContainer
eFexTauRoIContainer_v1 eFexTauRoIContainer
Definition
eFexTauRoIContainer.h:15
xAOD::eFexTauRoI
eFexTauRoI_v1 eFexTauRoI
Define the latest version of the eFexTauRoI class.
Definition
eFexTauRoI.h:16
TrigConf::name
Definition
HLTChainList.h:35
Generated on
for ATLAS Offline Software by
1.17.0