Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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>
13 #include "L1CaloFEXSim/jTower.h"
15 
16 namespace LVL1{
17 
18 LVL1::jFEXLargeRJetAlgo::jFEXLargeRJetAlgo(const std::string& type, const std::string& name, const IInterface* parent):
20  {
21  declareInterface<IjFEXLargeRJetAlgo>(this);
22  }
23 
26 {
27 }
29 {
30  ATH_CHECK(m_jTowerContainerKey.initialize());
31 
32  return StatusCode::SUCCESS;
33 
34 }
35 
37  m_jTowerContainer = SG::ReadHandle<jTowerContainer>(m_jTowerContainerKey);
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 
47 void 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++) {
57  int et = getTTowerET(m_largeRJetEtRing_IDs[n][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++) {
68  m_saturation = m_saturation || getTTowerSat(m_largeRJetEtRing_IDs[n][m]);
69  }
70  }
71  return m_saturation;
72 }
73 
74 unsigned 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
81 int 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
96 bool 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 
106 void 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 
et
Extra patterns decribing particle interation process.
xAOD::et
et
Definition: TrigEMCluster_v1.cxx:25
LVL1::jFEXLargeRJetAlgo::setFPGAEnergy
virtual void setFPGAEnergy(const std::unordered_map< int, std::vector< int > > &et_map) override
Definition: jFEXLargeRJetAlgo.cxx:106
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
LVL1::jFEXLargeRJetAlgo::jFEXLargeRJetAlgo
jFEXLargeRJetAlgo(const std::string &type, const std::string &name, const IInterface *parent)
Constructors.
Definition: jFEXLargeRJetAlgo.cxx:18
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
LVL1::jTower::getTowerSat
bool getTowerSat() const
Definition: jTower.h:61
LVL1::jFEXLargeRJetAlgo::getLRjetSat
virtual bool getLRjetSat() override
Definition: jFEXLargeRJetAlgo.cxx:64
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LVL1::jFEXLargeRJetAlgo::getTTowerET
int getTTowerET(unsigned int TTID)
Definition: jFEXLargeRJetAlgo.cxx:81
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::jFEXLargeRJetAlgo::getRingET
virtual unsigned int getRingET() override
Definition: jFEXLargeRJetAlgo.cxx:53
TrigConf::name
Definition: HLTChainList.h:35
jTowerContainer.h
jFEXLargeRJetAlgo.h
LVL1::jFEXLargeRJetAlgo::safetyTest
virtual StatusCode safetyTest() override
Definition: jFEXLargeRJetAlgo.cxx:36
LVL1::jFEXLargeRJetAlgo::getLargeClusterET
virtual unsigned int getLargeClusterET(unsigned int smallClusterET, unsigned int largeRingET) const override
Definition: jFEXLargeRJetAlgo.cxx:74
LVL1::jFEXLargeRJetAlgo::~jFEXLargeRJetAlgo
virtual ~jFEXLargeRJetAlgo()
Destructor.
Definition: jFEXLargeRJetAlgo.cxx:25
LVL1::jTower
The jTower class is an interface object for jFEX trigger algorithms The purposes are twofold:
Definition: jTower.h:36
LVL1::jFEXLargeRJetAlgo::getTTowerSat
bool getTTowerSat(unsigned int TTID)
Definition: jFEXLargeRJetAlgo.cxx:96
calibdata.copy
bool copy
Definition: calibdata.py:27
AthAlgTool
Definition: AthAlgTool.h:26
jTower.h
LVL1::jFEXLargeRJetAlgo::setupCluster
virtual void setupCluster(int inputTable[15][15]) override
Definition: jFEXLargeRJetAlgo.cxx:47
python.SystemOfUnits.m
float m
Definition: SystemOfUnits.py:105
LVL1::jFEXLargeRJetAlgo::initialize
virtual StatusCode initialize() override
standard Athena-Algorithm method
Definition: jFEXLargeRJetAlgo.cxx:28