ATLAS Offline Software
Loading...
Searching...
No Matches
JetElement.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 JetElement.cpp - description
6 -------------------
7 begin : Mon Sep 25 2000
8 email : e.moyse@qmw.ac.uk
9 ***************************************************************************/
10
11
12
13
14#ifndef TRIGGERSPACE
16#else
17#include "JetElement.h"
18#endif
19
20
21namespace LVL1 {
22
23
24
27 int emEnergy, int hadEnergy, unsigned int key,
28 int emError, int hadError, int linkError):
29 m_phi(phi),
30 m_eta(eta),
31 m_key(key),
32 m_peak(0),
38{
39}
40
43 const std::vector<int>& emEnergy,
44 const std::vector<int>& hadEnergy,
45 unsigned int key,
46 const std::vector<int>& emError,
47 const std::vector<int>& hadError,
48 const std::vector<int>& linkError, int peak):
49 m_phi(phi),
50 m_eta(eta),
51 m_key(key),
52 m_peak(peak),
58{
59}
60
61
63double JetElement::eta() const{
64 return m_eta;
65}
66
68double JetElement::phi() const{
69 return m_phi;
70}
71
75 return m_emEnergy[m_peak];
76 }
77 else {
79 }
80}
81
85 return m_hadEnergy[m_peak];
86 }
87 else {
89 }
90}
91
105
107int JetElement::emSliceEnergy(int slice) const{
108 if (slice >=0 && slice < (int)m_emEnergy.size()) {
110 return m_emEnergy[slice];
111 }
112 else {
114 }
115 }
116 else return 0;
117}
118
119int JetElement::hadSliceEnergy(int slice) const{
120 if (slice >=0 && slice < (int)m_hadEnergy.size()) {
122 return m_hadEnergy[slice];
123 }
124 else {
126 }
127 }
128 else return 0;
129}
130
131int JetElement::sliceEnergy(int slice) const{
132 if ( (emSliceEnergy(slice) >= m_layerSaturationThreshold) ||
136 }
137 else{
138 return emSliceEnergy(slice) + hadSliceEnergy(slice);
139 }
140}
141
153
166
169unsigned int JetElement::key() const{
170 return m_key;
171}
172
180 return true;
181 }else{
182 return false;
183 }
184}
185
186
190 return true;
191 }else{
192 return false;
193 }
194}
195
199 return true;
200 }else{
201 return false;
202 }
203}
204
207 return m_em_error[m_peak];
208}
209
212 return m_had_error[m_peak];
213}
214
217 return m_link_error[m_peak];
218}
219
222 return m_peak;
223}
224
226const std::vector<int>& JetElement::emEnergyVec() const{
227 return m_emEnergy;
228}
229
231const std::vector<int>& JetElement::hadEnergyVec() const{
232 return m_hadEnergy;
233}
234
236const std::vector<int>& JetElement::emErrorVec() const{
237 return m_em_error;
238}
239
241const std::vector<int>& JetElement::hadErrorVec() const{
242 return m_had_error;
243}
244
246const std::vector<int>& JetElement::linkErrorVec() const{
247 return m_link_error;
248}
249
254
255}// end of LVL1 namespace
double eta() const
Eta of centre of JetElement.
const std::vector< int > & hadEnergyVec() const
return Had energy vector reference (all timeslices)
int hadError() const
return Had error
double phi() const
Phi of centre of JetElement.
int emError() const
return Em error
int hadEnergy() const
returns had ET
const std::vector< int > & linkErrorVec() const
return link error vector reference (all timeslices)
void addSlice(int slice, int emEnergy, int hadEnergy, int emError, int hadError, int linkError)
add data for one timeslice.
int sliceEnergy(int slice) const
int hadSliceEnergy(int slice) const
const std::vector< int > & emErrorVec() const
return Em error vector reference (all timeslices)
int peak() const
return triggered slice offset
void addEnergy(int emEnergy, int hadEnergy)
Add ET to triggered time slice.
int energy() const
returns jet element ET The LVL1 Calo trigger uses a 10 bit integer i.e.
const std::vector< int > & hadErrorVec() const
return Had error vector reference (all timeslices)
bool isEmSaturated() const
returns TRUE if the Em layer of the JetElement is saturated
Coordinate coord() const
return coord of JE
int emSliceEnergy(int slice) const
return the ET values for a specified slice
bool isSaturated() const
returns TRUE if the JetElement is saturated (i.e.
unsigned int key() const
Error codes and utility information.
int linkError() const
return link error
JetElement()=default
Default constructor.
int emEnergy() const
Return ET for peak slice.
bool isHadSaturated() const
returns TRUE if the Had layer of the JetElement is saturated
const std::vector< int > & emEnergyVec() const
Return data for all slices.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...