ATLAS Offline Software
JetElement.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 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 
24  m_phi(0.0),
25  m_eta(0.0),
26  m_key(0),
27  m_peak(0),
28  m_emEnergy(1),
29  m_hadEnergy(1),
30  m_em_error(1),
31  m_had_error(1),
32  m_link_error(1)
33 {
34 }
35 
37 JetElement::JetElement(double phi, double eta,
38  int emEnergy, int hadEnergy, unsigned int key,
39  int emError, int hadError, int linkError):
40  m_phi(phi),
41  m_eta(eta),
42  m_key(key),
43  m_peak(0),
44  m_emEnergy(1,emEnergy),
45  m_hadEnergy(1,hadEnergy),
46  m_em_error(1,emError),
47  m_had_error(1,hadError),
48  m_link_error(1,linkError)
49 {
50 }
51 
53 JetElement::JetElement(double phi, double eta,
54  const std::vector<int>& emEnergy,
55  const std::vector<int>& hadEnergy,
56  unsigned int key,
57  const std::vector<int>& emError,
58  const std::vector<int>& hadError,
59  const std::vector<int>& linkError, int peak):
60  m_phi(phi),
61  m_eta(eta),
62  m_key(key),
63  m_peak(peak),
64  m_emEnergy(emEnergy),
65  m_hadEnergy(hadEnergy),
66  m_em_error(emError),
67  m_had_error(hadError),
68  m_link_error(linkError)
69 {
70 }
71 
73 }
74 
75 
77 double JetElement::eta() const{
78  return m_eta;
79 }
80 
82 double JetElement::phi() const{
83  return m_phi;
84 }
85 
89  return m_emEnergy[m_peak];
90  }
91  else {
93  }
94 }
95 
97 int JetElement::hadEnergy() const{
99  return m_hadEnergy[m_peak];
100  }
101  else {
103  }
104 }
105 
110 int JetElement::energy() const{
114  return m_saturationThreshold;
115  }else{
116  return m_emEnergy[m_peak] + m_hadEnergy[m_peak];
117  }
118 }
119 
121 int JetElement::emSliceEnergy(int slice) const{
122  if (slice >=0 && slice < (int)m_emEnergy.size()) {
124  return m_emEnergy[slice];
125  }
126  else {
128  }
129  }
130  else return 0;
131 }
132 
133 int JetElement::hadSliceEnergy(int slice) const{
134  if (slice >=0 && slice < (int)m_hadEnergy.size()) {
136  return m_hadEnergy[slice];
137  }
138  else {
140  }
141  }
142  else return 0;
143 }
144 
145 int JetElement::sliceEnergy(int slice) const{
149  return m_saturationThreshold;
150  }
151  else{
153  }
154 }
155 
158 void JetElement::addEnergy(int emEnergy, int hadEnergy){
165  return;
166 }
167 
169 void JetElement::addSlice(int slice, int emEnergy, int hadEnergy,
170  int emError, int hadError, int linkError){
171  m_emEnergy[slice] =
173  m_hadEnergy[slice] =
178  return;
179 }
180 
183 unsigned int JetElement::key() const{
184  return m_key;
185 }
186 
190 bool JetElement::isSaturated() const{
194  return true;
195  }else{
196  return false;
197  }
198 }
199 
200 
202 bool JetElement::isEmSaturated() const{
204  return true;
205  }else{
206  return false;
207  }
208 }
209 
211 bool JetElement::isHadSaturated() const{
213  return true;
214  }else{
215  return false;
216  }
217 }
218 
220 int JetElement::emError() const{
221  return m_em_error[m_peak];
222 }
223 
226  return m_had_error[m_peak];
227 }
228 
231  return m_link_error[m_peak];
232 }
233 
235 int JetElement::peak() const{
236  return m_peak;
237 }
238 
240 const std::vector<int>& JetElement::emEnergyVec() const{
241  return m_emEnergy;
242 }
243 
245 const std::vector<int>& JetElement::hadEnergyVec() const{
246  return m_hadEnergy;
247 }
248 
250 const std::vector<int>& JetElement::emErrorVec() const{
251  return m_em_error;
252 }
253 
255 const std::vector<int>& JetElement::hadErrorVec() const{
256  return m_had_error;
257 }
258 
260 const std::vector<int>& JetElement::linkErrorVec() const{
261  return m_link_error;
262 }
263 
266  return Coordinate(m_phi,m_eta);
267 }
268 
269 }// end of LVL1 namespace
LVL1::JetElement::m_saturationThreshold
static const int m_saturationThreshold
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:114
LVL1::JetElement::emEnergy
int emEnergy() const
Return ET for peak slice.
Definition: JetElement.cxx:92
LVL1::JetElement::hadError
int hadError() const
return Had error
Definition: JetElement.cxx:230
LVL1::JetElement::emEnergyVec
const std::vector< int > & emEnergyVec() const
Return data for all slices.
Definition: JetElement.cxx:245
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:174
LVL1::JetElement::isEmSaturated
bool isEmSaturated() const
returns TRUE if the Em layer of the JetElement is saturated
Definition: JetElement.cxx:207
LVL1::JetElement::energy
int energy() const
returns jet element ET The LVL1 Calo trigger uses a 10 bit integer i.e.
Definition: JetElement.cxx:115
LVL1::JetElement::peak
int peak() const
return triggered slice offset
Definition: JetElement.cxx:240
LVL1::JetElement::emSliceEnergy
int emSliceEnergy(int slice) const
return the ET values for a specified slice
Definition: JetElement.cxx:126
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:225
LVL1::JetElement::hadEnergyVec
const std::vector< int > & hadEnergyVec() const
return Had energy vector reference (all timeslices)
Definition: JetElement.cxx:250
LVL1::JetElement::m_phi
double m_phi
Internal data.
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:104
LVL1::JetElement::m_hadEnergy
std::vector< int > m_hadEnergy
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:109
LVL1::JetElement::m_layerSaturationThreshold
static const int m_layerSaturationThreshold
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:115
LVL1::Coordinate
Coordinate class declaration.
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:50
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
LVL1::JetElement::JetElement
JetElement()
Default constructor.
Definition: JetElement.cxx:28
LVL1::JetElement::key
unsigned int key() const
Error codes and utility information.
Definition: JetElement.cxx:188
LVL1::JetElement::m_eta
double m_eta
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:105
LVL1::JetElement::m_emEnergy
std::vector< int > m_emEnergy
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:108
LVL1::JetElement::m_peak
int m_peak
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:107
LVL1::JetElement::eta
double eta() const
Eta of centre of JetElement.
Definition: JetElement.cxx:82
LVL1::JetElement::m_em_error
std::vector< int > m_em_error
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:110
LVL1::JetElement::addEnergy
void addEnergy(int emEnergy, int hadEnergy)
Add ET to triggered time slice.
Definition: JetElement.cxx:163
LVL1::JetElement::linkError
int linkError() const
return link error
Definition: JetElement.cxx:235
LVL1::JetElement::m_had_error
std::vector< int > m_had_error
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:111
LVL1::JetElement::m_link_error
std::vector< int > m_link_error
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:112
LVL1::JetElement::hadEnergy
int hadEnergy() const
returns had ET
Definition: JetElement.cxx:102
LVL1::JetElement::hadErrorVec
const std::vector< int > & hadErrorVec() const
return Had error vector reference (all timeslices)
Definition: JetElement.cxx:260
LVL1::JetElement::isHadSaturated
bool isHadSaturated() const
returns TRUE if the Had layer of the JetElement is saturated
Definition: JetElement.cxx:216
LVL1::JetElement::m_key
unsigned int m_key
Definition: Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h:106
LVL1::JetElement::phi
double phi() const
Phi of centre of JetElement.
Definition: JetElement.cxx:87
LVL1::JetElement::hadSliceEnergy
int hadSliceEnergy(int slice) const
Definition: JetElement.cxx:138
LVL1::JetElement::~JetElement
virtual ~JetElement()
Destructor.
Definition: JetElement.cxx:77
LVL1::JetElement::emErrorVec
const std::vector< int > & emErrorVec() const
return Em error vector reference (all timeslices)
Definition: JetElement.cxx:255
LVL1::JetElement::sliceEnergy
int sliceEnergy(int slice) const
Definition: JetElement.cxx:150
LVL1::JetElement::linkErrorVec
const std::vector< int > & linkErrorVec() const
return link error vector reference (all timeslices)
Definition: JetElement.cxx:265
LVL1::JetElement::isSaturated
bool isSaturated() const
returns TRUE if the JetElement is saturated (i.e.
Definition: JetElement.cxx:195
JetElement.h
LVL1::JetElement::coord
Coordinate coord() const
return coord of JE
Definition: JetElement.cxx:270
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37