ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
CaloTowerContainer Class Reference

Storable container class for CaloTower. More...

#include <CaloTowerContainer.h>

Inheritance diagram for CaloTowerContainer:
Collaboration diagram for CaloTowerContainer:

Classes

class  iterator
 Iterator class for which the reference type is not an lvalue. More...
 

Public Types

typedef DataVector< CaloTowerBase
 
typedef size_t index_t
 Tower map index type. More...
 
typedef std::reverse_iterator< iteratorreverse_iterator
 
typedef typename DataVectorBase< CaloTower >::Base DataVector_BASE
 
typedef typename DataVectorBase< CaloTower >::Base DVL_BASE
 
typedef BASE::PtrVector PtrVector
 This is the type of the underlying std::vector (what stdcont returns). More...
 
typedef BASE::PtrVector BaseContainer
 
typedef CaloTower *& reference
 
typedef CaloTower *constconst_reference
 
typedef BASE::size_type size_type
 
typedef BASE::difference_type difference_type
 
typedef CaloTowervalue_type
 
typedef BASE::allocator_type allocator_type
 
typedef CaloTower ** pointer
 
typedef CaloTower *constconst_pointer
 
typedef const CaloTowerconst_value_type
 
typedef CaloTower base_value_type
 The T value used as the template parameter. More...
 
typedef std::unique_ptr< base_value_typeunique_type
 Type of a unique_ptr that can be used to insert elements into this container. More...
 
typedef DataModel_detail::ElementProxy< DataVectorElementProxy
 This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership. More...
 
typedef DataModel_detail::const_iterator< DataVectorconst_iterator
 Standard const_iterator. More...
 
typedef DataModel_detail::iterator< DataVectoriterator
 Standard iterator. More...
 
typedef std::reverse_iterator< const_iteratorconst_reverse_iterator
 Standard const_reverse_iterator. More...
 
typedef DataVector base_data_vector
 
using Deleter = typename BASE::Deleter
 

Public Member Functions

 CaloTowerContainer ()
 Default constructor. More...
 
 CaloTowerContainer (const CaloTowerSeg &tseg, bool noTowers=false)
 Useable Constructor. More...
 
 CaloTowerContainer (const CaloTowerContainer &other)
 Copy constructor. More...
 
CaloTowerContaineroperator= (const CaloTowerContainer &other)
 Assignment. More...
 
void swap (CaloTowerContainer &other)
 Swap. More...
 
virtual ~CaloTowerContainer ()
 Destructor. More...
 
void init ()
 Initializes the CaloTowerContainer. More...
 
void setCalo (const CaloCell_ID::SUBCALO &nCalo)
 Adds a calorimeter index to the tower. More...
 
size_t getCalos (std::vector< CaloCell_ID::SUBCALO > &theCalos) const
 Retrieve the list of used calorimeters. More...
 
size_t getNumberOfCalos () const
 Returns the number of included calorimeters. More...
 
double etamin () const
 Return lower \( \eta \) value range boundary. More...
 
double phimin () const
 Return lower \( \varphi \) value range boundary. More...
 
double deta () const
 Return bin size \( \Delta \eta \). More...
 
double dphi () const
 Return bin size \( \Delta \varphi \). More...
 
size_t neta () const
 Return number of \( \eta \) bins. More...
 
size_t nphi () const
 Return number of \( \varphi \) bins. More...
 
const CaloTowerSegtowerseg () const
 Return a copy of the attached CaloTowerSeg. More...
 
double et (double theEta, double thePhi) const
 Return the tower transverse energy at a given grid position. More...
 
double et (index_t etaIndex, index_t phiIndex) const
 Return the tower transverse energy at a given grid position. More...
 
double et (int etaIndex, int phiIndex) const
 Return the tower transverse energy at a given grid position. More...
 
double e (double theEta, double thePhi) const
 Return the tower energy at a given grid position. More...
 
double e (index_t etaIndex, index_t phiIndex) const
 Return the tower energy at a given grid position. More...
 
double e (int etaIndex, int phiIndex) const
 Return the tower energy at a given grid position. More...
 
double energy (double theEta, double thePhi) const
 Return the tower energy at a given grid position. More...
 
double energy (index_t etaIndex, index_t phiIndex) const
 Return the tower energy at a given grid position. More...
 
double energy (int etaIndex, int phiIndex) const
 Return the tower energy at a given grid position. More...
 
index_t getTowerIndex (const CaloTower *aTower) const
 Returns the combined index of a tower on the grid. More...
 
index_t getTowerIndex (index_t etaIndex, index_t phiIndex) const
 Returns the combined index for given \( \eta \) and \( \varphi \) indices. More...
 
index_t getTowerIndex (double theEta, double thePhi) const
 Returns the combined index for given \( \eta \) and \( \varphi \) values. More...
 
index_t getTowerEtaIndex (const CaloTower *aTower) const
 Returns the \( \eta \) index for a given tower. More...
 
index_t getTowerEtaIndex (double theEta) const
 Returns the \( \eta \) index for a given \( \eta \) value. More...
 
index_t getTowerEtaIndex (index_t towerIndex) const
 Returns the \( \eta \) index for a given combined index. More...
 
index_t getTowerPhiIndex (const CaloTower *aTower) const
 Returns the \( \varphi \) index for a given tower. More...
 
index_t getTowerPhiIndex (double thePhi) const
 Returns the \( \varphi \) index for a given \( \varphi \) value. More...
 
index_t getTowerPhiIndex (index_t towerIndex) const
 Returns the \( \varphi \) index for a given combined index. More...
 
bool getTowerIndices (const CaloTower *aTower, index_t &indexEta, index_t &indexPhi) const
 Returns both \( \eta \) and \( \varphi \) indices for a given tower. More...
 
bool getTowerIndices (double theEta, double thePhi, index_t &indexEta, index_t &indexPhi) const
 Returns both \( \eta \) and \( \varphi \) indices for given \( \eta \) and \( \varphi \) values. More...
 
CaloTowergetTower (index_t eta, index_t phi)
 Returns a pointer to a tower with given \( ( \eta, \varphi ) \) indices. More...
 
const CaloTowergetTower (index_t eta, index_t phi) const
 Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) indices. More...
 
CaloTowergetTower (int eta, int phi)
 Returns a pointer to a tower with given \( ( \eta, \varphi ) \) indices. More...
 
const CaloTowergetTower (int eta, int phi) const
 Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) indices. More...
 
CaloTowergetTower (double eta, double phi)
 Returns a pointer to a tower with given \( ( \eta, \varphi ) \) values. More...
 
const CaloTowergetTower (double eta, double phi) const
 Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) values. More...
 
CaloTowergetTower (index_t theIndex)
 Returns a pointer to a tower with a given combined index. More...
 
const CaloTowergetTower (index_t theIndex) const
 Returns a const pointer to a tower with a given combined index. More...
 
index_t flagOutOfRange () const
 Returns the index out-of-range indicator. More...
 
bool isOutOfRange (index_t anIndex) const
 Checks if an index is out of range. More...
 
CaloToweroperator[] (size_type n)
 
CaloTowerat (size_type n)
 
CaloTowerfront ()
 
CaloTowerback ()
 
iterator begin ()
 
iterator end ()
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
void insert (iterator position, iterator first, iterator last)
 
void clear (SG::OwnershipPolicy p)
 
void push_back (value_type pElem)
 

Static Public Attributes

static const bool has_virtual
 This is true for any DataVector class if we need to use virtual derivation to get to the base DataVector class. More...
 
static constexpr bool must_own
 If true, then this type must own its contents. More...
 

Private Member Functions

template<class InputIterator >
void assign (InputIterator first, InputIterator last)
 
iterator insert (iterator position, value_type pElem)
 
template<class InputIterator >
void insert (iterator position, InputIterator first, InputIterator last)
 
iterator erase (iterator position)
 
iterator erase (iterator first, iterator last)
 
void sort ()
 
template<class COMPARE >
void sort (COMPARE comp)
 
void swapElement (size_type index, value_type newElem, reference oldElem)
 
void resize (size_type sz)
 
void reserve (size_type n)
 
void pop_back ()
 
void clear ()
 

Private Attributes

CaloTowerSeg m_towerSeg
 Tower grid \( ( \Delta \eta \times \Delta \varphi ) \) descriptor. More...
 
std::vector< unsigned int > m_caloRegions
 Vector of calorimeter regions contributing to the tower signals. More...
 

Static Private Attributes

static const index_t m_outOfRange = static_cast<index_t>(-1)
 Index overflow indicator. More...
 

Friends

class CaloTowerContainerCnv_p1
 

Swap and sort.

void swap (DataVector &rhs)
 Swap this collection with another. More...
 
static void iter_swap (iterator a, iterator b)
 Swap the referents of two DataVector iterators. More...
 

Non-standard operations.

void clear (SG::OwnershipPolicy ownPolicy, SG::IndexTrackingPolicy trackIndices)
 
void clear (std::unique_ptr< Deleter > deleter)
 Erase all the elements in the collection, and change how elements are to be deleted. More...
 
void swapElement (iterator pos, value_type newElem, reference oldElem)
 Swap one element out of the container. More...
 
void swapElement (size_type index, std::unique_ptr< base_value_type > newElem, std::unique_ptr< base_value_type > &oldElem)
 Swap one element out of the container. More...
 
void swapElement (iterator pos, std::unique_ptr< base_value_type > newElem, std::unique_ptr< base_value_type > &oldElem)
 Swap one element out of the container. More...
 
virtual const DataModel_detail::DVLInfoBasedvlinfo_v () const
 Return the DV/DL info struct for this class. More...
 
const SG::AuxVectorBaseauxbase () const
 Convert to AuxVectorBase. More...
 
size_type max_size () const noexcept
 Returns the size() of the largest possible collection. More...
 
size_type capacity () const noexcept
 Returns the total number of elements that the collection can hold before needing to allocate more memory. More...
 
bool empty () const noexcept
 Returns true if the collection is empty. More...
 
void shrink_to_fit ()
 
const PtrVectorstdcont () const
 Return the underlying std::vector of the container. More...
 
SG::OwnershipPolicy ownPolicy () const
 Return the ownership policy setting for this container. More...
 
static const DataModel_detail::DVLInfoBasedvlinfo ()
 Return the DV/DL info struct for this class. More...
 
static int baseOffset (const std::type_info &ti)
 Return the offset of a base DataVector class. More...
 

Internal operations.

SG::IsMostDerivedFlag m_isMostDerived
 This flag is true if this DV instance is the most-derived one. More...
 
void resortAux (iterator beg, iterator end)
 Reset indices / reorder aux data after elements have been permuted. More...
 
void testInsert (const char *op)
 Test if we can insert; raise an exception if not. More...
 
void testInsertOol (const char *op)
 Test if we can insert; raise an exception if not. More...
 
void assignElement (typename BaseContainer::iterator pos, value_type newElem)
 Handle element assignment. More...
 
void assignElement (typename BaseContainer::iterator pos, std::unique_ptr< base_value_type > newElem)
 Handle element assignment. More...
 
void assignBaseElement (typename BaseContainer::iterator pos, typename BaseContainer::value_type newElem)
 Handle element assignment from a base pointer. More...
 
void shift (size_t pos, ptrdiff_t offs)
 Shift the auxiliary elements of the container. More...
 
virtual const std::type_info & dv_typeid () const
 Find the most-derived DataVector class in the hierarchy. More...
 
typedef ROOT::Meta::Selection::DataVector< CaloTower, DataVector_BASE >::self self
 
static int baseOffset1 (const char *p, const DataVector &dv, const std::type_info &ti)
 Helper for baseOffset. More...
 
static const CaloTowerdo_cast (const typename PtrVector::value_type p)
 Helper to shorten calls to DataModel_detail::DVLCast. More...
 
static CaloTowerdo_cast_nc (typename PtrVector::value_type p)
 Helper to shorten calls to DataModel_detail::DVLCast. More...
 
void clearMostDerived ()
 Clear m_isMostDerived for this instance and for all bases. More...
 
virtual void setMostDerived ()
 Set m_isMostDerived for this instance and clear it for all bases. More...
 

Detailed Description

Storable container class for CaloTower.

Author
H. Ma hma@b.nosp@m.nl.g.nosp@m.ov
S. Rajagopalan srini.nosp@m.r@bn.nosp@m.l.gov
P. Loch loch@.nosp@m.phys.nosp@m.ics.a.nosp@m.rizo.nosp@m.na.ed.nosp@m.u
Date
April 1, 2005
Version
2

The CaloTowerContainer holds an ordered list of pointers to CaloTower s, where the index of a given tower in the list is determined by its \( ( \eta, \varphi ) \) location on the tower grid. When persistified, only the tower grid as stored in a CaloTowerSeg object held by the CaloTowerContainer object, and the list of contributing calorimeters are saved to disk. The CaloTowerContainer is refilled on the fly using this information when retrieved from the persistent store into the transient store (requires original CaloCellContainer to be available also).

Definition at line 76 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

Member Typedef Documentation

◆ allocator_type

typedef BASE::allocator_type DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::allocator_type
inherited

Definition at line 816 of file DataVector.h.

◆ Base

◆ base_data_vector

Definition at line 853 of file DataVector.h.

◆ base_value_type

The T value used as the template parameter.

Note that this is different from value_type (that's T*).

Definition at line 824 of file DataVector.h.

◆ BaseContainer

typedef BASE::PtrVector DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::BaseContainer
inherited

Definition at line 806 of file DataVector.h.

◆ const_iterator

Standard const_iterator.

Definition at line 837 of file DataVector.h.

◆ const_pointer

Definition at line 818 of file DataVector.h.

◆ const_reference

Definition at line 812 of file DataVector.h.

◆ const_reverse_iterator

typedef std::reverse_iterator<const_iterator> DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::const_reverse_iterator
inherited

Standard const_reverse_iterator.

Definition at line 846 of file DataVector.h.

◆ const_value_type

Definition at line 820 of file DataVector.h.

◆ DataVector_BASE

Definition at line 796 of file DataVector.h.

◆ Deleter

using DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::Deleter = typename BASE::Deleter
inherited

Definition at line 856 of file DataVector.h.

◆ difference_type

typedef BASE::difference_type DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::difference_type
inherited

Definition at line 814 of file DataVector.h.

◆ DVL_BASE

typedef typename DataVectorBase<CaloTower >::Base DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::DVL_BASE
inherited

Definition at line 797 of file DataVector.h.

◆ ElementProxy

This type is used to proxy lvalue accesses to DataVector elements, in order to handle ownership.

Definition at line 832 of file DataVector.h.

◆ index_t

Tower map index type.

Definition at line 82 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

◆ iterator

Standard iterator.

Note that lvalue references here will yield an ElementProxy, not a reference.

Definition at line 841 of file DataVector.h.

◆ pointer

typedef CaloTower ** DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::pointer
inherited

Definition at line 817 of file DataVector.h.

◆ PtrVector

typedef BASE::PtrVector DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::PtrVector
inherited

This is the type of the underlying std::vector (what stdcont returns).

Definition at line 805 of file DataVector.h.

◆ reference

typedef CaloTower *& DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::reference
inherited

Definition at line 811 of file DataVector.h.

◆ reverse_iterator

typedef std::reverse_iterator<iterator> CaloTowerContainer::reverse_iterator

◆ self

Definition at line 2042 of file DataVector.h.

◆ size_type

typedef BASE::size_type DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::size_type
inherited

Definition at line 813 of file DataVector.h.

◆ unique_type

typedef std::unique_ptr<base_value_type> DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::unique_type
inherited

Type of a unique_ptr that can be used to insert elements into this container.

Definition at line 828 of file DataVector.h.

◆ value_type

typedef CaloTower * DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::value_type
inherited

Definition at line 815 of file DataVector.h.

Constructor & Destructor Documentation

◆ CaloTowerContainer() [1/3]

CaloTowerContainer::CaloTowerContainer ( )

Default constructor.

Instantiates a CaloTowerContainer without a \( \Delta \eta \times \Delta \varphi \) grid definition. Limited use only.

Definition at line 46 of file CaloTowerContainer.cxx.

48 { }

◆ CaloTowerContainer() [2/3]

CaloTowerContainer::CaloTowerContainer ( const CaloTowerSeg tseg,
bool  noTowers = false 
)

Useable Constructor.

Parameters
tseginput a CaloTowerSeg object containing a \( \Delta \eta \times \Delta \varphi \) tower grid description
noTowersIf true, don't create the contained towers.

Creates an empty CaloTower at each \( ( \eta, \varphi ) \) location of the grid.

Definition at line 50 of file CaloTowerContainer.cxx.

53  m_towerSeg(theSegmentation)
54 {
55  if (!noTowers)
56  init();
57 }

◆ CaloTowerContainer() [3/3]

CaloTowerContainer::CaloTowerContainer ( const CaloTowerContainer other)

Copy constructor.

Definition at line 68 of file CaloTowerContainer.cxx.

70  Base(other.m_towers.size(), SG::VIEW_ELEMENTS),
71  m_towerSeg (other.m_towerSeg),
72  m_caloRegions (other.m_caloRegions),
73  m_towers (other.m_towers)
74 {
75  setTowers();
76 }

◆ ~CaloTowerContainer()

CaloTowerContainer::~CaloTowerContainer ( )
virtualdefault

Destructor.

Member Function Documentation

◆ assign() [1/2]

template<class InputIterator >
void CaloTowerContainer::assign ( InputIterator  first,
InputIterator  last 
)
private

◆ assign() [2/2]

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::assign ( std::initializer_list< value_type l)
inherited
Parameters
lAn initializer list.

Any existing owned elements will be released. The DataVector's ownership policy determines whether it will take ownership of the new elements.

◆ assignBaseElement()

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::assignBaseElement ( typename BaseContainer::iterator  pos,
typename BaseContainer::value_type  newElem 
)
privateinherited

Handle element assignment from a base pointer.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The old element is freed if this container owns elements. Auxiliary data are copied if appropriate.

◆ assignElement() [1/2]

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::assignElement ( typename BaseContainer::iterator  pos,
std::unique_ptr< base_value_type newElem 
)
privateinherited

Handle element assignment.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The container must own its elements. Auxiliary data are copied if appropriate.

◆ assignElement() [2/2]

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::assignElement ( typename BaseContainer::iterator  pos,
value_type  newElem 
)
privateinherited

Handle element assignment.

Parameters
posPosition in the container to assign.
newElemThe new element to assign.

The old element is freed if this container owns elements. Auxiliary data are copied if appropriate.

◆ at() [1/2]

CaloTower * CaloTowerContainer::at ( size_type  n)
inline

Definition at line 665 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

666 {
667  return Base::at(n);
668 }

◆ at() [2/2]

const CaloTower * DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::at ( size_type  n) const
inherited

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

Will raise std::out_of_range if the index is out-of-bounds. Note that we return a const T* rather than a reference.

◆ auxbase()

const SG::AuxVectorBase& DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::auxbase ( ) const
inherited

Convert to AuxVectorBase.

Needed to get AuxVectorBase from a ConstDataVector. Present in DataVector as well for consistency. We only really need it in the base class; however, root6 fails constructing a TMethodCall for this if there is virtual derivation. A workaround is to redeclare this in the derived classes too.

◆ back()

CaloTower * CaloTowerContainer::back ( )
inline

Definition at line 675 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

676 {
677  return Base::back();
678 }

◆ baseOffset()

static int DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::baseOffset ( const std::type_info &  ti)
staticinherited

Return the offset of a base DataVector class.

Parameters
tistd::type_info of the desired class.

If ti represents a DataVector base class of this one, then return the offset of that base class. Otherwise, return -1.

This function is here due to limitations of root 6, which can't calculate these offsets correctly from the dictionary if virtual derivation is used.

◆ baseOffset1()

static int DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::baseOffset1 ( const char *  p,
const DataVector< CaloTower > &  dv,
const std::type_info &  ti 
)
staticinherited

Helper for baseOffset.

Parameters
pPointer to the start of the top-level object.
dvReference to the DataVector object.
tistd::type_info of the desired class.

If ti represents a DataVector base class of this one, then return the offset of that base class. Otherwise, return -1.

◆ begin()

CaloTowerContainer::iterator CaloTowerContainer::begin ( )
inline

Definition at line 680 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

681 {
682  return iterator (Base::begin());
683 }

◆ capacity()

size_type DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::capacity ( ) const
noexceptinherited

Returns the total number of elements that the collection can hold before needing to allocate more memory.

◆ cbegin()

const_iterator DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::cbegin ( ) const
noexceptinherited

Return a const_iterator pointing at the beginning of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ cend()

const_iterator DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::cend ( ) const
noexceptinherited

Return a const_iterator pointing past the end of the collection.

Returns
A const_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ clear() [1/4]

void CaloTowerContainer::clear ( )
private

◆ clear() [2/4]

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::clear ( SG::OwnershipPolicy  ownPolicy,
SG::IndexTrackingPolicy  trackIndices 
)
inherited

◆ clear() [3/4]

void CaloTowerContainer::clear ( SG::OwnershipPolicy  p)

Definition at line 296 of file CaloTowerContainer.cxx.

297 {
298  if (m_towerSeg.neta() > 0 || m_towerSeg.nphi() > 0)
299  throw std::runtime_error ("Bad call to CaloTowerContainer::clear");
300  Base::clear (p);
301 }

◆ clear() [4/4]

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::clear ( std::unique_ptr< Deleter deleter)
inherited

Erase all the elements in the collection, and change how elements are to be deleted.

Parameters
deleterObject to be used to delete object. Passing nullptr will change back to the default.

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this. After the current elements are deleted, the Deleter object is changed.

◆ clearMostDerived()

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::clearMostDerived ( )
protectedinherited

Clear m_isMostDerived for this instance and for all bases.

Called from the constructor after setting m_isMostDerived.

◆ crbegin()

const_reverse_iterator DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::crbegin ( ) const
noexceptinherited

Return a const_reverse_iterator pointing past the end of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ crend()

const_reverse_iterator DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::crend ( ) const
noexceptinherited

Return a const_reverse_iterator pointing at the beginning of the collection.

Returns
A const_reverse_iterator.

Note that dereferencing the iterator will yield a const T* rather than a reference.

◆ deta()

double CaloTowerContainer::deta ( ) const
inline

Return bin size \( \Delta \eta \).

Definition at line 570 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

571 {
572  return m_towerSeg.deta();
573 }

◆ do_cast()

static const CaloTower * DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::do_cast ( const typename PtrVector::value_type  p)
staticinherited

Helper to shorten calls to DataModel_detail::DVLCast.

Parameters
pThe value to convert.
Returns
The value as a const T*.

The conversion will be done with static_cast if possible, with dynamic_cast otherwise.

◆ do_cast_nc()

static CaloTower * DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::do_cast_nc ( typename PtrVector::value_type  p)
staticinherited

Helper to shorten calls to DataModel_detail::DVLCast.

Parameters
pThe value to convert.
Returns
The value as a T*.

The conversion will be done with static_cast if possible, with dynamic_cast otherwise.

◆ dphi()

double CaloTowerContainer::dphi ( ) const
inline

Return bin size \( \Delta \varphi \).

Definition at line 583 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

584 {
585  return m_towerSeg.dphi();
586 }

◆ dv_typeid()

virtual const std::type_info& DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::dv_typeid ( ) const
privatevirtualinherited

Find the most-derived DataVector class in the hierarchy.

Returns
The type_info for the class for which this method gets run.

This is used to generate a nice error message when the most-derived check for insertions fails. Every DataVector defines this virtual method, so when it's called, the one corresponding to the most-derived DataVector gets run.

◆ dvlinfo()

static const DataModel_detail::DVLInfoBase& DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::dvlinfo ( )
staticinherited

Return the DV/DL info struct for this class.

This can be used to make sure that it's instantiated.

◆ dvlinfo_v()

virtual const DataModel_detail::DVLInfoBase& DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::dvlinfo_v ( ) const
virtualinherited

Return the DV/DL info struct for this class.

This can be used to make sure that it's instantiated.

◆ e() [1/3]

double CaloTowerContainer::e ( double  theEta,
double  thePhi 
) const
inline

Return the tower energy at a given grid position.

Parameters
theEtainput \( \eta \) value
thePhiinput \( \varphi \) value

Returns 0 if input out of range.

Definition at line 205 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

206  { return this->energy(theEta,thePhi); }

◆ e() [2/3]

double CaloTowerContainer::e ( index_t  etaIndex,
index_t  phiIndex 
) const
inline

Return the tower energy at a given grid position.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
etaIndexinput \( \eta \) index
phiIndexinput \( \varphi \) index

Definition at line 214 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

215  { return this->energy(etaIndex,phiIndex); }

◆ e() [3/3]

double CaloTowerContainer::e ( int  etaIndex,
int  phiIndex 
) const
inline

Return the tower energy at a given grid position.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 220 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

221  { return this->energy(etaIndex,phiIndex); }

◆ emplace()

iterator DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::emplace ( iterator  position,
value_type  pElem 
)
inherited

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

For DataVector, this is just the same as insert. It's included just for interface compatibility with std::vector.

◆ emplace_back()

value_type DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::emplace_back ( value_type  pElem)
inherited

Add an element to the end of the collection.

Parameters
pElemThe element to add to the collection.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

For DataVector, this is like the same as push_back, and it returns the pushed element. It's included just for interface compatibility with std::vector.

◆ empty()

bool DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::empty ( ) const
noexceptinherited

Returns true if the collection is empty.

◆ end()

CaloTowerContainer::iterator CaloTowerContainer::end ( )
inline

Definition at line 685 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

686 {
687  return iterator (Base::end());
688 }

◆ energy() [1/3]

double CaloTowerContainer::energy ( double  theEta,
double  thePhi 
) const

Return the tower energy at a given grid position.

Parameters
theEtainput \( \eta \) value
thePhiinput \( \varphi \) value

Returns 0 if input out of range.

Definition at line 208 of file CaloTowerContainer.cxx.

209 {
210  const CaloTower* t = this->getTower(theEta, thePhi);
211  return t ? t->e() : 0;
212 }

◆ energy() [2/3]

double CaloTowerContainer::energy ( index_t  etaIndex,
index_t  phiIndex 
) const

Return the tower energy at a given grid position.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
etaIndexinput \( \eta \) index
phiIndexinput \( \varphi \) index

Definition at line 202 of file CaloTowerContainer.cxx.

203 {
204  const CaloTower* t = this->getTower(etaIndex,phiIndex);
205  return t ? t->e() : 0;
206 }

◆ energy() [3/3]

double CaloTowerContainer::energy ( int  etaIndex,
int  phiIndex 
) const
inline

Return the tower energy at a given grid position.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 243 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

244  { return energy((index_t)etaIndex,(index_t)phiIndex); }

◆ erase() [1/4]

iterator CaloTowerContainer::erase ( iterator  first,
iterator  last 
)
private

◆ erase() [2/4]

iterator DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::erase ( iterator  first,
iterator  last 
)
inherited

Remove a range of elements.

Parameters
firstIterator pointing to the first element to be removed.
lastIterator pointing one past the last element to be removed.
Returns
An iterator pointing to the element pointed to by last prior to erasing (or end()).

If the container owns its elements, then the removed elements will be deleted. Any duplicates will be removed in this process, but don't rely on this.

◆ erase() [3/4]

iterator CaloTowerContainer::erase ( iterator  position)
private

◆ erase() [4/4]

iterator DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::erase ( iterator  position)
inherited

Remove element at a given position.

Parameters
positionIterator pointing to the element to be removed.
Returns
An iterator pointing to the next element (or end()).

If the container owns its elements, then the pointed-to element will be deleted.

◆ et() [1/3]

double CaloTowerContainer::et ( double  theEta,
double  thePhi 
) const

Return the tower transverse energy at a given grid position.

Parameters
theEtainput \( \eta \) value
thePhiinput \( \varphi \) value

Returns 0 if input out of range.

Definition at line 223 of file CaloTowerContainer.cxx.

224 {
225  const CaloTower* t = this->getTower(theEta, thePhi);
226  return t ? t->et() : 0;
227 }

◆ et() [2/3]

double CaloTowerContainer::et ( index_t  etaIndex,
index_t  phiIndex 
) const

Return the tower transverse energy at a given grid position.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
etaIndexinput \( \eta \) index
phiIndexinput \( \varphi \) index

Definition at line 215 of file CaloTowerContainer.cxx.

216 {
217  const CaloTower* t = this->getTower(etaIndex, phiIndex);
218  return t ? t->et() : 0;
219 }

◆ et() [3/3]

double CaloTowerContainer::et ( int  etaIndex,
int  phiIndex 
) const
inline

Return the tower transverse energy at a given grid position.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 195 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

196  { return et((index_t)etaIndex,(index_t)phiIndex); } // temp fix!

◆ etamin()

double CaloTowerContainer::etamin ( ) const
inline

Return lower \( \eta \) value range boundary.

Definition at line 566 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

567 {
568  return m_towerSeg.etamin();
569 }

◆ flagOutOfRange()

CaloTowerContainer::index_t CaloTowerContainer::flagOutOfRange ( ) const
inline

Returns the index out-of-range indicator.

Definition at line 651 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

652 {
653  return m_outOfRange;
654 }

◆ front()

CaloTower * CaloTowerContainer::front ( )
inline

Definition at line 670 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

671 {
672  return Base::front();
673 }

◆ get()

const CaloTower * DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::get ( size_type  n) const
inherited

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

This is a synonym for operator[] const, to be used when calling from root (where we can't readily call just the const version of a method).

◆ getCalos()

size_t CaloTowerContainer::getCalos ( std::vector< CaloCell_ID::SUBCALO > &  theCalos) const

Retrieve the list of used calorimeters.

Parameters
theCalosreference to a modifiable vector of calorimeter indices

Fills a vector with the list of included calorimeters and returns the number of included calorimeters.

Definition at line 180 of file CaloTowerContainer.cxx.

181 {
182  theCalos.resize(m_caloRegions.size());
183  std::vector<unsigned int>::size_type i;
184  for(i=0;i<m_caloRegions.size();++i)
185  theCalos[i] = (CaloCell_ID::SUBCALO) m_caloRegions[i];
186 
187 // std::copy(m_caloRegions.begin(),m_caloRegions.end(),theCalos.begin());
188  return theCalos.size();
189 }

◆ getNumberOfCalos()

size_t CaloTowerContainer::getNumberOfCalos ( ) const
inline

Returns the number of included calorimeters.

Definition at line 560 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

561 {
562  return m_caloRegions.size();
563 }

◆ getTower() [1/8]

CaloTower * CaloTowerContainer::getTower ( double  eta,
double  phi 
)

Returns a pointer to a tower with given \( ( \eta, \varphi ) \) values.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
etainput \( \eta \) value
phiinput \( \varphi \) value

Definition at line 286 of file CaloTowerContainer.cxx.

287 {
288  index_t etaIndex = m_outOfRange;
290  return this->getTowerIndices(theEta,thePhi,etaIndex,phiIndex)
291  ? (this->operator[])(this->getTowerIndex(etaIndex,phiIndex))
292  : (CaloTower*)nullptr;
293 }

◆ getTower() [2/8]

const CaloTower * CaloTowerContainer::getTower ( double  eta,
double  phi 
) const

Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) values.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 277 of file CaloTowerContainer.cxx.

279 {
280  index_t etaIndex = m_outOfRange;
282  return this->getTowerIndices(theEta,thePhi,etaIndex,phiIndex)
283  ? (this->operator[])(this->getTowerIndex(etaIndex,phiIndex))
284  : (const CaloTower*)nullptr;
285 }

◆ getTower() [3/8]

CaloTower * CaloTowerContainer::getTower ( index_t  eta,
index_t  phi 
)

Returns a pointer to a tower with given \( ( \eta, \varphi ) \) indices.

Parameters
etainput \( \eta \) index
phiinput \( \varphi \) index

Returns 0 if indices out of range.

Definition at line 266 of file CaloTowerContainer.cxx.

267 {
268  index_t theIndex = this->getTowerIndex(etaIndex,phiIndex);
269  return theIndex != m_outOfRange
270 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
271  ? Base::operator[](theIndex)
272 #else
273  ? &m_towers[theIndex]
274 #endif
275  : (CaloTower*)nullptr;
276 }

◆ getTower() [4/8]

const CaloTower * CaloTowerContainer::getTower ( index_t  eta,
index_t  phi 
) const

Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) indices.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 253 of file CaloTowerContainer.cxx.

256 {
257  index_t theIndex = this->getTowerIndex(etaIndex,phiIndex);
258  return theIndex != m_outOfRange
259 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
260  ? Base::operator[](theIndex)
261 #else
262  ? &m_towers[theIndex]
263 #endif
264  : (const CaloTower*)nullptr;
265 }

◆ getTower() [5/8]

CaloTower* CaloTowerContainer::getTower ( index_t  theIndex)
inline

Returns a pointer to a tower with a given combined index.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
theIndexinput combined index

Definition at line 403 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

404  {
405  return theIndex < this->size()
406  ? (this->operator[])(theIndex)
407  : (CaloTower*)0;
408  }

◆ getTower() [6/8]

const CaloTower* CaloTowerContainer::getTower ( index_t  theIndex) const
inline

Returns a const pointer to a tower with a given combined index.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 413 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

414  {
415  return theIndex < this->size()
416  ? (this->operator[])(theIndex)
417  : (const CaloTower*)0;
418  }

◆ getTower() [7/8]

CaloTower* CaloTowerContainer::getTower ( int  eta,
int  phi 
)
inline

Returns a pointer to a tower with given \( ( \eta, \varphi ) \) indices.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 372 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

373  { return this->getTower(index_t(eta), index_t(phi)); }

◆ getTower() [8/8]

const CaloTower* CaloTowerContainer::getTower ( int  eta,
int  phi 
) const
inline

Returns a const pointer to a tower with given \( ( \eta, \varphi ) \) indices.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 379 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

380  { return this->getTower(index_t(eta), index_t(phi)); }

◆ getTowerEtaIndex() [1/3]

CaloTowerContainer::index_t CaloTowerContainer::getTowerEtaIndex ( const CaloTower aTower) const
inline

Returns the \( \eta \) index for a given tower.

Parameters
aTowerpointer to a CaloTower object

Returns index_t(-1) if input invalid.

Definition at line 616 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

617 {
618  return aTower != 0
619  ? this->getTowerEtaIndex(aTower->eta())
620  : m_outOfRange;
621 }

◆ getTowerEtaIndex() [2/3]

CaloTowerContainer::index_t CaloTowerContainer::getTowerEtaIndex ( double  theEta) const
inline

Returns the \( \eta \) index for a given \( \eta \) value.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
theEtainput \( \eta \) value

Definition at line 623 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

624 {
625  return m_towerSeg.etaIndex(theEta);
626 }

◆ getTowerEtaIndex() [3/3]

CaloTowerContainer::index_t CaloTowerContainer::getTowerEtaIndex ( index_t  towerIndex) const
inline

Returns the \( \eta \) index for a given combined index.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
towerIndexinput combined index

Definition at line 628 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

629 {
630  return m_towerSeg.etaIndex(combinedIndex);
631 }

◆ getTowerIndex() [1/3]

CaloTowerContainer::index_t CaloTowerContainer::getTowerIndex ( const CaloTower aTower) const
inline

Returns the combined index of a tower on the grid.

Parameters
aTowerpointer to a CaloTower object

Returns index_t(-1) if input invalid.

Definition at line 598 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

599 {
600  return aTower != 0
601  ? this->getTowerIndex(aTower->eta(),aTower->phi())
602  : m_outOfRange;
603 }

◆ getTowerIndex() [2/3]

CaloTowerContainer::index_t CaloTowerContainer::getTowerIndex ( double  theEta,
double  thePhi 
) const
inline

Returns the combined index for given \( \eta \) and \( \varphi \) values.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
theEtainput \( \eta \) value
thePhiinput \( \varphi \) value

Definition at line 610 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

611 {
612  return this->getTowerIndex(this->getTowerEtaIndex(theEta),
613  this->getTowerPhiIndex(thePhi));
614 }

◆ getTowerIndex() [3/3]

CaloTowerContainer::index_t CaloTowerContainer::getTowerIndex ( index_t  etaIndex,
index_t  phiIndex 
) const
inline

Returns the combined index for given \( \eta \) and \( \varphi \) indices.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
etaIndexinput \( \eta \) index
phiIndexinput \( \varphi \) index

Definition at line 605 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

606 {
607  return m_towerSeg.etaphi(etaIndex,phiIndex);
608 }

◆ getTowerIndices() [1/2]

bool CaloTowerContainer::getTowerIndices ( const CaloTower aTower,
index_t indexEta,
index_t indexPhi 
) const

Returns both \( \eta \) and \( \varphi \) indices for a given tower.

Parameters
aTowerinput pointer to a CaloTower
indexEtareference to a modifiable \( \eta \) index (set on return)
indexPhireference to a modifiable \( \varphi \) index (set on return)

Returns true if tower allocated with valid indices.

Definition at line 235 of file CaloTowerContainer.cxx.

238 {
239  return aTower != nullptr
240  ? this->getTowerIndices(aTower->eta(),aTower->phi(),etaIndex,phiIndex)
241  : false;
242 }

◆ getTowerIndices() [2/2]

bool CaloTowerContainer::getTowerIndices ( double  theEta,
double  thePhi,
index_t indexEta,
index_t indexPhi 
) const

Returns both \( \eta \) and \( \varphi \) indices for given \( \eta \) and \( \varphi \) values.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
theEtainput \( \eta \) index
thePhiinput \( \varphi \) index
indexEtareference to a modifiable \( \eta \) index (set on return)
indexPhireference to a modifiable \( \varphi \) index (set on return)

Returns true if tower allocated with valid indices.

Definition at line 243 of file CaloTowerContainer.cxx.

246 {
247  etaIndex = this->getTowerEtaIndex(theEta);
248  phiIndex = this->getTowerPhiIndex(thePhi);
249  return ( etaIndex != m_outOfRange && phiIndex != m_outOfRange );
250 }

◆ getTowerPhiIndex() [1/3]

CaloTowerContainer::index_t CaloTowerContainer::getTowerPhiIndex ( const CaloTower aTower) const
inline

Returns the \( \varphi \) index for a given tower.

Parameters
aTowerpointer to a CaloTower object

Returns index_t(-1) if input invalid.

Definition at line 633 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

634 {
635  return aTower != 0
636  ? this->getTowerPhiIndex(aTower->phi())
637  : m_outOfRange;
638 }

◆ getTowerPhiIndex() [2/3]

CaloTowerContainer::index_t CaloTowerContainer::getTowerPhiIndex ( double  thePhi) const
inline

Returns the \( \varphi \) index for a given \( \varphi \) value.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
thePhiinput \( \varphi \) value

Definition at line 640 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

641 {
642  return m_towerSeg.phiIndex(thePhi);
643 }

◆ getTowerPhiIndex() [3/3]

CaloTowerContainer::index_t CaloTowerContainer::getTowerPhiIndex ( index_t  towerIndex) const
inline

Returns the \( \varphi \) index for a given combined index.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
towerIndexinput combined index

Definition at line 645 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

646 {
647  return m_towerSeg.phiIndex(combinedIndex);
648 }

◆ init()

void CaloTowerContainer::init ( )

Initializes the CaloTowerContainer.

A CaloTower object with zero energy is put at each \( ( \eta, \varphi ) \) position of the tower grid.

Definition at line 107 of file CaloTowerContainer.cxx.

108 {
109  // pre-size the container
112  index_t phiBins = (index_t)m_towerSeg.nphi();
113 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
114  Base::resize (etaBins * phiBins);
115 #else
116  this->m_towers.resize (etaBins * phiBins);
117  setTowers();
118 #endif
119 
120 
121  // get the eta/phi segmentation
122  double deltaEta = m_towerSeg.deta();
123  double minEta = m_towerSeg.etamin() + deltaEta / 2.;
124  double deltaPhi = m_towerSeg.dphi();
125  double minPhi = CaloPhiRange::fix (m_towerSeg.phimin() + deltaPhi / 2.);
126 
127 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
128  DataPool<CaloTower> towersPool (etaBins * phiBins);
129 #endif
130 
131  // insert empty towers
132  // NOTE: eta/phi indexing is 1-based.
133  for (index_t etaIndex = 1; etaIndex <= etaBins; ++etaIndex) {
134  double theEta = minEta + (etaIndex-1) * deltaEta;
135  for (index_t phiIndex = 1; phiIndex <= phiBins; ++phiIndex) {
136  double thePhi = CaloPhiRange::fix (minPhi + (phiIndex-1) * deltaPhi);
137  index_t towerIndex = this->getTowerIndex(etaIndex,phiIndex);
138 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
139  CaloTower& tower = *towersPool.nextElementPtr();
140  Base::operator[] (towerIndex) = &tower;
141  tower.removeCells();
142  tower.setE(0);
143 #else
144  CaloTower& tower = m_towers[towerIndex];
145 #endif
146  tower.setEta (theEta);
147  tower.setPhi (thePhi);
148  }
149  }
150 }

◆ insert() [1/7]

template<class InputIterator >
void CaloTowerContainer::insert ( iterator  position,
InputIterator  first,
InputIterator  last 
)
private

◆ insert() [2/7]

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::insert ( iterator  position,
InputIterator  first,
InputIterator  last 
)
inherited

Add a group of new elements to the collection.

Parameters
positionIterator before which the element will be added.
firstThe start of the range to put in the container.
lastThe end of the range to put in the container.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

This overload is for the case where the iterator value type is convertible to T*.

◆ insert() [3/7]

void CaloTowerContainer::insert ( iterator  position,
iterator  first,
iterator  last 
)

Definition at line 303 of file CaloTowerContainer.cxx.

306 {
307  if (m_towerSeg.neta() > 0 || m_towerSeg.nphi() > 0 ||
309  {
310  throw std::runtime_error ("Bad call to CaloTowerContainer::insert");
311  }
312  Base::insert (position.base(), first.base(), last.base());
313 }

◆ insert() [4/7]

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::insert ( iterator  position,
std::initializer_list< value_type l 
)
inherited

Add a group of new elements to the collection.

Parameters
positionIterator before which the element will be added.
lAn initializer list.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insert() [5/7]

iterator DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::insert ( iterator  position,
std::unique_ptr< base_value_type pElem 
)
inherited

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container must be an owning container.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insert() [6/7]

iterator CaloTowerContainer::insert ( iterator  position,
value_type  pElem 
)
private

◆ insert() [7/7]

iterator DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::insert ( iterator  position,
value_type  pElem 
)
inherited

Add a new element to the collection.

Parameters
positionIterator before which the element will be added.
pElemThe element to add to the collection.
Returns
An iterator that points to the inserted data.

The container's ownership policy will determine if it takes ownership of the new element.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ insertMove()

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::insertMove ( iterator  position,
DataVector< CaloTower > &  other 
)
inherited

Insert the contents of another DataVector, with auxiliary data copied via move semantics.

Parameters
positionIterator before which the new elements will be added.
otherThe vector to add.

The ownership mode of this vector must be the same as other; otherwise, an exception will be thrown.

If both vectors are view vectors, then this is the same as insert (position, other.begin(), other.end()) .

Otherwise, the elements from other will be inserted into this vector. This vector will take ownership of the elements, and the ownership mode of other will be changed to VIEW_ELEMENTS. Auxiliary data for these elements will be transferred, using move semantics if possible. (Thus, the auxiliary store for other may be modified and must not be locked.) Finally, the auxiliary store pointer for other will be cleared (but the store itself will not be deleted since it's not owned by the vector).

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ isOutOfRange()

bool CaloTowerContainer::isOutOfRange ( index_t  anIndex) const
inline

Checks if an index is out of range.

Parameters
anIndexinput combined tower index

Returns true if index is out of range.

Definition at line 655 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

656 {
657  return anIndex >= this->size() || anIndex == m_outOfRange;
658 }

◆ iter_swap()

static void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::iter_swap ( iterator  a,
iterator  b 
)
staticinherited

Swap the referents of two DataVector iterators.

Parameters
aThe first iterator for the swap.
bThe second iterator for the swap.

◆ max_size()

size_type DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::max_size ( ) const
noexceptinherited

Returns the size() of the largest possible collection.

◆ neta()

size_t CaloTowerContainer::neta ( ) const
inline

Return number of \( \eta \) bins.

Definition at line 574 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

575 {
576  return m_towerSeg.neta();
577 }

◆ nphi()

size_t CaloTowerContainer::nphi ( ) const
inline

Return number of \( \varphi \) bins.

Definition at line 587 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

588 {
589  return m_towerSeg.nphi();
590 }

◆ operator=()

CaloTowerContainer & CaloTowerContainer::operator= ( const CaloTowerContainer other)

Assignment.

Definition at line 80 of file CaloTowerContainer.cxx.

81 {
82  if (this != &other) {
83  m_towerSeg = other.m_towerSeg;
84  m_caloRegions = other.m_caloRegions;
85 #ifdef CALOTOWERCONTAINER_USES_DATAPOOL
87 #else
88  m_towers = other.m_towers;
89  setTowers();
90 #endif
91  }
92  return *this;
93 }

◆ operator[]() [1/2]

CaloTower * CaloTowerContainer::operator[] ( size_type  n)
inline

Definition at line 660 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

661 {
662  return Base::operator[](n);
663 }

◆ operator[]() [2/2]

const CaloTower * DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::operator[] ( size_type  n) const
inherited

Access an element, as an rvalue.

Parameters
nArray index to access.
Returns
The element at n.

No bounds checking is done. Note that we return a const T* rather than a reference.

◆ ownPolicy()

SG::OwnershipPolicy DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::ownPolicy ( ) const
inherited

Return the ownership policy setting for this container.

◆ phimin()

double CaloTowerContainer::phimin ( ) const
inline

Return lower \( \varphi \) value range boundary.

Definition at line 578 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

579 {
580  return m_towerSeg.phimin();
581 }

◆ pop_back()

void CaloTowerContainer::pop_back ( )
private

◆ push_back() [1/2]

value_type DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::push_back ( std::unique_ptr< base_value_type pElem)
inherited

Add an element to the end of the collection.

Parameters
pElemThe element to add to the collection.

The container must be an owning container.

Note: this method may only be called using the most derived DataVector in the hierarchy.

Returns the pushed pointer.

◆ push_back() [2/2]

void CaloTowerContainer::push_back ( value_type  pElem)

Definition at line 315 of file CaloTowerContainer.cxx.

316 {
317  if (m_towerSeg.neta() > 0 || m_towerSeg.nphi() > 0 ||
319  {
320  throw std::runtime_error ("Bad call to CaloTowerContainer::push_back");
321  }
322  Base::push_back (pElem);
323 }

◆ rbegin()

CaloTowerContainer::reverse_iterator CaloTowerContainer::rbegin ( )
inline

Definition at line 690 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

691 {
692  return reverse_iterator (end());
693 }

◆ rend()

CaloTowerContainer::reverse_iterator CaloTowerContainer::rend ( )
inline

Definition at line 695 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

696 {
697  return reverse_iterator (begin());
698 }

◆ reserve()

void CaloTowerContainer::reserve ( size_type  n)
private

◆ resize()

void CaloTowerContainer::resize ( size_type  sz)
private

◆ resortAux()

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::resortAux ( iterator  beg,
iterator  end 
)
inherited

Reset indices / reorder aux data after elements have been permuted.

Parameters
begStart of the range of elements to process.
endEnd of the range of elements to process.

Call this after some operation that has permuted the elements in the container (such as sort). The index information in the elements will be used to permute all auxiliary data in the same way. Finally, all the indices will be reset in the correct order.

◆ setCalo()

void CaloTowerContainer::setCalo ( const CaloCell_ID::SUBCALO nCalo)

Adds a calorimeter index to the tower.

Parameters
nCaloinput calorimeter index

Updates the list of calorimeters included in the towers. This list is needed to restore the CaloTowerContainer from persistency.

Definition at line 169 of file CaloTowerContainer.cxx.

170 {
171  unsigned int intCalo = theCalo ;
172  if ( std::find(m_caloRegions.begin(),m_caloRegions.end(),intCalo)
173  == m_caloRegions.end() )
174  {
175  m_caloRegions.push_back(intCalo);
176  }
177 }

◆ setMostDerived()

virtual void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::setMostDerived ( )
protectedvirtualinherited

Set m_isMostDerived for this instance and clear it for all bases.

Called from testInsert if the test fails. The flag may not have been set if this container was made via copy construction, so set it appropriately now so we can test again.

◆ shift()

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::shift ( size_t  pos,
ptrdiff_t  offs 
)
privateinherited

Shift the auxiliary elements of the container.

Parameters
posThe starting index for the shift.
offsThe (signed) amount of the shift.

The elements in the container should have already been shifted; this operation will then adjust the element indices and also shift the elements in the vectors for all aux data items. offs may be either positive or negative.

If offs is positive, then the container is growing. The container size should be increased by offs, the element at pos moved to pos + offs, and similarly for following elements. The elements between pos and pos + offs should be default-initialized.

If offs is negative, then the container is shrinking. The element at pos should be moved to pos + offs, and similarly for following elements. The container should then be shrunk by -offs elements (running destructors as appropriate).

◆ shrink_to_fit()

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::shrink_to_fit ( )
inherited

◆ size()

size_type DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::size ( ) const
noexceptinherited

Returns the number of elements in the collection.

Could in principle be inherited from the base class, but redeclared in the derived class to avoid root6 bugs.

◆ sort() [1/2]

void CaloTowerContainer::sort ( )
private

◆ sort() [2/2]

template<class COMPARE >
void CaloTowerContainer::sort ( COMPARE  comp)
private

◆ stdcont()

const PtrVector & DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::stdcont ( ) const
inherited

Return the underlying std::vector of the container.

Returns
Reference to the std::vector actually holding the collection.

Note that DataVector<T>::stdcont does not necessarily return a std::vector<T*> if DataVector inheritance is being used.

◆ swap() [1/2]

void CaloTowerContainer::swap ( CaloTowerContainer other)

Swap.

Definition at line 95 of file CaloTowerContainer.cxx.

96 {
97  if (this != &other) {
98  Base::swap (other);
99  std::swap (m_towerSeg, other.m_towerSeg);
100  m_caloRegions.swap (other.m_caloRegions);
101 #ifndef CALOTOWERCONTAINER_USES_DATAPOOL
102  m_towers.swap (other.m_towers);
103 #endif
104  }
105 }

◆ swap() [2/2]

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::swap ( DataVector< CaloTower > &  rhs)
inherited

Swap this collection with another.

Parameters
rhsThe collection with which to swap.

Ownership is swapped along with the collection content.

Note: this method may only be called using the most-derived DataVector in the hierarchy. The rhs must also be referenced using the most-derived DataVector.

◆ swapElement() [1/4]

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::swapElement ( iterator  pos,
std::unique_ptr< base_value_type newElem,
std::unique_ptr< base_value_type > &  oldElem 
)
inherited

Swap one element out of the container.

Parameters
posThe element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element pos of the collection (no bounds checking). Then element index is set to newElem.

The collection must own its elements to use its interface. The collection will take ownership of newElem and will return ownership of oldElem.

Note: this method may only be called using the most derived DataList in the hierarchy.

◆ swapElement() [2/4]

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::swapElement ( iterator  pos,
value_type  newElem,
reference  oldElem 
)
inherited

Swap one element out of the container.

Parameters
posThe element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element pos of the collection (no bounds checking). Then element index is set to newElem. If the collection owns its elements, then it will take ownership of newElem and release (without deleting) the element returned through oldElem.

Note: this method may only be called using the most derived DataList in the hierarchy.

◆ swapElement() [3/4]

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::swapElement ( size_type  index,
std::unique_ptr< base_value_type newElem,
std::unique_ptr< base_value_type > &  oldElem 
)
inherited

Swap one element out of the container.

Parameters
indexIndex of the element in the container to swap.
newElemNew element to put in the container. May be 0.
oldElemReference to receive the element removed from the container.

Reference oldElem is initialized with element index of the collection (no bounds checking). Then element index is set to newElem.

The collection must own its elements to use its interface. The collection will take ownership of newElem and will return ownership of oldElem.

Note: this method may only be called using the most derived DataVector in the hierarchy.

◆ swapElement() [4/4]

void CaloTowerContainer::swapElement ( size_type  index,
value_type  newElem,
reference  oldElem 
)
private

◆ testInsert()

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::testInsert ( const char *  op)
inherited

Test if we can insert; raise an exception if not.

Parameters
opDescription of the attempted operation.

In order to maintain type-safety, we can only allow insertions using the most-derived instance of DataVector. This checks this by testing the m_isMostDerived, which is set by the constructors to true only for the most-derived instance. If the test fails, we call to potentially out-of-line code to continue.

◆ testInsertOol()

void DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::testInsertOol ( const char *  op)
inherited

Test if we can insert; raise an exception if not.

Parameters
opDescription of the attempted operation.

This continues the test of testInsert. There is one case where m_isMostDerived may not be set correctly. If this container was made via copy construction, then all the m_isMostDerived flags will be false. So we call setMostDerived to set the flags correctly and test again. If the test fails again, then we raise an exception.

◆ towerseg()

const CaloTowerSeg & CaloTowerContainer::towerseg ( ) const
inline

Return a copy of the attached CaloTowerSeg.

Definition at line 591 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

592 {
593  return m_towerSeg;
594 }

Friends And Related Function Documentation

◆ CaloTowerContainerCnv_p1

friend class CaloTowerContainerCnv_p1
friend

Member Data Documentation

◆ has_virtual

const bool DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::has_virtual
staticinherited

This is true for any DataVector class if we need to use virtual derivation to get to the base DataVector class.

Definition at line 801 of file DataVector.h.

◆ m_caloRegions

std::vector<unsigned int> CaloTowerContainer::m_caloRegions
private

Vector of calorimeter regions contributing to the tower signals.

Definition at line 520 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

◆ m_isMostDerived

SG::IsMostDerivedFlag DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::m_isMostDerived
privateinherited

This flag is true if this DV instance is the most-derived one.

We set this to true in the top-level constructor; the constructor then calls clearMostDerived on the base classes.

Definition at line 2038 of file DataVector.h.

◆ m_outOfRange

const index_t CaloTowerContainer::m_outOfRange = static_cast<index_t>(-1)
staticprivate

Index overflow indicator.

Definition at line 530 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

◆ m_towerSeg

CaloTowerSeg CaloTowerContainer::m_towerSeg
private

Tower grid \( ( \Delta \eta \times \Delta \varphi ) \) descriptor.

Definition at line 517 of file Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h.

◆ must_own

constexpr bool DataVector< CaloTower , typename DataVectorBase<CaloTower >::Base >::must_own
staticconstexprinherited

If true, then this type must own its contents.

Definition at line 859 of file DataVector.h.


The documentation for this class was generated from the following files:
CaloTowerContainer::et
double et(double theEta, double thePhi) const
Return the tower transverse energy at a given grid position.
Definition: CaloTowerContainer.cxx:223
CaloTowerContainer::getTower
CaloTower * getTower(index_t eta, index_t phi)
Returns a pointer to a tower with given indices.
Definition: CaloTowerContainer.cxx:266
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
P4EEtaPhiM::setEta
virtual void setEta(double theEta)
set eta data member
Definition: P4EEtaPhiM.h:117
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
DataVector< CaloTower >::iterator
DataModel_detail::iterator< DataVector > iterator
Standard iterator.
Definition: DataVector.h:841
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
CaloTowerContainer::end
iterator end()
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:685
ConvertOldUJHistosToNewHistos.etaBins
list etaBins
Definition: ConvertOldUJHistosToNewHistos.py:145
CaloEnergyCluster::removeCells
void removeCells()
Remove all cells without kinematic update.
Definition: CaloEnergyCluster.cxx:189
CaloTowerContainer::Base
DataVector< CaloTower > Base
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:79
CaloTowerSeg::neta
index_t neta() const
Retrieve number of bins.
Definition: CaloTowerSeg.h:423
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
CaloTowerSeg::deta
double deta() const
Retrieve bin size .
Definition: CaloTowerSeg.h:433
DataVector< CaloTower >::operator=
DataVector & operator=(const DataVector &rhs)
Assignment operator.
CaloTowerContainer::init
void init()
Initializes the CaloTowerContainer.
Definition: CaloTowerContainer.cxx:107
CaloTowerContainer::m_caloRegions
std::vector< unsigned int > m_caloRegions
Vector of calorimeter regions contributing to the tower signals.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:520
CaloTowerContainer::getTowerIndex
index_t getTowerIndex(const CaloTower *aTower) const
Returns the combined index of a tower on the grid.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:598
CaloTowerSeg::nphi
index_t nphi() const
Retrieve number of bins.
Definition: CaloTowerSeg.h:428
CaloTowerSeg::phimin
double phimin() const
Retrieve lower boundary value range.
Definition: CaloTowerSeg.h:453
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CaloTower::phi
virtual double phi() const override final
get phi data member
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTower.h:144
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
CaloTowerSeg::dphi
double dphi() const
Retrieve bin size .
Definition: CaloTowerSeg.h:438
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
CaloCell_Base_ID::SUBCALO
SUBCALO
enumeration of sub calorimeters
Definition: CaloCell_Base_ID.h:46
CaloTowerContainer::getTowerIndices
bool getTowerIndices(const CaloTower *aTower, index_t &indexEta, index_t &indexPhi) const
Returns both and indices for a given tower.
Definition: CaloTowerContainer.cxx:235
CaloTowerContainer::getTowerEtaIndex
index_t getTowerEtaIndex(const CaloTower *aTower) const
Returns the index for a given tower.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:616
CaloTowerContainer::reverse_iterator
std::reverse_iterator< iterator > reverse_iterator
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:485
DataVector< CaloTower >::front
const CaloTower * front() const
Access the first element in the collection as an rvalue.
DataVector< CaloTower >::swap
void swap(DataVector &rhs)
Swap this collection with another.
DataVector< CaloTower >::insert
iterator insert(iterator position, value_type pElem)
Add a new element to the collection.
DataVector< CaloTower >::back
const CaloTower * back() const
Access the last element in the collection as an rvalue.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
WriteCalibToCool.swap
swap
Definition: WriteCalibToCool.py:94
CaloPhiRange::fix
static double fix(double phi)
Definition: CaloPhiRange.cxx:14
DataVector< CaloTower >::operator[]
const CaloTower * operator[](size_type n) const
Access an element, as an rvalue.
DataVector< CaloTower >::clear
void clear()
Erase all the elements in the collection.
CaloTower
Data class for calorimeter cell towers.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTower.h:55
P4EEtaPhiM::setPhi
virtual void setPhi(double thePhi)
set phi data member
Definition: P4EEtaPhiM.h:120
DataVector< CaloTower >::resize
void resize(size_type sz)
Resizes the collection to the specified number of elements.
CaloTowerSeg::phiIndex
index_t phiIndex(double phiVal) const
Returns index for a given value.
Definition: CaloTowerSeg.h:499
CaloTowerSeg::etaphi
index_t etaphi(index_t etaInd, index_t phiInd) const
Returns combined continous index from , indices.
Definition: CaloTowerSeg.h:481
DataVector< CaloTower >::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
CaloTowerSeg::etamin
double etamin() const
Retrieve lower boundary value range.
Definition: CaloTowerSeg.h:443
eflowRec::phiIndex
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition: EtaPhiLUT.cxx:23
DataVector< CaloTower >::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
CaloTowerContainer::index_t
size_t index_t
Tower map index type.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:82
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
CaloTowerContainer::m_towerSeg
CaloTowerSeg m_towerSeg
Tower grid descriptor.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:517
DeMoScan.first
bool first
Definition: DeMoScan.py:536
CaloTowerContainer::energy
double energy(double theEta, double thePhi) const
Return the tower energy at a given grid position.
Definition: CaloTowerContainer.cxx:208
DataPool
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Definition: DataPool.h:63
P4EEtaPhiM::setE
virtual void setE(double theE)
set energy data member
Definition: P4EEtaPhiM.h:114
DataVector< CaloTower >::ownPolicy
SG::OwnershipPolicy ownPolicy() const
Return the ownership policy setting for this container.
CaloTowerContainer::m_outOfRange
static const index_t m_outOfRange
Index overflow indicator.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:530
CaloTowerContainer::getTowerPhiIndex
index_t getTowerPhiIndex(const CaloTower *aTower) const
Returns the index for a given tower.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:633
DataVector< CaloTower >::at
const CaloTower * at(size_type n) const
Access an element, as an rvalue.
CaloTowerSeg::etaIndex
index_t etaIndex(double etaVal) const
Returns index for a given value.
Definition: CaloTowerSeg.h:489
DataVector< CaloTower >::size
size_type size() const noexcept
Returns the number of elements in the collection.
CaloTowerContainer::begin
iterator begin()
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTowerContainer.h:680
DataVector< CaloTower >::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
CaloTower::eta
virtual double eta() const override final
get eta data member
Definition: Calorimeter/CaloEvent/CaloEvent/CaloTower.h:141