ATLAS Offline Software
Loading...
Searching...
No Matches
xAOD::JetElement_v1 Class Reference

Description of JetElement_v1. More...

#include <JetElement_v1.h>

Inheritance diagram for xAOD::JetElement_v1:
Collaboration diagram for xAOD::JetElement_v1:

Public Member Functions

 JetElement_v1 ()
float phi () const
 get phi (note that for L1Calo phi runs from 0 to 2pi)
void setPhi (float)
 set phi
float eta () const
 get eta
void setEta (float)
 set eta
unsigned int key () const
 get key
void setKey (unsigned int)
 set key
int peak () const
 get peak
void setPeak (int)
 set key
const std::vector< int > & emEnergyVec () const
 get emEnergyVec - emEnergy for all time slices
void setEmEnergyVec (const std::vector< int > &)
 set emEnergyVec - emEnergy for all time slices
const std::vector< int > & hadEnergyVec () const
 get hadEnergyVec - hadEnergy for all time slices
void setHadEnergyVec (const std::vector< int > &)
 set hadEnergyVec - hadEnergy for all time slices
const std::vector< int > & emErrorVec () const
 get emErrorVec - emError for all time slices
void setEmErrorVec (const std::vector< int > &)
 set emErrorVec - emError for all time slices
const std::vector< int > & hadErrorVec () const
 get hadErrorVec - hadError for all time slices
void setHadErrorVec (const std::vector< int > &)
 set hadErrorVec - hadError for all time slices
const std::vector< int > & linkErrorVec () const
 get linkErrorVec - linkError for all time slices
void setLinkErrorVec (const std::vector< int > &)
 set linkErrorVec - linkError for all time slices
void addEnergy (int emEnergy, int hadEnergy)
 Add ET to triggered time slice.
void addSlice (int slice, int emEnergy, int hadEnergy, int emError, int hadError, int linkError)
 Add ET values to specified slice.
int emEnergy () const
 get emEnery for emEnergyVec[peak] - time slice that (hopefully) contains the collision
int hadEnergy () const
 get hadEnery for hadEnergyVec[peak] - time slice that (hopefully) contains the collision
int energy () const
 get total energy. returns emEnergy() + hadEnergy()
int emSliceEnergy (int slice) const
 get emEnery for emEnergyVec[slice] - time slice for arbitary slice
int hadSliceEnergy (int slice) const
 get hadEnery for hadEnergyVec[slice] - time slice for arbitary slice
int sliceEnergy (int slice) const
 get total energy. returns emSliceEnergy(slice) + hadSliceEnergy(slice)
bool isSaturated () const
 is JetElement saturated?
bool isEmSaturated () const
 is EM component of JetElement saturated?
bool isHadSaturated () const
 is Had component of JetElement saturated?
int emError () const
 get emError for emErrorVec[peak] - time slice that (hopefully) contains the collision
int hadError () const
 get hadError for hadErrorVec[peak] - time slice that (hopefully) contains the collision
int linkError () const
 get linkError for linkErrorVec[peak] - time slice that (hopefully) contains the collision

Static Private Attributes

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

Detailed Description

Description of JetElement_v1.

Author
John Morris john..nosp@m.morr.nosp@m.is@ce.nosp@m.rn.c.nosp@m.h
Revision
631127
Date
2014-11-26 10:54:48 +0100 (Wed, 26 Nov 2014)

Definition at line 23 of file JetElement_v1.h.

Constructor & Destructor Documentation

◆ JetElement_v1()

xAOD::JetElement_v1::JetElement_v1 ( )

Definition at line 18 of file JetElement_v1.cxx.

18 :
20 {
21 }
AuxElement(SG::AuxVectorData *container, size_t index)
Base class for elements of a container that can have aux data.

Member Function Documentation

◆ addEnergy()

void xAOD::JetElement_v1::addEnergy ( int emEnergy,
int hadEnergy )

Add ET to triggered time slice.

EM Section

Calclate the modified energy if it is above saturation threshold, set it to the saturation threshold

Had Section

Calclate the modified energy if it is above saturation threshold, set it to the saturation threshold

Definition at line 33 of file JetElement_v1.cxx.

34 {
36
39 int modifiedEmEnergy = emEnergy() + emEnergyIn;
40 if( modifiedEmEnergy > m_layerSaturationThreshold ){
41 modifiedEmEnergy = m_layerSaturationThreshold;
42 }
43
44 // copy (I don't like this) the current Aux const data member vector to a non-const stack vector
45 // modify the content of the stack vector and set it as the Aux data member
46 std::vector<int> modifiedEmEnergyVec;
47 const std::vector<int> currentEmEnergyVec = emEnergyVec();
48 for(std::vector<int>::const_iterator i=currentEmEnergyVec.begin();i!=currentEmEnergyVec.end();++i){
49 modifiedEmEnergyVec.push_back( (*i) );
50 }
51 modifiedEmEnergyVec[ peak() ] = modifiedEmEnergy;
52 setEmEnergyVec( modifiedEmEnergyVec );
53
54
56
59 int modifiedHadEnergy = hadEnergy() + hadEnergyIn;
60 if( modifiedHadEnergy > m_layerSaturationThreshold ){
61 modifiedEmEnergy = m_layerSaturationThreshold;
62 }
63
64 // copy (I don't like this) the current Aux const data member vector to a non-const stack vector
65 // modify the content of the stack vector and set it as the Aux data member
66 std::vector<int> modifiedHadEnergyVec;
67 const std::vector<int> currentHadEnergyVec = hadEnergyVec();
68 for(std::vector<int>::const_iterator i=currentHadEnergyVec.begin();i!=currentHadEnergyVec.end();++i){
69 modifiedHadEnergyVec.push_back( (*i) );
70 }
71 modifiedHadEnergyVec[ peak() ] = modifiedHadEnergy;
72 setHadEnergyVec( modifiedHadEnergyVec );
73
74
75 }
const std::vector< int > & emEnergyVec() const
get emEnergyVec - emEnergy for all time slices
int peak() const
get peak
void setEmEnergyVec(const std::vector< int > &)
set emEnergyVec - emEnergy for all time slices
static const int m_layerSaturationThreshold
int emEnergy() const
get emEnery for emEnergyVec[peak] - time slice that (hopefully) contains the collision
const std::vector< int > & hadEnergyVec() const
get hadEnergyVec - hadEnergy for all time slices
int hadEnergy() const
get hadEnery for hadEnergyVec[peak] - time slice that (hopefully) contains the collision
void setHadEnergyVec(const std::vector< int > &)
set hadEnergyVec - hadEnergy for all time slices

◆ addSlice()

void xAOD::JetElement_v1::addSlice ( int slice,
int emEnergy,
int hadEnergy,
int emError,
int hadError,
int linkError )

Add ET values to specified slice.

This functions works just like addEnergy, it's just got more in it

Definition at line 78 of file JetElement_v1.cxx.

79 {
81
82 // EM Energy
83 int modifiedEmEnergy = emSliceEnergy( slice ) + emEnergyIn;
84 if( modifiedEmEnergy > m_layerSaturationThreshold ){
85 modifiedEmEnergy = m_layerSaturationThreshold;
86 }
87 std::vector<int> modifiedEmEnergyVec;
88 const std::vector<int> currentEmEnergyVec = emEnergyVec();
89 for(std::vector<int>::const_iterator i=currentEmEnergyVec.begin();i!=currentEmEnergyVec.end();++i){
90 modifiedEmEnergyVec.push_back( (*i) );
91 }
92 modifiedEmEnergyVec[ slice ] = modifiedEmEnergy;
93 setEmEnergyVec( modifiedEmEnergyVec );
94
95 // Had Energy
96 int modifiedHadEnergy = hadSliceEnergy( slice ) + hadEnergyIn;
97 if( modifiedHadEnergy > m_layerSaturationThreshold ){
98 modifiedEmEnergy = m_layerSaturationThreshold;
99 }
100 std::vector<int> modifiedHadEnergyVec;
101 const std::vector<int> currentHadEnergyVec = hadEnergyVec();
102 for(std::vector<int>::const_iterator i=currentHadEnergyVec.begin();i!=currentHadEnergyVec.end();++i){
103 modifiedHadEnergyVec.push_back( (*i) );
104 }
105 modifiedHadEnergyVec[ slice ] = modifiedHadEnergy;
106 setHadEnergyVec( modifiedHadEnergyVec );
107
108 // EM Error
109 int modifiedEmError = emErrorVec()[ slice ] + emErrorIn;
110 std::vector<int> modifiedEmErrorVec;
111 const std::vector<int> currentEmErrorVec = emErrorVec();
112 for(std::vector<int>::const_iterator i=currentEmErrorVec.begin();i!=currentEmErrorVec.end();++i){
113 modifiedEmErrorVec.push_back( (*i) );
114 }
115 modifiedEmErrorVec[ slice ] = modifiedEmError;
116 setEmErrorVec( modifiedEmErrorVec );
117
118 // Had Error
119 int modifiedHadError = hadErrorVec()[ slice ] + hadErrorIn;
120 std::vector<int> modifiedHadErrorVec;
121 const std::vector<int> currentHadErrorVec = hadErrorVec();
122 for(std::vector<int>::const_iterator i=currentHadErrorVec.begin();i!=currentHadErrorVec.end();++i){
123 modifiedHadErrorVec.push_back( (*i) );
124 }
125 modifiedHadErrorVec[ slice ] = modifiedHadError;
126 setHadErrorVec( modifiedHadErrorVec );
127
128 // Link Error
129 int modifiedLinkError = linkErrorVec()[ slice ] + linkErrorIn;
130 std::vector<int> modifiedLinkErrorVec;
131 const std::vector<int> currentLinkErrorVec = linkErrorVec();
132 for(std::vector<int>::const_iterator i=currentLinkErrorVec.begin();i!=currentLinkErrorVec.end();++i){
133 modifiedLinkErrorVec.push_back( (*i) );
134 }
135 modifiedLinkErrorVec[ slice ] = modifiedLinkError;
136 setLinkErrorVec( modifiedLinkErrorVec );
137
138
139 }
const std::vector< int > & linkErrorVec() const
get linkErrorVec - linkError for all time slices
int hadSliceEnergy(int slice) const
get hadEnery for hadEnergyVec[slice] - time slice for arbitary slice
void setHadErrorVec(const std::vector< int > &)
set hadErrorVec - hadError for all time slices
void setLinkErrorVec(const std::vector< int > &)
set linkErrorVec - linkError for all time slices
const std::vector< int > & emErrorVec() const
get emErrorVec - emError for all time slices
void setEmErrorVec(const std::vector< int > &)
set emErrorVec - emError for all time slices
const std::vector< int > & hadErrorVec() const
get hadErrorVec - hadError for all time slices
int emSliceEnergy(int slice) const
get emEnery for emEnergyVec[slice] - time slice for arbitary slice

◆ emEnergy()

int xAOD::JetElement_v1::emEnergy ( ) const

get emEnery for emEnergyVec[peak] - time slice that (hopefully) contains the collision

Definition at line 141 of file JetElement_v1.cxx.

142 {
144 return emEnergyVec()[ peak() ];
145 }
147 }

◆ emEnergyVec()

const std::vector< int > & xAOD::JetElement_v1::emEnergyVec ( ) const

get emEnergyVec - emEnergy for all time slices

◆ emError()

int xAOD::JetElement_v1::emError ( ) const

get emError for emErrorVec[peak] - time slice that (hopefully) contains the collision

Definition at line 216 of file JetElement_v1.cxx.

217 {
218 return emErrorVec()[ peak() ];
219 }

◆ emErrorVec()

const std::vector< int > & xAOD::JetElement_v1::emErrorVec ( ) const

get emErrorVec - emError for all time slices

◆ emSliceEnergy()

int xAOD::JetElement_v1::emSliceEnergy ( int slice) const

get emEnery for emEnergyVec[slice] - time slice for arbitary slice

Definition at line 168 of file JetElement_v1.cxx.

169 {
170 if( slice >= 0 && slice < (int)emEnergyVec().size() ) {
171 if( emEnergyVec()[ slice ] < m_layerSaturationThreshold ) {
172 return emEnergyVec()[ slice ];
173 }
175 }
176 return 0;
177 }
size_t size() const
Number of registered mappings.

◆ energy()

int xAOD::JetElement_v1::energy ( ) const

get total energy. returns emEnergy() + hadEnergy()

Definition at line 157 of file JetElement_v1.cxx.

158 {
159
162 ( ( emEnergy() + hadEnergy() ) >= m_saturationThreshold ) ){
164 }
165 return emEnergy() + hadEnergy();
166 }
static const int m_saturationThreshold

◆ eta()

float xAOD::JetElement_v1::eta ( ) const

get eta

◆ hadEnergy()

int xAOD::JetElement_v1::hadEnergy ( ) const

get hadEnery for hadEnergyVec[peak] - time slice that (hopefully) contains the collision

Definition at line 149 of file JetElement_v1.cxx.

150 {
152 return hadEnergyVec()[ peak() ];
153 }
155 }

◆ hadEnergyVec()

const std::vector< int > & xAOD::JetElement_v1::hadEnergyVec ( ) const

get hadEnergyVec - hadEnergy for all time slices

◆ hadError()

int xAOD::JetElement_v1::hadError ( ) const

get hadError for hadErrorVec[peak] - time slice that (hopefully) contains the collision

Definition at line 221 of file JetElement_v1.cxx.

222 {
223 return hadErrorVec()[ peak() ];
224 }

◆ hadErrorVec()

const std::vector< int > & xAOD::JetElement_v1::hadErrorVec ( ) const

get hadErrorVec - hadError for all time slices

◆ hadSliceEnergy()

int xAOD::JetElement_v1::hadSliceEnergy ( int slice) const

get hadEnery for hadEnergyVec[slice] - time slice for arbitary slice

Definition at line 179 of file JetElement_v1.cxx.

180 {
181 if( slice >= 0 && slice < (int)hadEnergyVec().size() ) {
182 if( hadEnergyVec()[ slice ] < m_layerSaturationThreshold ) {
183 return hadEnergyVec()[ slice ];
184 }
186 }
187 return 0;
188 }

◆ isEmSaturated()

bool xAOD::JetElement_v1::isEmSaturated ( ) const

is EM component of JetElement saturated?

Definition at line 206 of file JetElement_v1.cxx.

207 {
209 }

◆ isHadSaturated()

bool xAOD::JetElement_v1::isHadSaturated ( ) const

is Had component of JetElement saturated?

Definition at line 211 of file JetElement_v1.cxx.

212 {
214 }

◆ isSaturated()

bool xAOD::JetElement_v1::isSaturated ( ) const

is JetElement saturated?

Definition at line 201 of file JetElement_v1.cxx.

202 {
203 return energy() == m_saturationThreshold;
204 }
int energy() const
get total energy. returns emEnergy() + hadEnergy()

◆ key()

unsigned int xAOD::JetElement_v1::key ( ) const

get key

◆ linkError()

int xAOD::JetElement_v1::linkError ( ) const

get linkError for linkErrorVec[peak] - time slice that (hopefully) contains the collision

Definition at line 226 of file JetElement_v1.cxx.

227 {
228 return linkErrorVec()[ peak() ];
229 }

◆ linkErrorVec()

const std::vector< int > & xAOD::JetElement_v1::linkErrorVec ( ) const

get linkErrorVec - linkError for all time slices

◆ peak()

int xAOD::JetElement_v1::peak ( ) const

get peak

◆ phi()

float xAOD::JetElement_v1::phi ( ) const

get phi (note that for L1Calo phi runs from 0 to 2pi)

◆ setEmEnergyVec()

void xAOD::JetElement_v1::setEmEnergyVec ( const std::vector< int > & )

set emEnergyVec - emEnergy for all time slices

◆ setEmErrorVec()

void xAOD::JetElement_v1::setEmErrorVec ( const std::vector< int > & )

set emErrorVec - emError for all time slices

◆ setEta()

void xAOD::JetElement_v1::setEta ( float )

set eta

◆ setHadEnergyVec()

void xAOD::JetElement_v1::setHadEnergyVec ( const std::vector< int > & )

set hadEnergyVec - hadEnergy for all time slices

◆ setHadErrorVec()

void xAOD::JetElement_v1::setHadErrorVec ( const std::vector< int > & )

set hadErrorVec - hadError for all time slices

◆ setKey()

void xAOD::JetElement_v1::setKey ( unsigned int )

set key

◆ setLinkErrorVec()

void xAOD::JetElement_v1::setLinkErrorVec ( const std::vector< int > & )

set linkErrorVec - linkError for all time slices

◆ setPeak()

void xAOD::JetElement_v1::setPeak ( int )

set key

◆ setPhi()

void xAOD::JetElement_v1::setPhi ( float )

set phi

◆ sliceEnergy()

int xAOD::JetElement_v1::sliceEnergy ( int slice) const

get total energy. returns emSliceEnergy(slice) + hadSliceEnergy(slice)

Definition at line 190 of file JetElement_v1.cxx.

191 {
192 if( ( emSliceEnergy(slice) >= m_layerSaturationThreshold ) ||
194 ( ( emSliceEnergy(slice) + hadSliceEnergy(slice) ) >= m_saturationThreshold ) ){
196 }
197 return emSliceEnergy(slice) + hadSliceEnergy(slice);
198 }

Member Data Documentation

◆ m_layerSaturationThreshold

const int xAOD::JetElement_v1::m_layerSaturationThreshold = 511
staticprivate

Definition at line 108 of file JetElement_v1.h.

◆ m_saturationThreshold

const int xAOD::JetElement_v1::m_saturationThreshold = 1023
staticprivate

Definition at line 107 of file JetElement_v1.h.


The documentation for this class was generated from the following files: