ATLAS Offline Software
Loading...
Searching...
No Matches
JetElement_v2.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id: JetElement_v2.cxx 687949 2015-08-06 15:48:49Z amazurov $
6
7// System include(s):
8#include <cmath>
9
10// EDM includes(s):
12
13// Local include(s):
15
16namespace xAOD{
17
22
24 void JetElement_v2::initialize(const float eta,const float phi,const unsigned int key)
25 {
26 setEta( eta );
27 setPhi( phi );
28 setKey( key );
29 }
30
32 void JetElement_v2::initialize(const float eta,const float phi,const unsigned int key,
33 const std::vector<uint16_t>& emJetElementETVec,
34 const std::vector<uint16_t>& hadJetElementETVec,
35 const std::vector<uint32_t>& emJetElementErrorVec,
36 const std::vector<uint32_t>& hadJetElementErrorVec,
37 const std::vector<uint32_t>& linkErrorVec,
38 const uint8_t peak)
39 {
40 setEta( eta );
41 setPhi( phi );
42 setKey( key );
48 setPeak( peak );
49 }
50
51
54 AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetElement_v2 , unsigned int , key , setKey )
56 AUXSTORE_OBJECT_SETTER_AND_GETTER( JetElement_v2 , std::vector<uint16_t> , emJetElementETVec , setEmJetElementETVec )
57 AUXSTORE_OBJECT_SETTER_AND_GETTER( JetElement_v2 , std::vector<uint16_t> , hadJetElementETVec , setHadJetElementETVec )
58 AUXSTORE_OBJECT_SETTER_AND_GETTER( JetElement_v2 , std::vector<uint32_t> , emJetElementErrorVec , setEmJetElementErrorVec )
59 AUXSTORE_OBJECT_SETTER_AND_GETTER( JetElement_v2 , std::vector<uint32_t> , hadJetElementErrorVec , setHadJetElementErrorVec )
60 AUXSTORE_OBJECT_SETTER_AND_GETTER( JetElement_v2 , std::vector<uint32_t> , linkErrorVec , setLinkErrorVec )
61
69
70 unsigned int JetElement_v2::hadJetElementET() const
71 {
73 return hadJetElementETVec()[ peak() ];
74 }
76 }
77
78 unsigned int JetElement_v2::et() const
79 {
80
85 }
87 }
88
89 unsigned int JetElement_v2::emJetElementETSlice(unsigned int slice) const
90 {
91 if( slice < emJetElementETVec().size() ) {
93 return emJetElementETVec()[ slice ];
94 }
96 }
97 return 0;
98 }
99
100 unsigned int JetElement_v2::hadJetElementETSlice(unsigned int slice) const
101 {
102 if( slice < hadJetElementETVec().size() ) {
104 return hadJetElementETVec()[ slice ];
105 }
107 }
108 return 0;
109 }
110
111 unsigned int JetElement_v2::sliceET(unsigned int slice) const
112 {
117 }
118 return emJetElementETSlice(slice) + hadJetElementETSlice(slice);
119 }
120
121
123 {
124 return et() == m_saturationThreshold;
125 }
126
131
136
141
146
148 {
149 return linkErrorVec()[ peak() ];
150 }
151
152} // namespace xAOD
Scalar eta() const
pseudorapidity method
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
AuxElement()
Default constructor.
Description of JetElement_v2.
void setHadJetElementETVec(const std::vector< uint16_t > &)
set hadJetElementETVec - hadJetElementET for all time slices
unsigned int key() const
get key
static const int m_layerSaturationThreshold
const std::vector< uint32_t > & hadJetElementErrorVec() const
get hadJetElementErrorVec - hadJetElementError for all time slices
float phi() const
get phi (note that for L1Calo phi runs from 0 to 2pi)
void setLinkErrorVec(const std::vector< uint32_t > &)
set linkErrorVec - linkError for all time slices
uint32_t linkError() const
get linkError for linkErrorVec[peak] - time slice that (hopefully) contains the collision
void setKey(unsigned int)
set key
void setPeak(uint8_t)
set key
const std::vector< uint32_t > & emJetElementErrorVec() const
get emJetElementErrorVec - emJetElementError for all time slices
const std::vector< uint32_t > & linkErrorVec() const
get linkErrorVec - linkError for all time slices
const std::vector< uint16_t > & hadJetElementETVec() const
get hadJetElementETVec - hadJetElementET for all time slices
unsigned int hadJetElementET() const
get hadJetElementET for hadJetElementETVec[peak] - time slice that (hopefully) contains the collision
unsigned int hadJetElementETSlice(unsigned int slice) const
get hadJetElementET for hadJetElementETVec[slice] - time slice for arbitary slice
JetElement_v2()
Default constructor.
virtual void initialize(const float eta, const float phi, const unsigned int key)
initialize
uint32_t emJetElementError() const
get emJetElementError for emJetElementErrorVec[peak] - time slice that (hopefully) contains the colli...
float eta() const
get eta
const std::vector< uint16_t > & emJetElementETVec() const
get emJetElementETVec - emJetElementET for all time slices
uint32_t hadJetElementError() const
get hadJetElementError for hadJetElementErrorVec[peak] - time slice that (hopefully) contains the col...
void setEmJetElementETVec(const std::vector< uint16_t > &)
set emJetElementETVec - emJetElementET for all time slices
unsigned int emJetElementETSlice(unsigned int slice) const
get emJetElementET for emJetElementETVec[slice] - time slice for arbitary slice
bool isEmSaturated() const
is EM component of JetElement saturated?
static const int m_saturationThreshold
unsigned int et() const
get total et. returns emJetElementET() + hadJetElementET()
void setEmJetElementErrorVec(const std::vector< uint32_t > &)
set emJetElementErrorVec - emJetElementError for all time slices
void setHadJetElementErrorVec(const std::vector< uint32_t > &)
set hadJetElementErrorVec - hadJetElementError for all time slices
unsigned int emJetElementET() const
get emJetElementET for emJetElementETVec[peak] - time slice that (hopefully) contains the collision
bool isSaturated() const
is JetElement saturated?
uint8_t peak() const
get peak
unsigned int sliceET(unsigned int slice) const
get total et. returns emJetElementETSlice(slice) + hadJetElementETSlice(slice)
bool isHadSaturated() const
is Had component of JetElement saturated?
void setPhi(float)
set phi
void setEta(float)
set eta
Forward declaration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setEventNumber uint32_t