ATLAS Offline Software
CaloRings_v1.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 /*
3  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4 */
5 #ifndef XAODCALORINGS_VERSIONS_CALORINGS_V1_H
6 #define XAODCALORINGS_VERSIONS_CALORINGS_V1_H
7 
8 // STL include(s):
9 #include <vector>
10 #include <iosfwd>
11 
12 // EDM include(s):
14 
15 // Local include(s):
18 
19 namespace xAOD {
20 
51 class CaloRings_v1 : public SG::AuxElement {
52 
53  public:
54 
57 
64  CaloRings_v1(const CaloRings_v1& cr);
66 
71 
74 
77  unsigned nRingSets() const;
81  unsigned size() const;
89  void clear();
101  RingSetLinks::const_iterator begin() const;
105  RingSetLinks::const_iterator end() const;
109  const RingSet *at(const unsigned index) const;
113  const RingSet *operator [](const unsigned index) const;
119  const RingSetLinks &ringSetLinks() const;
125  void setRingSetLinks(const RingSetLinks &ringsets);
127 
130 
133  CaloRings_v1& operator=(const CaloRings_v1& clrings);
135 
138 
141  float ringAt(const unsigned int rsIdx, const unsigned int ringIdx) const;
145  float ringAt(const unsigned int ringIdx) const;
147 
150 
153  void exportRingsTo(std::vector<float> &ringStrip) const;
157  void exportRingsTo(std::vector<float> &ringStrip,
158  const unsigned rsIdx) const;
162  void exportRingsTo(std::vector<float> &ringStrip,
163  const unsigned rsIdxStart,
164  const unsigned rsIdxEnd) const;
168  void exportRingsTo(std::vector<float> &ringStrip,
169  const RingSetConf_v1::RawConfCollection &clRingsRawConfCol,
170  const Ringer::CalJointLayer layerTypeIdx) const;
174  void exportRingsTo(std::vector<float> &ringStrip,
175  const RingSetConf_v1::RawConfCollection &clRingsRawConfCol,
176  const Ringer::CalJointLayer layerTypeStart,
177  const Ringer::CalJointLayer layerTypeEnd) const;
181  void exportRingsTo(std::vector<float> &ringStrip,
182  const RingSetConf_v1::RawConfCollection &clRingsRawConfCol,
183  const Ringer::CalJointSection sectionType) const;
185 
186 
189 
192  void print( std::ostream &stream ) const;
194 
195  private:
196 
198  void checkRingSetIndexWithinRange( unsigned index ) const;
199 
200 };
201 
204 //==============================================================================
205 inline
207  SG::AuxElement(clrings)
208 {
209  this->makePrivateStore(clrings);
210 }
212 
213 //==============================================================================
214 inline
215 unsigned CaloRings_v1::size() const {
216  return nRingSets();
217 }
218 
219 //==============================================================================
220 inline
221 void CaloRings_v1::exportRingsTo(std::vector<float> &ringStrip) const
222 {
223  exportRingsTo(ringStrip, 0, size()-1);
224 }
225 
226 //==============================================================================
227 inline
229  std::vector<float> &ringStrip,
230  const unsigned rsIdx) const
231 {
232  exportRingsTo(ringStrip, rsIdx, rsIdx);
233 }
234 
235 //==============================================================================
236 inline
238  std::vector<float> &ringStrip,
239  const RingSetConf_v1::RawConfCollection &clRingsRawConfCol,
240  const Ringer::CalJointLayer layerTypeIdx) const
241 {
242  exportRingsTo(ringStrip, clRingsRawConfCol, layerTypeIdx, layerTypeIdx);
243 }
245 
246 } // End of namespace xAOD
247 
248 #include "xAODCore/BaseInfo.h"
250 
251 #endif // XAODCALORINGS_VERSIONS_CALORINGS_V1_H
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::CaloRings_v1::checkRingSetIndexWithinRange
void checkRingSetIndexWithinRange(unsigned index) const
Check if index is within range, otherwise throws overflow_error:
Definition: CaloRings_v1.cxx:298
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
xAOD::CaloRings_v1::~CaloRings_v1
~CaloRings_v1()
Definition: CaloRings_v1.h:69
xAOD::CaloRings_v1::end
RingSetLinks::iterator end()
returns iterator to the ending of RingSet EL Collection.
Definition: CaloRings_v1.cxx:61
xAOD::RingSetConf_v1::RawConfCollection
std::vector< RawConf > RawConfCollection
typedef The raw configuration structure data holder
Definition: RingSetConf_v1.h:124
index
Definition: index.py:1
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:472
xAOD::RingSetLinks
std::vector< ElementLink< RingSetContainer > > RingSetLinks
Declare element links vector.
Definition: RingSetContainer.h:25
BaseInfo.h
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::RingSet_v1
Class holding a set of rings.
Definition: RingSet_v1.h:31
xAOD::CaloRings_v1::CaloRings_v1
CaloRings_v1()
Default empty ctor.
Definition: CaloRings_v1.h:60
xAOD::CaloRings_v1::nRingSets
unsigned nRingSets() const
Number of RingSets ElementLinks available.
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
xAOD::CaloRings_v1::ringSetLinks
const RingSetLinks & ringSetLinks() const
Returns constant ringsets collection.
xAOD::CaloRings_v1::ringAt
float ringAt(const unsigned int rsIdx, const unsigned int ringIdx) const
Navigate through eT rings methods.
xAOD::CaloRings_v1::ringAt
float ringAt(const unsigned int ringIdx) const
Returns the ringIdx'th ring eT value from the vectorized representation.
SG_BASE
SG_BASE(xAOD::CaloRings_v1, SG::AuxElement)
xAOD::CaloRings_v1::operator[]
const RingSet * operator[](const unsigned index) const
Return ith RingSet.
Definition: CaloRings_v1.cxx:98
xAOD::CaloRings_v1::addRingSetEL
void addRingSetEL(const ElementLink< RingSetContainer_v1 > &rsEL)
Add ElementLink to holden vector.
xAOD::CaloRings_v1::print
void print(std::ostream &stream) const
Print-out methods:
Definition: CaloRings_v1.cxx:280
xAOD::CaloRings_v1
Class summarizing the particle interaction throughout the Calorimeter (its shower shape).
Definition: CaloRings_v1.h:51
Ringer::CalJointLayer
CalJointLayer
the joint calorimeter layers.
Definition: CaloRingsDefs.h:45
xAOD::CaloRings_v1::exportRingsTo
void exportRingsTo(std::vector< float > &ringStrip) const
Export rings eT in vectorized representation.
Definition: CaloRings_v1.h:221
RingSetContainer.h
xAOD::CaloRings_v1::setRingSetLinks
void setRingSetLinks(const RingSetLinks &ringsets)
Set this CaloRings RingSet Collection.
RingSetConf.h
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:172
xAOD::CaloRings_v1::operator=
CaloRings_v1 & operator=(const CaloRings_v1 &clrings)
Assignment Operator.
Definition: CaloRings_v1.cxx:262
xAOD::CaloRings_v1::at
const RingSet * at(const unsigned index) const
Return ith RingSet.
Definition: CaloRings_v1.cxx:85
xAOD::CaloRings_v1::begin
RingSetLinks::iterator begin()
returns iterator to the beginning of RingSet Collection.
Definition: CaloRings_v1.cxx:53
xAOD::CaloRings_v1::size
unsigned size() const
Number of RingSets ElementLinks available.
Definition: CaloRings_v1.h:215
xAOD::CaloRings_v1::clear
void clear()
Clear RingSet EL Collection.
Definition: CaloRings_v1.cxx:47
Ringer::CalJointSection
CalJointSection
the joint calorimeter sections.
Definition: CaloRingsDefs.h:18
AuxElement.h
Base class for elements of a container that can have aux data.