ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigT1
L1CaloFEX
L1CaloFEXSim
src
jFEXLargeRJetAlgo.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
// jFEXSmallRJetAlgo - Algorithm for small R jet Algorithm in jFEX
6
// -------------------
7
// begin : 03 11 2020
8
// email : varsiha.sothilingam@cern.ch
9
//***************************************************************************
10
11
#include "
jFEXLargeRJetAlgo.h
"
12
13
namespace
LVL1
{
14
15
LVL1::jFEXLargeRJetAlgo::jFEXLargeRJetAlgo
(
const
std::string&
type
,
const
std::string&
name
,
const
IInterface* parent):
16
AthAlgTool
(
type
,
name
, parent)
17
{
18
declareInterface<IjFEXLargeRJetAlgo>(
this
);
19
}
20
21
22
StatusCode
LVL1::jFEXLargeRJetAlgo::initialize
()
23
{
24
ATH_CHECK
(
m_jTowerContainerKey
.initialize());
25
26
return
StatusCode::SUCCESS;
27
}
28
29
StatusCode
LVL1::jFEXLargeRJetAlgo::safetyTest
() {
30
m_jTowerContainer
=
SG::ReadHandle<jTowerContainer>
(
m_jTowerContainerKey
);
31
if
(!
m_jTowerContainer
.isValid()) {
32
ATH_MSG_ERROR
(
"Could not retrieve jTowerContainer "
<<
m_jTowerContainerKey
.key());
33
34
return
StatusCode::FAILURE;
35
}
36
37
return
StatusCode::SUCCESS;
38
}
39
40
void
LVL1::jFEXLargeRJetAlgo::setupCluster
(
int
inputTable[15][15]){
41
42
std::copy(&inputTable[0][0], &inputTable[0][0] + 225 , &
m_largeRJetEtRing_IDs
[0][0]);
43
44
}
45
46
unsigned
int
LVL1::jFEXLargeRJetAlgo::getRingET
() {
47
int
RingET =0;
48
for
(
int
n =0; n <15; n++) {
49
for
(
int
m =0; m <15; m++) {
50
int
et
=
getTTowerET
(
m_largeRJetEtRing_IDs
[n][m]);
51
RingET +=
et
;
52
}
53
}
54
return
RingET;
55
}
56
57
bool
LVL1::jFEXLargeRJetAlgo::getLRjetSat
() {
58
m_saturation
=
false
;
59
for
(
int
n =0; n <15; n++) {
60
for
(
int
m =0; m <15; m++) {
61
m_saturation
=
m_saturation
||
getTTowerSat
(
m_largeRJetEtRing_IDs
[n][m]);
62
}
63
}
64
return
m_saturation
;
65
}
66
67
unsigned
int
LVL1::jFEXLargeRJetAlgo::getLargeClusterET
(
unsigned
int
smallClusterET,
unsigned
int
largeRingET)
const
{
68
int
largeClusterET = smallClusterET + largeRingET;
69
return
largeClusterET;
70
}
71
72
73
//Gets the ET for the TT. This ET is EM + HAD
74
int
LVL1::jFEXLargeRJetAlgo::getTTowerET
(
unsigned
int
TTID )
const
{
75
if
(TTID == 0) {
76
return
0;
77
}
78
79
if
(
m_map_Etvalues
.find(TTID) !=
m_map_Etvalues
.end()) {
80
return
m_map_Etvalues
.at(TTID)[0];
81
}
82
83
//we shouldn't arrive here
84
return
0;
85
86
}
87
88
//getter for tower saturation
89
bool
LVL1::jFEXLargeRJetAlgo::getTTowerSat
(
unsigned
int
TTID ) {
90
if
(TTID == 0) {
91
return
false
;
92
}
93
94
const
LVL1::jTower
* tmpTower =
m_jTowerContainer
->findTower(TTID);
95
return
tmpTower->
getTowerSat
();
96
}
97
98
99
void
LVL1::jFEXLargeRJetAlgo::setFPGAEnergy
(
const
std::unordered_map<
int
,std::vector<int> >& et_map){
100
m_map_Etvalues
=et_map;
101
}
102
103
}
// end of namespace LVL1
104
105
106
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
AthAlgTool::AthAlgTool
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Definition
AthAlgTool.cxx:16
LVL1::jFEXLargeRJetAlgo::jFEXLargeRJetAlgo
jFEXLargeRJetAlgo(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
Definition
jFEXLargeRJetAlgo.cxx:15
LVL1::jFEXLargeRJetAlgo::getRingET
virtual unsigned int getRingET() override
Definition
jFEXLargeRJetAlgo.cxx:46
LVL1::jFEXLargeRJetAlgo::getLargeClusterET
virtual unsigned int getLargeClusterET(unsigned int smallClusterET, unsigned int largeRingET) const override
Definition
jFEXLargeRJetAlgo.cxx:67
LVL1::jFEXLargeRJetAlgo::setupCluster
virtual void setupCluster(int inputTable[15][15]) override
Definition
jFEXLargeRJetAlgo.cxx:40
LVL1::jFEXLargeRJetAlgo::m_saturation
bool m_saturation
Definition
jFEXLargeRJetAlgo.h:51
LVL1::jFEXLargeRJetAlgo::safetyTest
virtual StatusCode safetyTest() override
Definition
jFEXLargeRJetAlgo.cxx:29
LVL1::jFEXLargeRJetAlgo::m_largeRJetEtRing_IDs
int m_largeRJetEtRing_IDs[15][15]
Definition
jFEXLargeRJetAlgo.h:52
LVL1::jFEXLargeRJetAlgo::m_jTowerContainer
SG::ReadHandle< jTowerContainer > m_jTowerContainer
Definition
jFEXLargeRJetAlgo.h:47
LVL1::jFEXLargeRJetAlgo::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition
jFEXLargeRJetAlgo.cxx:22
LVL1::jFEXLargeRJetAlgo::setFPGAEnergy
virtual void setFPGAEnergy(const std::unordered_map< int, std::vector< int > > &et_map) override
Definition
jFEXLargeRJetAlgo.cxx:99
LVL1::jFEXLargeRJetAlgo::m_map_Etvalues
std::unordered_map< int, std::vector< int > > m_map_Etvalues
Definition
jFEXLargeRJetAlgo.h:54
LVL1::jFEXLargeRJetAlgo::getLRjetSat
virtual bool getLRjetSat() override
Definition
jFEXLargeRJetAlgo.cxx:57
LVL1::jFEXLargeRJetAlgo::m_jTowerContainerKey
SG::ReadHandleKey< LVL1::jTowerContainer > m_jTowerContainerKey
Definition
jFEXLargeRJetAlgo.h:46
LVL1::jFEXLargeRJetAlgo::getTTowerSat
bool getTTowerSat(unsigned int TTID)
Definition
jFEXLargeRJetAlgo.cxx:89
LVL1::jFEXLargeRJetAlgo::getTTowerET
int getTTowerET(unsigned int TTID) const
Definition
jFEXLargeRJetAlgo.cxx:74
LVL1::jTower
The jTower class is an interface object for jFEX trigger algorithms The purposes are twofold:
Definition
jTower.h:36
LVL1::jTower::getTowerSat
bool getTowerSat() const
Definition
jTower.h:61
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
jFEXLargeRJetAlgo.h
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition
IZdcDataAccess.h:13
type
TrigConf::name
Definition
HLTChainList.h:35
et
Extra patterns decribing particle interation process.
Generated on
for ATLAS Offline Software by
1.17.0