ATLAS Offline Software
Loading...
Searching...
No Matches
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
13namespace LVL1{
14
15LVL1::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
23{
24 ATH_CHECK(m_jTowerContainerKey.initialize());
25
26 return StatusCode::SUCCESS;
27}
28
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
40void 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
47 int RingET =0;
48 for(int n =0; n <15; n++) {
49 for(int m =0; m <15; m++) {
51 RingET +=et;
52 }
53 }
54 return RingET;
55}
56
58 m_saturation = false;
59 for(int n =0; n <15; n++) {
60 for(int m =0; m <15; m++) {
62 }
63 }
64 return m_saturation;
65}
66
67unsigned 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
74int 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
89bool 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
99void 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
#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
virtual unsigned int getLargeClusterET(unsigned int smallClusterET, unsigned int largeRingET) const override
virtual void setupCluster(int inputTable[15][15]) override
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)
int getTTowerET(unsigned int TTID) const
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.