ATLAS Offline Software
CaloRings.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
10 
11 float &RingSet::at(unsigned int i)
12 {
13  return m_rings.at(i);
14 }
15 
16 
17 float &RingSet::operator [](unsigned int i)
18 {
19  return m_rings[i];
20 }
21 
22 const float &RingSet::at(unsigned int i) const
23 {
24  return m_rings.at(i);
25 }
26 
27 
28 const float &RingSet::operator [](unsigned int i) const
29 {
30  return m_rings[i];
31 }
32 
33 size_t RingSet::size() const
34 {
35  return m_rings.size();
36 }
37 
38 
40 {
41  m_rings.clear();
42 }
43 
44 void RingSet::addRing(float r)
45 {
46  m_rings.push_back(r);
47 }
48 
49 
50 size_t RingSet::numberOfLayers() const
51 {
52  return m_layers.size();
53 }
54 
56 {
57  return m_layers[i];
58 }
59 
60 const CaloCell_ID::CaloSample &RingSet::layer(unsigned int i) const
61 {
62  return m_layers[i];
63 }
64 
66 {
67  m_layers.clear();
68 }
69 
70 
72 {
73  m_layers.push_back(c);
74 }
75 
77 {
78  return m_deltaEta;
79 }
80 
82 {
83  return m_deltaPhi;
84 }
85 
86 const float &RingSet::deltaEta() const
87 {
88  return m_deltaEta;
89 }
90 
91 const float &RingSet::deltaPhi() const
92 {
93  return m_deltaPhi;
94 }
95 
96 
98 {
99  return m_rings.begin();
100 }
101 
102 
104 {
105  return m_rings.end();
106 }
107 
108 
112 
114  : m_ringsets(0)
115 {
116 }
117 
118 void CaloRings::addRingSet(unsigned int numberOfRings,
119  std::vector<CaloCell_ID::CaloSample> &layers,
120  float deltaEta, float deltaPhi) {
121 
122  RingSet r;
123  r.m_rings.clear();
124  r.m_layers = layers;
125  r.m_deltaEta = deltaEta;
126  r.m_deltaPhi = deltaPhi;
127 
128  for (unsigned int j = 0; j < numberOfRings; ++j) {
129  r.m_rings.push_back(0);
130  }
131  m_ringsets.push_back(r);
132 }
133 
135 {
136  m_ringsets.clear();
137 }
138 
139 size_t CaloRings::size() const
140 {
141  return m_ringsets.size();
142 }
143 
145 {
146  return m_ringsets.begin();
147 }
148 
150 {
151  return m_ringsets.end();
152 }
153 
154 std::vector<RingSet>::const_iterator CaloRings::begin() const
155 {
156  return m_ringsets.begin();
157 }
158 
159 std::vector<RingSet>::const_iterator CaloRings::end() const
160 {
161  return m_ringsets.end();
162 }
163 
164 RingSet &CaloRings::at(unsigned int i) {
165  return m_ringsets.at(i);
166 }
167 
169  return m_ringsets[i];
170 }
171 
172 const RingSet &CaloRings::at(unsigned int i) const {
173  return m_ringsets.at(i);
174 }
175 
176 const RingSet &CaloRings::operator [](unsigned int i) const {
177  return m_ringsets[i];
178 }
179 
180 float CaloRings::ringAt(unsigned int nRingSet, unsigned int nRing) {
181  return m_ringsets.at(nRingSet).at(nRing);
182 }
183 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
beamspotman.r
def r
Definition: beamspotman.py:676
RingSet::operator[]
float & operator[](unsigned int i)
Definition: CaloRings.cxx:17
CaloRings::size
size_t size() const
Definition: CaloRings.cxx:139
RingSet::deltaPhi
float & deltaPhi()
Definition: CaloRings.cxx:81
RingSet::at
float & at(unsigned int i)
RingSet ///.
Definition: CaloRings.cxx:11
RingSet::clearLayers
void clearLayers()
Definition: CaloRings.cxx:65
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
RingSet
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:14
CaloRings::at
RingSet & at(unsigned int i)
Definition: CaloRings.cxx:164
RingSet::m_rings
std::vector< float > m_rings
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:17
CaloRings::m_ringsets
std::vector< RingSet > m_ringsets
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:85
CaloRings::begin
std::vector< RingSet >::iterator begin()
Definition: CaloRings.cxx:144
RingSet::addLayer
void addLayer(CaloCell_ID::CaloSample c)
Definition: CaloRings.cxx:71
RingSet::size
size_t size() const
Definition: CaloRings.cxx:33
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloRings::operator[]
RingSet & operator[](unsigned int i)
Definition: CaloRings.cxx:168
RingSet::m_layers
std::vector< CaloCell_ID::CaloSample > m_layers
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:19
RingSet::m_deltaPhi
float m_deltaPhi
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:24
RingSet::layer
CaloCell_ID::CaloSample & layer(unsigned int i)
Definition: CaloRings.cxx:55
CaloRings::clear
void clear()
Definition: CaloRings.cxx:134
RingSet::const_iterator
std::vector< float >::const_iterator const_iterator
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:21
CaloRings::end
std::vector< RingSet >::iterator end()
Definition: CaloRings.cxx:149
RingSet::m_deltaEta
float m_deltaEta
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:23
RingSet::addRing
void addRing(float r)
Definition: CaloRings.cxx:44
RingSet::numberOfLayers
size_t numberOfLayers() const
Definition: CaloRings.cxx:50
RingSet::deltaEta
float & deltaEta()
Definition: CaloRings.cxx:76
RingSet::begin
const_iterator begin() const
Definition: CaloRings.cxx:97
CaloRings.h
RingSet::clearRings
void clearRings()
Definition: CaloRings.cxx:39
CaloRings::addRingSet
void addRingSet(unsigned int numberOfRings, std::vector< CaloCell_ID::CaloSample > &layers, float deltaEta, float deltaPhi)
Definition: CaloRings.cxx:118
CaloRings::ringAt
float ringAt(unsigned int nRingSet, unsigned int nRing)
Definition: CaloRings.cxx:180
CaloRings::CaloRings
CaloRings()
Calo Rings ///.
Definition: CaloRings.cxx:113
python.compressB64.c
def c
Definition: compressB64.py:93
RingSet::end
const_iterator end() const
Definition: CaloRings.cxx:103