Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
LVL1::JetElement Class Reference

Jet elements are the inputs to the Jet, ETmiss and ETsum triggers. More...

#include <JetElement.h>

Collaboration diagram for LVL1::JetElement:

Public Member Functions

 JetElement ()=default
 Default constructor. More...
 
 JetElement (double phi, double eta, int emEnergy, int hadEnergy, unsigned int key, int emError, int hadError, int linkError)
 Single slice constructor (some simulation tasks, legacy really) More...
 
 JetElement (double phi, double eta, const std::vector< int > &emEnergy, const std::vector< int > &hadEnergy, unsigned int key, const std::vector< int > &emError, const std::vector< int > &hadError, const std::vector< int > &linkError, int peak)
 Multi-slice constructor, e.g. More...
 
void addEnergy (int emEnergy, int hadEnergy)
 Add ET to triggered time slice. More...
 
void addSlice (int slice, int emEnergy, int hadEnergy, int emError, int hadError, int linkError)
 add data for one timeslice. More...
 
double eta () const
 Eta of centre of JetElement. More...
 
double phi () const
 Phi of centre of JetElement. More...
 
int emEnergy () const
 Return ET for peak slice. More...
 
int hadEnergy () const
 returns had ET More...
 
int energy () const
 returns jet element ET
The LVL1 Calo trigger uses a 10 bit integer i.e. More...
 
int emSliceEnergy (int slice) const
 return the ET values for a specified slice More...
 
int hadSliceEnergy (int slice) const
 
int sliceEnergy (int slice) const
 
unsigned int key () const
 Error codes and utility information. More...
 
bool isSaturated () const
 returns TRUE if the JetElement is saturated (i.e. More...
 
bool isEmSaturated () const
 returns TRUE if the Em layer of the JetElement is saturated More...
 
bool isHadSaturated () const
 returns TRUE if the Had layer of the JetElement is saturated More...
 
int emError () const
 return Em error More...
 
int hadError () const
 return Had error More...
 
int linkError () const
 return link error More...
 
int peak () const
 return triggered slice offset More...
 
const std::vector< int > & emEnergyVec () const
 Return data for all slices. More...
 
const std::vector< int > & hadEnergyVec () const
 return Had energy vector reference (all timeslices) More...
 
const std::vector< int > & emErrorVec () const
 return Em error vector reference (all timeslices) More...
 
const std::vector< int > & hadErrorVec () const
 return Had error vector reference (all timeslices) More...
 
const std::vector< int > & linkErrorVec () const
 return link error vector reference (all timeslices) More...
 
Coordinate coord () const
 return coord of JE More...
 

Private Attributes

double m_phi {}
 Internal data. More...
 
double m_eta {}
 
unsigned int m_key {}
 
int m_peak {}
 
std::vector< int > m_emEnergy {0}
 
std::vector< int > m_hadEnergy {0}
 
std::vector< int > m_em_error {0}
 
std::vector< int > m_had_error {0}
 
std::vector< int > m_link_error {0}
 

Static Private Attributes

static const int m_saturationThreshold = 1023
 
static const int m_layerSaturationThreshold = 511
 

Detailed Description

Jet elements are the inputs to the Jet, ETmiss and ETsum triggers.

They are formed in two stages: 2x2 Trigger Towers (EM or Had) are summed in the PreProcessor The corresponding EM and Had towers are summed in the Jet/Energy Module In the simulation, both of these stages are performed in the TrigT1CaloSim::JetElementMaker algorithm.

As for most L1Calo outputs, the hardware can read out a variable number of slices of data. Hence JetElement stores its internal data in vectors, and can return an individal slice of data or the entire vector.

Definition at line 43 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h.

Constructor & Destructor Documentation

◆ JetElement() [1/3]

LVL1::JetElement::JetElement ( )
default

Default constructor.

◆ JetElement() [2/3]

LVL1::JetElement::JetElement ( double  phi,
double  eta,
int  emEnergy,
int  hadEnergy,
unsigned int  key,
int  emError,
int  hadError,
int  linkError 
)

Single slice constructor (some simulation tasks, legacy really)

constructs a jet element with one timeslice

Definition at line 31 of file JetElement.cxx.

38 {
39 }
40 
42 JetElement::JetElement(double phi, double eta,
43  const std::vector<int>& emEnergy,
44  const std::vector<int>& hadEnergy,

◆ JetElement() [3/3]

LVL1::JetElement::JetElement ( double  phi,
double  eta,
const std::vector< int > &  emEnergy,
const std::vector< int > &  hadEnergy,
unsigned int  key,
const std::vector< int > &  emError,
const std::vector< int > &  hadError,
const std::vector< int > &  linkError,
int  peak 
)

Multi-slice constructor, e.g.

constructs a jet element with multiple timeslices

for bytestream decoding

Definition at line 47 of file JetElement.cxx.

48  :
49  m_phi(phi),
50  m_eta(eta),
51  m_key(key),
52  m_peak(peak),
58 {
59 }
60 
61 
63 double JetElement::eta() const{
64  return m_eta;

Member Function Documentation

◆ addEnergy()

void LVL1::JetElement::addEnergy ( int  emEnergy,
int  hadEnergy 
)

Add ET to triggered time slice.

this will add energy to the JE.

It's really intended for JetElementMaker to use when creating JEs.

Definition at line 149 of file JetElement.cxx.

156  {
157  m_emEnergy[slice] =

◆ addSlice()

void LVL1::JetElement::addSlice ( int  slice,
int  emEnergy,
int  hadEnergy,
int  emError,
int  hadError,
int  linkError 
)

add data for one timeslice.

Used by bytestream converter.

Definition at line 160 of file JetElement.cxx.

164  return;
165 }
166 
169 unsigned int JetElement::key() const{
170  return m_key;

◆ coord()

Coordinate LVL1::JetElement::coord ( ) const

return coord of JE

Definition at line 256 of file JetElement.cxx.

◆ emEnergy()

int LVL1::JetElement::emEnergy ( ) const

Return ET for peak slice.

returns em ET

Definition at line 78 of file JetElement.cxx.

83  {
85  return m_hadEnergy[m_peak];

◆ emEnergyVec()

const std::vector< int > & LVL1::JetElement::emEnergyVec ( ) const

Return data for all slices.

return Em energy vector reference (all timeslices)

Definition at line 231 of file JetElement.cxx.

231  {
232  return m_hadEnergy;
233 }

◆ emError()

int LVL1::JetElement::emError ( ) const

return Em error

Definition at line 211 of file JetElement.cxx.

211  {
212  return m_had_error[m_peak];
213 }

◆ emErrorVec()

const std::vector< int > & LVL1::JetElement::emErrorVec ( ) const

return Em error vector reference (all timeslices)

Definition at line 241 of file JetElement.cxx.

241  {
242  return m_had_error;
243 }

◆ emSliceEnergy()

int LVL1::JetElement::emSliceEnergy ( int  slice) const

return the ET values for a specified slice

return ET for specified slice

Definition at line 112 of file JetElement.cxx.

112  {
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];

◆ energy()

int LVL1::JetElement::energy ( ) const

returns jet element ET
The LVL1 Calo trigger uses a 10 bit integer i.e.

0-1023 GeV JetElements are treated as saturated if any of tower, layer or element ET exceed their dynamic range

Definition at line 101 of file JetElement.cxx.

101  {
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()) {

◆ eta()

double LVL1::JetElement::eta ( ) const

Eta of centre of JetElement.

returns eta coord

Definition at line 68 of file JetElement.cxx.

68  {
69  return m_phi;
70 }

◆ hadEnergy()

int LVL1::JetElement::hadEnergy ( ) const

returns had ET

Definition at line 88 of file JetElement.cxx.

◆ hadEnergyVec()

const std::vector< int > & LVL1::JetElement::hadEnergyVec ( ) const

return Had energy vector reference (all timeslices)

Definition at line 236 of file JetElement.cxx.

236  {
237  return m_em_error;
238 }

◆ hadError()

int LVL1::JetElement::hadError ( ) const

return Had error

Definition at line 216 of file JetElement.cxx.

216  {
217  return m_link_error[m_peak];
218 }

◆ hadErrorVec()

const std::vector< int > & LVL1::JetElement::hadErrorVec ( ) const

return Had error vector reference (all timeslices)

Definition at line 246 of file JetElement.cxx.

246  {
247  return m_link_error;
248 }

◆ hadSliceEnergy()

int LVL1::JetElement::hadSliceEnergy ( int  slice) const

Definition at line 124 of file JetElement.cxx.

124  {
126  }
127  }
128  else return 0;
129 }
130 
131 int JetElement::sliceEnergy(int slice) const{

◆ isEmSaturated()

bool LVL1::JetElement::isEmSaturated ( ) const

returns TRUE if the Em layer of the JetElement is saturated

Definition at line 193 of file JetElement.cxx.

197  {
199  return true;

◆ isHadSaturated()

bool LVL1::JetElement::isHadSaturated ( ) const

returns TRUE if the Had layer of the JetElement is saturated

Definition at line 202 of file JetElement.cxx.

206  {
207  return m_em_error[m_peak];
208 }

◆ isSaturated()

bool LVL1::JetElement::isSaturated ( ) const

returns TRUE if the JetElement is saturated (i.e.

either the energy of the JetElement itself or that of one of its components exceeds its dynamic range) and FALSE otherwise.

Definition at line 181 of file JetElement.cxx.

181  {
182  return false;
183  }
184 }
185 
186 
188 bool JetElement::isEmSaturated() const{

◆ key()

unsigned int LVL1::JetElement::key ( ) const

Error codes and utility information.

returns JE key - that is the key the JE had when it was created.

Added for bug-testing.

Definition at line 174 of file JetElement.cxx.

176  {

◆ linkError()

int LVL1::JetElement::linkError ( ) const

return link error

Definition at line 221 of file JetElement.cxx.

221  {
222  return m_peak;
223 }

◆ linkErrorVec()

const std::vector< int > & LVL1::JetElement::linkErrorVec ( ) const

return link error vector reference (all timeslices)

Definition at line 251 of file JetElement.cxx.

251  {
252  return Coordinate(m_phi,m_eta);
253 }

◆ peak()

int LVL1::JetElement::peak ( ) const

return triggered slice offset

Definition at line 226 of file JetElement.cxx.

226  {
227  return m_emEnergy;
228 }

◆ phi()

double LVL1::JetElement::phi ( ) const

Phi of centre of JetElement.

returns phi coord of tower

Definition at line 73 of file JetElement.cxx.

73  {
75  return m_emEnergy[m_peak];

◆ sliceEnergy()

int LVL1::JetElement::sliceEnergy ( int  slice) const

Definition at line 136 of file JetElement.cxx.

137  {
139  }
140 }
141 

Member Data Documentation

◆ m_em_error

std::vector<int> LVL1::JetElement::m_em_error {0}
private

◆ m_emEnergy

std::vector<int> LVL1::JetElement::m_emEnergy {0}
private

◆ m_eta

double LVL1::JetElement::m_eta {}
private

◆ m_had_error

std::vector<int> LVL1::JetElement::m_had_error {0}
private

◆ m_hadEnergy

std::vector<int> LVL1::JetElement::m_hadEnergy {0}
private

◆ m_key

unsigned int LVL1::JetElement::m_key {}
private

◆ m_layerSaturationThreshold

const int LVL1::JetElement::m_layerSaturationThreshold = 511
staticprivate

◆ m_link_error

std::vector<int> LVL1::JetElement::m_link_error {0}
private

◆ m_peak

int LVL1::JetElement::m_peak {}
private

◆ m_phi

double LVL1::JetElement::m_phi {}
private

Internal data.

Definition at line 102 of file Trigger/TrigT1/TrigT1CaloEvent/TrigT1CaloEvent/JetElement.h.

◆ m_saturationThreshold

const int LVL1::JetElement::m_saturationThreshold = 1023
staticprivate

The documentation for this class was generated from the following files:
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
LVL1::JetElement::hadError
int hadError() const
return Had error
Definition: JetElement.cxx:216
LVL1::JetElement::isEmSaturated
bool isEmSaturated() const
returns TRUE if the Em layer of the JetElement is saturated
Definition: JetElement.cxx:193
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::JetElement::emError
int emError() const
return Em error
Definition: JetElement.cxx:211
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
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::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::sliceEnergy
int sliceEnergy(int slice) const
Definition: JetElement.cxx:136