ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1CaloFEX
L1CaloFEXAlgos
src
eFexTOBDecorator.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
// eFexTOBDecorator - description
7
// -------------------
8
// This algorithm decorates the eFEX TOBs with jet descriminant variables and, for the EM TOBs, with the cluster layer supercell Et sums
9
// recalculated from input data using the eFEXTOBEtTool
10
// All values are in 25 MeV counts
11
//
12
// begin : 03 02 2022
13
// email : paul.daniel.thompson@cern.ch
14
//***************************************************************************/
15
#include "
eFexTOBDecorator.h
"
16
#include "
L1CaloFEXSim/eFEXegTOB.h
"
17
18
namespace
LVL1
{
19
20
eFexTOBDecorator::eFexTOBDecorator
(
const
std::string&
name
, ISvcLocator* svc) :
AthAlgorithm
(
name
, svc){}
21
22
StatusCode
eFexTOBDecorator::initialize
() {
23
ATH_MSG_INFO
(
"L1CaloFEXTools/eFexTOBDecorator::initialize()"
);
24
25
// initialise read and decorator write handles
26
ATH_CHECK
(
m_eFEXegEDMContainerKey
.initialize() );
27
ATH_CHECK
(
m_eFEXtauEDMContainerKey
.initialize() );
28
29
ATH_CHECK
(
m_RetaCoreDec
.initialize() );
30
ATH_CHECK
(
m_RetaEnvDec
.initialize() );
31
ATH_CHECK
(
m_RhadEMDec
.initialize() );
32
ATH_CHECK
(
m_RhadHadDec
.initialize() );
33
ATH_CHECK
(
m_WstotDenDec
.initialize() );
34
ATH_CHECK
(
m_WstotNumDec
.initialize() );
35
36
ATH_CHECK
(
m_ClusterSCellEtSumsDec
.initialize() );
37
38
ATH_CHECK
(
m_RCoreDec
.initialize() );
39
ATH_CHECK
(
m_REnvDec
.initialize() );
40
ATH_CHECK
(
m_REMCoreDec
.initialize() );
41
ATH_CHECK
(
m_REMHadDec
.initialize() );
42
43
// Retrieve the TOB ET sum tool
44
ATH_CHECK
(
m_eFEXTOBEtTool
.retrieve() );
45
46
return
StatusCode::SUCCESS;
47
}
48
49
StatusCode
eFexTOBDecorator::execute
(
const
EventContext& ctx) {
50
51
// read the TOB containers
52
SG::ReadHandle<xAOD::eFexEMRoIContainer>
eFEXegEDMContainerObj{
m_eFEXegEDMContainerKey
, ctx};
53
if
(!eFEXegEDMContainerObj.
isValid
()) {
54
ATH_MSG_ERROR
(
"Failed to retrieve EDM collection"
);
55
return
StatusCode::SUCCESS;
56
}
57
const
xAOD::eFexEMRoIContainer
* emEDMConstPtr = eFEXegEDMContainerObj.
cptr
();
58
59
SG::ReadHandle<xAOD::eFexTauRoIContainer>
eFEXtauEDMContainerObj{
m_eFEXtauEDMContainerKey
, ctx};
60
if
(!eFEXtauEDMContainerObj.
isValid
()) {
61
ATH_MSG_ERROR
(
"Failed to retrieve tau EDM collection"
);
62
return
StatusCode::SUCCESS;
63
}
64
const
xAOD::eFexTauRoIContainer
* tauEDMConstPtr = eFEXtauEDMContainerObj.
cptr
();
65
66
//Setup EM Decorator Handlers
67
SG::WriteDecorHandle<xAOD::eFexEMRoIContainer, unsigned int >
RetaCoreDec (
m_RetaCoreDec
, ctx);
68
SG::WriteDecorHandle<xAOD::eFexEMRoIContainer, unsigned int >
RetaEnvDec (
m_RetaEnvDec
, ctx);
69
SG::WriteDecorHandle<xAOD::eFexEMRoIContainer, unsigned int >
RhadEMDec (
m_RhadEMDec
, ctx);
70
SG::WriteDecorHandle<xAOD::eFexEMRoIContainer, unsigned int >
RhadHadDec (
m_RhadHadDec
, ctx);
71
SG::WriteDecorHandle<xAOD::eFexEMRoIContainer, unsigned int >
WstotDenDec (
m_WstotDenDec
, ctx);
72
SG::WriteDecorHandle<xAOD::eFexEMRoIContainer, unsigned int >
WstotNumDec (
m_WstotNumDec
, ctx);
73
74
SG::WriteDecorHandle<xAOD::eFexEMRoIContainer, std::vector<unsigned int >
> ClusterSCellEtSumsDec (
m_ClusterSCellEtSumsDec
, ctx);
75
76
//looping over EM TOB to decorate them
77
for
(
const
xAOD::eFexEMRoI
* emRoI : *emEDMConstPtr ){
78
79
float
eta
= emRoI->eta();
80
float
phi
= emRoI->phi();
81
int
seed = emRoI->seed();
82
int
UnD = emRoI->UpNotDown();
83
std::vector<unsigned int> ClusterCellETs;
84
std::vector<unsigned int> RetaSums;
85
std::vector<unsigned int> RhadSums;
86
std::vector<unsigned int> WstotSums;
87
88
ATH_CHECK
(
m_eFEXTOBEtTool
->getegSums(ctx,
eta
,
phi
, seed, UnD, ClusterCellETs, RetaSums, RhadSums, WstotSums) );
89
90
RetaCoreDec (*emRoI) = RetaSums[0];
91
RetaEnvDec (*emRoI) = RetaSums[1];
92
RhadEMDec (*emRoI) = RhadSums[0];
93
RhadHadDec (*emRoI) = RhadSums[1];
94
WstotDenDec (*emRoI) = WstotSums[0];
95
WstotNumDec (*emRoI) = WstotSums[1];
96
97
ClusterSCellEtSumsDec (*emRoI) = std::move(ClusterCellETs);
98
}
99
100
//Setup Tau Decorator Handlers
101
SG::WriteDecorHandle<xAOD::eFexTauRoIContainer, unsigned int >
RCoreDec (
m_RCoreDec
, ctx);
102
SG::WriteDecorHandle<xAOD::eFexTauRoIContainer, unsigned int >
REnvDec (
m_REnvDec
, ctx);
103
SG::WriteDecorHandle<xAOD::eFexTauRoIContainer, unsigned int >
REMCoreDec (
m_REMCoreDec
, ctx);
104
SG::WriteDecorHandle<xAOD::eFexTauRoIContainer, unsigned int >
REMHadDec (
m_REMHadDec
, ctx);
105
106
//looping over Tau TOB to decorate them
107
for
(
const
xAOD::eFexTauRoI
* tauRoI : *tauEDMConstPtr ){
108
109
float
eta
= tauRoI->eta();
110
float
phi
= tauRoI->phi();
111
int
seed = tauRoI->seed();
112
int
UnD = tauRoI->upNotDown();
113
std::vector<unsigned int> RcoreSums;
114
std::vector<unsigned int> RemSums;
115
116
ATH_CHECK
(
m_eFEXTOBEtTool
->gettauSums(ctx,
eta
,
phi
, seed, UnD, RcoreSums, RemSums) );
117
118
RCoreDec (*tauRoI) = RcoreSums[0];
119
REnvDec (*tauRoI) = RcoreSums[1];
120
REMCoreDec (*tauRoI) = RemSums[0];
121
REMHadDec (*tauRoI) = RemSums[1];
122
}
123
124
// Return gracefully
125
return
StatusCode::SUCCESS;
126
}
127
128
}
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
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
LVL1::eFexTOBDecorator::m_ClusterSCellEtSumsDec
SG::WriteDecorHandleKey< xAOD::eFexEMRoIContainer > m_ClusterSCellEtSumsDec
Definition
eFexTOBDecorator.h:50
LVL1::eFexTOBDecorator::m_WstotDenDec
SG::WriteDecorHandleKey< xAOD::eFexEMRoIContainer > m_WstotDenDec
Definition
eFexTOBDecorator.h:47
LVL1::eFexTOBDecorator::m_eFEXTOBEtTool
ToolHandle< eFEXTOBEtTool > m_eFEXTOBEtTool
Definition
eFexTOBDecorator.h:58
LVL1::eFexTOBDecorator::m_REMHadDec
SG::WriteDecorHandleKey< xAOD::eFexTauRoIContainer > m_REMHadDec
Definition
eFexTOBDecorator.h:56
LVL1::eFexTOBDecorator::m_eFEXtauEDMContainerKey
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_eFEXtauEDMContainerKey
Definition
eFexTOBDecorator.h:40
LVL1::eFexTOBDecorator::m_eFEXegEDMContainerKey
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eFEXegEDMContainerKey
Definition
eFexTOBDecorator.h:39
LVL1::eFexTOBDecorator::m_RhadHadDec
SG::WriteDecorHandleKey< xAOD::eFexEMRoIContainer > m_RhadHadDec
Definition
eFexTOBDecorator.h:46
LVL1::eFexTOBDecorator::m_WstotNumDec
SG::WriteDecorHandleKey< xAOD::eFexEMRoIContainer > m_WstotNumDec
Definition
eFexTOBDecorator.h:48
LVL1::eFexTOBDecorator::m_RetaCoreDec
SG::WriteDecorHandleKey< xAOD::eFexEMRoIContainer > m_RetaCoreDec
Definition
eFexTOBDecorator.h:43
LVL1::eFexTOBDecorator::initialize
virtual StatusCode initialize()
Definition
eFexTOBDecorator.cxx:22
LVL1::eFexTOBDecorator::eFexTOBDecorator
eFexTOBDecorator(const std::string &name, ISvcLocator *svc)
Definition
eFexTOBDecorator.cxx:20
LVL1::eFexTOBDecorator::m_REnvDec
SG::WriteDecorHandleKey< xAOD::eFexTauRoIContainer > m_REnvDec
Definition
eFexTOBDecorator.h:54
LVL1::eFexTOBDecorator::m_RetaEnvDec
SG::WriteDecorHandleKey< xAOD::eFexEMRoIContainer > m_RetaEnvDec
Definition
eFexTOBDecorator.h:44
LVL1::eFexTOBDecorator::m_RhadEMDec
SG::WriteDecorHandleKey< xAOD::eFexEMRoIContainer > m_RhadEMDec
Definition
eFexTOBDecorator.h:45
LVL1::eFexTOBDecorator::execute
virtual StatusCode execute(const EventContext &ctx)
Execute method.
Definition
eFexTOBDecorator.cxx:49
LVL1::eFexTOBDecorator::m_REMCoreDec
SG::WriteDecorHandleKey< xAOD::eFexTauRoIContainer > m_REMCoreDec
Definition
eFexTOBDecorator.h:55
LVL1::eFexTOBDecorator::m_RCoreDec
SG::WriteDecorHandleKey< xAOD::eFexTauRoIContainer > m_RCoreDec
Definition
eFexTOBDecorator.h:53
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
eFexTOBDecorator.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