ATLAS Offline Software
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 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...
 
virtual ~JetElement ()
 Destructor. 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
 
std::vector< int > m_hadEnergy
 
std::vector< int > m_em_error
 
std::vector< int > m_had_error
 
std::vector< int > m_link_error
 

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 constructor.

Definition at line 28 of file JetElement.cxx.

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):

◆ 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 42 of file JetElement.cxx.

49 {
50 }
51 
53 JetElement::JetElement(double phi, double eta,
54  const std::vector<int>& emEnergy,
55  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 58 of file JetElement.cxx.

59  :
60  m_phi(phi),
61  m_eta(eta),
62  m_key(key),
63  m_peak(peak),
69 {
70 }
71 
73 }
74 
75 

◆ ~JetElement()

LVL1::JetElement::~JetElement ( )
virtual

Destructor.

Definition at line 77 of file JetElement.cxx.

77  {
78  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 163 of file JetElement.cxx.

170  {
171  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 174 of file JetElement.cxx.

178  return;
179 }
180 
183 unsigned int JetElement::key() const{
184  return m_key;

◆ coord()

Coordinate LVL1::JetElement::coord ( ) const

return coord of JE

Definition at line 270 of file JetElement.cxx.

◆ emEnergy()

int LVL1::JetElement::emEnergy ( ) const

Return ET for peak slice.

returns em ET

Definition at line 92 of file JetElement.cxx.

97  {
99  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 245 of file JetElement.cxx.

245  {
246  return m_hadEnergy;
247 }

◆ emError()

int LVL1::JetElement::emError ( ) const

return Em error

Definition at line 225 of file JetElement.cxx.

225  {
226  return m_had_error[m_peak];
227 }

◆ emErrorVec()

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

return Em error vector reference (all timeslices)

Definition at line 255 of file JetElement.cxx.

255  {
256  return m_had_error;
257 }

◆ emSliceEnergy()

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

return the ET values for a specified slice

return ET for specified slice

Definition at line 126 of file JetElement.cxx.

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

◆ 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 115 of file JetElement.cxx.

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

◆ eta()

double LVL1::JetElement::eta ( ) const

Eta of centre of JetElement.

returns eta coord

Definition at line 82 of file JetElement.cxx.

82  {
83  return m_phi;
84 }

◆ hadEnergy()

int LVL1::JetElement::hadEnergy ( ) const

returns had ET

Definition at line 102 of file JetElement.cxx.

◆ hadEnergyVec()

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

return Had energy vector reference (all timeslices)

Definition at line 250 of file JetElement.cxx.

250  {
251  return m_em_error;
252 }

◆ hadError()

int LVL1::JetElement::hadError ( ) const

return Had error

Definition at line 230 of file JetElement.cxx.

230  {
231  return m_link_error[m_peak];
232 }

◆ hadErrorVec()

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

return Had error vector reference (all timeslices)

Definition at line 260 of file JetElement.cxx.

260  {
261  return m_link_error;
262 }

◆ hadSliceEnergy()

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

Definition at line 138 of file JetElement.cxx.

138  {
140  }
141  }
142  else return 0;
143 }
144 
145 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 207 of file JetElement.cxx.

211  {
213  return true;

◆ isHadSaturated()

bool LVL1::JetElement::isHadSaturated ( ) const

returns TRUE if the Had layer of the JetElement is saturated

Definition at line 216 of file JetElement.cxx.

220  {
221  return m_em_error[m_peak];
222 }

◆ 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 195 of file JetElement.cxx.

195  {
196  return false;
197  }
198 }
199 
200 
202 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 188 of file JetElement.cxx.

190  {

◆ linkError()

int LVL1::JetElement::linkError ( ) const

return link error

Definition at line 235 of file JetElement.cxx.

235  {
236  return m_peak;
237 }

◆ linkErrorVec()

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

return link error vector reference (all timeslices)

Definition at line 265 of file JetElement.cxx.

265  {
266  return Coordinate(m_phi,m_eta);
267 }

◆ peak()

int LVL1::JetElement::peak ( ) const

return triggered slice offset

Definition at line 240 of file JetElement.cxx.

240  {
241  return m_emEnergy;
242 }

◆ phi()

double LVL1::JetElement::phi ( ) const

Phi of centre of JetElement.

returns phi coord of tower

Definition at line 87 of file JetElement.cxx.

87  {
89  return m_emEnergy[m_peak];

◆ sliceEnergy()

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

Definition at line 150 of file JetElement.cxx.

151  {
153  }
154 }
155 

Member Data Documentation

◆ m_em_error

std::vector<int> LVL1::JetElement::m_em_error
private

◆ m_emEnergy

std::vector<int> LVL1::JetElement::m_emEnergy
private

◆ m_eta

double LVL1::JetElement::m_eta
private

◆ m_had_error

std::vector<int> LVL1::JetElement::m_had_error
private

◆ m_hadEnergy

std::vector<int> LVL1::JetElement::m_hadEnergy
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
private

◆ m_peak

int LVL1::JetElement::m_peak
private

◆ m_phi

double LVL1::JetElement::m_phi
private

Internal data.

Definition at line 104 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: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::isEmSaturated
bool isEmSaturated() const
returns TRUE if the Em layer of the JetElement is saturated
Definition: JetElement.cxx:207
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::JetElement::emError
int emError() const
return Em error
Definition: JetElement.cxx:225
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
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::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::sliceEnergy
int sliceEnergy(int slice) const
Definition: JetElement.cxx:150