ATLAS Offline Software
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 
16 namespace xAOD{
17 
19  SG::AuxElement()
20  {
21  }
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 
52  AUXSTORE_PRIMITIVE_SETTER_AND_GETTER( JetElement_v2 , float , eta , setEta )
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 
62  unsigned int JetElement_v2::emJetElementET() const
63  {
64  if( emJetElementETVec()[ peak() ] < m_layerSaturationThreshold) {
65  return emJetElementETVec()[ peak() ];
66  }
67  return m_layerSaturationThreshold;
68  }
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 
84  return m_saturationThreshold;
85  }
86  return emJetElementET() + hadJetElementET();
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  {
116  return m_saturationThreshold;
117  }
119  }
120 
121 
123  {
124  return et() == m_saturationThreshold;
125  }
126 
128  {
130  }
131 
133  {
135  }
136 
138  {
139  return emJetElementErrorVec()[ peak() ];
140  }
141 
143  {
144  return hadJetElementErrorVec()[ peak() ];
145  }
146 
148  {
149  return linkErrorVec()[ peak() ];
150  }
151 
152 } // namespace xAOD
xAOD::JetElement_v2::setEta
void setEta(float)
set eta
xAOD::JetElement_v2::hadJetElementError
uint32_t hadJetElementError() const
get hadJetElementError for hadJetElementErrorVec[peak] - time slice that (hopefully) contains the col...
Definition: JetElement_v2.cxx:142
xAOD::AUXSTORE_PRIMITIVE_SETTER_AND_GETTER
AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1, float, IP2D_pb, setIP2D_pb) AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(BTagging_v1
xAOD::JetElement_v2::isEmSaturated
bool isEmSaturated() const
is EM component of JetElement saturated?
Definition: JetElement_v2.cxx:127
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::JetElement_v2::setEmJetElementETVec
void setEmJetElementETVec(const std::vector< uint16_t > &)
set emJetElementETVec - emJetElementET for all time slices
xAOD::JetElement_v2::setHadJetElementErrorVec
void setHadJetElementErrorVec(const std::vector< uint32_t > &)
set hadJetElementErrorVec - hadJetElementError for all time slices
xAOD::JetElement_v2::emJetElementError
uint32_t emJetElementError() const
get emJetElementError for emJetElementErrorVec[peak] - time slice that (hopefully) contains the colli...
Definition: JetElement_v2.cxx:137
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
AuxStoreAccessorMacros.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAOD::JetElement_v2::setKey
void setKey(unsigned int)
set key
xAOD::JetElement_v2::setPeak
void setPeak(uint8_t)
set key
xAOD::JetElement_v2::setEmJetElementErrorVec
void setEmJetElementErrorVec(const std::vector< uint32_t > &)
set emJetElementErrorVec - emJetElementError for all time slices
xAOD::JetElement_v2::emJetElementET
unsigned int emJetElementET() const
get emJetElementET for emJetElementETVec[peak] - time slice that (hopefully) contains the collision
Definition: JetElement_v2.cxx:62
xAOD::JetElement_v2
Description of JetElement_v2.
Definition: JetElement_v2.h:26
xAOD::JetElement_v2::isSaturated
bool isSaturated() const
is JetElement saturated?
Definition: JetElement_v2.cxx:122
xAOD::JetElement_v2::sliceET
unsigned int sliceET(unsigned int slice) const
get total et. returns emJetElementETSlice(slice) + hadJetElementETSlice(slice)
Definition: JetElement_v2.cxx:111
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::JetElement_v2::JetElement_v2
JetElement_v2()
Default constructor.
Definition: JetElement_v2.cxx:18
xAOD::JetElement_v2::emJetElementErrorVec
const std::vector< uint32_t > & emJetElementErrorVec() const
get emJetElementErrorVec - emJetElementError for all time slices
xAOD::JetElement_v2::eta
float eta() const
get eta
xAOD::unsigned
unsigned
Definition: RingSetConf_v1.cxx:662
Amg::setPhi
Amg::RotationMatrix3D setPhi(Amg::RotationMatrix3D mat, double angle, int convention=0)
Definition: EulerAnglesHelpers.h:102
xAOD::JetElement_v2::initialize
virtual void initialize(const float eta, const float phi, const unsigned int key)
initialize
Definition: JetElement_v2.cxx:24
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
xAOD::JetElement_v2::setLinkErrorVec
void setLinkErrorVec(const std::vector< uint32_t > &)
set linkErrorVec - linkError for all time slices
xAOD::JetElement_v2::peak
uint8_t peak() const
get peak
xAOD::JetElement_v2::linkErrorVec
const std::vector< uint32_t > & linkErrorVec() const
get linkErrorVec - linkError for all time slices
perfmonmt-refit.slice
slice
Definition: perfmonmt-refit.py:52
xAOD::JetElement_v2::hadJetElementETSlice
unsigned int hadJetElementETSlice(unsigned int slice) const
get hadJetElementET for hadJetElementETVec[slice] - time slice for arbitary slice
Definition: JetElement_v2.cxx:100
xAOD::JetElement_v2::emJetElementETSlice
unsigned int emJetElementETSlice(unsigned int slice) const
get emJetElementET for emJetElementETVec[slice] - time slice for arbitary slice
Definition: JetElement_v2.cxx:89
xAOD::JetElement_v2::hadJetElementETVec
const std::vector< uint16_t > & hadJetElementETVec() const
get hadJetElementETVec - hadJetElementET for all time slices
xAOD::JetElement_v2::hadJetElementET
unsigned int hadJetElementET() const
get hadJetElementET for hadJetElementETVec[peak] - time slice that (hopefully) contains the collision
Definition: JetElement_v2.cxx:70
xAOD::JetElement_v2::m_saturationThreshold
static const int m_saturationThreshold
Definition: JetElement_v2.h:120
JetElement_v2.h
xAOD::JetElement_v2::m_layerSaturationThreshold
static const int m_layerSaturationThreshold
Definition: JetElement_v2.h:121
xAOD::JetElement_v2::key
unsigned int key() const
get key
xAOD::JetElement_v2::linkError
uint32_t linkError() const
get linkError for linkErrorVec[peak] - time slice that (hopefully) contains the collision
Definition: JetElement_v2.cxx:147
xAOD::JetElement_v2::emJetElementETVec
const std::vector< uint16_t > & emJetElementETVec() const
get emJetElementETVec - emJetElementET for all time slices
xAOD::JetElement_v2::setPhi
void setPhi(float)
set phi
xAOD::JetElement_v2::phi
float phi() const
get phi (note that for L1Calo phi runs from 0 to 2pi)
xAOD::JetElement_v2::setHadJetElementETVec
void setHadJetElementETVec(const std::vector< uint16_t > &)
set hadJetElementETVec - hadJetElementET for all time slices
xAOD::JetElement_v2::et
unsigned int et() const
get total et. returns emJetElementET() + hadJetElementET()
Definition: JetElement_v2.cxx:78
xAOD::JetElement_v2::hadJetElementErrorVec
const std::vector< uint32_t > & hadJetElementErrorVec() const
get hadJetElementErrorVec - hadJetElementError for all time slices
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
xAOD::JetElement_v2::isHadSaturated
bool isHadSaturated() const
is Had component of JetElement saturated?
Definition: JetElement_v2.cxx:132