ATLAS Offline Software
Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef EGAMMAEVENT_CALORINGS_H
8 #define EGAMMAEVENT_CALORINGS_H
9 
10 #include <vector>
12 #include "AthenaKernel/CLASS_DEF.h"
13 
14 class RingSet {
15  public:
16 
17  std::vector<float> m_rings;
18 
19  std::vector<CaloCell_ID::CaloSample> m_layers;
20 
21  typedef std::vector<float>::const_iterator const_iterator;
22 
23  float m_deltaEta; // size of ring in eta
24  float m_deltaPhi; // size of ring in phi
25 
26  // constructor and destructor
28  : m_deltaEta(0),
29  m_deltaPhi(0)
30  { };
31  virtual ~RingSet() { };
32 
33  // accessors
34  float &at(unsigned int i);
35  float &operator [](unsigned int i);
36  const float &at(unsigned int i) const;
37  const float &operator [](unsigned int i) const;
38  size_t size() const;
39  void clearRings();
40  void addRing(float r);
41 
42  size_t numberOfLayers() const;
43  CaloCell_ID::CaloSample &layer(unsigned int i);
44  const CaloCell_ID::CaloSample &layer(unsigned int i) const;
45  void clearLayers();
47 
48  const_iterator begin() const;
49  const_iterator end() const;
50 
51  float &deltaEta();
52  float &deltaPhi();
53  const float &deltaEta() const;
54  const float &deltaPhi() const;
55 
56 };
57 
58 class CaloRings {
59  public:
61  typedef std::vector<RingSet>::const_iterator const_iterator;
62 
63  CaloRings();
64  virtual ~CaloRings() { };
65 
66  void addRingSet(unsigned int numberOfRings,
67  std::vector<CaloCell_ID::CaloSample> &layers,
68  float deltaEta, float deltaPhi);
69  RingSet &at(unsigned int i);
70  const RingSet &at(unsigned int i) const;
71  RingSet &operator [](unsigned int i);
72  const RingSet &operator [](unsigned int i) const;
73  void clear();
74 
75  float ringAt(unsigned int nRingSet, unsigned int nRing);
76 
77 
78  size_t size() const;
81  std::vector<RingSet>::const_iterator begin() const;
82  std::vector<RingSet>::const_iterator end() const;
83 
84  private:
85  std::vector<RingSet> m_ringsets;
86 };
87 
88 CLASS_DEF(CaloRings, 177490517, 1)
89 
90 #endif
91 
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
CaloRings
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:58
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
RingSet::~RingSet
virtual ~RingSet()
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:31
CaloCell_ID.h
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
CaloRings::const_iterator
std::vector< RingSet >::const_iterator const_iterator
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:61
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::RingSet
RingSet()
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:27
RingSet::begin
const_iterator begin() const
Definition: CaloRings.cxx:97
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
RingSet::clearRings
void clearRings()
Definition: CaloRings.cxx:39
CaloRings::~CaloRings
virtual ~CaloRings()
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:64
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
CLASS_DEF.h
macros to associate a CLID to a type
RingSet::end
const_iterator end() const
Definition: CaloRings.cxx:103
CaloRings::iterator
std::vector< RingSet >::iterator iterator
Definition: Reconstruction/egamma/egammaEvent/egammaEvent/CaloRings.h:60