ATLAS Offline Software
Loading...
Searching...
No Matches
jFEXLargeRJetAlgo.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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 <vector>
12#include "jFEXLargeRJetAlgo.h"
13#include "L1CaloFEXSim/jTower.h"
15
16namespace LVL1{
17
18LVL1::jFEXLargeRJetAlgo::jFEXLargeRJetAlgo(const std::string& type, const std::string& name, const IInterface* parent):
19 AthAlgTool(type, name, parent)
20 {
21 declareInterface<IjFEXLargeRJetAlgo>(this);
22 }
23
29{
30 ATH_CHECK(m_jTowerContainerKey.initialize());
31
32 return StatusCode::SUCCESS;
33
34}
35
38 if(! m_jTowerContainer.isValid()) {
39 ATH_MSG_ERROR("Could not retrieve jTowerContainer " << m_jTowerContainerKey.key());
40
41 return StatusCode::FAILURE;
42 }
43
44 return StatusCode::SUCCESS;
45}
46
47void LVL1::jFEXLargeRJetAlgo::setupCluster(int inputTable[15][15]){
48
49 std::copy(&inputTable[0][0], &inputTable[0][0] + 225 , &m_largeRJetEtRing_IDs[0][0]);
50
51}
52
54 int RingET =0;
55 for(int n =0; n <15; n++) {
56 for(int m =0; m <15; m++) {
58 RingET +=et;
59 }
60 }
61 return RingET;
62}
63
65 m_saturation = false;
66 for(int n =0; n <15; n++) {
67 for(int m =0; m <15; m++) {
69 }
70 }
71 return m_saturation;
72}
73
74unsigned int LVL1::jFEXLargeRJetAlgo::getLargeClusterET(unsigned int smallClusterET, unsigned int largeRingET) const {
75 int largeClusterET = smallClusterET + largeRingET;
76 return largeClusterET;
77}
78
79
80//Gets the ET for the TT. This ET is EM + HAD
81int LVL1::jFEXLargeRJetAlgo::getTTowerET(unsigned int TTID ) {
82 if(TTID == 0) {
83 return 0;
84 }
85
86 if(m_map_Etvalues.find(TTID) != m_map_Etvalues.end()) {
87 return m_map_Etvalues[TTID][0];
88 }
89
90 //we shouldn't arrive here
91 return 0;
92
93}
94
95//getter for tower saturation
96bool LVL1::jFEXLargeRJetAlgo::getTTowerSat(unsigned int TTID ) {
97 if(TTID == 0) {
98 return false;
99 }
100
101 const LVL1::jTower * tmpTower = m_jTowerContainer->findTower(TTID);
102 return tmpTower->getTowerSat();
103}
104
105
106void LVL1::jFEXLargeRJetAlgo::setFPGAEnergy(const std::unordered_map<int,std::vector<int> >& et_map){
107 m_map_Etvalues=et_map;
108}
109
110}// end of namespace LVL1
111
112
113
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
jFEXLargeRJetAlgo(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
virtual unsigned int getRingET() override
int getTTowerET(unsigned int TTID)
virtual unsigned int getLargeClusterET(unsigned int smallClusterET, unsigned int largeRingET) const override
virtual void setupCluster(int inputTable[15][15]) override
virtual ~jFEXLargeRJetAlgo()
Destructor.
virtual StatusCode safetyTest() override
SG::ReadHandle< jTowerContainer > m_jTowerContainer
virtual StatusCode initialize() override
standard Athena-Algorithm method
virtual void setFPGAEnergy(const std::unordered_map< int, std::vector< int > > &et_map) override
std::unordered_map< int, std::vector< int > > m_map_Etvalues
virtual bool getLRjetSat() override
SG::ReadHandleKey< LVL1::jTowerContainer > m_jTowerContainerKey
bool getTTowerSat(unsigned int TTID)
The jTower class is an interface object for jFEX trigger algorithms The purposes are twofold:
Definition jTower.h:36
bool getTowerSat() const
Definition jTower.h:61
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Extra patterns decribing particle interation process.