|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef CALOEVENT_CALOTOWERCONTAINER_H
8 #define CALOEVENT_CALOTOWERCONTAINER_H
58 #define CALOTOWERCONTAINER_USES_DATAPOOL
66 #include "CaloEvent/CaloTower.h"
71 #include "boost/iterator/iterator_adaptor.hpp"
151 size_t getCalos(std::vector<CaloCell_ID::SUBCALO>& theCalos)
const;
182 double et(
double theEta,
double thePhi)
const;
205 double e(
double theEta,
double thePhi)
const
206 {
return this->
energy(theEta,thePhi); }
230 double energy(
double theEta,
double thePhi)
const;
405 return theIndex < this->
size()
406 ? (this->operator[])(theIndex)
415 return theIndex < this->
size()
416 ? (this->operator[])(theIndex)
437 using Base::operator[];
460 :
public boost::iterator_adaptor<iterator,
463 Base::iterator::iterator_category,
469 typedef boost::iterator_adaptor<
iterator,
472 Base::iterator::iterator_category,
522 #ifndef CALOTOWERCONTAINER_USES_DATAPOOL
524 std::vector<CaloTower> m_towers;
535 template <
class InputIterator>
538 template <
class InputIterator>
543 template <
class COMPARE>
562 return m_caloRegions.
size();
double et(double theEta, double thePhi) const
Return the tower transverse energy at a given grid position.
CaloTower * getTower(index_t eta, index_t phi)
Returns a pointer to a tower with given indices.
size_t neta() const
Return number of bins.
void push_back(value_type pElem)
reverse_iterator rbegin()
Scalar phi() const
phi method
double e(int etaIndex, int phiIndex) const
Return the tower energy at a given grid position.
DataModel_detail::iterator< DataVector > iterator
Standard iterator.
double dphi() const
Return bin size .
DataModel_detail::const_iterator< DataVector > const_iterator
Standard const_iterator.
const_reverse_iterator rend() const noexcept
Return a const_reverse_iterator pointing at the beginning of the collection.
Scalar eta() const
pseudorapidity method
CaloTowerContainer & operator=(const CaloTowerContainer &other)
Assignment.
void insert(iterator position, InputIterator first, InputIterator last)
void insert(iterator position, iterator first, iterator last)
void resize(size_type sz)
DataVector< CaloTower > Base
Iterator class for which the reference type is not an lvalue.
index_t neta() const
Retrieve number of bins.
size_t nphi() const
Return number of bins.
double deta() const
Retrieve bin size .
void init()
Initializes the CaloTowerContainer.
const CaloTower * getTower(int eta, int phi) const
Returns a const pointer to a tower with given indices.
std::vector< unsigned int > m_caloRegions
Vector of calorimeter regions contributing to the tower signals.
index_t getTowerIndex(const CaloTower *aTower) const
Returns the combined index of a tower on the grid.
index_t nphi() const
Retrieve number of bins.
OwnershipPolicy
describes the possible element ownership policies (see e.g. DataVector)
CaloTowerContainer()
Default constructor.
void assign(InputIterator first, InputIterator last)
double phimin() const
Retrieve lower boundary value range.
double e(index_t etaIndex, index_t phiIndex) const
Return the tower energy at a given grid position.
CaloTower * operator[](size_type n)
Storable container class for CaloTower.
iterator(Base::iterator it)
virtual double phi() const override final
get phi data member
(Non-const) Iterator class for DataVector/DataList.
double dphi() const
Retrieve bin size .
double energy(int etaIndex, int phiIndex) const
Return the tower energy at a given grid position.
iterator erase(iterator first, iterator last)
SUBCALO
enumeration of sub calorimeters
iterator insert(iterator position, value_type pElem)
bool getTowerIndices(const CaloTower *aTower, index_t &indexEta, index_t &indexPhi) const
Returns both and indices for a given tower.
index_t getTowerEtaIndex(const CaloTower *aTower) const
Returns the index for a given tower.
std::reverse_iterator< iterator > reverse_iterator
const CaloTower * front() const
Access the first element in the collection as an rvalue.
CaloTower * getTower(index_t theIndex)
Returns a pointer to a tower with a given combined index.
const CaloTower * back() const
Access the last element in the collection as an rvalue.
double etamin() const
Return lower value range boundary.
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
const CaloTower * operator[](size_type n) const
Access an element, as an rvalue.
size_t getCalos(std::vector< CaloCell_ID::SUBCALO > &theCalos) const
Retrieve the list of used calorimeters.
Data class for calorimeter cell towers.
const CaloTowerSeg & towerseg() const
Return a copy of the attached CaloTowerSeg.
CaloTower * getTower(int eta, int phi)
Returns a pointer to a tower with given indices.
iterator erase(iterator position)
index_t phiIndex(double phiVal) const
Returns index for a given value.
size_t getNumberOfCalos() const
Returns the number of included calorimeters.
index_t etaphi(index_t etaInd, index_t phiInd) const
Returns combined continous index from , indices.
virtual ~CaloTowerContainer()
Destructor.
bool isOutOfRange(index_t anIndex) const
Checks if an index is out of range.
double etamin() const
Retrieve lower boundary value range.
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
size_t index_t
Tower map index type.
An STL vector of pointers that by default owns its pointed-to elements.
CaloTower * at(size_type n)
CaloTowerSeg m_towerSeg
Tower grid descriptor.
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
void swap(CaloTowerContainer &other)
Swap.
double energy(double theEta, double thePhi) const
Return the tower energy at a given grid position.
static const index_t m_outOfRange
Index overflow indicator.
Data object stores CaloTower segmentation.
double deta() const
Return bin size .
void reserve(size_type n)
double e(double theEta, double thePhi) const
Return the tower energy at a given grid position.
index_t getTowerPhiIndex(const CaloTower *aTower) const
Returns the index for a given tower.
const CaloTower * at(size_type n) const
Access an element, as an rvalue.
double et(int etaIndex, int phiIndex) const
Return the tower transverse energy at a given grid position.
BASE::size_type size_type
index_t etaIndex(double etaVal) const
Returns index for a given value.
SG_BASE(CaloTowerContainer, DataVector< CaloTower >)
void swapElement(size_type index, value_type newElem, reference oldElem)
void setCalo(const CaloCell_ID::SUBCALO &nCalo)
Adds a calorimeter index to the tower.
size_type size() const noexcept
Returns the number of elements in the collection.
const CaloTower * getTower(index_t theIndex) const
Returns a const pointer to a tower with a given combined index.
macros to associate a CLID to a type
double phimin() const
Return lower value range boundary.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
virtual double eta() const override final
get eta data member
index_t flagOutOfRange() const
Returns the index out-of-range indicator.
boost::iterator_adaptor< iterator, Base::iterator, Base::value_type, Base::iterator::iterator_category, Base::value_type > iterator_adaptor_