|
ATLAS Offline Software
|
Go to the documentation of this file.
26 #include "CaloEvent/CaloTowerContainer.h"
27 #include "CaloEvent/CaloTower.h"
30 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
53 m_towerSeg(theSegmentation)
59 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
63 m_towerSeg (
other.m_towerSeg),
64 m_caloRegions (
other.m_caloRegions)
71 m_towerSeg (
other.m_towerSeg),
72 m_caloRegions (
other.m_caloRegions),
73 m_towers (
other.m_towers)
85 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
88 m_towers =
other.m_towers;
101 #ifndef CALOTOWERCONTAINER_USES_DATAPOOL
102 m_towers.swap (
other.m_towers);
113 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
116 this->m_towers.resize (
etaBins * phiBins);
127 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
134 double theEta = minEta + (etaIndex-1) *
deltaEta;
138 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
152 #ifndef CALOTOWERCONTAINER_USES_DATAPOOL
153 void CaloTowerContainer::setTowers()
158 for (
size_t i = 0;
i < m_towers.size();
i++)
159 Base::operator[](
i) = &m_towers[
i];
171 unsigned int intCalo = theCalo ;
183 std::vector<unsigned int>::size_type
i;
188 return theCalos.size();
205 return t ?
t->e() : 0;
211 return t ?
t->e() : 0;
218 return t ?
t->et() : 0;
226 return t ?
t->et() : 0;
239 return aTower !=
nullptr
259 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
262 ? &m_towers[theIndex]
270 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
273 ? &m_towers[theIndex]
299 throw std::runtime_error (
"Bad call to CaloTowerContainer::clear");
310 throw std::runtime_error (
"Bad call to CaloTowerContainer::insert");
320 throw std::runtime_error (
"Bad call to CaloTowerContainer::push_back");
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.
void push_back(value_type pElem)
virtual void setEta(double theEta)
set eta data member
std::string find(const std::string &s)
return a remapped string
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
CaloTowerContainer & operator=(const CaloTowerContainer &other)
Assignment.
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
void removeCells()
Remove all cells without kinematic update.
void insert(iterator position, iterator first, iterator last)
Iterator class for which the reference type is not an lvalue.
index_t neta() const
Retrieve number of bins.
double deta() const
Retrieve bin size .
DataVector & operator=(const DataVector &rhs)
Assignment operator.
void init()
Initializes the CaloTowerContainer.
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.
double phimin() const
Retrieve lower boundary value range.
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
Storable container class for CaloTower.
virtual double phi() const override final
get phi data member
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
double dphi() const
Retrieve bin size .
SUBCALO
enumeration of sub calorimeters
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.
void swap(DataVector &rhs)
Swap this collection with another.
iterator insert(iterator position, value_type pElem)
Add a new element to the collection.
static double fix(double phi)
const CaloTower * operator[](size_type n) const
Access an element, as an rvalue.
void clear()
Erase all the elements in the collection.
size_t getCalos(std::vector< CaloCell_ID::SUBCALO > &theCalos) const
Retrieve the list of used calorimeters.
Data class for calorimeter cell towers.
virtual void setPhi(double thePhi)
set phi data member
void resize(size_type sz)
Resizes the collection to the specified number of elements.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
virtual ~CaloTowerContainer()
Destructor.
double etamin() const
Retrieve lower boundary value range.
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
size_t index_t
Tower map index type.
CaloTowerSeg m_towerSeg
Tower grid descriptor.
void swap(CaloTowerContainer &other)
Swap.
double energy(double theEta, double thePhi) const
Return the tower energy at a given grid position.
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
virtual void setE(double theE)
set energy data member
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
static const index_t m_outOfRange
Index overflow indicator.
Data object stores CaloTower segmentation.
index_t getTowerPhiIndex(const CaloTower *aTower) const
Returns the index for a given tower.
void setCalo(const CaloCell_ID::SUBCALO &nCalo)
Adds a calorimeter index to the tower.
virtual double eta() const override final
get eta data member