ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
21 namespace LVL1 {
22 
23 
24 
26 JetElement::JetElement(double phi, double eta,
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),
33  m_emEnergy(1,emEnergy),
34  m_hadEnergy(1,hadEnergy),
35  m_em_error(1,emError),
36  m_had_error(1,hadError),
37  m_link_error(1,linkError)
38 {
39 }
40 
42 JetElement::JetElement(double phi, double eta,
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),
53  m_emEnergy(emEnergy),
54  m_hadEnergy(hadEnergy),
55  m_em_error(emError),
56  m_had_error(hadError),
57  m_link_error(linkError)
58 {
59 }
60 
61 
63 double JetElement::eta() const{
64  return m_eta;
65 }
66 
68 double JetElement::phi() const{
69  return m_phi;
70 }
71 
75  return m_emEnergy[m_peak];
76  }
77  else {
79  }
80 }
81 
83 int JetElement::hadEnergy() const{
85  return m_hadEnergy[m_peak];
86  }
87  else {
89  }
90 }
91 
96 int JetElement::energy() const{
100  return m_saturationThreshold;
101  }else{
102  return m_emEnergy[m_peak] + m_hadEnergy[m_peak];
103  }
104 }
105 
107 int 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 
119 int 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 
131 int JetElement::sliceEnergy(int slice) const{
135  return m_saturationThreshold;
136  }
137  else{
139  }
140 }
141 
144 void JetElement::addEnergy(int emEnergy, int hadEnergy){
151  return;
152 }
153 
155 void JetElement::addSlice(int slice, int emEnergy, int hadEnergy,
156  int emError, int hadError, int linkError){
157  m_emEnergy[slice] =
159  m_hadEnergy[slice] =
164  return;
165 }
166 
169 unsigned int JetElement::key() const{
170  return m_key;
171 }
172 
176 bool JetElement::isSaturated() const{
180  return true;
181  }else{
182  return false;
183  }
184 }
185 
186 
188 bool JetElement::isEmSaturated() const{
190  return true;
191  }else{
192  return false;
193  }
194 }
195 
197 bool JetElement::isHadSaturated() const{
199  return true;
200  }else{
201  return false;
202  }
203 }
204 
206 int JetElement::emError() const{
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 
221 int JetElement::peak() const{
222  return m_peak;
223 }
224 
226 const std::vector<int>& JetElement::emEnergyVec() const{
227  return m_emEnergy;
228 }
229 
231 const std::vector<int>& JetElement::hadEnergyVec() const{
232  return m_hadEnergy;
233 }
234 
236 const std::vector<int>& JetElement::emErrorVec() const{
237  return m_em_error;
238 }
239 
241 const std::vector<int>& JetElement::hadErrorVec() const{
242  return m_had_error;
243 }
244 
246 const std::vector<int>& JetElement::linkErrorVec() const{
247  return m_link_error;
248 }
249 
252  return Coordinate(m_phi,m_eta);
253 }
254 
255 }// end of LVL1 namespace
LVL1::JetElement::m_saturationThreshold
static const int m_saturationThreshold
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:112
LVL1::JetElement::emEnergy
int emEnergy() const
Return ET for peak slice.
Definition: JetElement.cxx:78
test_pyathena.eta
eta
Definition: test_pyathena.py:10
LVL1::JetElement::hadError
int hadError() const
return Had error
Definition: JetElement.cxx:216
LVL1::JetElement::emEnergyVec
const std::vector< int > & emEnergyVec() const
Return data for all slices.
Definition: JetElement.cxx:231
LVL1::JetElement::addSlice
void addSlice(int slice, int emEnergy, int hadEnergy, int emError, int hadError, int linkError)
add data for one timeslice.
Definition: JetElement.cxx:160
LVL1::JetElement::isEmSaturated
bool isEmSaturated() const
returns TRUE if the Em layer of the JetElement is saturated
Definition: JetElement.cxx:193
LVL1::JetElement::energy
int energy() const
returns jet element ET The LVL1 Calo trigger uses a 10 bit integer i.e.
Definition: JetElement.cxx:101
LVL1::JetElement::peak
int peak() const
return triggered slice offset
Definition: JetElement.cxx:226
LVL1::JetElement::emSliceEnergy
int emSliceEnergy(int slice) const
return the ET values for a specified slice
Definition: JetElement.cxx:112
LVL1::JetElement::JetElement
JetElement()=default
Default constructor.
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
LVL1::JetElement::emError
int emError() const
return Em error
Definition: JetElement.cxx:211
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
LVL1::JetElement::hadEnergyVec
const std::vector< int > & hadEnergyVec() const
return Had energy vector reference (all timeslices)
Definition: JetElement.cxx:236
LVL1::JetElement::m_phi
double m_phi
Internal data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:102
LVL1::JetElement::m_hadEnergy
std::vector< int > m_hadEnergy
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:107
LVL1::JetElement::m_layerSaturationThreshold
static const int m_layerSaturationThreshold
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:113
LVL1::Coordinate
Coordinate class declaration.
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:50
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
LVL1::JetElement::key
unsigned int key() const
Error codes and utility information.
Definition: JetElement.cxx:174
LVL1::JetElement::m_eta
double m_eta
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:103
LVL1::JetElement::m_emEnergy
std::vector< int > m_emEnergy
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:106
LVL1::JetElement::m_peak
int m_peak
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:105
LVL1::JetElement::eta
double eta() const
Eta of centre of JetElement.
Definition: JetElement.cxx:68
LVL1::JetElement::m_em_error
std::vector< int > m_em_error
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:108
LVL1::JetElement::addEnergy
void addEnergy(int emEnergy, int hadEnergy)
Add ET to triggered time slice.
Definition: JetElement.cxx:149
LVL1::JetElement::linkError
int linkError() const
return link error
Definition: JetElement.cxx:221
LVL1::JetElement::m_had_error
std::vector< int > m_had_error
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:109
LVL1::JetElement::m_link_error
std::vector< int > m_link_error
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:110
LVL1::JetElement::hadEnergy
int hadEnergy() const
returns had ET
Definition: JetElement.cxx:88
LVL1::JetElement::hadErrorVec
const std::vector< int > & hadErrorVec() const
return Had error vector reference (all timeslices)
Definition: JetElement.cxx:246
LVL1::JetElement::isHadSaturated
bool isHadSaturated() const
returns TRUE if the Had layer of the JetElement is saturated
Definition: JetElement.cxx:202
LVL1::JetElement::m_key
unsigned int m_key
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:104
LVL1::JetElement::phi
double phi() const
Phi of centre of JetElement.
Definition: JetElement.cxx:73
LVL1::JetElement::hadSliceEnergy
int hadSliceEnergy(int slice) const
Definition: JetElement.cxx:124
LVL1::JetElement::emErrorVec
const std::vector< int > & emErrorVec() const
return Em error vector reference (all timeslices)
Definition: JetElement.cxx:241
LVL1::JetElement::sliceEnergy
int sliceEnergy(int slice) const
Definition: JetElement.cxx:136
LVL1::JetElement::linkErrorVec
const std::vector< int > & linkErrorVec() const
return link error vector reference (all timeslices)
Definition: JetElement.cxx:251
LVL1::JetElement::isSaturated
bool isSaturated() const
returns TRUE if the JetElement is saturated (i.e.
Definition: JetElement.cxx:181
JetElement.h
LVL1::JetElement::coord
Coordinate coord() const
return coord of JE
Definition: JetElement.cxx:256
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37